{-# 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.ElasticSearch.GetUpgradeHistory
(
GetUpgradeHistory (..),
newGetUpgradeHistory,
getUpgradeHistory_nextToken,
getUpgradeHistory_maxResults,
getUpgradeHistory_domainName,
GetUpgradeHistoryResponse (..),
newGetUpgradeHistoryResponse,
getUpgradeHistoryResponse_nextToken,
getUpgradeHistoryResponse_upgradeHistories,
getUpgradeHistoryResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.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 GetUpgradeHistory = GetUpgradeHistory'
{ GetUpgradeHistory -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetUpgradeHistory -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
GetUpgradeHistory -> Text
domainName :: Prelude.Text
}
deriving (GetUpgradeHistory -> GetUpgradeHistory -> Bool
(GetUpgradeHistory -> GetUpgradeHistory -> Bool)
-> (GetUpgradeHistory -> GetUpgradeHistory -> Bool)
-> Eq GetUpgradeHistory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUpgradeHistory -> GetUpgradeHistory -> Bool
$c/= :: GetUpgradeHistory -> GetUpgradeHistory -> Bool
== :: GetUpgradeHistory -> GetUpgradeHistory -> Bool
$c== :: GetUpgradeHistory -> GetUpgradeHistory -> Bool
Prelude.Eq, ReadPrec [GetUpgradeHistory]
ReadPrec GetUpgradeHistory
Int -> ReadS GetUpgradeHistory
ReadS [GetUpgradeHistory]
(Int -> ReadS GetUpgradeHistory)
-> ReadS [GetUpgradeHistory]
-> ReadPrec GetUpgradeHistory
-> ReadPrec [GetUpgradeHistory]
-> Read GetUpgradeHistory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUpgradeHistory]
$creadListPrec :: ReadPrec [GetUpgradeHistory]
readPrec :: ReadPrec GetUpgradeHistory
$creadPrec :: ReadPrec GetUpgradeHistory
readList :: ReadS [GetUpgradeHistory]
$creadList :: ReadS [GetUpgradeHistory]
readsPrec :: Int -> ReadS GetUpgradeHistory
$creadsPrec :: Int -> ReadS GetUpgradeHistory
Prelude.Read, Int -> GetUpgradeHistory -> ShowS
[GetUpgradeHistory] -> ShowS
GetUpgradeHistory -> String
(Int -> GetUpgradeHistory -> ShowS)
-> (GetUpgradeHistory -> String)
-> ([GetUpgradeHistory] -> ShowS)
-> Show GetUpgradeHistory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUpgradeHistory] -> ShowS
$cshowList :: [GetUpgradeHistory] -> ShowS
show :: GetUpgradeHistory -> String
$cshow :: GetUpgradeHistory -> String
showsPrec :: Int -> GetUpgradeHistory -> ShowS
$cshowsPrec :: Int -> GetUpgradeHistory -> ShowS
Prelude.Show, (forall x. GetUpgradeHistory -> Rep GetUpgradeHistory x)
-> (forall x. Rep GetUpgradeHistory x -> GetUpgradeHistory)
-> Generic GetUpgradeHistory
forall x. Rep GetUpgradeHistory x -> GetUpgradeHistory
forall x. GetUpgradeHistory -> Rep GetUpgradeHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetUpgradeHistory x -> GetUpgradeHistory
$cfrom :: forall x. GetUpgradeHistory -> Rep GetUpgradeHistory x
Prelude.Generic)
newGetUpgradeHistory ::
Prelude.Text ->
GetUpgradeHistory
newGetUpgradeHistory :: Text -> GetUpgradeHistory
newGetUpgradeHistory Text
pDomainName_ =
GetUpgradeHistory' :: Maybe Text -> Maybe Int -> Text -> GetUpgradeHistory
GetUpgradeHistory'
{ $sel:nextToken:GetUpgradeHistory' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetUpgradeHistory' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:GetUpgradeHistory' :: Text
domainName = Text
pDomainName_
}
getUpgradeHistory_nextToken :: Lens.Lens' GetUpgradeHistory (Prelude.Maybe Prelude.Text)
getUpgradeHistory_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetUpgradeHistory -> f GetUpgradeHistory
getUpgradeHistory_nextToken = (GetUpgradeHistory -> Maybe Text)
-> (GetUpgradeHistory -> Maybe Text -> GetUpgradeHistory)
-> Lens
GetUpgradeHistory GetUpgradeHistory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUpgradeHistory' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetUpgradeHistory' :: GetUpgradeHistory -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetUpgradeHistory
s@GetUpgradeHistory' {} Maybe Text
a -> GetUpgradeHistory
s {$sel:nextToken:GetUpgradeHistory' :: Maybe Text
nextToken = Maybe Text
a} :: GetUpgradeHistory)
getUpgradeHistory_maxResults :: Lens.Lens' GetUpgradeHistory (Prelude.Maybe Prelude.Int)
getUpgradeHistory_maxResults :: (Maybe Int -> f (Maybe Int))
-> GetUpgradeHistory -> f GetUpgradeHistory
getUpgradeHistory_maxResults = (GetUpgradeHistory -> Maybe Int)
-> (GetUpgradeHistory -> Maybe Int -> GetUpgradeHistory)
-> Lens GetUpgradeHistory GetUpgradeHistory (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUpgradeHistory' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetUpgradeHistory' :: GetUpgradeHistory -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetUpgradeHistory
s@GetUpgradeHistory' {} Maybe Int
a -> GetUpgradeHistory
s {$sel:maxResults:GetUpgradeHistory' :: Maybe Int
maxResults = Maybe Int
a} :: GetUpgradeHistory)
getUpgradeHistory_domainName :: Lens.Lens' GetUpgradeHistory Prelude.Text
getUpgradeHistory_domainName :: (Text -> f Text) -> GetUpgradeHistory -> f GetUpgradeHistory
getUpgradeHistory_domainName = (GetUpgradeHistory -> Text)
-> (GetUpgradeHistory -> Text -> GetUpgradeHistory)
-> Lens GetUpgradeHistory GetUpgradeHistory Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUpgradeHistory' {Text
domainName :: Text
$sel:domainName:GetUpgradeHistory' :: GetUpgradeHistory -> Text
domainName} -> Text
domainName) (\s :: GetUpgradeHistory
s@GetUpgradeHistory' {} Text
a -> GetUpgradeHistory
s {$sel:domainName:GetUpgradeHistory' :: Text
domainName = Text
a} :: GetUpgradeHistory)
instance Core.AWSPager GetUpgradeHistory where
page :: GetUpgradeHistory
-> AWSResponse GetUpgradeHistory -> Maybe GetUpgradeHistory
page GetUpgradeHistory
rq AWSResponse GetUpgradeHistory
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetUpgradeHistory
GetUpgradeHistoryResponse
rs
GetUpgradeHistoryResponse
-> Getting (First Text) GetUpgradeHistoryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetUpgradeHistoryResponse
-> Const (First Text) GetUpgradeHistoryResponse
Lens' GetUpgradeHistoryResponse (Maybe Text)
getUpgradeHistoryResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetUpgradeHistoryResponse
-> Const (First Text) GetUpgradeHistoryResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetUpgradeHistoryResponse 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 GetUpgradeHistory
forall a. Maybe a
Prelude.Nothing
| Maybe [UpgradeHistory] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetUpgradeHistory
GetUpgradeHistoryResponse
rs
GetUpgradeHistoryResponse
-> Getting
(First [UpgradeHistory]) GetUpgradeHistoryResponse [UpgradeHistory]
-> Maybe [UpgradeHistory]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [UpgradeHistory]
-> Const (First [UpgradeHistory]) (Maybe [UpgradeHistory]))
-> GetUpgradeHistoryResponse
-> Const (First [UpgradeHistory]) GetUpgradeHistoryResponse
Lens' GetUpgradeHistoryResponse (Maybe [UpgradeHistory])
getUpgradeHistoryResponse_upgradeHistories
((Maybe [UpgradeHistory]
-> Const (First [UpgradeHistory]) (Maybe [UpgradeHistory]))
-> GetUpgradeHistoryResponse
-> Const (First [UpgradeHistory]) GetUpgradeHistoryResponse)
-> (([UpgradeHistory]
-> Const (First [UpgradeHistory]) [UpgradeHistory])
-> Maybe [UpgradeHistory]
-> Const (First [UpgradeHistory]) (Maybe [UpgradeHistory]))
-> Getting
(First [UpgradeHistory]) GetUpgradeHistoryResponse [UpgradeHistory]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([UpgradeHistory]
-> Const (First [UpgradeHistory]) [UpgradeHistory])
-> Maybe [UpgradeHistory]
-> Const (First [UpgradeHistory]) (Maybe [UpgradeHistory])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetUpgradeHistory
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetUpgradeHistory -> Maybe GetUpgradeHistory
forall a. a -> Maybe a
Prelude.Just (GetUpgradeHistory -> Maybe GetUpgradeHistory)
-> GetUpgradeHistory -> Maybe GetUpgradeHistory
forall a b. (a -> b) -> a -> b
Prelude.$
GetUpgradeHistory
rq
GetUpgradeHistory
-> (GetUpgradeHistory -> GetUpgradeHistory) -> GetUpgradeHistory
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetUpgradeHistory -> Identity GetUpgradeHistory
Lens GetUpgradeHistory GetUpgradeHistory (Maybe Text) (Maybe Text)
getUpgradeHistory_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetUpgradeHistory -> Identity GetUpgradeHistory)
-> Maybe Text -> GetUpgradeHistory -> GetUpgradeHistory
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetUpgradeHistory
GetUpgradeHistoryResponse
rs
GetUpgradeHistoryResponse
-> Getting (First Text) GetUpgradeHistoryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetUpgradeHistoryResponse
-> Const (First Text) GetUpgradeHistoryResponse
Lens' GetUpgradeHistoryResponse (Maybe Text)
getUpgradeHistoryResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetUpgradeHistoryResponse
-> Const (First Text) GetUpgradeHistoryResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetUpgradeHistoryResponse 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 GetUpgradeHistory where
type
AWSResponse GetUpgradeHistory =
GetUpgradeHistoryResponse
request :: GetUpgradeHistory -> Request GetUpgradeHistory
request = Service -> GetUpgradeHistory -> Request GetUpgradeHistory
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetUpgradeHistory
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetUpgradeHistory)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetUpgradeHistory))
-> Logger
-> Service
-> Proxy GetUpgradeHistory
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetUpgradeHistory)))
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 [UpgradeHistory] -> Int -> GetUpgradeHistoryResponse
GetUpgradeHistoryResponse'
(Maybe Text
-> Maybe [UpgradeHistory] -> Int -> GetUpgradeHistoryResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [UpgradeHistory] -> Int -> GetUpgradeHistoryResponse)
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 [UpgradeHistory] -> Int -> GetUpgradeHistoryResponse)
-> Either String (Maybe [UpgradeHistory])
-> Either String (Int -> GetUpgradeHistoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [UpgradeHistory]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UpgradeHistories"
Either String (Maybe (Maybe [UpgradeHistory]))
-> Maybe [UpgradeHistory] -> Either String (Maybe [UpgradeHistory])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [UpgradeHistory]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> GetUpgradeHistoryResponse)
-> Either String Int -> Either String GetUpgradeHistoryResponse
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 GetUpgradeHistory
instance Prelude.NFData GetUpgradeHistory
instance Core.ToHeaders GetUpgradeHistory where
toHeaders :: GetUpgradeHistory -> ResponseHeaders
toHeaders = ResponseHeaders -> GetUpgradeHistory -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath GetUpgradeHistory where
toPath :: GetUpgradeHistory -> ByteString
toPath GetUpgradeHistory' {Maybe Int
Maybe Text
Text
domainName :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:domainName:GetUpgradeHistory' :: GetUpgradeHistory -> Text
$sel:maxResults:GetUpgradeHistory' :: GetUpgradeHistory -> Maybe Int
$sel:nextToken:GetUpgradeHistory' :: GetUpgradeHistory -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-01-01/es/upgradeDomain/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName,
ByteString
"/history"
]
instance Core.ToQuery GetUpgradeHistory where
toQuery :: GetUpgradeHistory -> QueryString
toQuery GetUpgradeHistory' {Maybe Int
Maybe Text
Text
domainName :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:domainName:GetUpgradeHistory' :: GetUpgradeHistory -> Text
$sel:maxResults:GetUpgradeHistory' :: GetUpgradeHistory -> Maybe Int
$sel:nextToken:GetUpgradeHistory' :: GetUpgradeHistory -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"maxResults" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
]
data GetUpgradeHistoryResponse = GetUpgradeHistoryResponse'
{
GetUpgradeHistoryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetUpgradeHistoryResponse -> Maybe [UpgradeHistory]
upgradeHistories :: Prelude.Maybe [UpgradeHistory],
GetUpgradeHistoryResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetUpgradeHistoryResponse -> GetUpgradeHistoryResponse -> Bool
(GetUpgradeHistoryResponse -> GetUpgradeHistoryResponse -> Bool)
-> (GetUpgradeHistoryResponse -> GetUpgradeHistoryResponse -> Bool)
-> Eq GetUpgradeHistoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetUpgradeHistoryResponse -> GetUpgradeHistoryResponse -> Bool
$c/= :: GetUpgradeHistoryResponse -> GetUpgradeHistoryResponse -> Bool
== :: GetUpgradeHistoryResponse -> GetUpgradeHistoryResponse -> Bool
$c== :: GetUpgradeHistoryResponse -> GetUpgradeHistoryResponse -> Bool
Prelude.Eq, ReadPrec [GetUpgradeHistoryResponse]
ReadPrec GetUpgradeHistoryResponse
Int -> ReadS GetUpgradeHistoryResponse
ReadS [GetUpgradeHistoryResponse]
(Int -> ReadS GetUpgradeHistoryResponse)
-> ReadS [GetUpgradeHistoryResponse]
-> ReadPrec GetUpgradeHistoryResponse
-> ReadPrec [GetUpgradeHistoryResponse]
-> Read GetUpgradeHistoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetUpgradeHistoryResponse]
$creadListPrec :: ReadPrec [GetUpgradeHistoryResponse]
readPrec :: ReadPrec GetUpgradeHistoryResponse
$creadPrec :: ReadPrec GetUpgradeHistoryResponse
readList :: ReadS [GetUpgradeHistoryResponse]
$creadList :: ReadS [GetUpgradeHistoryResponse]
readsPrec :: Int -> ReadS GetUpgradeHistoryResponse
$creadsPrec :: Int -> ReadS GetUpgradeHistoryResponse
Prelude.Read, Int -> GetUpgradeHistoryResponse -> ShowS
[GetUpgradeHistoryResponse] -> ShowS
GetUpgradeHistoryResponse -> String
(Int -> GetUpgradeHistoryResponse -> ShowS)
-> (GetUpgradeHistoryResponse -> String)
-> ([GetUpgradeHistoryResponse] -> ShowS)
-> Show GetUpgradeHistoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetUpgradeHistoryResponse] -> ShowS
$cshowList :: [GetUpgradeHistoryResponse] -> ShowS
show :: GetUpgradeHistoryResponse -> String
$cshow :: GetUpgradeHistoryResponse -> String
showsPrec :: Int -> GetUpgradeHistoryResponse -> ShowS
$cshowsPrec :: Int -> GetUpgradeHistoryResponse -> ShowS
Prelude.Show, (forall x.
GetUpgradeHistoryResponse -> Rep GetUpgradeHistoryResponse x)
-> (forall x.
Rep GetUpgradeHistoryResponse x -> GetUpgradeHistoryResponse)
-> Generic GetUpgradeHistoryResponse
forall x.
Rep GetUpgradeHistoryResponse x -> GetUpgradeHistoryResponse
forall x.
GetUpgradeHistoryResponse -> Rep GetUpgradeHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetUpgradeHistoryResponse x -> GetUpgradeHistoryResponse
$cfrom :: forall x.
GetUpgradeHistoryResponse -> Rep GetUpgradeHistoryResponse x
Prelude.Generic)
newGetUpgradeHistoryResponse ::
Prelude.Int ->
GetUpgradeHistoryResponse
newGetUpgradeHistoryResponse :: Int -> GetUpgradeHistoryResponse
newGetUpgradeHistoryResponse Int
pHttpStatus_ =
GetUpgradeHistoryResponse' :: Maybe Text
-> Maybe [UpgradeHistory] -> Int -> GetUpgradeHistoryResponse
GetUpgradeHistoryResponse'
{ $sel:nextToken:GetUpgradeHistoryResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:upgradeHistories:GetUpgradeHistoryResponse' :: Maybe [UpgradeHistory]
upgradeHistories = Maybe [UpgradeHistory]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetUpgradeHistoryResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getUpgradeHistoryResponse_nextToken :: Lens.Lens' GetUpgradeHistoryResponse (Prelude.Maybe Prelude.Text)
getUpgradeHistoryResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetUpgradeHistoryResponse -> f GetUpgradeHistoryResponse
getUpgradeHistoryResponse_nextToken = (GetUpgradeHistoryResponse -> Maybe Text)
-> (GetUpgradeHistoryResponse
-> Maybe Text -> GetUpgradeHistoryResponse)
-> Lens' GetUpgradeHistoryResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUpgradeHistoryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetUpgradeHistoryResponse' :: GetUpgradeHistoryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetUpgradeHistoryResponse
s@GetUpgradeHistoryResponse' {} Maybe Text
a -> GetUpgradeHistoryResponse
s {$sel:nextToken:GetUpgradeHistoryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetUpgradeHistoryResponse)
getUpgradeHistoryResponse_upgradeHistories :: Lens.Lens' GetUpgradeHistoryResponse (Prelude.Maybe [UpgradeHistory])
getUpgradeHistoryResponse_upgradeHistories :: (Maybe [UpgradeHistory] -> f (Maybe [UpgradeHistory]))
-> GetUpgradeHistoryResponse -> f GetUpgradeHistoryResponse
getUpgradeHistoryResponse_upgradeHistories = (GetUpgradeHistoryResponse -> Maybe [UpgradeHistory])
-> (GetUpgradeHistoryResponse
-> Maybe [UpgradeHistory] -> GetUpgradeHistoryResponse)
-> Lens' GetUpgradeHistoryResponse (Maybe [UpgradeHistory])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUpgradeHistoryResponse' {Maybe [UpgradeHistory]
upgradeHistories :: Maybe [UpgradeHistory]
$sel:upgradeHistories:GetUpgradeHistoryResponse' :: GetUpgradeHistoryResponse -> Maybe [UpgradeHistory]
upgradeHistories} -> Maybe [UpgradeHistory]
upgradeHistories) (\s :: GetUpgradeHistoryResponse
s@GetUpgradeHistoryResponse' {} Maybe [UpgradeHistory]
a -> GetUpgradeHistoryResponse
s {$sel:upgradeHistories:GetUpgradeHistoryResponse' :: Maybe [UpgradeHistory]
upgradeHistories = Maybe [UpgradeHistory]
a} :: GetUpgradeHistoryResponse) ((Maybe [UpgradeHistory] -> f (Maybe [UpgradeHistory]))
-> GetUpgradeHistoryResponse -> f GetUpgradeHistoryResponse)
-> ((Maybe [UpgradeHistory] -> f (Maybe [UpgradeHistory]))
-> Maybe [UpgradeHistory] -> f (Maybe [UpgradeHistory]))
-> (Maybe [UpgradeHistory] -> f (Maybe [UpgradeHistory]))
-> GetUpgradeHistoryResponse
-> f GetUpgradeHistoryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[UpgradeHistory] [UpgradeHistory] [UpgradeHistory] [UpgradeHistory]
-> Iso
(Maybe [UpgradeHistory])
(Maybe [UpgradeHistory])
(Maybe [UpgradeHistory])
(Maybe [UpgradeHistory])
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
[UpgradeHistory] [UpgradeHistory] [UpgradeHistory] [UpgradeHistory]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getUpgradeHistoryResponse_httpStatus :: Lens.Lens' GetUpgradeHistoryResponse Prelude.Int
getUpgradeHistoryResponse_httpStatus :: (Int -> f Int)
-> GetUpgradeHistoryResponse -> f GetUpgradeHistoryResponse
getUpgradeHistoryResponse_httpStatus = (GetUpgradeHistoryResponse -> Int)
-> (GetUpgradeHistoryResponse -> Int -> GetUpgradeHistoryResponse)
-> Lens GetUpgradeHistoryResponse GetUpgradeHistoryResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetUpgradeHistoryResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetUpgradeHistoryResponse' :: GetUpgradeHistoryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetUpgradeHistoryResponse
s@GetUpgradeHistoryResponse' {} Int
a -> GetUpgradeHistoryResponse
s {$sel:httpStatus:GetUpgradeHistoryResponse' :: Int
httpStatus = Int
a} :: GetUpgradeHistoryResponse)
instance Prelude.NFData GetUpgradeHistoryResponse