{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WellArchitected.ListMilestones
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List all milestones for an existing workload.
module Amazonka.WellArchitected.ListMilestones
  ( -- * Creating a Request
    ListMilestones (..),
    newListMilestones,

    -- * Request Lenses
    listMilestones_nextToken,
    listMilestones_maxResults,
    listMilestones_workloadId,

    -- * Destructuring the Response
    ListMilestonesResponse (..),
    newListMilestonesResponse,

    -- * Response Lenses
    listMilestonesResponse_milestoneSummaries,
    listMilestonesResponse_nextToken,
    listMilestonesResponse_workloadId,
    listMilestonesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WellArchitected.Types

-- | Input to list all milestones for a workload.
--
-- /See:/ 'newListMilestones' smart constructor.
data ListMilestones = ListMilestones'
  { ListMilestones -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListMilestones -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    ListMilestones -> Text
workloadId :: Prelude.Text
  }
  deriving (ListMilestones -> ListMilestones -> Bool
(ListMilestones -> ListMilestones -> Bool)
-> (ListMilestones -> ListMilestones -> Bool) -> Eq ListMilestones
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMilestones -> ListMilestones -> Bool
$c/= :: ListMilestones -> ListMilestones -> Bool
== :: ListMilestones -> ListMilestones -> Bool
$c== :: ListMilestones -> ListMilestones -> Bool
Prelude.Eq, ReadPrec [ListMilestones]
ReadPrec ListMilestones
Int -> ReadS ListMilestones
ReadS [ListMilestones]
(Int -> ReadS ListMilestones)
-> ReadS [ListMilestones]
-> ReadPrec ListMilestones
-> ReadPrec [ListMilestones]
-> Read ListMilestones
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMilestones]
$creadListPrec :: ReadPrec [ListMilestones]
readPrec :: ReadPrec ListMilestones
$creadPrec :: ReadPrec ListMilestones
readList :: ReadS [ListMilestones]
$creadList :: ReadS [ListMilestones]
readsPrec :: Int -> ReadS ListMilestones
$creadsPrec :: Int -> ReadS ListMilestones
Prelude.Read, Int -> ListMilestones -> ShowS
[ListMilestones] -> ShowS
ListMilestones -> String
(Int -> ListMilestones -> ShowS)
-> (ListMilestones -> String)
-> ([ListMilestones] -> ShowS)
-> Show ListMilestones
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMilestones] -> ShowS
$cshowList :: [ListMilestones] -> ShowS
show :: ListMilestones -> String
$cshow :: ListMilestones -> String
showsPrec :: Int -> ListMilestones -> ShowS
$cshowsPrec :: Int -> ListMilestones -> ShowS
Prelude.Show, (forall x. ListMilestones -> Rep ListMilestones x)
-> (forall x. Rep ListMilestones x -> ListMilestones)
-> Generic ListMilestones
forall x. Rep ListMilestones x -> ListMilestones
forall x. ListMilestones -> Rep ListMilestones x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMilestones x -> ListMilestones
$cfrom :: forall x. ListMilestones -> Rep ListMilestones x
Prelude.Generic)

-- |
-- Create a value of 'ListMilestones' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listMilestones_nextToken' - Undocumented member.
--
-- 'maxResults', 'listMilestones_maxResults' - Undocumented member.
--
-- 'workloadId', 'listMilestones_workloadId' - Undocumented member.
newListMilestones ::
  -- | 'workloadId'
  Prelude.Text ->
  ListMilestones
newListMilestones :: Text -> ListMilestones
newListMilestones Text
pWorkloadId_ =
  ListMilestones' :: Maybe Text -> Maybe Natural -> Text -> ListMilestones
ListMilestones'
    { $sel:nextToken:ListMilestones' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMilestones' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListMilestones' :: Text
workloadId = Text
pWorkloadId_
    }

-- | Undocumented member.
listMilestones_nextToken :: Lens.Lens' ListMilestones (Prelude.Maybe Prelude.Text)
listMilestones_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMilestones -> f ListMilestones
listMilestones_nextToken = (ListMilestones -> Maybe Text)
-> (ListMilestones -> Maybe Text -> ListMilestones)
-> Lens ListMilestones ListMilestones (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMilestones' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMilestones' :: ListMilestones -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMilestones
s@ListMilestones' {} Maybe Text
a -> ListMilestones
s {$sel:nextToken:ListMilestones' :: Maybe Text
nextToken = Maybe Text
a} :: ListMilestones)

-- | Undocumented member.
listMilestones_maxResults :: Lens.Lens' ListMilestones (Prelude.Maybe Prelude.Natural)
listMilestones_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMilestones -> f ListMilestones
listMilestones_maxResults = (ListMilestones -> Maybe Natural)
-> (ListMilestones -> Maybe Natural -> ListMilestones)
-> Lens
     ListMilestones ListMilestones (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMilestones' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMilestones' :: ListMilestones -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMilestones
s@ListMilestones' {} Maybe Natural
a -> ListMilestones
s {$sel:maxResults:ListMilestones' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMilestones)

-- | Undocumented member.
listMilestones_workloadId :: Lens.Lens' ListMilestones Prelude.Text
listMilestones_workloadId :: (Text -> f Text) -> ListMilestones -> f ListMilestones
listMilestones_workloadId = (ListMilestones -> Text)
-> (ListMilestones -> Text -> ListMilestones)
-> Lens ListMilestones ListMilestones Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMilestones' {Text
workloadId :: Text
$sel:workloadId:ListMilestones' :: ListMilestones -> Text
workloadId} -> Text
workloadId) (\s :: ListMilestones
s@ListMilestones' {} Text
a -> ListMilestones
s {$sel:workloadId:ListMilestones' :: Text
workloadId = Text
a} :: ListMilestones)

instance Core.AWSRequest ListMilestones where
  type
    AWSResponse ListMilestones =
      ListMilestonesResponse
  request :: ListMilestones -> Request ListMilestones
request = Service -> ListMilestones -> Request ListMilestones
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListMilestones
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListMilestones)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListMilestones))
-> Logger
-> Service
-> Proxy ListMilestones
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListMilestones)))
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 [MilestoneSummary]
-> Maybe Text -> Maybe Text -> Int -> ListMilestonesResponse
ListMilestonesResponse'
            (Maybe [MilestoneSummary]
 -> Maybe Text -> Maybe Text -> Int -> ListMilestonesResponse)
-> Either String (Maybe [MilestoneSummary])
-> Either
     String (Maybe Text -> Maybe Text -> Int -> ListMilestonesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [MilestoneSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MilestoneSummaries"
                            Either String (Maybe (Maybe [MilestoneSummary]))
-> Maybe [MilestoneSummary]
-> Either String (Maybe [MilestoneSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MilestoneSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Maybe Text -> Int -> ListMilestonesResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> ListMilestonesResponse)
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 (Maybe Text -> Int -> ListMilestonesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListMilestonesResponse)
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
"WorkloadId")
            Either String (Int -> ListMilestonesResponse)
-> Either String Int -> Either String ListMilestonesResponse
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 ListMilestones

instance Prelude.NFData ListMilestones

instance Core.ToHeaders ListMilestones where
  toHeaders :: ListMilestones -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMilestones -> 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 ListMilestones where
  toJSON :: ListMilestones -> Value
toJSON ListMilestones' {Maybe Natural
Maybe Text
Text
workloadId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:workloadId:ListMilestones' :: ListMilestones -> Text
$sel:maxResults:ListMilestones' :: ListMilestones -> Maybe Natural
$sel:nextToken:ListMilestones' :: ListMilestones -> 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,
            (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
          ]
      )

instance Core.ToPath ListMilestones where
  toPath :: ListMilestones -> ByteString
toPath ListMilestones' {Maybe Natural
Maybe Text
Text
workloadId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:workloadId:ListMilestones' :: ListMilestones -> Text
$sel:maxResults:ListMilestones' :: ListMilestones -> Maybe Natural
$sel:nextToken:ListMilestones' :: ListMilestones -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/workloads/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
workloadId,
        ByteString
"/milestonesSummaries"
      ]

instance Core.ToQuery ListMilestones where
  toQuery :: ListMilestones -> QueryString
toQuery = QueryString -> ListMilestones -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Output of a list milestones call.
--
-- /See:/ 'newListMilestonesResponse' smart constructor.
data ListMilestonesResponse = ListMilestonesResponse'
  { ListMilestonesResponse -> Maybe [MilestoneSummary]
milestoneSummaries :: Prelude.Maybe [MilestoneSummary],
    ListMilestonesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListMilestonesResponse -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListMilestonesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMilestonesResponse -> ListMilestonesResponse -> Bool
(ListMilestonesResponse -> ListMilestonesResponse -> Bool)
-> (ListMilestonesResponse -> ListMilestonesResponse -> Bool)
-> Eq ListMilestonesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMilestonesResponse -> ListMilestonesResponse -> Bool
$c/= :: ListMilestonesResponse -> ListMilestonesResponse -> Bool
== :: ListMilestonesResponse -> ListMilestonesResponse -> Bool
$c== :: ListMilestonesResponse -> ListMilestonesResponse -> Bool
Prelude.Eq, ReadPrec [ListMilestonesResponse]
ReadPrec ListMilestonesResponse
Int -> ReadS ListMilestonesResponse
ReadS [ListMilestonesResponse]
(Int -> ReadS ListMilestonesResponse)
-> ReadS [ListMilestonesResponse]
-> ReadPrec ListMilestonesResponse
-> ReadPrec [ListMilestonesResponse]
-> Read ListMilestonesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMilestonesResponse]
$creadListPrec :: ReadPrec [ListMilestonesResponse]
readPrec :: ReadPrec ListMilestonesResponse
$creadPrec :: ReadPrec ListMilestonesResponse
readList :: ReadS [ListMilestonesResponse]
$creadList :: ReadS [ListMilestonesResponse]
readsPrec :: Int -> ReadS ListMilestonesResponse
$creadsPrec :: Int -> ReadS ListMilestonesResponse
Prelude.Read, Int -> ListMilestonesResponse -> ShowS
[ListMilestonesResponse] -> ShowS
ListMilestonesResponse -> String
(Int -> ListMilestonesResponse -> ShowS)
-> (ListMilestonesResponse -> String)
-> ([ListMilestonesResponse] -> ShowS)
-> Show ListMilestonesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMilestonesResponse] -> ShowS
$cshowList :: [ListMilestonesResponse] -> ShowS
show :: ListMilestonesResponse -> String
$cshow :: ListMilestonesResponse -> String
showsPrec :: Int -> ListMilestonesResponse -> ShowS
$cshowsPrec :: Int -> ListMilestonesResponse -> ShowS
Prelude.Show, (forall x. ListMilestonesResponse -> Rep ListMilestonesResponse x)
-> (forall x.
    Rep ListMilestonesResponse x -> ListMilestonesResponse)
-> Generic ListMilestonesResponse
forall x. Rep ListMilestonesResponse x -> ListMilestonesResponse
forall x. ListMilestonesResponse -> Rep ListMilestonesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMilestonesResponse x -> ListMilestonesResponse
$cfrom :: forall x. ListMilestonesResponse -> Rep ListMilestonesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMilestonesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'milestoneSummaries', 'listMilestonesResponse_milestoneSummaries' - Undocumented member.
--
-- 'nextToken', 'listMilestonesResponse_nextToken' - Undocumented member.
--
-- 'workloadId', 'listMilestonesResponse_workloadId' - Undocumented member.
--
-- 'httpStatus', 'listMilestonesResponse_httpStatus' - The response's http status code.
newListMilestonesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMilestonesResponse
newListMilestonesResponse :: Int -> ListMilestonesResponse
newListMilestonesResponse Int
pHttpStatus_ =
  ListMilestonesResponse' :: Maybe [MilestoneSummary]
-> Maybe Text -> Maybe Text -> Int -> ListMilestonesResponse
ListMilestonesResponse'
    { $sel:milestoneSummaries:ListMilestonesResponse' :: Maybe [MilestoneSummary]
milestoneSummaries =
        Maybe [MilestoneSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMilestonesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListMilestonesResponse' :: Maybe Text
workloadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMilestonesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
listMilestonesResponse_milestoneSummaries :: Lens.Lens' ListMilestonesResponse (Prelude.Maybe [MilestoneSummary])
listMilestonesResponse_milestoneSummaries :: (Maybe [MilestoneSummary] -> f (Maybe [MilestoneSummary]))
-> ListMilestonesResponse -> f ListMilestonesResponse
listMilestonesResponse_milestoneSummaries = (ListMilestonesResponse -> Maybe [MilestoneSummary])
-> (ListMilestonesResponse
    -> Maybe [MilestoneSummary] -> ListMilestonesResponse)
-> Lens
     ListMilestonesResponse
     ListMilestonesResponse
     (Maybe [MilestoneSummary])
     (Maybe [MilestoneSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMilestonesResponse' {Maybe [MilestoneSummary]
milestoneSummaries :: Maybe [MilestoneSummary]
$sel:milestoneSummaries:ListMilestonesResponse' :: ListMilestonesResponse -> Maybe [MilestoneSummary]
milestoneSummaries} -> Maybe [MilestoneSummary]
milestoneSummaries) (\s :: ListMilestonesResponse
s@ListMilestonesResponse' {} Maybe [MilestoneSummary]
a -> ListMilestonesResponse
s {$sel:milestoneSummaries:ListMilestonesResponse' :: Maybe [MilestoneSummary]
milestoneSummaries = Maybe [MilestoneSummary]
a} :: ListMilestonesResponse) ((Maybe [MilestoneSummary] -> f (Maybe [MilestoneSummary]))
 -> ListMilestonesResponse -> f ListMilestonesResponse)
-> ((Maybe [MilestoneSummary] -> f (Maybe [MilestoneSummary]))
    -> Maybe [MilestoneSummary] -> f (Maybe [MilestoneSummary]))
-> (Maybe [MilestoneSummary] -> f (Maybe [MilestoneSummary]))
-> ListMilestonesResponse
-> f ListMilestonesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MilestoneSummary]
  [MilestoneSummary]
  [MilestoneSummary]
  [MilestoneSummary]
-> Iso
     (Maybe [MilestoneSummary])
     (Maybe [MilestoneSummary])
     (Maybe [MilestoneSummary])
     (Maybe [MilestoneSummary])
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
  [MilestoneSummary]
  [MilestoneSummary]
  [MilestoneSummary]
  [MilestoneSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
listMilestonesResponse_nextToken :: Lens.Lens' ListMilestonesResponse (Prelude.Maybe Prelude.Text)
listMilestonesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMilestonesResponse -> f ListMilestonesResponse
listMilestonesResponse_nextToken = (ListMilestonesResponse -> Maybe Text)
-> (ListMilestonesResponse -> Maybe Text -> ListMilestonesResponse)
-> Lens
     ListMilestonesResponse
     ListMilestonesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMilestonesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMilestonesResponse' :: ListMilestonesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMilestonesResponse
s@ListMilestonesResponse' {} Maybe Text
a -> ListMilestonesResponse
s {$sel:nextToken:ListMilestonesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMilestonesResponse)

-- | Undocumented member.
listMilestonesResponse_workloadId :: Lens.Lens' ListMilestonesResponse (Prelude.Maybe Prelude.Text)
listMilestonesResponse_workloadId :: (Maybe Text -> f (Maybe Text))
-> ListMilestonesResponse -> f ListMilestonesResponse
listMilestonesResponse_workloadId = (ListMilestonesResponse -> Maybe Text)
-> (ListMilestonesResponse -> Maybe Text -> ListMilestonesResponse)
-> Lens
     ListMilestonesResponse
     ListMilestonesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMilestonesResponse' {Maybe Text
workloadId :: Maybe Text
$sel:workloadId:ListMilestonesResponse' :: ListMilestonesResponse -> Maybe Text
workloadId} -> Maybe Text
workloadId) (\s :: ListMilestonesResponse
s@ListMilestonesResponse' {} Maybe Text
a -> ListMilestonesResponse
s {$sel:workloadId:ListMilestonesResponse' :: Maybe Text
workloadId = Maybe Text
a} :: ListMilestonesResponse)

-- | The response's http status code.
listMilestonesResponse_httpStatus :: Lens.Lens' ListMilestonesResponse Prelude.Int
listMilestonesResponse_httpStatus :: (Int -> f Int)
-> ListMilestonesResponse -> f ListMilestonesResponse
listMilestonesResponse_httpStatus = (ListMilestonesResponse -> Int)
-> (ListMilestonesResponse -> Int -> ListMilestonesResponse)
-> Lens ListMilestonesResponse ListMilestonesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMilestonesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListMilestonesResponse' :: ListMilestonesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListMilestonesResponse
s@ListMilestonesResponse' {} Int
a -> ListMilestonesResponse
s {$sel:httpStatus:ListMilestonesResponse' :: Int
httpStatus = Int
a} :: ListMilestonesResponse)

instance Prelude.NFData ListMilestonesResponse