{-# 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.ElasticInference.DescribeAccelerators
(
DescribeAccelerators (..),
newDescribeAccelerators,
describeAccelerators_filters,
describeAccelerators_nextToken,
describeAccelerators_maxResults,
describeAccelerators_acceleratorIds,
DescribeAcceleratorsResponse (..),
newDescribeAcceleratorsResponse,
describeAcceleratorsResponse_acceleratorSet,
describeAcceleratorsResponse_nextToken,
describeAcceleratorsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticInference.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 DescribeAccelerators = DescribeAccelerators'
{
DescribeAccelerators -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
DescribeAccelerators -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAccelerators -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeAccelerators -> Maybe [Text]
acceleratorIds :: Prelude.Maybe [Prelude.Text]
}
deriving (DescribeAccelerators -> DescribeAccelerators -> Bool
(DescribeAccelerators -> DescribeAccelerators -> Bool)
-> (DescribeAccelerators -> DescribeAccelerators -> Bool)
-> Eq DescribeAccelerators
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccelerators -> DescribeAccelerators -> Bool
$c/= :: DescribeAccelerators -> DescribeAccelerators -> Bool
== :: DescribeAccelerators -> DescribeAccelerators -> Bool
$c== :: DescribeAccelerators -> DescribeAccelerators -> Bool
Prelude.Eq, ReadPrec [DescribeAccelerators]
ReadPrec DescribeAccelerators
Int -> ReadS DescribeAccelerators
ReadS [DescribeAccelerators]
(Int -> ReadS DescribeAccelerators)
-> ReadS [DescribeAccelerators]
-> ReadPrec DescribeAccelerators
-> ReadPrec [DescribeAccelerators]
-> Read DescribeAccelerators
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccelerators]
$creadListPrec :: ReadPrec [DescribeAccelerators]
readPrec :: ReadPrec DescribeAccelerators
$creadPrec :: ReadPrec DescribeAccelerators
readList :: ReadS [DescribeAccelerators]
$creadList :: ReadS [DescribeAccelerators]
readsPrec :: Int -> ReadS DescribeAccelerators
$creadsPrec :: Int -> ReadS DescribeAccelerators
Prelude.Read, Int -> DescribeAccelerators -> ShowS
[DescribeAccelerators] -> ShowS
DescribeAccelerators -> String
(Int -> DescribeAccelerators -> ShowS)
-> (DescribeAccelerators -> String)
-> ([DescribeAccelerators] -> ShowS)
-> Show DescribeAccelerators
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccelerators] -> ShowS
$cshowList :: [DescribeAccelerators] -> ShowS
show :: DescribeAccelerators -> String
$cshow :: DescribeAccelerators -> String
showsPrec :: Int -> DescribeAccelerators -> ShowS
$cshowsPrec :: Int -> DescribeAccelerators -> ShowS
Prelude.Show, (forall x. DescribeAccelerators -> Rep DescribeAccelerators x)
-> (forall x. Rep DescribeAccelerators x -> DescribeAccelerators)
-> Generic DescribeAccelerators
forall x. Rep DescribeAccelerators x -> DescribeAccelerators
forall x. DescribeAccelerators -> Rep DescribeAccelerators x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAccelerators x -> DescribeAccelerators
$cfrom :: forall x. DescribeAccelerators -> Rep DescribeAccelerators x
Prelude.Generic)
newDescribeAccelerators ::
DescribeAccelerators
newDescribeAccelerators :: DescribeAccelerators
newDescribeAccelerators =
DescribeAccelerators' :: Maybe [Filter]
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> DescribeAccelerators
DescribeAccelerators'
{ $sel:filters:DescribeAccelerators' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeAccelerators' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeAccelerators' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:acceleratorIds:DescribeAccelerators' :: Maybe [Text]
acceleratorIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
describeAccelerators_filters :: Lens.Lens' DescribeAccelerators (Prelude.Maybe [Filter])
describeAccelerators_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeAccelerators -> f DescribeAccelerators
describeAccelerators_filters = (DescribeAccelerators -> Maybe [Filter])
-> (DescribeAccelerators -> Maybe [Filter] -> DescribeAccelerators)
-> Lens
DescribeAccelerators
DescribeAccelerators
(Maybe [Filter])
(Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccelerators' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeAccelerators' :: DescribeAccelerators -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeAccelerators
s@DescribeAccelerators' {} Maybe [Filter]
a -> DescribeAccelerators
s {$sel:filters:DescribeAccelerators' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeAccelerators) ((Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeAccelerators -> f DescribeAccelerators)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
-> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeAccelerators
-> f DescribeAccelerators
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
(Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAccelerators_nextToken :: Lens.Lens' DescribeAccelerators (Prelude.Maybe Prelude.Text)
describeAccelerators_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAccelerators -> f DescribeAccelerators
describeAccelerators_nextToken = (DescribeAccelerators -> Maybe Text)
-> (DescribeAccelerators -> Maybe Text -> DescribeAccelerators)
-> Lens
DescribeAccelerators DescribeAccelerators (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccelerators' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccelerators' :: DescribeAccelerators -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAccelerators
s@DescribeAccelerators' {} Maybe Text
a -> DescribeAccelerators
s {$sel:nextToken:DescribeAccelerators' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAccelerators)
describeAccelerators_maxResults :: Lens.Lens' DescribeAccelerators (Prelude.Maybe Prelude.Natural)
describeAccelerators_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeAccelerators -> f DescribeAccelerators
describeAccelerators_maxResults = (DescribeAccelerators -> Maybe Natural)
-> (DescribeAccelerators -> Maybe Natural -> DescribeAccelerators)
-> Lens
DescribeAccelerators
DescribeAccelerators
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccelerators' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeAccelerators' :: DescribeAccelerators -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeAccelerators
s@DescribeAccelerators' {} Maybe Natural
a -> DescribeAccelerators
s {$sel:maxResults:DescribeAccelerators' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeAccelerators)
describeAccelerators_acceleratorIds :: Lens.Lens' DescribeAccelerators (Prelude.Maybe [Prelude.Text])
describeAccelerators_acceleratorIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeAccelerators -> f DescribeAccelerators
describeAccelerators_acceleratorIds = (DescribeAccelerators -> Maybe [Text])
-> (DescribeAccelerators -> Maybe [Text] -> DescribeAccelerators)
-> Lens
DescribeAccelerators
DescribeAccelerators
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccelerators' {Maybe [Text]
acceleratorIds :: Maybe [Text]
$sel:acceleratorIds:DescribeAccelerators' :: DescribeAccelerators -> Maybe [Text]
acceleratorIds} -> Maybe [Text]
acceleratorIds) (\s :: DescribeAccelerators
s@DescribeAccelerators' {} Maybe [Text]
a -> DescribeAccelerators
s {$sel:acceleratorIds:DescribeAccelerators' :: Maybe [Text]
acceleratorIds = Maybe [Text]
a} :: DescribeAccelerators) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeAccelerators -> f DescribeAccelerators)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeAccelerators
-> f DescribeAccelerators
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSPager DescribeAccelerators where
page :: DescribeAccelerators
-> AWSResponse DescribeAccelerators -> Maybe DescribeAccelerators
page DescribeAccelerators
rq AWSResponse DescribeAccelerators
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAccelerators
DescribeAcceleratorsResponse
rs
DescribeAcceleratorsResponse
-> Getting (First Text) DescribeAcceleratorsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAcceleratorsResponse
-> Const (First Text) DescribeAcceleratorsResponse
Lens' DescribeAcceleratorsResponse (Maybe Text)
describeAcceleratorsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAcceleratorsResponse
-> Const (First Text) DescribeAcceleratorsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeAcceleratorsResponse 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 DescribeAccelerators
forall a. Maybe a
Prelude.Nothing
| Maybe [ElasticInferenceAccelerator] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAccelerators
DescribeAcceleratorsResponse
rs
DescribeAcceleratorsResponse
-> Getting
(First [ElasticInferenceAccelerator])
DescribeAcceleratorsResponse
[ElasticInferenceAccelerator]
-> Maybe [ElasticInferenceAccelerator]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ElasticInferenceAccelerator]
-> Const
(First [ElasticInferenceAccelerator])
(Maybe [ElasticInferenceAccelerator]))
-> DescribeAcceleratorsResponse
-> Const
(First [ElasticInferenceAccelerator]) DescribeAcceleratorsResponse
Lens'
DescribeAcceleratorsResponse (Maybe [ElasticInferenceAccelerator])
describeAcceleratorsResponse_acceleratorSet
((Maybe [ElasticInferenceAccelerator]
-> Const
(First [ElasticInferenceAccelerator])
(Maybe [ElasticInferenceAccelerator]))
-> DescribeAcceleratorsResponse
-> Const
(First [ElasticInferenceAccelerator]) DescribeAcceleratorsResponse)
-> (([ElasticInferenceAccelerator]
-> Const
(First [ElasticInferenceAccelerator])
[ElasticInferenceAccelerator])
-> Maybe [ElasticInferenceAccelerator]
-> Const
(First [ElasticInferenceAccelerator])
(Maybe [ElasticInferenceAccelerator]))
-> Getting
(First [ElasticInferenceAccelerator])
DescribeAcceleratorsResponse
[ElasticInferenceAccelerator]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ElasticInferenceAccelerator]
-> Const
(First [ElasticInferenceAccelerator])
[ElasticInferenceAccelerator])
-> Maybe [ElasticInferenceAccelerator]
-> Const
(First [ElasticInferenceAccelerator])
(Maybe [ElasticInferenceAccelerator])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeAccelerators
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeAccelerators -> Maybe DescribeAccelerators
forall a. a -> Maybe a
Prelude.Just (DescribeAccelerators -> Maybe DescribeAccelerators)
-> DescribeAccelerators -> Maybe DescribeAccelerators
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeAccelerators
rq
DescribeAccelerators
-> (DescribeAccelerators -> DescribeAccelerators)
-> DescribeAccelerators
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeAccelerators -> Identity DescribeAccelerators
Lens
DescribeAccelerators DescribeAccelerators (Maybe Text) (Maybe Text)
describeAccelerators_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeAccelerators -> Identity DescribeAccelerators)
-> Maybe Text -> DescribeAccelerators -> DescribeAccelerators
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeAccelerators
DescribeAcceleratorsResponse
rs
DescribeAcceleratorsResponse
-> Getting (First Text) DescribeAcceleratorsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAcceleratorsResponse
-> Const (First Text) DescribeAcceleratorsResponse
Lens' DescribeAcceleratorsResponse (Maybe Text)
describeAcceleratorsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAcceleratorsResponse
-> Const (First Text) DescribeAcceleratorsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeAcceleratorsResponse 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 DescribeAccelerators where
type
AWSResponse DescribeAccelerators =
DescribeAcceleratorsResponse
request :: DescribeAccelerators -> Request DescribeAccelerators
request = Service -> DescribeAccelerators -> Request DescribeAccelerators
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAccelerators
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAccelerators)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeAccelerators))
-> Logger
-> Service
-> Proxy DescribeAccelerators
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAccelerators)))
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 [ElasticInferenceAccelerator]
-> Maybe Text -> Int -> DescribeAcceleratorsResponse
DescribeAcceleratorsResponse'
(Maybe [ElasticInferenceAccelerator]
-> Maybe Text -> Int -> DescribeAcceleratorsResponse)
-> Either String (Maybe [ElasticInferenceAccelerator])
-> Either
String (Maybe Text -> Int -> DescribeAcceleratorsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [ElasticInferenceAccelerator]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"acceleratorSet" Either String (Maybe (Maybe [ElasticInferenceAccelerator]))
-> Maybe [ElasticInferenceAccelerator]
-> Either String (Maybe [ElasticInferenceAccelerator])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ElasticInferenceAccelerator]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> DescribeAcceleratorsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeAcceleratorsResponse)
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
"nextToken")
Either String (Int -> DescribeAcceleratorsResponse)
-> Either String Int -> Either String DescribeAcceleratorsResponse
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 DescribeAccelerators
instance Prelude.NFData DescribeAccelerators
instance Core.ToHeaders DescribeAccelerators where
toHeaders :: DescribeAccelerators -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeAccelerators -> 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 DescribeAccelerators where
toJSON :: DescribeAccelerators -> Value
toJSON DescribeAccelerators' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
acceleratorIds :: Maybe [Text]
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:acceleratorIds:DescribeAccelerators' :: DescribeAccelerators -> Maybe [Text]
$sel:maxResults:DescribeAccelerators' :: DescribeAccelerators -> Maybe Natural
$sel:nextToken:DescribeAccelerators' :: DescribeAccelerators -> Maybe Text
$sel:filters:DescribeAccelerators' :: DescribeAccelerators -> Maybe [Filter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
(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
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Text
"acceleratorIds" 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]
acceleratorIds
]
)
instance Core.ToPath DescribeAccelerators where
toPath :: DescribeAccelerators -> ByteString
toPath = ByteString -> DescribeAccelerators -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/describe-accelerators"
instance Core.ToQuery DescribeAccelerators where
toQuery :: DescribeAccelerators -> QueryString
toQuery = QueryString -> DescribeAccelerators -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeAcceleratorsResponse = DescribeAcceleratorsResponse'
{
DescribeAcceleratorsResponse -> Maybe [ElasticInferenceAccelerator]
acceleratorSet :: Prelude.Maybe [ElasticInferenceAccelerator],
DescribeAcceleratorsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAcceleratorsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAcceleratorsResponse
-> DescribeAcceleratorsResponse -> Bool
(DescribeAcceleratorsResponse
-> DescribeAcceleratorsResponse -> Bool)
-> (DescribeAcceleratorsResponse
-> DescribeAcceleratorsResponse -> Bool)
-> Eq DescribeAcceleratorsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAcceleratorsResponse
-> DescribeAcceleratorsResponse -> Bool
$c/= :: DescribeAcceleratorsResponse
-> DescribeAcceleratorsResponse -> Bool
== :: DescribeAcceleratorsResponse
-> DescribeAcceleratorsResponse -> Bool
$c== :: DescribeAcceleratorsResponse
-> DescribeAcceleratorsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAcceleratorsResponse]
ReadPrec DescribeAcceleratorsResponse
Int -> ReadS DescribeAcceleratorsResponse
ReadS [DescribeAcceleratorsResponse]
(Int -> ReadS DescribeAcceleratorsResponse)
-> ReadS [DescribeAcceleratorsResponse]
-> ReadPrec DescribeAcceleratorsResponse
-> ReadPrec [DescribeAcceleratorsResponse]
-> Read DescribeAcceleratorsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAcceleratorsResponse]
$creadListPrec :: ReadPrec [DescribeAcceleratorsResponse]
readPrec :: ReadPrec DescribeAcceleratorsResponse
$creadPrec :: ReadPrec DescribeAcceleratorsResponse
readList :: ReadS [DescribeAcceleratorsResponse]
$creadList :: ReadS [DescribeAcceleratorsResponse]
readsPrec :: Int -> ReadS DescribeAcceleratorsResponse
$creadsPrec :: Int -> ReadS DescribeAcceleratorsResponse
Prelude.Read, Int -> DescribeAcceleratorsResponse -> ShowS
[DescribeAcceleratorsResponse] -> ShowS
DescribeAcceleratorsResponse -> String
(Int -> DescribeAcceleratorsResponse -> ShowS)
-> (DescribeAcceleratorsResponse -> String)
-> ([DescribeAcceleratorsResponse] -> ShowS)
-> Show DescribeAcceleratorsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAcceleratorsResponse] -> ShowS
$cshowList :: [DescribeAcceleratorsResponse] -> ShowS
show :: DescribeAcceleratorsResponse -> String
$cshow :: DescribeAcceleratorsResponse -> String
showsPrec :: Int -> DescribeAcceleratorsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAcceleratorsResponse -> ShowS
Prelude.Show, (forall x.
DescribeAcceleratorsResponse -> Rep DescribeAcceleratorsResponse x)
-> (forall x.
Rep DescribeAcceleratorsResponse x -> DescribeAcceleratorsResponse)
-> Generic DescribeAcceleratorsResponse
forall x.
Rep DescribeAcceleratorsResponse x -> DescribeAcceleratorsResponse
forall x.
DescribeAcceleratorsResponse -> Rep DescribeAcceleratorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAcceleratorsResponse x -> DescribeAcceleratorsResponse
$cfrom :: forall x.
DescribeAcceleratorsResponse -> Rep DescribeAcceleratorsResponse x
Prelude.Generic)
newDescribeAcceleratorsResponse ::
Prelude.Int ->
DescribeAcceleratorsResponse
newDescribeAcceleratorsResponse :: Int -> DescribeAcceleratorsResponse
newDescribeAcceleratorsResponse Int
pHttpStatus_ =
DescribeAcceleratorsResponse' :: Maybe [ElasticInferenceAccelerator]
-> Maybe Text -> Int -> DescribeAcceleratorsResponse
DescribeAcceleratorsResponse'
{ $sel:acceleratorSet:DescribeAcceleratorsResponse' :: Maybe [ElasticInferenceAccelerator]
acceleratorSet =
Maybe [ElasticInferenceAccelerator]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeAcceleratorsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAcceleratorsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAcceleratorsResponse_acceleratorSet :: Lens.Lens' DescribeAcceleratorsResponse (Prelude.Maybe [ElasticInferenceAccelerator])
describeAcceleratorsResponse_acceleratorSet :: (Maybe [ElasticInferenceAccelerator]
-> f (Maybe [ElasticInferenceAccelerator]))
-> DescribeAcceleratorsResponse -> f DescribeAcceleratorsResponse
describeAcceleratorsResponse_acceleratorSet = (DescribeAcceleratorsResponse
-> Maybe [ElasticInferenceAccelerator])
-> (DescribeAcceleratorsResponse
-> Maybe [ElasticInferenceAccelerator]
-> DescribeAcceleratorsResponse)
-> Lens'
DescribeAcceleratorsResponse (Maybe [ElasticInferenceAccelerator])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAcceleratorsResponse' {Maybe [ElasticInferenceAccelerator]
acceleratorSet :: Maybe [ElasticInferenceAccelerator]
$sel:acceleratorSet:DescribeAcceleratorsResponse' :: DescribeAcceleratorsResponse -> Maybe [ElasticInferenceAccelerator]
acceleratorSet} -> Maybe [ElasticInferenceAccelerator]
acceleratorSet) (\s :: DescribeAcceleratorsResponse
s@DescribeAcceleratorsResponse' {} Maybe [ElasticInferenceAccelerator]
a -> DescribeAcceleratorsResponse
s {$sel:acceleratorSet:DescribeAcceleratorsResponse' :: Maybe [ElasticInferenceAccelerator]
acceleratorSet = Maybe [ElasticInferenceAccelerator]
a} :: DescribeAcceleratorsResponse) ((Maybe [ElasticInferenceAccelerator]
-> f (Maybe [ElasticInferenceAccelerator]))
-> DescribeAcceleratorsResponse -> f DescribeAcceleratorsResponse)
-> ((Maybe [ElasticInferenceAccelerator]
-> f (Maybe [ElasticInferenceAccelerator]))
-> Maybe [ElasticInferenceAccelerator]
-> f (Maybe [ElasticInferenceAccelerator]))
-> (Maybe [ElasticInferenceAccelerator]
-> f (Maybe [ElasticInferenceAccelerator]))
-> DescribeAcceleratorsResponse
-> f DescribeAcceleratorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ElasticInferenceAccelerator]
[ElasticInferenceAccelerator]
[ElasticInferenceAccelerator]
[ElasticInferenceAccelerator]
-> Iso
(Maybe [ElasticInferenceAccelerator])
(Maybe [ElasticInferenceAccelerator])
(Maybe [ElasticInferenceAccelerator])
(Maybe [ElasticInferenceAccelerator])
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
[ElasticInferenceAccelerator]
[ElasticInferenceAccelerator]
[ElasticInferenceAccelerator]
[ElasticInferenceAccelerator]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAcceleratorsResponse_nextToken :: Lens.Lens' DescribeAcceleratorsResponse (Prelude.Maybe Prelude.Text)
describeAcceleratorsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAcceleratorsResponse -> f DescribeAcceleratorsResponse
describeAcceleratorsResponse_nextToken = (DescribeAcceleratorsResponse -> Maybe Text)
-> (DescribeAcceleratorsResponse
-> Maybe Text -> DescribeAcceleratorsResponse)
-> Lens' DescribeAcceleratorsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAcceleratorsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAcceleratorsResponse' :: DescribeAcceleratorsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAcceleratorsResponse
s@DescribeAcceleratorsResponse' {} Maybe Text
a -> DescribeAcceleratorsResponse
s {$sel:nextToken:DescribeAcceleratorsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAcceleratorsResponse)
describeAcceleratorsResponse_httpStatus :: Lens.Lens' DescribeAcceleratorsResponse Prelude.Int
describeAcceleratorsResponse_httpStatus :: (Int -> f Int)
-> DescribeAcceleratorsResponse -> f DescribeAcceleratorsResponse
describeAcceleratorsResponse_httpStatus = (DescribeAcceleratorsResponse -> Int)
-> (DescribeAcceleratorsResponse
-> Int -> DescribeAcceleratorsResponse)
-> Lens
DescribeAcceleratorsResponse DescribeAcceleratorsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAcceleratorsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAcceleratorsResponse' :: DescribeAcceleratorsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAcceleratorsResponse
s@DescribeAcceleratorsResponse' {} Int
a -> DescribeAcceleratorsResponse
s {$sel:httpStatus:DescribeAcceleratorsResponse' :: Int
httpStatus = Int
a} :: DescribeAcceleratorsResponse)
instance Prelude.NFData DescribeAcceleratorsResponse