{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DataExchange.CreateRevision
(
CreateRevision (..),
newCreateRevision,
createRevision_comment,
createRevision_tags,
createRevision_dataSetId,
CreateRevisionResponse (..),
newCreateRevisionResponse,
createRevisionResponse_arn,
createRevisionResponse_createdAt,
createRevisionResponse_sourceId,
createRevisionResponse_finalized,
createRevisionResponse_dataSetId,
createRevisionResponse_id,
createRevisionResponse_updatedAt,
createRevisionResponse_comment,
createRevisionResponse_tags,
createRevisionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DataExchange.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateRevision = CreateRevision'
{
:: Prelude.Maybe Prelude.Text,
CreateRevision -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateRevision -> Text
dataSetId :: Prelude.Text
}
deriving (CreateRevision -> CreateRevision -> Bool
(CreateRevision -> CreateRevision -> Bool)
-> (CreateRevision -> CreateRevision -> Bool) -> Eq CreateRevision
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRevision -> CreateRevision -> Bool
$c/= :: CreateRevision -> CreateRevision -> Bool
== :: CreateRevision -> CreateRevision -> Bool
$c== :: CreateRevision -> CreateRevision -> Bool
Prelude.Eq, ReadPrec [CreateRevision]
ReadPrec CreateRevision
Int -> ReadS CreateRevision
ReadS [CreateRevision]
(Int -> ReadS CreateRevision)
-> ReadS [CreateRevision]
-> ReadPrec CreateRevision
-> ReadPrec [CreateRevision]
-> Read CreateRevision
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRevision]
$creadListPrec :: ReadPrec [CreateRevision]
readPrec :: ReadPrec CreateRevision
$creadPrec :: ReadPrec CreateRevision
readList :: ReadS [CreateRevision]
$creadList :: ReadS [CreateRevision]
readsPrec :: Int -> ReadS CreateRevision
$creadsPrec :: Int -> ReadS CreateRevision
Prelude.Read, Int -> CreateRevision -> ShowS
[CreateRevision] -> ShowS
CreateRevision -> String
(Int -> CreateRevision -> ShowS)
-> (CreateRevision -> String)
-> ([CreateRevision] -> ShowS)
-> Show CreateRevision
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRevision] -> ShowS
$cshowList :: [CreateRevision] -> ShowS
show :: CreateRevision -> String
$cshow :: CreateRevision -> String
showsPrec :: Int -> CreateRevision -> ShowS
$cshowsPrec :: Int -> CreateRevision -> ShowS
Prelude.Show, (forall x. CreateRevision -> Rep CreateRevision x)
-> (forall x. Rep CreateRevision x -> CreateRevision)
-> Generic CreateRevision
forall x. Rep CreateRevision x -> CreateRevision
forall x. CreateRevision -> Rep CreateRevision x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRevision x -> CreateRevision
$cfrom :: forall x. CreateRevision -> Rep CreateRevision x
Prelude.Generic)
newCreateRevision ::
Prelude.Text ->
CreateRevision
newCreateRevision :: Text -> CreateRevision
newCreateRevision Text
pDataSetId_ =
CreateRevision' :: Maybe Text -> Maybe (HashMap Text Text) -> Text -> CreateRevision
CreateRevision'
{ $sel:comment:CreateRevision' :: Maybe Text
comment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRevision' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:dataSetId:CreateRevision' :: Text
dataSetId = Text
pDataSetId_
}
createRevision_comment :: Lens.Lens' CreateRevision (Prelude.Maybe Prelude.Text)
= (CreateRevision -> Maybe Text)
-> (CreateRevision -> Maybe Text -> CreateRevision)
-> Lens CreateRevision CreateRevision (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevision' {Maybe Text
comment :: Maybe Text
$sel:comment:CreateRevision' :: CreateRevision -> Maybe Text
comment} -> Maybe Text
comment) (\s :: CreateRevision
s@CreateRevision' {} Maybe Text
a -> CreateRevision
s {$sel:comment:CreateRevision' :: Maybe Text
comment = Maybe Text
a} :: CreateRevision)
createRevision_tags :: Lens.Lens' CreateRevision (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRevision_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRevision -> f CreateRevision
createRevision_tags = (CreateRevision -> Maybe (HashMap Text Text))
-> (CreateRevision -> Maybe (HashMap Text Text) -> CreateRevision)
-> Lens
CreateRevision
CreateRevision
(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 (\CreateRevision' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRevision' :: CreateRevision -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRevision
s@CreateRevision' {} Maybe (HashMap Text Text)
a -> CreateRevision
s {$sel:tags:CreateRevision' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRevision) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRevision -> f CreateRevision)
-> ((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)))
-> CreateRevision
-> f CreateRevision
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
createRevision_dataSetId :: Lens.Lens' CreateRevision Prelude.Text
createRevision_dataSetId :: (Text -> f Text) -> CreateRevision -> f CreateRevision
createRevision_dataSetId = (CreateRevision -> Text)
-> (CreateRevision -> Text -> CreateRevision)
-> Lens CreateRevision CreateRevision Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevision' {Text
dataSetId :: Text
$sel:dataSetId:CreateRevision' :: CreateRevision -> Text
dataSetId} -> Text
dataSetId) (\s :: CreateRevision
s@CreateRevision' {} Text
a -> CreateRevision
s {$sel:dataSetId:CreateRevision' :: Text
dataSetId = Text
a} :: CreateRevision)
instance Core.AWSRequest CreateRevision where
type
AWSResponse CreateRevision =
CreateRevisionResponse
request :: CreateRevision -> Request CreateRevision
request = Service -> CreateRevision -> Request CreateRevision
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateRevision
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRevision)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateRevision))
-> Logger
-> Service
-> Proxy CreateRevision
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRevision)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse
CreateRevisionResponse'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedAt")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SourceId")
Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Finalized")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataSetId")
Either
String
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Id")
Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe (HashMap Text Text) -> Int -> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UpdatedAt")
Either
String
(Maybe Text
-> Maybe (HashMap Text Text) -> Int -> CreateRevisionResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe (HashMap Text Text) -> Int -> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Comment")
Either
String (Maybe (HashMap Text Text) -> Int -> CreateRevisionResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateRevisionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> CreateRevisionResponse)
-> Either String Int -> Either String CreateRevisionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateRevision
instance Prelude.NFData CreateRevision
instance Core.ToHeaders CreateRevision where
toHeaders :: CreateRevision -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateRevision -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateRevision where
toJSON :: CreateRevision -> Value
toJSON CreateRevision' {Maybe Text
Maybe (HashMap Text Text)
Text
dataSetId :: Text
tags :: Maybe (HashMap Text Text)
comment :: Maybe Text
$sel:dataSetId:CreateRevision' :: CreateRevision -> Text
$sel:tags:CreateRevision' :: CreateRevision -> Maybe (HashMap Text Text)
$sel:comment:CreateRevision' :: CreateRevision -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Comment" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
comment,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
]
)
instance Core.ToPath CreateRevision where
toPath :: CreateRevision -> ByteString
toPath CreateRevision' {Maybe Text
Maybe (HashMap Text Text)
Text
dataSetId :: Text
tags :: Maybe (HashMap Text Text)
comment :: Maybe Text
$sel:dataSetId:CreateRevision' :: CreateRevision -> Text
$sel:tags:CreateRevision' :: CreateRevision -> Maybe (HashMap Text Text)
$sel:comment:CreateRevision' :: CreateRevision -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v1/data-sets/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dataSetId, ByteString
"/revisions"]
instance Core.ToQuery CreateRevision where
toQuery :: CreateRevision -> QueryString
toQuery = QueryString -> CreateRevision -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateRevisionResponse = CreateRevisionResponse'
{
CreateRevisionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateRevisionResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
CreateRevisionResponse -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
CreateRevisionResponse -> Maybe Bool
finalized :: Prelude.Maybe Prelude.Bool,
CreateRevisionResponse -> Maybe Text
dataSetId :: Prelude.Maybe Prelude.Text,
CreateRevisionResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
CreateRevisionResponse -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
:: Prelude.Maybe Prelude.Text,
CreateRevisionResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateRevisionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateRevisionResponse -> CreateRevisionResponse -> Bool
(CreateRevisionResponse -> CreateRevisionResponse -> Bool)
-> (CreateRevisionResponse -> CreateRevisionResponse -> Bool)
-> Eq CreateRevisionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRevisionResponse -> CreateRevisionResponse -> Bool
$c/= :: CreateRevisionResponse -> CreateRevisionResponse -> Bool
== :: CreateRevisionResponse -> CreateRevisionResponse -> Bool
$c== :: CreateRevisionResponse -> CreateRevisionResponse -> Bool
Prelude.Eq, ReadPrec [CreateRevisionResponse]
ReadPrec CreateRevisionResponse
Int -> ReadS CreateRevisionResponse
ReadS [CreateRevisionResponse]
(Int -> ReadS CreateRevisionResponse)
-> ReadS [CreateRevisionResponse]
-> ReadPrec CreateRevisionResponse
-> ReadPrec [CreateRevisionResponse]
-> Read CreateRevisionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRevisionResponse]
$creadListPrec :: ReadPrec [CreateRevisionResponse]
readPrec :: ReadPrec CreateRevisionResponse
$creadPrec :: ReadPrec CreateRevisionResponse
readList :: ReadS [CreateRevisionResponse]
$creadList :: ReadS [CreateRevisionResponse]
readsPrec :: Int -> ReadS CreateRevisionResponse
$creadsPrec :: Int -> ReadS CreateRevisionResponse
Prelude.Read, Int -> CreateRevisionResponse -> ShowS
[CreateRevisionResponse] -> ShowS
CreateRevisionResponse -> String
(Int -> CreateRevisionResponse -> ShowS)
-> (CreateRevisionResponse -> String)
-> ([CreateRevisionResponse] -> ShowS)
-> Show CreateRevisionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRevisionResponse] -> ShowS
$cshowList :: [CreateRevisionResponse] -> ShowS
show :: CreateRevisionResponse -> String
$cshow :: CreateRevisionResponse -> String
showsPrec :: Int -> CreateRevisionResponse -> ShowS
$cshowsPrec :: Int -> CreateRevisionResponse -> ShowS
Prelude.Show, (forall x. CreateRevisionResponse -> Rep CreateRevisionResponse x)
-> (forall x.
Rep CreateRevisionResponse x -> CreateRevisionResponse)
-> Generic CreateRevisionResponse
forall x. Rep CreateRevisionResponse x -> CreateRevisionResponse
forall x. CreateRevisionResponse -> Rep CreateRevisionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRevisionResponse x -> CreateRevisionResponse
$cfrom :: forall x. CreateRevisionResponse -> Rep CreateRevisionResponse x
Prelude.Generic)
newCreateRevisionResponse ::
Prelude.Int ->
CreateRevisionResponse
newCreateRevisionResponse :: Int -> CreateRevisionResponse
newCreateRevisionResponse Int
pHttpStatus_ =
CreateRevisionResponse' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRevisionResponse
CreateRevisionResponse'
{ $sel:arn:CreateRevisionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:CreateRevisionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:sourceId:CreateRevisionResponse' :: Maybe Text
sourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:finalized:CreateRevisionResponse' :: Maybe Bool
finalized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:dataSetId:CreateRevisionResponse' :: Maybe Text
dataSetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:CreateRevisionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:CreateRevisionResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:comment:CreateRevisionResponse' :: Maybe Text
comment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRevisionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateRevisionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createRevisionResponse_arn :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.Text)
createRevisionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_arn = (CreateRevisionResponse -> Maybe Text)
-> (CreateRevisionResponse -> Maybe Text -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe Text
a -> CreateRevisionResponse
s {$sel:arn:CreateRevisionResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateRevisionResponse)
createRevisionResponse_createdAt :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.UTCTime)
createRevisionResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_createdAt = (CreateRevisionResponse -> Maybe POSIX)
-> (CreateRevisionResponse
-> Maybe POSIX -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe POSIX
a -> CreateRevisionResponse
s {$sel:createdAt:CreateRevisionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: CreateRevisionResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateRevisionResponse -> f CreateRevisionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRevisionResponse
-> f CreateRevisionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createRevisionResponse_sourceId :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.Text)
createRevisionResponse_sourceId :: (Maybe Text -> f (Maybe Text))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_sourceId = (CreateRevisionResponse -> Maybe Text)
-> (CreateRevisionResponse -> Maybe Text -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe Text
a -> CreateRevisionResponse
s {$sel:sourceId:CreateRevisionResponse' :: Maybe Text
sourceId = Maybe Text
a} :: CreateRevisionResponse)
createRevisionResponse_finalized :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.Bool)
createRevisionResponse_finalized :: (Maybe Bool -> f (Maybe Bool))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_finalized = (CreateRevisionResponse -> Maybe Bool)
-> (CreateRevisionResponse -> Maybe Bool -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe Bool
finalized :: Maybe Bool
$sel:finalized:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe Bool
finalized} -> Maybe Bool
finalized) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe Bool
a -> CreateRevisionResponse
s {$sel:finalized:CreateRevisionResponse' :: Maybe Bool
finalized = Maybe Bool
a} :: CreateRevisionResponse)
createRevisionResponse_dataSetId :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.Text)
createRevisionResponse_dataSetId :: (Maybe Text -> f (Maybe Text))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_dataSetId = (CreateRevisionResponse -> Maybe Text)
-> (CreateRevisionResponse -> Maybe Text -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe Text
dataSetId :: Maybe Text
$sel:dataSetId:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe Text
dataSetId} -> Maybe Text
dataSetId) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe Text
a -> CreateRevisionResponse
s {$sel:dataSetId:CreateRevisionResponse' :: Maybe Text
dataSetId = Maybe Text
a} :: CreateRevisionResponse)
createRevisionResponse_id :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.Text)
createRevisionResponse_id :: (Maybe Text -> f (Maybe Text))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_id = (CreateRevisionResponse -> Maybe Text)
-> (CreateRevisionResponse -> Maybe Text -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe Text
a -> CreateRevisionResponse
s {$sel:id:CreateRevisionResponse' :: Maybe Text
id = Maybe Text
a} :: CreateRevisionResponse)
createRevisionResponse_updatedAt :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.UTCTime)
createRevisionResponse_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_updatedAt = (CreateRevisionResponse -> Maybe POSIX)
-> (CreateRevisionResponse
-> Maybe POSIX -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe POSIX
a -> CreateRevisionResponse
s {$sel:updatedAt:CreateRevisionResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: CreateRevisionResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateRevisionResponse -> f CreateRevisionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRevisionResponse
-> f CreateRevisionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createRevisionResponse_comment :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe Prelude.Text)
= (CreateRevisionResponse -> Maybe Text)
-> (CreateRevisionResponse -> Maybe Text -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Maybe Text
comment :: Maybe Text
$sel:comment:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe Text
comment} -> Maybe Text
comment) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe Text
a -> CreateRevisionResponse
s {$sel:comment:CreateRevisionResponse' :: Maybe Text
comment = Maybe Text
a} :: CreateRevisionResponse)
createRevisionResponse_tags :: Lens.Lens' CreateRevisionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRevisionResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_tags = (CreateRevisionResponse -> Maybe (HashMap Text Text))
-> (CreateRevisionResponse
-> Maybe (HashMap Text Text) -> CreateRevisionResponse)
-> Lens
CreateRevisionResponse
CreateRevisionResponse
(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 (\CreateRevisionResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRevisionResponse' :: CreateRevisionResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Maybe (HashMap Text Text)
a -> CreateRevisionResponse
s {$sel:tags:CreateRevisionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRevisionResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRevisionResponse -> f CreateRevisionResponse)
-> ((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)))
-> CreateRevisionResponse
-> f CreateRevisionResponse
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
createRevisionResponse_httpStatus :: Lens.Lens' CreateRevisionResponse Prelude.Int
createRevisionResponse_httpStatus :: (Int -> f Int)
-> CreateRevisionResponse -> f CreateRevisionResponse
createRevisionResponse_httpStatus = (CreateRevisionResponse -> Int)
-> (CreateRevisionResponse -> Int -> CreateRevisionResponse)
-> Lens CreateRevisionResponse CreateRevisionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRevisionResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRevisionResponse' :: CreateRevisionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRevisionResponse
s@CreateRevisionResponse' {} Int
a -> CreateRevisionResponse
s {$sel:httpStatus:CreateRevisionResponse' :: Int
httpStatus = Int
a} :: CreateRevisionResponse)
instance Prelude.NFData CreateRevisionResponse