{-# 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.SageMakerGeoSpatial.ListRasterDataCollections
(
ListRasterDataCollections (..),
newListRasterDataCollections,
listRasterDataCollections_maxResults,
listRasterDataCollections_nextToken,
ListRasterDataCollectionsResponse (..),
newListRasterDataCollectionsResponse,
listRasterDataCollectionsResponse_nextToken,
listRasterDataCollectionsResponse_httpStatus,
listRasterDataCollectionsResponse_rasterDataCollectionSummaries,
)
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMakerGeoSpatial.Types
data ListRasterDataCollections = ListRasterDataCollections'
{
ListRasterDataCollections -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListRasterDataCollections -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Data.Sensitive Prelude.Text)
}
deriving (ListRasterDataCollections -> ListRasterDataCollections -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRasterDataCollections -> ListRasterDataCollections -> Bool
$c/= :: ListRasterDataCollections -> ListRasterDataCollections -> Bool
== :: ListRasterDataCollections -> ListRasterDataCollections -> Bool
$c== :: ListRasterDataCollections -> ListRasterDataCollections -> Bool
Prelude.Eq, Int -> ListRasterDataCollections -> ShowS
[ListRasterDataCollections] -> ShowS
ListRasterDataCollections -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRasterDataCollections] -> ShowS
$cshowList :: [ListRasterDataCollections] -> ShowS
show :: ListRasterDataCollections -> String
$cshow :: ListRasterDataCollections -> String
showsPrec :: Int -> ListRasterDataCollections -> ShowS
$cshowsPrec :: Int -> ListRasterDataCollections -> ShowS
Prelude.Show, forall x.
Rep ListRasterDataCollections x -> ListRasterDataCollections
forall x.
ListRasterDataCollections -> Rep ListRasterDataCollections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRasterDataCollections x -> ListRasterDataCollections
$cfrom :: forall x.
ListRasterDataCollections -> Rep ListRasterDataCollections x
Prelude.Generic)
newListRasterDataCollections ::
ListRasterDataCollections
newListRasterDataCollections :: ListRasterDataCollections
newListRasterDataCollections =
ListRasterDataCollections'
{ $sel:maxResults:ListRasterDataCollections' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListRasterDataCollections' :: Maybe (Sensitive Text)
nextToken = forall a. Maybe a
Prelude.Nothing
}
listRasterDataCollections_maxResults :: Lens.Lens' ListRasterDataCollections (Prelude.Maybe Prelude.Natural)
listRasterDataCollections_maxResults :: Lens' ListRasterDataCollections (Maybe Natural)
listRasterDataCollections_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRasterDataCollections' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRasterDataCollections
s@ListRasterDataCollections' {} Maybe Natural
a -> ListRasterDataCollections
s {$sel:maxResults:ListRasterDataCollections' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRasterDataCollections)
listRasterDataCollections_nextToken :: Lens.Lens' ListRasterDataCollections (Prelude.Maybe Prelude.Text)
listRasterDataCollections_nextToken :: Lens' ListRasterDataCollections (Maybe Text)
listRasterDataCollections_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRasterDataCollections' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListRasterDataCollections
s@ListRasterDataCollections' {} Maybe (Sensitive Text)
a -> ListRasterDataCollections
s {$sel:nextToken:ListRasterDataCollections' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListRasterDataCollections) 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 a. Iso' (Sensitive a) a
Data._Sensitive
instance Core.AWSPager ListRasterDataCollections where
page :: ListRasterDataCollections
-> AWSResponse ListRasterDataCollections
-> Maybe ListRasterDataCollections
page ListRasterDataCollections
rq AWSResponse ListRasterDataCollections
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListRasterDataCollections
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRasterDataCollectionsResponse (Maybe Text)
listRasterDataCollectionsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListRasterDataCollections
rs
forall s a. s -> Getting a s a -> a
Lens.^. Lens'
ListRasterDataCollectionsResponse [RasterDataCollectionMetadata]
listRasterDataCollectionsResponse_rasterDataCollectionSummaries
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ ListRasterDataCollections
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListRasterDataCollections (Maybe Text)
listRasterDataCollections_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRasterDataCollections
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRasterDataCollectionsResponse (Maybe Text)
listRasterDataCollectionsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListRasterDataCollections where
type
AWSResponse ListRasterDataCollections =
ListRasterDataCollectionsResponse
request :: (Service -> Service)
-> ListRasterDataCollections -> Request ListRasterDataCollections
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListRasterDataCollections
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListRasterDataCollections)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe (Sensitive Text)
-> Int
-> [RasterDataCollectionMetadata]
-> ListRasterDataCollectionsResponse
ListRasterDataCollectionsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RasterDataCollectionSummaries"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListRasterDataCollections where
hashWithSalt :: Int -> ListRasterDataCollections -> Int
hashWithSalt Int
_salt ListRasterDataCollections' {Maybe Natural
Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
$sel:nextToken:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe (Sensitive Text)
$sel:maxResults:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
nextToken
instance Prelude.NFData ListRasterDataCollections where
rnf :: ListRasterDataCollections -> ()
rnf ListRasterDataCollections' {Maybe Natural
Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
$sel:nextToken:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe (Sensitive Text)
$sel:maxResults:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
nextToken
instance Data.ToHeaders ListRasterDataCollections where
toHeaders :: ListRasterDataCollections -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath ListRasterDataCollections where
toPath :: ListRasterDataCollections -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/raster-data-collections"
instance Data.ToQuery ListRasterDataCollections where
toQuery :: ListRasterDataCollections -> QueryString
toQuery ListRasterDataCollections' {Maybe Natural
Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
$sel:nextToken:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe (Sensitive Text)
$sel:maxResults:ListRasterDataCollections' :: ListRasterDataCollections -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe (Sensitive Text)
nextToken
]
data ListRasterDataCollectionsResponse = ListRasterDataCollectionsResponse'
{
ListRasterDataCollectionsResponse -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),
ListRasterDataCollectionsResponse -> Int
httpStatus :: Prelude.Int,
ListRasterDataCollectionsResponse -> [RasterDataCollectionMetadata]
rasterDataCollectionSummaries :: [RasterDataCollectionMetadata]
}
deriving (ListRasterDataCollectionsResponse
-> ListRasterDataCollectionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRasterDataCollectionsResponse
-> ListRasterDataCollectionsResponse -> Bool
$c/= :: ListRasterDataCollectionsResponse
-> ListRasterDataCollectionsResponse -> Bool
== :: ListRasterDataCollectionsResponse
-> ListRasterDataCollectionsResponse -> Bool
$c== :: ListRasterDataCollectionsResponse
-> ListRasterDataCollectionsResponse -> Bool
Prelude.Eq, Int -> ListRasterDataCollectionsResponse -> ShowS
[ListRasterDataCollectionsResponse] -> ShowS
ListRasterDataCollectionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRasterDataCollectionsResponse] -> ShowS
$cshowList :: [ListRasterDataCollectionsResponse] -> ShowS
show :: ListRasterDataCollectionsResponse -> String
$cshow :: ListRasterDataCollectionsResponse -> String
showsPrec :: Int -> ListRasterDataCollectionsResponse -> ShowS
$cshowsPrec :: Int -> ListRasterDataCollectionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListRasterDataCollectionsResponse x
-> ListRasterDataCollectionsResponse
forall x.
ListRasterDataCollectionsResponse
-> Rep ListRasterDataCollectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRasterDataCollectionsResponse x
-> ListRasterDataCollectionsResponse
$cfrom :: forall x.
ListRasterDataCollectionsResponse
-> Rep ListRasterDataCollectionsResponse x
Prelude.Generic)
newListRasterDataCollectionsResponse ::
Prelude.Int ->
ListRasterDataCollectionsResponse
newListRasterDataCollectionsResponse :: Int -> ListRasterDataCollectionsResponse
newListRasterDataCollectionsResponse Int
pHttpStatus_ =
ListRasterDataCollectionsResponse'
{ $sel:nextToken:ListRasterDataCollectionsResponse' :: Maybe (Sensitive Text)
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListRasterDataCollectionsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:rasterDataCollectionSummaries:ListRasterDataCollectionsResponse' :: [RasterDataCollectionMetadata]
rasterDataCollectionSummaries =
forall a. Monoid a => a
Prelude.mempty
}
listRasterDataCollectionsResponse_nextToken :: Lens.Lens' ListRasterDataCollectionsResponse (Prelude.Maybe Prelude.Text)
listRasterDataCollectionsResponse_nextToken :: Lens' ListRasterDataCollectionsResponse (Maybe Text)
listRasterDataCollectionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRasterDataCollectionsResponse' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListRasterDataCollectionsResponse' :: ListRasterDataCollectionsResponse -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListRasterDataCollectionsResponse
s@ListRasterDataCollectionsResponse' {} Maybe (Sensitive Text)
a -> ListRasterDataCollectionsResponse
s {$sel:nextToken:ListRasterDataCollectionsResponse' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListRasterDataCollectionsResponse) 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 a. Iso' (Sensitive a) a
Data._Sensitive
listRasterDataCollectionsResponse_httpStatus :: Lens.Lens' ListRasterDataCollectionsResponse Prelude.Int
listRasterDataCollectionsResponse_httpStatus :: Lens' ListRasterDataCollectionsResponse Int
listRasterDataCollectionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRasterDataCollectionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRasterDataCollectionsResponse' :: ListRasterDataCollectionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRasterDataCollectionsResponse
s@ListRasterDataCollectionsResponse' {} Int
a -> ListRasterDataCollectionsResponse
s {$sel:httpStatus:ListRasterDataCollectionsResponse' :: Int
httpStatus = Int
a} :: ListRasterDataCollectionsResponse)
listRasterDataCollectionsResponse_rasterDataCollectionSummaries :: Lens.Lens' ListRasterDataCollectionsResponse [RasterDataCollectionMetadata]
listRasterDataCollectionsResponse_rasterDataCollectionSummaries :: Lens'
ListRasterDataCollectionsResponse [RasterDataCollectionMetadata]
listRasterDataCollectionsResponse_rasterDataCollectionSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRasterDataCollectionsResponse' {[RasterDataCollectionMetadata]
rasterDataCollectionSummaries :: [RasterDataCollectionMetadata]
$sel:rasterDataCollectionSummaries:ListRasterDataCollectionsResponse' :: ListRasterDataCollectionsResponse -> [RasterDataCollectionMetadata]
rasterDataCollectionSummaries} -> [RasterDataCollectionMetadata]
rasterDataCollectionSummaries) (\s :: ListRasterDataCollectionsResponse
s@ListRasterDataCollectionsResponse' {} [RasterDataCollectionMetadata]
a -> ListRasterDataCollectionsResponse
s {$sel:rasterDataCollectionSummaries:ListRasterDataCollectionsResponse' :: [RasterDataCollectionMetadata]
rasterDataCollectionSummaries = [RasterDataCollectionMetadata]
a} :: ListRasterDataCollectionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
ListRasterDataCollectionsResponse
where
rnf :: ListRasterDataCollectionsResponse -> ()
rnf ListRasterDataCollectionsResponse' {Int
[RasterDataCollectionMetadata]
Maybe (Sensitive Text)
rasterDataCollectionSummaries :: [RasterDataCollectionMetadata]
httpStatus :: Int
nextToken :: Maybe (Sensitive Text)
$sel:rasterDataCollectionSummaries:ListRasterDataCollectionsResponse' :: ListRasterDataCollectionsResponse -> [RasterDataCollectionMetadata]
$sel:httpStatus:ListRasterDataCollectionsResponse' :: ListRasterDataCollectionsResponse -> Int
$sel:nextToken:ListRasterDataCollectionsResponse' :: ListRasterDataCollectionsResponse -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [RasterDataCollectionMetadata]
rasterDataCollectionSummaries