{-# 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.DeviceFarm.GetOfferingStatus
(
GetOfferingStatus (..),
newGetOfferingStatus,
getOfferingStatus_nextToken,
GetOfferingStatusResponse (..),
newGetOfferingStatusResponse,
getOfferingStatusResponse_nextPeriod,
getOfferingStatusResponse_current,
getOfferingStatusResponse_nextToken,
getOfferingStatusResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.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 GetOfferingStatus = GetOfferingStatus'
{
GetOfferingStatus -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (GetOfferingStatus -> GetOfferingStatus -> Bool
(GetOfferingStatus -> GetOfferingStatus -> Bool)
-> (GetOfferingStatus -> GetOfferingStatus -> Bool)
-> Eq GetOfferingStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOfferingStatus -> GetOfferingStatus -> Bool
$c/= :: GetOfferingStatus -> GetOfferingStatus -> Bool
== :: GetOfferingStatus -> GetOfferingStatus -> Bool
$c== :: GetOfferingStatus -> GetOfferingStatus -> Bool
Prelude.Eq, ReadPrec [GetOfferingStatus]
ReadPrec GetOfferingStatus
Int -> ReadS GetOfferingStatus
ReadS [GetOfferingStatus]
(Int -> ReadS GetOfferingStatus)
-> ReadS [GetOfferingStatus]
-> ReadPrec GetOfferingStatus
-> ReadPrec [GetOfferingStatus]
-> Read GetOfferingStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOfferingStatus]
$creadListPrec :: ReadPrec [GetOfferingStatus]
readPrec :: ReadPrec GetOfferingStatus
$creadPrec :: ReadPrec GetOfferingStatus
readList :: ReadS [GetOfferingStatus]
$creadList :: ReadS [GetOfferingStatus]
readsPrec :: Int -> ReadS GetOfferingStatus
$creadsPrec :: Int -> ReadS GetOfferingStatus
Prelude.Read, Int -> GetOfferingStatus -> ShowS
[GetOfferingStatus] -> ShowS
GetOfferingStatus -> String
(Int -> GetOfferingStatus -> ShowS)
-> (GetOfferingStatus -> String)
-> ([GetOfferingStatus] -> ShowS)
-> Show GetOfferingStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOfferingStatus] -> ShowS
$cshowList :: [GetOfferingStatus] -> ShowS
show :: GetOfferingStatus -> String
$cshow :: GetOfferingStatus -> String
showsPrec :: Int -> GetOfferingStatus -> ShowS
$cshowsPrec :: Int -> GetOfferingStatus -> ShowS
Prelude.Show, (forall x. GetOfferingStatus -> Rep GetOfferingStatus x)
-> (forall x. Rep GetOfferingStatus x -> GetOfferingStatus)
-> Generic GetOfferingStatus
forall x. Rep GetOfferingStatus x -> GetOfferingStatus
forall x. GetOfferingStatus -> Rep GetOfferingStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetOfferingStatus x -> GetOfferingStatus
$cfrom :: forall x. GetOfferingStatus -> Rep GetOfferingStatus x
Prelude.Generic)
newGetOfferingStatus ::
GetOfferingStatus
newGetOfferingStatus :: GetOfferingStatus
newGetOfferingStatus =
GetOfferingStatus' :: Maybe Text -> GetOfferingStatus
GetOfferingStatus' {$sel:nextToken:GetOfferingStatus' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing}
getOfferingStatus_nextToken :: Lens.Lens' GetOfferingStatus (Prelude.Maybe Prelude.Text)
getOfferingStatus_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetOfferingStatus -> f GetOfferingStatus
getOfferingStatus_nextToken = (GetOfferingStatus -> Maybe Text)
-> (GetOfferingStatus -> Maybe Text -> GetOfferingStatus)
-> Lens
GetOfferingStatus GetOfferingStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOfferingStatus' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetOfferingStatus' :: GetOfferingStatus -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetOfferingStatus
s@GetOfferingStatus' {} Maybe Text
a -> GetOfferingStatus
s {$sel:nextToken:GetOfferingStatus' :: Maybe Text
nextToken = Maybe Text
a} :: GetOfferingStatus)
instance Core.AWSPager GetOfferingStatus where
page :: GetOfferingStatus
-> AWSResponse GetOfferingStatus -> Maybe GetOfferingStatus
page GetOfferingStatus
rq AWSResponse GetOfferingStatus
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetOfferingStatus
GetOfferingStatusResponse
rs
GetOfferingStatusResponse
-> Getting (First Text) GetOfferingStatusResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetOfferingStatusResponse
-> Const (First Text) GetOfferingStatusResponse
Lens' GetOfferingStatusResponse (Maybe Text)
getOfferingStatusResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetOfferingStatusResponse
-> Const (First Text) GetOfferingStatusResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetOfferingStatusResponse 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 GetOfferingStatus
forall a. Maybe a
Prelude.Nothing
| Maybe (HashMap Text OfferingStatus) -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetOfferingStatus
GetOfferingStatusResponse
rs
GetOfferingStatusResponse
-> Getting
(First (HashMap Text OfferingStatus))
GetOfferingStatusResponse
(HashMap Text OfferingStatus)
-> Maybe (HashMap Text OfferingStatus)
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse
-> Const
(First (HashMap Text OfferingStatus)) GetOfferingStatusResponse
Lens'
GetOfferingStatusResponse (Maybe (HashMap Text OfferingStatus))
getOfferingStatusResponse_current
((Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse
-> Const
(First (HashMap Text OfferingStatus)) GetOfferingStatusResponse)
-> ((HashMap Text OfferingStatus
-> Const
(First (HashMap Text OfferingStatus))
(HashMap Text OfferingStatus))
-> Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus)))
-> Getting
(First (HashMap Text OfferingStatus))
GetOfferingStatusResponse
(HashMap Text OfferingStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text OfferingStatus
-> Const
(First (HashMap Text OfferingStatus))
(HashMap Text OfferingStatus))
-> Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetOfferingStatus
forall a. Maybe a
Prelude.Nothing
| Maybe (HashMap Text OfferingStatus) -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetOfferingStatus
GetOfferingStatusResponse
rs
GetOfferingStatusResponse
-> Getting
(First (HashMap Text OfferingStatus))
GetOfferingStatusResponse
(HashMap Text OfferingStatus)
-> Maybe (HashMap Text OfferingStatus)
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse
-> Const
(First (HashMap Text OfferingStatus)) GetOfferingStatusResponse
Lens'
GetOfferingStatusResponse (Maybe (HashMap Text OfferingStatus))
getOfferingStatusResponse_nextPeriod
((Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse
-> Const
(First (HashMap Text OfferingStatus)) GetOfferingStatusResponse)
-> ((HashMap Text OfferingStatus
-> Const
(First (HashMap Text OfferingStatus))
(HashMap Text OfferingStatus))
-> Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus)))
-> Getting
(First (HashMap Text OfferingStatus))
GetOfferingStatusResponse
(HashMap Text OfferingStatus)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text OfferingStatus
-> Const
(First (HashMap Text OfferingStatus))
(HashMap Text OfferingStatus))
-> Maybe (HashMap Text OfferingStatus)
-> Const
(First (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetOfferingStatus
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetOfferingStatus -> Maybe GetOfferingStatus
forall a. a -> Maybe a
Prelude.Just (GetOfferingStatus -> Maybe GetOfferingStatus)
-> GetOfferingStatus -> Maybe GetOfferingStatus
forall a b. (a -> b) -> a -> b
Prelude.$
GetOfferingStatus
rq
GetOfferingStatus
-> (GetOfferingStatus -> GetOfferingStatus) -> GetOfferingStatus
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetOfferingStatus -> Identity GetOfferingStatus
Lens GetOfferingStatus GetOfferingStatus (Maybe Text) (Maybe Text)
getOfferingStatus_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetOfferingStatus -> Identity GetOfferingStatus)
-> Maybe Text -> GetOfferingStatus -> GetOfferingStatus
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetOfferingStatus
GetOfferingStatusResponse
rs
GetOfferingStatusResponse
-> Getting (First Text) GetOfferingStatusResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetOfferingStatusResponse
-> Const (First Text) GetOfferingStatusResponse
Lens' GetOfferingStatusResponse (Maybe Text)
getOfferingStatusResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetOfferingStatusResponse
-> Const (First Text) GetOfferingStatusResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetOfferingStatusResponse 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 GetOfferingStatus where
type
AWSResponse GetOfferingStatus =
GetOfferingStatusResponse
request :: GetOfferingStatus -> Request GetOfferingStatus
request = Service -> GetOfferingStatus -> Request GetOfferingStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetOfferingStatus
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetOfferingStatus)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetOfferingStatus))
-> Logger
-> Service
-> Proxy GetOfferingStatus
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetOfferingStatus)))
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 (HashMap Text OfferingStatus)
-> Maybe (HashMap Text OfferingStatus)
-> Maybe Text
-> Int
-> GetOfferingStatusResponse
GetOfferingStatusResponse'
(Maybe (HashMap Text OfferingStatus)
-> Maybe (HashMap Text OfferingStatus)
-> Maybe Text
-> Int
-> GetOfferingStatusResponse)
-> Either String (Maybe (HashMap Text OfferingStatus))
-> Either
String
(Maybe (HashMap Text OfferingStatus)
-> Maybe Text -> Int -> GetOfferingStatusResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text OfferingStatus)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextPeriod" Either String (Maybe (Maybe (HashMap Text OfferingStatus)))
-> Maybe (HashMap Text OfferingStatus)
-> Either String (Maybe (HashMap Text OfferingStatus))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text OfferingStatus)
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe (HashMap Text OfferingStatus)
-> Maybe Text -> Int -> GetOfferingStatusResponse)
-> Either String (Maybe (HashMap Text OfferingStatus))
-> Either String (Maybe Text -> Int -> GetOfferingStatusResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text OfferingStatus)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"current" Either String (Maybe (Maybe (HashMap Text OfferingStatus)))
-> Maybe (HashMap Text OfferingStatus)
-> Either String (Maybe (HashMap Text OfferingStatus))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text OfferingStatus)
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> GetOfferingStatusResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetOfferingStatusResponse)
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 -> GetOfferingStatusResponse)
-> Either String Int -> Either String GetOfferingStatusResponse
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 GetOfferingStatus
instance Prelude.NFData GetOfferingStatus
instance Core.ToHeaders GetOfferingStatus where
toHeaders :: GetOfferingStatus -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetOfferingStatus -> 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
"DeviceFarm_20150623.GetOfferingStatus" ::
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 GetOfferingStatus where
toJSON :: GetOfferingStatus -> Value
toJSON GetOfferingStatus' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetOfferingStatus' :: GetOfferingStatus -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(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]
)
instance Core.ToPath GetOfferingStatus where
toPath :: GetOfferingStatus -> ByteString
toPath = ByteString -> GetOfferingStatus -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetOfferingStatus where
toQuery :: GetOfferingStatus -> QueryString
toQuery = QueryString -> GetOfferingStatus -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetOfferingStatusResponse = GetOfferingStatusResponse'
{
GetOfferingStatusResponse -> Maybe (HashMap Text OfferingStatus)
nextPeriod :: Prelude.Maybe (Prelude.HashMap Prelude.Text OfferingStatus),
GetOfferingStatusResponse -> Maybe (HashMap Text OfferingStatus)
current :: Prelude.Maybe (Prelude.HashMap Prelude.Text OfferingStatus),
GetOfferingStatusResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetOfferingStatusResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetOfferingStatusResponse -> GetOfferingStatusResponse -> Bool
(GetOfferingStatusResponse -> GetOfferingStatusResponse -> Bool)
-> (GetOfferingStatusResponse -> GetOfferingStatusResponse -> Bool)
-> Eq GetOfferingStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOfferingStatusResponse -> GetOfferingStatusResponse -> Bool
$c/= :: GetOfferingStatusResponse -> GetOfferingStatusResponse -> Bool
== :: GetOfferingStatusResponse -> GetOfferingStatusResponse -> Bool
$c== :: GetOfferingStatusResponse -> GetOfferingStatusResponse -> Bool
Prelude.Eq, ReadPrec [GetOfferingStatusResponse]
ReadPrec GetOfferingStatusResponse
Int -> ReadS GetOfferingStatusResponse
ReadS [GetOfferingStatusResponse]
(Int -> ReadS GetOfferingStatusResponse)
-> ReadS [GetOfferingStatusResponse]
-> ReadPrec GetOfferingStatusResponse
-> ReadPrec [GetOfferingStatusResponse]
-> Read GetOfferingStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOfferingStatusResponse]
$creadListPrec :: ReadPrec [GetOfferingStatusResponse]
readPrec :: ReadPrec GetOfferingStatusResponse
$creadPrec :: ReadPrec GetOfferingStatusResponse
readList :: ReadS [GetOfferingStatusResponse]
$creadList :: ReadS [GetOfferingStatusResponse]
readsPrec :: Int -> ReadS GetOfferingStatusResponse
$creadsPrec :: Int -> ReadS GetOfferingStatusResponse
Prelude.Read, Int -> GetOfferingStatusResponse -> ShowS
[GetOfferingStatusResponse] -> ShowS
GetOfferingStatusResponse -> String
(Int -> GetOfferingStatusResponse -> ShowS)
-> (GetOfferingStatusResponse -> String)
-> ([GetOfferingStatusResponse] -> ShowS)
-> Show GetOfferingStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOfferingStatusResponse] -> ShowS
$cshowList :: [GetOfferingStatusResponse] -> ShowS
show :: GetOfferingStatusResponse -> String
$cshow :: GetOfferingStatusResponse -> String
showsPrec :: Int -> GetOfferingStatusResponse -> ShowS
$cshowsPrec :: Int -> GetOfferingStatusResponse -> ShowS
Prelude.Show, (forall x.
GetOfferingStatusResponse -> Rep GetOfferingStatusResponse x)
-> (forall x.
Rep GetOfferingStatusResponse x -> GetOfferingStatusResponse)
-> Generic GetOfferingStatusResponse
forall x.
Rep GetOfferingStatusResponse x -> GetOfferingStatusResponse
forall x.
GetOfferingStatusResponse -> Rep GetOfferingStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOfferingStatusResponse x -> GetOfferingStatusResponse
$cfrom :: forall x.
GetOfferingStatusResponse -> Rep GetOfferingStatusResponse x
Prelude.Generic)
newGetOfferingStatusResponse ::
Prelude.Int ->
GetOfferingStatusResponse
newGetOfferingStatusResponse :: Int -> GetOfferingStatusResponse
newGetOfferingStatusResponse Int
pHttpStatus_ =
GetOfferingStatusResponse' :: Maybe (HashMap Text OfferingStatus)
-> Maybe (HashMap Text OfferingStatus)
-> Maybe Text
-> Int
-> GetOfferingStatusResponse
GetOfferingStatusResponse'
{ $sel:nextPeriod:GetOfferingStatusResponse' :: Maybe (HashMap Text OfferingStatus)
nextPeriod =
Maybe (HashMap Text OfferingStatus)
forall a. Maybe a
Prelude.Nothing,
$sel:current:GetOfferingStatusResponse' :: Maybe (HashMap Text OfferingStatus)
current = Maybe (HashMap Text OfferingStatus)
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetOfferingStatusResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetOfferingStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getOfferingStatusResponse_nextPeriod :: Lens.Lens' GetOfferingStatusResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text OfferingStatus))
getOfferingStatusResponse_nextPeriod :: (Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse -> f GetOfferingStatusResponse
getOfferingStatusResponse_nextPeriod = (GetOfferingStatusResponse -> Maybe (HashMap Text OfferingStatus))
-> (GetOfferingStatusResponse
-> Maybe (HashMap Text OfferingStatus)
-> GetOfferingStatusResponse)
-> Lens'
GetOfferingStatusResponse (Maybe (HashMap Text OfferingStatus))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOfferingStatusResponse' {Maybe (HashMap Text OfferingStatus)
nextPeriod :: Maybe (HashMap Text OfferingStatus)
$sel:nextPeriod:GetOfferingStatusResponse' :: GetOfferingStatusResponse -> Maybe (HashMap Text OfferingStatus)
nextPeriod} -> Maybe (HashMap Text OfferingStatus)
nextPeriod) (\s :: GetOfferingStatusResponse
s@GetOfferingStatusResponse' {} Maybe (HashMap Text OfferingStatus)
a -> GetOfferingStatusResponse
s {$sel:nextPeriod:GetOfferingStatusResponse' :: Maybe (HashMap Text OfferingStatus)
nextPeriod = Maybe (HashMap Text OfferingStatus)
a} :: GetOfferingStatusResponse) ((Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse -> f GetOfferingStatusResponse)
-> ((Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> (Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse
-> f GetOfferingStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
-> Iso
(Maybe (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
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 OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getOfferingStatusResponse_current :: Lens.Lens' GetOfferingStatusResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text OfferingStatus))
getOfferingStatusResponse_current :: (Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse -> f GetOfferingStatusResponse
getOfferingStatusResponse_current = (GetOfferingStatusResponse -> Maybe (HashMap Text OfferingStatus))
-> (GetOfferingStatusResponse
-> Maybe (HashMap Text OfferingStatus)
-> GetOfferingStatusResponse)
-> Lens'
GetOfferingStatusResponse (Maybe (HashMap Text OfferingStatus))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOfferingStatusResponse' {Maybe (HashMap Text OfferingStatus)
current :: Maybe (HashMap Text OfferingStatus)
$sel:current:GetOfferingStatusResponse' :: GetOfferingStatusResponse -> Maybe (HashMap Text OfferingStatus)
current} -> Maybe (HashMap Text OfferingStatus)
current) (\s :: GetOfferingStatusResponse
s@GetOfferingStatusResponse' {} Maybe (HashMap Text OfferingStatus)
a -> GetOfferingStatusResponse
s {$sel:current:GetOfferingStatusResponse' :: Maybe (HashMap Text OfferingStatus)
current = Maybe (HashMap Text OfferingStatus)
a} :: GetOfferingStatusResponse) ((Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse -> f GetOfferingStatusResponse)
-> ((Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> (Maybe (HashMap Text OfferingStatus)
-> f (Maybe (HashMap Text OfferingStatus)))
-> GetOfferingStatusResponse
-> f GetOfferingStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
-> Iso
(Maybe (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
(Maybe (HashMap Text OfferingStatus))
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 OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
(HashMap Text OfferingStatus)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getOfferingStatusResponse_nextToken :: Lens.Lens' GetOfferingStatusResponse (Prelude.Maybe Prelude.Text)
getOfferingStatusResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetOfferingStatusResponse -> f GetOfferingStatusResponse
getOfferingStatusResponse_nextToken = (GetOfferingStatusResponse -> Maybe Text)
-> (GetOfferingStatusResponse
-> Maybe Text -> GetOfferingStatusResponse)
-> Lens' GetOfferingStatusResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOfferingStatusResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetOfferingStatusResponse' :: GetOfferingStatusResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetOfferingStatusResponse
s@GetOfferingStatusResponse' {} Maybe Text
a -> GetOfferingStatusResponse
s {$sel:nextToken:GetOfferingStatusResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetOfferingStatusResponse)
getOfferingStatusResponse_httpStatus :: Lens.Lens' GetOfferingStatusResponse Prelude.Int
getOfferingStatusResponse_httpStatus :: (Int -> f Int)
-> GetOfferingStatusResponse -> f GetOfferingStatusResponse
getOfferingStatusResponse_httpStatus = (GetOfferingStatusResponse -> Int)
-> (GetOfferingStatusResponse -> Int -> GetOfferingStatusResponse)
-> Lens GetOfferingStatusResponse GetOfferingStatusResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOfferingStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetOfferingStatusResponse' :: GetOfferingStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetOfferingStatusResponse
s@GetOfferingStatusResponse' {} Int
a -> GetOfferingStatusResponse
s {$sel:httpStatus:GetOfferingStatusResponse' :: Int
httpStatus = Int
a} :: GetOfferingStatusResponse)
instance Prelude.NFData GetOfferingStatusResponse