{-# 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.ListWorkloadShares
-- 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 the workload shares associated with the workload.
module Amazonka.WellArchitected.ListWorkloadShares
  ( -- * Creating a Request
    ListWorkloadShares (..),
    newListWorkloadShares,

    -- * Request Lenses
    listWorkloadShares_sharedWithPrefix,
    listWorkloadShares_nextToken,
    listWorkloadShares_maxResults,
    listWorkloadShares_workloadId,

    -- * Destructuring the Response
    ListWorkloadSharesResponse (..),
    newListWorkloadSharesResponse,

    -- * Response Lenses
    listWorkloadSharesResponse_workloadShareSummaries,
    listWorkloadSharesResponse_nextToken,
    listWorkloadSharesResponse_workloadId,
    listWorkloadSharesResponse_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 for List Workload Share
--
-- /See:/ 'newListWorkloadShares' smart constructor.
data ListWorkloadShares = ListWorkloadShares'
  { -- | The AWS account ID or IAM role with which the workload is shared.
    ListWorkloadShares -> Maybe Text
sharedWithPrefix :: Prelude.Maybe Prelude.Text,
    ListWorkloadShares -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return for this request.
    ListWorkloadShares -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    ListWorkloadShares -> Text
workloadId :: Prelude.Text
  }
  deriving (ListWorkloadShares -> ListWorkloadShares -> Bool
(ListWorkloadShares -> ListWorkloadShares -> Bool)
-> (ListWorkloadShares -> ListWorkloadShares -> Bool)
-> Eq ListWorkloadShares
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorkloadShares -> ListWorkloadShares -> Bool
$c/= :: ListWorkloadShares -> ListWorkloadShares -> Bool
== :: ListWorkloadShares -> ListWorkloadShares -> Bool
$c== :: ListWorkloadShares -> ListWorkloadShares -> Bool
Prelude.Eq, ReadPrec [ListWorkloadShares]
ReadPrec ListWorkloadShares
Int -> ReadS ListWorkloadShares
ReadS [ListWorkloadShares]
(Int -> ReadS ListWorkloadShares)
-> ReadS [ListWorkloadShares]
-> ReadPrec ListWorkloadShares
-> ReadPrec [ListWorkloadShares]
-> Read ListWorkloadShares
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorkloadShares]
$creadListPrec :: ReadPrec [ListWorkloadShares]
readPrec :: ReadPrec ListWorkloadShares
$creadPrec :: ReadPrec ListWorkloadShares
readList :: ReadS [ListWorkloadShares]
$creadList :: ReadS [ListWorkloadShares]
readsPrec :: Int -> ReadS ListWorkloadShares
$creadsPrec :: Int -> ReadS ListWorkloadShares
Prelude.Read, Int -> ListWorkloadShares -> ShowS
[ListWorkloadShares] -> ShowS
ListWorkloadShares -> String
(Int -> ListWorkloadShares -> ShowS)
-> (ListWorkloadShares -> String)
-> ([ListWorkloadShares] -> ShowS)
-> Show ListWorkloadShares
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorkloadShares] -> ShowS
$cshowList :: [ListWorkloadShares] -> ShowS
show :: ListWorkloadShares -> String
$cshow :: ListWorkloadShares -> String
showsPrec :: Int -> ListWorkloadShares -> ShowS
$cshowsPrec :: Int -> ListWorkloadShares -> ShowS
Prelude.Show, (forall x. ListWorkloadShares -> Rep ListWorkloadShares x)
-> (forall x. Rep ListWorkloadShares x -> ListWorkloadShares)
-> Generic ListWorkloadShares
forall x. Rep ListWorkloadShares x -> ListWorkloadShares
forall x. ListWorkloadShares -> Rep ListWorkloadShares x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListWorkloadShares x -> ListWorkloadShares
$cfrom :: forall x. ListWorkloadShares -> Rep ListWorkloadShares x
Prelude.Generic)

-- |
-- Create a value of 'ListWorkloadShares' 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:
--
-- 'sharedWithPrefix', 'listWorkloadShares_sharedWithPrefix' - The AWS account ID or IAM role with which the workload is shared.
--
-- 'nextToken', 'listWorkloadShares_nextToken' - Undocumented member.
--
-- 'maxResults', 'listWorkloadShares_maxResults' - The maximum number of results to return for this request.
--
-- 'workloadId', 'listWorkloadShares_workloadId' - Undocumented member.
newListWorkloadShares ::
  -- | 'workloadId'
  Prelude.Text ->
  ListWorkloadShares
newListWorkloadShares :: Text -> ListWorkloadShares
newListWorkloadShares Text
pWorkloadId_ =
  ListWorkloadShares' :: Maybe Text
-> Maybe Text -> Maybe Natural -> Text -> ListWorkloadShares
ListWorkloadShares'
    { $sel:sharedWithPrefix:ListWorkloadShares' :: Maybe Text
sharedWithPrefix =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListWorkloadShares' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListWorkloadShares' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListWorkloadShares' :: Text
workloadId = Text
pWorkloadId_
    }

-- | The AWS account ID or IAM role with which the workload is shared.
listWorkloadShares_sharedWithPrefix :: Lens.Lens' ListWorkloadShares (Prelude.Maybe Prelude.Text)
listWorkloadShares_sharedWithPrefix :: (Maybe Text -> f (Maybe Text))
-> ListWorkloadShares -> f ListWorkloadShares
listWorkloadShares_sharedWithPrefix = (ListWorkloadShares -> Maybe Text)
-> (ListWorkloadShares -> Maybe Text -> ListWorkloadShares)
-> Lens
     ListWorkloadShares ListWorkloadShares (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkloadShares' {Maybe Text
sharedWithPrefix :: Maybe Text
$sel:sharedWithPrefix:ListWorkloadShares' :: ListWorkloadShares -> Maybe Text
sharedWithPrefix} -> Maybe Text
sharedWithPrefix) (\s :: ListWorkloadShares
s@ListWorkloadShares' {} Maybe Text
a -> ListWorkloadShares
s {$sel:sharedWithPrefix:ListWorkloadShares' :: Maybe Text
sharedWithPrefix = Maybe Text
a} :: ListWorkloadShares)

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

-- | The maximum number of results to return for this request.
listWorkloadShares_maxResults :: Lens.Lens' ListWorkloadShares (Prelude.Maybe Prelude.Natural)
listWorkloadShares_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListWorkloadShares -> f ListWorkloadShares
listWorkloadShares_maxResults = (ListWorkloadShares -> Maybe Natural)
-> (ListWorkloadShares -> Maybe Natural -> ListWorkloadShares)
-> Lens
     ListWorkloadShares
     ListWorkloadShares
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkloadShares' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListWorkloadShares' :: ListWorkloadShares -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListWorkloadShares
s@ListWorkloadShares' {} Maybe Natural
a -> ListWorkloadShares
s {$sel:maxResults:ListWorkloadShares' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListWorkloadShares)

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

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

instance Prelude.NFData ListWorkloadShares

instance Core.ToHeaders ListWorkloadShares where
  toHeaders :: ListWorkloadShares -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListWorkloadShares -> 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.ToPath ListWorkloadShares where
  toPath :: ListWorkloadShares -> ByteString
toPath ListWorkloadShares' {Maybe Natural
Maybe Text
Text
workloadId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
sharedWithPrefix :: Maybe Text
$sel:workloadId:ListWorkloadShares' :: ListWorkloadShares -> Text
$sel:maxResults:ListWorkloadShares' :: ListWorkloadShares -> Maybe Natural
$sel:nextToken:ListWorkloadShares' :: ListWorkloadShares -> Maybe Text
$sel:sharedWithPrefix:ListWorkloadShares' :: ListWorkloadShares -> 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
"/shares"]

instance Core.ToQuery ListWorkloadShares where
  toQuery :: ListWorkloadShares -> QueryString
toQuery ListWorkloadShares' {Maybe Natural
Maybe Text
Text
workloadId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
sharedWithPrefix :: Maybe Text
$sel:workloadId:ListWorkloadShares' :: ListWorkloadShares -> Text
$sel:maxResults:ListWorkloadShares' :: ListWorkloadShares -> Maybe Natural
$sel:nextToken:ListWorkloadShares' :: ListWorkloadShares -> Maybe Text
$sel:sharedWithPrefix:ListWorkloadShares' :: ListWorkloadShares -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"SharedWithPrefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
sharedWithPrefix,
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | Input for List Workload Share
--
-- /See:/ 'newListWorkloadSharesResponse' smart constructor.
data ListWorkloadSharesResponse = ListWorkloadSharesResponse'
  { ListWorkloadSharesResponse -> Maybe [WorkloadShareSummary]
workloadShareSummaries :: Prelude.Maybe [WorkloadShareSummary],
    ListWorkloadSharesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListWorkloadSharesResponse -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListWorkloadSharesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListWorkloadSharesResponse -> ListWorkloadSharesResponse -> Bool
(ListWorkloadSharesResponse -> ListWorkloadSharesResponse -> Bool)
-> (ListWorkloadSharesResponse
    -> ListWorkloadSharesResponse -> Bool)
-> Eq ListWorkloadSharesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorkloadSharesResponse -> ListWorkloadSharesResponse -> Bool
$c/= :: ListWorkloadSharesResponse -> ListWorkloadSharesResponse -> Bool
== :: ListWorkloadSharesResponse -> ListWorkloadSharesResponse -> Bool
$c== :: ListWorkloadSharesResponse -> ListWorkloadSharesResponse -> Bool
Prelude.Eq, ReadPrec [ListWorkloadSharesResponse]
ReadPrec ListWorkloadSharesResponse
Int -> ReadS ListWorkloadSharesResponse
ReadS [ListWorkloadSharesResponse]
(Int -> ReadS ListWorkloadSharesResponse)
-> ReadS [ListWorkloadSharesResponse]
-> ReadPrec ListWorkloadSharesResponse
-> ReadPrec [ListWorkloadSharesResponse]
-> Read ListWorkloadSharesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorkloadSharesResponse]
$creadListPrec :: ReadPrec [ListWorkloadSharesResponse]
readPrec :: ReadPrec ListWorkloadSharesResponse
$creadPrec :: ReadPrec ListWorkloadSharesResponse
readList :: ReadS [ListWorkloadSharesResponse]
$creadList :: ReadS [ListWorkloadSharesResponse]
readsPrec :: Int -> ReadS ListWorkloadSharesResponse
$creadsPrec :: Int -> ReadS ListWorkloadSharesResponse
Prelude.Read, Int -> ListWorkloadSharesResponse -> ShowS
[ListWorkloadSharesResponse] -> ShowS
ListWorkloadSharesResponse -> String
(Int -> ListWorkloadSharesResponse -> ShowS)
-> (ListWorkloadSharesResponse -> String)
-> ([ListWorkloadSharesResponse] -> ShowS)
-> Show ListWorkloadSharesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorkloadSharesResponse] -> ShowS
$cshowList :: [ListWorkloadSharesResponse] -> ShowS
show :: ListWorkloadSharesResponse -> String
$cshow :: ListWorkloadSharesResponse -> String
showsPrec :: Int -> ListWorkloadSharesResponse -> ShowS
$cshowsPrec :: Int -> ListWorkloadSharesResponse -> ShowS
Prelude.Show, (forall x.
 ListWorkloadSharesResponse -> Rep ListWorkloadSharesResponse x)
-> (forall x.
    Rep ListWorkloadSharesResponse x -> ListWorkloadSharesResponse)
-> Generic ListWorkloadSharesResponse
forall x.
Rep ListWorkloadSharesResponse x -> ListWorkloadSharesResponse
forall x.
ListWorkloadSharesResponse -> Rep ListWorkloadSharesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListWorkloadSharesResponse x -> ListWorkloadSharesResponse
$cfrom :: forall x.
ListWorkloadSharesResponse -> Rep ListWorkloadSharesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListWorkloadSharesResponse' 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:
--
-- 'workloadShareSummaries', 'listWorkloadSharesResponse_workloadShareSummaries' - Undocumented member.
--
-- 'nextToken', 'listWorkloadSharesResponse_nextToken' - Undocumented member.
--
-- 'workloadId', 'listWorkloadSharesResponse_workloadId' - Undocumented member.
--
-- 'httpStatus', 'listWorkloadSharesResponse_httpStatus' - The response's http status code.
newListWorkloadSharesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListWorkloadSharesResponse
newListWorkloadSharesResponse :: Int -> ListWorkloadSharesResponse
newListWorkloadSharesResponse Int
pHttpStatus_ =
  ListWorkloadSharesResponse' :: Maybe [WorkloadShareSummary]
-> Maybe Text -> Maybe Text -> Int -> ListWorkloadSharesResponse
ListWorkloadSharesResponse'
    { $sel:workloadShareSummaries:ListWorkloadSharesResponse' :: Maybe [WorkloadShareSummary]
workloadShareSummaries =
        Maybe [WorkloadShareSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListWorkloadSharesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListWorkloadSharesResponse' :: Maybe Text
workloadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListWorkloadSharesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

instance Prelude.NFData ListWorkloadSharesResponse