{-# 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.CodeDeploy.ListApplicationRevisions
(
ListApplicationRevisions (..),
newListApplicationRevisions,
listApplicationRevisions_s3KeyPrefix,
listApplicationRevisions_deployed,
listApplicationRevisions_sortOrder,
listApplicationRevisions_nextToken,
listApplicationRevisions_s3Bucket,
listApplicationRevisions_sortBy,
listApplicationRevisions_applicationName,
ListApplicationRevisionsResponse (..),
newListApplicationRevisionsResponse,
listApplicationRevisionsResponse_nextToken,
listApplicationRevisionsResponse_revisions,
listApplicationRevisionsResponse_httpStatus,
)
where
import Amazonka.CodeDeploy.Types
import qualified Amazonka.Core as Core
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 ListApplicationRevisions = ListApplicationRevisions'
{
ListApplicationRevisions -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
ListApplicationRevisions -> Maybe ListStateFilterAction
deployed :: Prelude.Maybe ListStateFilterAction,
ListApplicationRevisions -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
ListApplicationRevisions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListApplicationRevisions -> Maybe Text
s3Bucket :: Prelude.Maybe Prelude.Text,
ListApplicationRevisions -> Maybe ApplicationRevisionSortBy
sortBy :: Prelude.Maybe ApplicationRevisionSortBy,
ListApplicationRevisions -> Text
applicationName :: Prelude.Text
}
deriving (ListApplicationRevisions -> ListApplicationRevisions -> Bool
(ListApplicationRevisions -> ListApplicationRevisions -> Bool)
-> (ListApplicationRevisions -> ListApplicationRevisions -> Bool)
-> Eq ListApplicationRevisions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationRevisions -> ListApplicationRevisions -> Bool
$c/= :: ListApplicationRevisions -> ListApplicationRevisions -> Bool
== :: ListApplicationRevisions -> ListApplicationRevisions -> Bool
$c== :: ListApplicationRevisions -> ListApplicationRevisions -> Bool
Prelude.Eq, ReadPrec [ListApplicationRevisions]
ReadPrec ListApplicationRevisions
Int -> ReadS ListApplicationRevisions
ReadS [ListApplicationRevisions]
(Int -> ReadS ListApplicationRevisions)
-> ReadS [ListApplicationRevisions]
-> ReadPrec ListApplicationRevisions
-> ReadPrec [ListApplicationRevisions]
-> Read ListApplicationRevisions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationRevisions]
$creadListPrec :: ReadPrec [ListApplicationRevisions]
readPrec :: ReadPrec ListApplicationRevisions
$creadPrec :: ReadPrec ListApplicationRevisions
readList :: ReadS [ListApplicationRevisions]
$creadList :: ReadS [ListApplicationRevisions]
readsPrec :: Int -> ReadS ListApplicationRevisions
$creadsPrec :: Int -> ReadS ListApplicationRevisions
Prelude.Read, Int -> ListApplicationRevisions -> ShowS
[ListApplicationRevisions] -> ShowS
ListApplicationRevisions -> String
(Int -> ListApplicationRevisions -> ShowS)
-> (ListApplicationRevisions -> String)
-> ([ListApplicationRevisions] -> ShowS)
-> Show ListApplicationRevisions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationRevisions] -> ShowS
$cshowList :: [ListApplicationRevisions] -> ShowS
show :: ListApplicationRevisions -> String
$cshow :: ListApplicationRevisions -> String
showsPrec :: Int -> ListApplicationRevisions -> ShowS
$cshowsPrec :: Int -> ListApplicationRevisions -> ShowS
Prelude.Show, (forall x.
ListApplicationRevisions -> Rep ListApplicationRevisions x)
-> (forall x.
Rep ListApplicationRevisions x -> ListApplicationRevisions)
-> Generic ListApplicationRevisions
forall x.
Rep ListApplicationRevisions x -> ListApplicationRevisions
forall x.
ListApplicationRevisions -> Rep ListApplicationRevisions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationRevisions x -> ListApplicationRevisions
$cfrom :: forall x.
ListApplicationRevisions -> Rep ListApplicationRevisions x
Prelude.Generic)
newListApplicationRevisions ::
Prelude.Text ->
ListApplicationRevisions
newListApplicationRevisions :: Text -> ListApplicationRevisions
newListApplicationRevisions Text
pApplicationName_ =
ListApplicationRevisions' :: Maybe Text
-> Maybe ListStateFilterAction
-> Maybe SortOrder
-> Maybe Text
-> Maybe Text
-> Maybe ApplicationRevisionSortBy
-> Text
-> ListApplicationRevisions
ListApplicationRevisions'
{ $sel:s3KeyPrefix:ListApplicationRevisions' :: Maybe Text
s3KeyPrefix =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deployed:ListApplicationRevisions' :: Maybe ListStateFilterAction
deployed = Maybe ListStateFilterAction
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:ListApplicationRevisions' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListApplicationRevisions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Bucket:ListApplicationRevisions' :: Maybe Text
s3Bucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:ListApplicationRevisions' :: Maybe ApplicationRevisionSortBy
sortBy = Maybe ApplicationRevisionSortBy
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:ListApplicationRevisions' :: Text
applicationName = Text
pApplicationName_
}
listApplicationRevisions_s3KeyPrefix :: Lens.Lens' ListApplicationRevisions (Prelude.Maybe Prelude.Text)
listApplicationRevisions_s3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> ListApplicationRevisions -> f ListApplicationRevisions
listApplicationRevisions_s3KeyPrefix = (ListApplicationRevisions -> Maybe Text)
-> (ListApplicationRevisions
-> Maybe Text -> ListApplicationRevisions)
-> Lens
ListApplicationRevisions
ListApplicationRevisions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisions' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: ListApplicationRevisions
s@ListApplicationRevisions' {} Maybe Text
a -> ListApplicationRevisions
s {$sel:s3KeyPrefix:ListApplicationRevisions' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: ListApplicationRevisions)
listApplicationRevisions_deployed :: Lens.Lens' ListApplicationRevisions (Prelude.Maybe ListStateFilterAction)
listApplicationRevisions_deployed :: (Maybe ListStateFilterAction -> f (Maybe ListStateFilterAction))
-> ListApplicationRevisions -> f ListApplicationRevisions
listApplicationRevisions_deployed = (ListApplicationRevisions -> Maybe ListStateFilterAction)
-> (ListApplicationRevisions
-> Maybe ListStateFilterAction -> ListApplicationRevisions)
-> Lens
ListApplicationRevisions
ListApplicationRevisions
(Maybe ListStateFilterAction)
(Maybe ListStateFilterAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisions' {Maybe ListStateFilterAction
deployed :: Maybe ListStateFilterAction
$sel:deployed:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe ListStateFilterAction
deployed} -> Maybe ListStateFilterAction
deployed) (\s :: ListApplicationRevisions
s@ListApplicationRevisions' {} Maybe ListStateFilterAction
a -> ListApplicationRevisions
s {$sel:deployed:ListApplicationRevisions' :: Maybe ListStateFilterAction
deployed = Maybe ListStateFilterAction
a} :: ListApplicationRevisions)
listApplicationRevisions_sortOrder :: Lens.Lens' ListApplicationRevisions (Prelude.Maybe SortOrder)
listApplicationRevisions_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListApplicationRevisions -> f ListApplicationRevisions
listApplicationRevisions_sortOrder = (ListApplicationRevisions -> Maybe SortOrder)
-> (ListApplicationRevisions
-> Maybe SortOrder -> ListApplicationRevisions)
-> Lens
ListApplicationRevisions
ListApplicationRevisions
(Maybe SortOrder)
(Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisions' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListApplicationRevisions
s@ListApplicationRevisions' {} Maybe SortOrder
a -> ListApplicationRevisions
s {$sel:sortOrder:ListApplicationRevisions' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListApplicationRevisions)
listApplicationRevisions_nextToken :: Lens.Lens' ListApplicationRevisions (Prelude.Maybe Prelude.Text)
listApplicationRevisions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationRevisions -> f ListApplicationRevisions
listApplicationRevisions_nextToken = (ListApplicationRevisions -> Maybe Text)
-> (ListApplicationRevisions
-> Maybe Text -> ListApplicationRevisions)
-> Lens
ListApplicationRevisions
ListApplicationRevisions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationRevisions
s@ListApplicationRevisions' {} Maybe Text
a -> ListApplicationRevisions
s {$sel:nextToken:ListApplicationRevisions' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationRevisions)
listApplicationRevisions_s3Bucket :: Lens.Lens' ListApplicationRevisions (Prelude.Maybe Prelude.Text)
listApplicationRevisions_s3Bucket :: (Maybe Text -> f (Maybe Text))
-> ListApplicationRevisions -> f ListApplicationRevisions
listApplicationRevisions_s3Bucket = (ListApplicationRevisions -> Maybe Text)
-> (ListApplicationRevisions
-> Maybe Text -> ListApplicationRevisions)
-> Lens
ListApplicationRevisions
ListApplicationRevisions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisions' {Maybe Text
s3Bucket :: Maybe Text
$sel:s3Bucket:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe Text
s3Bucket} -> Maybe Text
s3Bucket) (\s :: ListApplicationRevisions
s@ListApplicationRevisions' {} Maybe Text
a -> ListApplicationRevisions
s {$sel:s3Bucket:ListApplicationRevisions' :: Maybe Text
s3Bucket = Maybe Text
a} :: ListApplicationRevisions)
listApplicationRevisions_sortBy :: Lens.Lens' ListApplicationRevisions (Prelude.Maybe ApplicationRevisionSortBy)
listApplicationRevisions_sortBy :: (Maybe ApplicationRevisionSortBy
-> f (Maybe ApplicationRevisionSortBy))
-> ListApplicationRevisions -> f ListApplicationRevisions
listApplicationRevisions_sortBy = (ListApplicationRevisions -> Maybe ApplicationRevisionSortBy)
-> (ListApplicationRevisions
-> Maybe ApplicationRevisionSortBy -> ListApplicationRevisions)
-> Lens
ListApplicationRevisions
ListApplicationRevisions
(Maybe ApplicationRevisionSortBy)
(Maybe ApplicationRevisionSortBy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisions' {Maybe ApplicationRevisionSortBy
sortBy :: Maybe ApplicationRevisionSortBy
$sel:sortBy:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe ApplicationRevisionSortBy
sortBy} -> Maybe ApplicationRevisionSortBy
sortBy) (\s :: ListApplicationRevisions
s@ListApplicationRevisions' {} Maybe ApplicationRevisionSortBy
a -> ListApplicationRevisions
s {$sel:sortBy:ListApplicationRevisions' :: Maybe ApplicationRevisionSortBy
sortBy = Maybe ApplicationRevisionSortBy
a} :: ListApplicationRevisions)
listApplicationRevisions_applicationName :: Lens.Lens' ListApplicationRevisions Prelude.Text
listApplicationRevisions_applicationName :: (Text -> f Text)
-> ListApplicationRevisions -> f ListApplicationRevisions
listApplicationRevisions_applicationName = (ListApplicationRevisions -> Text)
-> (ListApplicationRevisions -> Text -> ListApplicationRevisions)
-> Lens ListApplicationRevisions ListApplicationRevisions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisions' {Text
applicationName :: Text
$sel:applicationName:ListApplicationRevisions' :: ListApplicationRevisions -> Text
applicationName} -> Text
applicationName) (\s :: ListApplicationRevisions
s@ListApplicationRevisions' {} Text
a -> ListApplicationRevisions
s {$sel:applicationName:ListApplicationRevisions' :: Text
applicationName = Text
a} :: ListApplicationRevisions)
instance Core.AWSPager ListApplicationRevisions where
page :: ListApplicationRevisions
-> AWSResponse ListApplicationRevisions
-> Maybe ListApplicationRevisions
page ListApplicationRevisions
rq AWSResponse ListApplicationRevisions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListApplicationRevisions
ListApplicationRevisionsResponse
rs
ListApplicationRevisionsResponse
-> Getting (First Text) ListApplicationRevisionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationRevisionsResponse
-> Const (First Text) ListApplicationRevisionsResponse
Lens' ListApplicationRevisionsResponse (Maybe Text)
listApplicationRevisionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationRevisionsResponse
-> Const (First Text) ListApplicationRevisionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationRevisionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListApplicationRevisions
forall a. Maybe a
Prelude.Nothing
| Maybe [RevisionLocation] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListApplicationRevisions
ListApplicationRevisionsResponse
rs
ListApplicationRevisionsResponse
-> Getting
(First [RevisionLocation])
ListApplicationRevisionsResponse
[RevisionLocation]
-> Maybe [RevisionLocation]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [RevisionLocation]
-> Const (First [RevisionLocation]) (Maybe [RevisionLocation]))
-> ListApplicationRevisionsResponse
-> Const
(First [RevisionLocation]) ListApplicationRevisionsResponse
Lens' ListApplicationRevisionsResponse (Maybe [RevisionLocation])
listApplicationRevisionsResponse_revisions
((Maybe [RevisionLocation]
-> Const (First [RevisionLocation]) (Maybe [RevisionLocation]))
-> ListApplicationRevisionsResponse
-> Const
(First [RevisionLocation]) ListApplicationRevisionsResponse)
-> (([RevisionLocation]
-> Const (First [RevisionLocation]) [RevisionLocation])
-> Maybe [RevisionLocation]
-> Const (First [RevisionLocation]) (Maybe [RevisionLocation]))
-> Getting
(First [RevisionLocation])
ListApplicationRevisionsResponse
[RevisionLocation]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RevisionLocation]
-> Const (First [RevisionLocation]) [RevisionLocation])
-> Maybe [RevisionLocation]
-> Const (First [RevisionLocation]) (Maybe [RevisionLocation])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListApplicationRevisions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListApplicationRevisions -> Maybe ListApplicationRevisions
forall a. a -> Maybe a
Prelude.Just (ListApplicationRevisions -> Maybe ListApplicationRevisions)
-> ListApplicationRevisions -> Maybe ListApplicationRevisions
forall a b. (a -> b) -> a -> b
Prelude.$
ListApplicationRevisions
rq
ListApplicationRevisions
-> (ListApplicationRevisions -> ListApplicationRevisions)
-> ListApplicationRevisions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListApplicationRevisions -> Identity ListApplicationRevisions
Lens
ListApplicationRevisions
ListApplicationRevisions
(Maybe Text)
(Maybe Text)
listApplicationRevisions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListApplicationRevisions -> Identity ListApplicationRevisions)
-> Maybe Text
-> ListApplicationRevisions
-> ListApplicationRevisions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListApplicationRevisions
ListApplicationRevisionsResponse
rs
ListApplicationRevisionsResponse
-> Getting (First Text) ListApplicationRevisionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationRevisionsResponse
-> Const (First Text) ListApplicationRevisionsResponse
Lens' ListApplicationRevisionsResponse (Maybe Text)
listApplicationRevisionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationRevisionsResponse
-> Const (First Text) ListApplicationRevisionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationRevisionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListApplicationRevisions where
type
AWSResponse ListApplicationRevisions =
ListApplicationRevisionsResponse
request :: ListApplicationRevisions -> Request ListApplicationRevisions
request = Service
-> ListApplicationRevisions -> Request ListApplicationRevisions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListApplicationRevisions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListApplicationRevisions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListApplicationRevisions))
-> Logger
-> Service
-> Proxy ListApplicationRevisions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListApplicationRevisions)))
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 [RevisionLocation]
-> Int
-> ListApplicationRevisionsResponse
ListApplicationRevisionsResponse'
(Maybe Text
-> Maybe [RevisionLocation]
-> Int
-> ListApplicationRevisionsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [RevisionLocation]
-> Int -> ListApplicationRevisionsResponse)
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
"nextToken")
Either
String
(Maybe [RevisionLocation]
-> Int -> ListApplicationRevisionsResponse)
-> Either String (Maybe [RevisionLocation])
-> Either String (Int -> ListApplicationRevisionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [RevisionLocation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"revisions" Either String (Maybe (Maybe [RevisionLocation]))
-> Maybe [RevisionLocation]
-> Either String (Maybe [RevisionLocation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RevisionLocation]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListApplicationRevisionsResponse)
-> Either String Int
-> Either String ListApplicationRevisionsResponse
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 ListApplicationRevisions
instance Prelude.NFData ListApplicationRevisions
instance Core.ToHeaders ListApplicationRevisions where
toHeaders :: ListApplicationRevisions -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListApplicationRevisions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeDeploy_20141006.ListApplicationRevisions" ::
Prelude.ByteString
),
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 ListApplicationRevisions where
toJSON :: ListApplicationRevisions -> Value
toJSON ListApplicationRevisions' {Maybe Text
Maybe ApplicationRevisionSortBy
Maybe ListStateFilterAction
Maybe SortOrder
Text
applicationName :: Text
sortBy :: Maybe ApplicationRevisionSortBy
s3Bucket :: Maybe Text
nextToken :: Maybe Text
sortOrder :: Maybe SortOrder
deployed :: Maybe ListStateFilterAction
s3KeyPrefix :: Maybe Text
$sel:applicationName:ListApplicationRevisions' :: ListApplicationRevisions -> Text
$sel:sortBy:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe ApplicationRevisionSortBy
$sel:s3Bucket:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe Text
$sel:nextToken:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe Text
$sel:sortOrder:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe SortOrder
$sel:deployed:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe ListStateFilterAction
$sel:s3KeyPrefix:ListApplicationRevisions' :: ListApplicationRevisions -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"s3KeyPrefix" 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
s3KeyPrefix,
(Text
"deployed" Text -> ListStateFilterAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ListStateFilterAction -> Pair)
-> Maybe ListStateFilterAction -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ListStateFilterAction
deployed,
(Text
"sortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
(Text
"nextToken" 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
nextToken,
(Text
"s3Bucket" 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
s3Bucket,
(Text
"sortBy" Text -> ApplicationRevisionSortBy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ApplicationRevisionSortBy -> Pair)
-> Maybe ApplicationRevisionSortBy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ApplicationRevisionSortBy
sortBy,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"applicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName)
]
)
instance Core.ToPath ListApplicationRevisions where
toPath :: ListApplicationRevisions -> ByteString
toPath = ByteString -> ListApplicationRevisions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListApplicationRevisions where
toQuery :: ListApplicationRevisions -> QueryString
toQuery = QueryString -> ListApplicationRevisions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListApplicationRevisionsResponse = ListApplicationRevisionsResponse'
{
ListApplicationRevisionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListApplicationRevisionsResponse -> Maybe [RevisionLocation]
revisions :: Prelude.Maybe [RevisionLocation],
ListApplicationRevisionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListApplicationRevisionsResponse
-> ListApplicationRevisionsResponse -> Bool
(ListApplicationRevisionsResponse
-> ListApplicationRevisionsResponse -> Bool)
-> (ListApplicationRevisionsResponse
-> ListApplicationRevisionsResponse -> Bool)
-> Eq ListApplicationRevisionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationRevisionsResponse
-> ListApplicationRevisionsResponse -> Bool
$c/= :: ListApplicationRevisionsResponse
-> ListApplicationRevisionsResponse -> Bool
== :: ListApplicationRevisionsResponse
-> ListApplicationRevisionsResponse -> Bool
$c== :: ListApplicationRevisionsResponse
-> ListApplicationRevisionsResponse -> Bool
Prelude.Eq, ReadPrec [ListApplicationRevisionsResponse]
ReadPrec ListApplicationRevisionsResponse
Int -> ReadS ListApplicationRevisionsResponse
ReadS [ListApplicationRevisionsResponse]
(Int -> ReadS ListApplicationRevisionsResponse)
-> ReadS [ListApplicationRevisionsResponse]
-> ReadPrec ListApplicationRevisionsResponse
-> ReadPrec [ListApplicationRevisionsResponse]
-> Read ListApplicationRevisionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationRevisionsResponse]
$creadListPrec :: ReadPrec [ListApplicationRevisionsResponse]
readPrec :: ReadPrec ListApplicationRevisionsResponse
$creadPrec :: ReadPrec ListApplicationRevisionsResponse
readList :: ReadS [ListApplicationRevisionsResponse]
$creadList :: ReadS [ListApplicationRevisionsResponse]
readsPrec :: Int -> ReadS ListApplicationRevisionsResponse
$creadsPrec :: Int -> ReadS ListApplicationRevisionsResponse
Prelude.Read, Int -> ListApplicationRevisionsResponse -> ShowS
[ListApplicationRevisionsResponse] -> ShowS
ListApplicationRevisionsResponse -> String
(Int -> ListApplicationRevisionsResponse -> ShowS)
-> (ListApplicationRevisionsResponse -> String)
-> ([ListApplicationRevisionsResponse] -> ShowS)
-> Show ListApplicationRevisionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationRevisionsResponse] -> ShowS
$cshowList :: [ListApplicationRevisionsResponse] -> ShowS
show :: ListApplicationRevisionsResponse -> String
$cshow :: ListApplicationRevisionsResponse -> String
showsPrec :: Int -> ListApplicationRevisionsResponse -> ShowS
$cshowsPrec :: Int -> ListApplicationRevisionsResponse -> ShowS
Prelude.Show, (forall x.
ListApplicationRevisionsResponse
-> Rep ListApplicationRevisionsResponse x)
-> (forall x.
Rep ListApplicationRevisionsResponse x
-> ListApplicationRevisionsResponse)
-> Generic ListApplicationRevisionsResponse
forall x.
Rep ListApplicationRevisionsResponse x
-> ListApplicationRevisionsResponse
forall x.
ListApplicationRevisionsResponse
-> Rep ListApplicationRevisionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationRevisionsResponse x
-> ListApplicationRevisionsResponse
$cfrom :: forall x.
ListApplicationRevisionsResponse
-> Rep ListApplicationRevisionsResponse x
Prelude.Generic)
newListApplicationRevisionsResponse ::
Prelude.Int ->
ListApplicationRevisionsResponse
newListApplicationRevisionsResponse :: Int -> ListApplicationRevisionsResponse
newListApplicationRevisionsResponse Int
pHttpStatus_ =
ListApplicationRevisionsResponse' :: Maybe Text
-> Maybe [RevisionLocation]
-> Int
-> ListApplicationRevisionsResponse
ListApplicationRevisionsResponse'
{ $sel:nextToken:ListApplicationRevisionsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisions:ListApplicationRevisionsResponse' :: Maybe [RevisionLocation]
revisions = Maybe [RevisionLocation]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListApplicationRevisionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listApplicationRevisionsResponse_nextToken :: Lens.Lens' ListApplicationRevisionsResponse (Prelude.Maybe Prelude.Text)
listApplicationRevisionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationRevisionsResponse
-> f ListApplicationRevisionsResponse
listApplicationRevisionsResponse_nextToken = (ListApplicationRevisionsResponse -> Maybe Text)
-> (ListApplicationRevisionsResponse
-> Maybe Text -> ListApplicationRevisionsResponse)
-> Lens' ListApplicationRevisionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationRevisionsResponse' :: ListApplicationRevisionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationRevisionsResponse
s@ListApplicationRevisionsResponse' {} Maybe Text
a -> ListApplicationRevisionsResponse
s {$sel:nextToken:ListApplicationRevisionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationRevisionsResponse)
listApplicationRevisionsResponse_revisions :: Lens.Lens' ListApplicationRevisionsResponse (Prelude.Maybe [RevisionLocation])
listApplicationRevisionsResponse_revisions :: (Maybe [RevisionLocation] -> f (Maybe [RevisionLocation]))
-> ListApplicationRevisionsResponse
-> f ListApplicationRevisionsResponse
listApplicationRevisionsResponse_revisions = (ListApplicationRevisionsResponse -> Maybe [RevisionLocation])
-> (ListApplicationRevisionsResponse
-> Maybe [RevisionLocation] -> ListApplicationRevisionsResponse)
-> Lens'
ListApplicationRevisionsResponse (Maybe [RevisionLocation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisionsResponse' {Maybe [RevisionLocation]
revisions :: Maybe [RevisionLocation]
$sel:revisions:ListApplicationRevisionsResponse' :: ListApplicationRevisionsResponse -> Maybe [RevisionLocation]
revisions} -> Maybe [RevisionLocation]
revisions) (\s :: ListApplicationRevisionsResponse
s@ListApplicationRevisionsResponse' {} Maybe [RevisionLocation]
a -> ListApplicationRevisionsResponse
s {$sel:revisions:ListApplicationRevisionsResponse' :: Maybe [RevisionLocation]
revisions = Maybe [RevisionLocation]
a} :: ListApplicationRevisionsResponse) ((Maybe [RevisionLocation] -> f (Maybe [RevisionLocation]))
-> ListApplicationRevisionsResponse
-> f ListApplicationRevisionsResponse)
-> ((Maybe [RevisionLocation] -> f (Maybe [RevisionLocation]))
-> Maybe [RevisionLocation] -> f (Maybe [RevisionLocation]))
-> (Maybe [RevisionLocation] -> f (Maybe [RevisionLocation]))
-> ListApplicationRevisionsResponse
-> f ListApplicationRevisionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RevisionLocation]
[RevisionLocation]
[RevisionLocation]
[RevisionLocation]
-> Iso
(Maybe [RevisionLocation])
(Maybe [RevisionLocation])
(Maybe [RevisionLocation])
(Maybe [RevisionLocation])
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
[RevisionLocation]
[RevisionLocation]
[RevisionLocation]
[RevisionLocation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listApplicationRevisionsResponse_httpStatus :: Lens.Lens' ListApplicationRevisionsResponse Prelude.Int
listApplicationRevisionsResponse_httpStatus :: (Int -> f Int)
-> ListApplicationRevisionsResponse
-> f ListApplicationRevisionsResponse
listApplicationRevisionsResponse_httpStatus = (ListApplicationRevisionsResponse -> Int)
-> (ListApplicationRevisionsResponse
-> Int -> ListApplicationRevisionsResponse)
-> Lens
ListApplicationRevisionsResponse
ListApplicationRevisionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationRevisionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListApplicationRevisionsResponse' :: ListApplicationRevisionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListApplicationRevisionsResponse
s@ListApplicationRevisionsResponse' {} Int
a -> ListApplicationRevisionsResponse
s {$sel:httpStatus:ListApplicationRevisionsResponse' :: Int
httpStatus = Int
a} :: ListApplicationRevisionsResponse)
instance
Prelude.NFData
ListApplicationRevisionsResponse