{-# 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.ServiceCatalog.ListServiceActions
-- 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)
--
-- Lists all self-service actions.
--
-- This operation returns paginated results.
module Amazonka.ServiceCatalog.ListServiceActions
  ( -- * Creating a Request
    ListServiceActions (..),
    newListServiceActions,

    -- * Request Lenses
    listServiceActions_acceptLanguage,
    listServiceActions_pageToken,
    listServiceActions_pageSize,

    -- * Destructuring the Response
    ListServiceActionsResponse (..),
    newListServiceActionsResponse,

    -- * Response Lenses
    listServiceActionsResponse_nextPageToken,
    listServiceActionsResponse_serviceActionSummaries,
    listServiceActionsResponse_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.ServiceCatalog.Types

-- | /See:/ 'newListServiceActions' smart constructor.
data ListServiceActions = ListServiceActions'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    ListServiceActions -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The page token for the next set of results. To retrieve the first set of
    -- results, use null.
    ListServiceActions -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    ListServiceActions -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListServiceActions -> ListServiceActions -> Bool
(ListServiceActions -> ListServiceActions -> Bool)
-> (ListServiceActions -> ListServiceActions -> Bool)
-> Eq ListServiceActions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListServiceActions -> ListServiceActions -> Bool
$c/= :: ListServiceActions -> ListServiceActions -> Bool
== :: ListServiceActions -> ListServiceActions -> Bool
$c== :: ListServiceActions -> ListServiceActions -> Bool
Prelude.Eq, ReadPrec [ListServiceActions]
ReadPrec ListServiceActions
Int -> ReadS ListServiceActions
ReadS [ListServiceActions]
(Int -> ReadS ListServiceActions)
-> ReadS [ListServiceActions]
-> ReadPrec ListServiceActions
-> ReadPrec [ListServiceActions]
-> Read ListServiceActions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListServiceActions]
$creadListPrec :: ReadPrec [ListServiceActions]
readPrec :: ReadPrec ListServiceActions
$creadPrec :: ReadPrec ListServiceActions
readList :: ReadS [ListServiceActions]
$creadList :: ReadS [ListServiceActions]
readsPrec :: Int -> ReadS ListServiceActions
$creadsPrec :: Int -> ReadS ListServiceActions
Prelude.Read, Int -> ListServiceActions -> ShowS
[ListServiceActions] -> ShowS
ListServiceActions -> String
(Int -> ListServiceActions -> ShowS)
-> (ListServiceActions -> String)
-> ([ListServiceActions] -> ShowS)
-> Show ListServiceActions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListServiceActions] -> ShowS
$cshowList :: [ListServiceActions] -> ShowS
show :: ListServiceActions -> String
$cshow :: ListServiceActions -> String
showsPrec :: Int -> ListServiceActions -> ShowS
$cshowsPrec :: Int -> ListServiceActions -> ShowS
Prelude.Show, (forall x. ListServiceActions -> Rep ListServiceActions x)
-> (forall x. Rep ListServiceActions x -> ListServiceActions)
-> Generic ListServiceActions
forall x. Rep ListServiceActions x -> ListServiceActions
forall x. ListServiceActions -> Rep ListServiceActions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListServiceActions x -> ListServiceActions
$cfrom :: forall x. ListServiceActions -> Rep ListServiceActions x
Prelude.Generic)

-- |
-- Create a value of 'ListServiceActions' 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:
--
-- 'acceptLanguage', 'listServiceActions_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageToken', 'listServiceActions_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'pageSize', 'listServiceActions_pageSize' - The maximum number of items to return with this call.
newListServiceActions ::
  ListServiceActions
newListServiceActions :: ListServiceActions
newListServiceActions =
  ListServiceActions' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListServiceActions
ListServiceActions'
    { $sel:acceptLanguage:ListServiceActions' :: Maybe Text
acceptLanguage =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:ListServiceActions' :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListServiceActions' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
listServiceActions_acceptLanguage :: Lens.Lens' ListServiceActions (Prelude.Maybe Prelude.Text)
listServiceActions_acceptLanguage :: (Maybe Text -> f (Maybe Text))
-> ListServiceActions -> f ListServiceActions
listServiceActions_acceptLanguage = (ListServiceActions -> Maybe Text)
-> (ListServiceActions -> Maybe Text -> ListServiceActions)
-> Lens
     ListServiceActions ListServiceActions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServiceActions' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:ListServiceActions' :: ListServiceActions -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: ListServiceActions
s@ListServiceActions' {} Maybe Text
a -> ListServiceActions
s {$sel:acceptLanguage:ListServiceActions' :: Maybe Text
acceptLanguage = Maybe Text
a} :: ListServiceActions)

-- | The page token for the next set of results. To retrieve the first set of
-- results, use null.
listServiceActions_pageToken :: Lens.Lens' ListServiceActions (Prelude.Maybe Prelude.Text)
listServiceActions_pageToken :: (Maybe Text -> f (Maybe Text))
-> ListServiceActions -> f ListServiceActions
listServiceActions_pageToken = (ListServiceActions -> Maybe Text)
-> (ListServiceActions -> Maybe Text -> ListServiceActions)
-> Lens
     ListServiceActions ListServiceActions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServiceActions' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:ListServiceActions' :: ListServiceActions -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: ListServiceActions
s@ListServiceActions' {} Maybe Text
a -> ListServiceActions
s {$sel:pageToken:ListServiceActions' :: Maybe Text
pageToken = Maybe Text
a} :: ListServiceActions)

-- | The maximum number of items to return with this call.
listServiceActions_pageSize :: Lens.Lens' ListServiceActions (Prelude.Maybe Prelude.Natural)
listServiceActions_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListServiceActions -> f ListServiceActions
listServiceActions_pageSize = (ListServiceActions -> Maybe Natural)
-> (ListServiceActions -> Maybe Natural -> ListServiceActions)
-> Lens
     ListServiceActions
     ListServiceActions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServiceActions' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListServiceActions' :: ListServiceActions -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListServiceActions
s@ListServiceActions' {} Maybe Natural
a -> ListServiceActions
s {$sel:pageSize:ListServiceActions' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListServiceActions)

instance Core.AWSPager ListServiceActions where
  page :: ListServiceActions
-> AWSResponse ListServiceActions -> Maybe ListServiceActions
page ListServiceActions
rq AWSResponse ListServiceActions
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListServiceActions
ListServiceActionsResponse
rs
            ListServiceActionsResponse
-> Getting (First Text) ListServiceActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListServiceActionsResponse
-> Const (First Text) ListServiceActionsResponse
Lens' ListServiceActionsResponse (Maybe Text)
listServiceActionsResponse_nextPageToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListServiceActionsResponse
 -> Const (First Text) ListServiceActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListServiceActionsResponse 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 ListServiceActions
forall a. Maybe a
Prelude.Nothing
    | Maybe [ServiceActionSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListServiceActions
ListServiceActionsResponse
rs
            ListServiceActionsResponse
-> Getting
     (First [ServiceActionSummary])
     ListServiceActionsResponse
     [ServiceActionSummary]
-> Maybe [ServiceActionSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ServiceActionSummary]
 -> Const
      (First [ServiceActionSummary]) (Maybe [ServiceActionSummary]))
-> ListServiceActionsResponse
-> Const (First [ServiceActionSummary]) ListServiceActionsResponse
Lens' ListServiceActionsResponse (Maybe [ServiceActionSummary])
listServiceActionsResponse_serviceActionSummaries
              ((Maybe [ServiceActionSummary]
  -> Const
       (First [ServiceActionSummary]) (Maybe [ServiceActionSummary]))
 -> ListServiceActionsResponse
 -> Const (First [ServiceActionSummary]) ListServiceActionsResponse)
-> (([ServiceActionSummary]
     -> Const (First [ServiceActionSummary]) [ServiceActionSummary])
    -> Maybe [ServiceActionSummary]
    -> Const
         (First [ServiceActionSummary]) (Maybe [ServiceActionSummary]))
-> Getting
     (First [ServiceActionSummary])
     ListServiceActionsResponse
     [ServiceActionSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ServiceActionSummary]
 -> Const (First [ServiceActionSummary]) [ServiceActionSummary])
-> Maybe [ServiceActionSummary]
-> Const
     (First [ServiceActionSummary]) (Maybe [ServiceActionSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListServiceActions
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListServiceActions -> Maybe ListServiceActions
forall a. a -> Maybe a
Prelude.Just (ListServiceActions -> Maybe ListServiceActions)
-> ListServiceActions -> Maybe ListServiceActions
forall a b. (a -> b) -> a -> b
Prelude.$
        ListServiceActions
rq
          ListServiceActions
-> (ListServiceActions -> ListServiceActions) -> ListServiceActions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListServiceActions -> Identity ListServiceActions
Lens
  ListServiceActions ListServiceActions (Maybe Text) (Maybe Text)
listServiceActions_pageToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListServiceActions -> Identity ListServiceActions)
-> Maybe Text -> ListServiceActions -> ListServiceActions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListServiceActions
ListServiceActionsResponse
rs
          ListServiceActionsResponse
-> Getting (First Text) ListServiceActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListServiceActionsResponse
-> Const (First Text) ListServiceActionsResponse
Lens' ListServiceActionsResponse (Maybe Text)
listServiceActionsResponse_nextPageToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListServiceActionsResponse
 -> Const (First Text) ListServiceActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListServiceActionsResponse 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 ListServiceActions where
  type
    AWSResponse ListServiceActions =
      ListServiceActionsResponse
  request :: ListServiceActions -> Request ListServiceActions
request = Service -> ListServiceActions -> Request ListServiceActions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListServiceActions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListServiceActions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListServiceActions))
-> Logger
-> Service
-> Proxy ListServiceActions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListServiceActions)))
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 [ServiceActionSummary]
-> Int
-> ListServiceActionsResponse
ListServiceActionsResponse'
            (Maybe Text
 -> Maybe [ServiceActionSummary]
 -> Int
 -> ListServiceActionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ServiceActionSummary] -> Int -> ListServiceActionsResponse)
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
"NextPageToken")
            Either
  String
  (Maybe [ServiceActionSummary] -> Int -> ListServiceActionsResponse)
-> Either String (Maybe [ServiceActionSummary])
-> Either String (Int -> ListServiceActionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ServiceActionSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ServiceActionSummaries"
                            Either String (Maybe (Maybe [ServiceActionSummary]))
-> Maybe [ServiceActionSummary]
-> Either String (Maybe [ServiceActionSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ServiceActionSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListServiceActionsResponse)
-> Either String Int -> Either String ListServiceActionsResponse
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 ListServiceActions

instance Prelude.NFData ListServiceActions

instance Core.ToHeaders ListServiceActions where
  toHeaders :: ListServiceActions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListServiceActions -> 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
"AWS242ServiceCatalogService.ListServiceActions" ::
                          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 ListServiceActions where
  toJSON :: ListServiceActions -> Value
toJSON ListServiceActions' {Maybe Natural
Maybe Text
pageSize :: Maybe Natural
pageToken :: Maybe Text
acceptLanguage :: Maybe Text
$sel:pageSize:ListServiceActions' :: ListServiceActions -> Maybe Natural
$sel:pageToken:ListServiceActions' :: ListServiceActions -> Maybe Text
$sel:acceptLanguage:ListServiceActions' :: ListServiceActions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AcceptLanguage" 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
acceptLanguage,
            (Text
"PageToken" 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
pageToken,
            (Text
"PageSize" 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
pageSize
          ]
      )

instance Core.ToPath ListServiceActions where
  toPath :: ListServiceActions -> ByteString
toPath = ByteString -> ListServiceActions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListServiceActionsResponse' smart constructor.
data ListServiceActionsResponse = ListServiceActionsResponse'
  { -- | The page token to use to retrieve the next set of results. If there are
    -- no additional results, this value is null.
    ListServiceActionsResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | An object containing information about the service actions associated
    -- with the provisioning artifact.
    ListServiceActionsResponse -> Maybe [ServiceActionSummary]
serviceActionSummaries :: Prelude.Maybe [ServiceActionSummary],
    -- | The response's http status code.
    ListServiceActionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListServiceActionsResponse -> ListServiceActionsResponse -> Bool
(ListServiceActionsResponse -> ListServiceActionsResponse -> Bool)
-> (ListServiceActionsResponse
    -> ListServiceActionsResponse -> Bool)
-> Eq ListServiceActionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListServiceActionsResponse -> ListServiceActionsResponse -> Bool
$c/= :: ListServiceActionsResponse -> ListServiceActionsResponse -> Bool
== :: ListServiceActionsResponse -> ListServiceActionsResponse -> Bool
$c== :: ListServiceActionsResponse -> ListServiceActionsResponse -> Bool
Prelude.Eq, ReadPrec [ListServiceActionsResponse]
ReadPrec ListServiceActionsResponse
Int -> ReadS ListServiceActionsResponse
ReadS [ListServiceActionsResponse]
(Int -> ReadS ListServiceActionsResponse)
-> ReadS [ListServiceActionsResponse]
-> ReadPrec ListServiceActionsResponse
-> ReadPrec [ListServiceActionsResponse]
-> Read ListServiceActionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListServiceActionsResponse]
$creadListPrec :: ReadPrec [ListServiceActionsResponse]
readPrec :: ReadPrec ListServiceActionsResponse
$creadPrec :: ReadPrec ListServiceActionsResponse
readList :: ReadS [ListServiceActionsResponse]
$creadList :: ReadS [ListServiceActionsResponse]
readsPrec :: Int -> ReadS ListServiceActionsResponse
$creadsPrec :: Int -> ReadS ListServiceActionsResponse
Prelude.Read, Int -> ListServiceActionsResponse -> ShowS
[ListServiceActionsResponse] -> ShowS
ListServiceActionsResponse -> String
(Int -> ListServiceActionsResponse -> ShowS)
-> (ListServiceActionsResponse -> String)
-> ([ListServiceActionsResponse] -> ShowS)
-> Show ListServiceActionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListServiceActionsResponse] -> ShowS
$cshowList :: [ListServiceActionsResponse] -> ShowS
show :: ListServiceActionsResponse -> String
$cshow :: ListServiceActionsResponse -> String
showsPrec :: Int -> ListServiceActionsResponse -> ShowS
$cshowsPrec :: Int -> ListServiceActionsResponse -> ShowS
Prelude.Show, (forall x.
 ListServiceActionsResponse -> Rep ListServiceActionsResponse x)
-> (forall x.
    Rep ListServiceActionsResponse x -> ListServiceActionsResponse)
-> Generic ListServiceActionsResponse
forall x.
Rep ListServiceActionsResponse x -> ListServiceActionsResponse
forall x.
ListServiceActionsResponse -> Rep ListServiceActionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListServiceActionsResponse x -> ListServiceActionsResponse
$cfrom :: forall x.
ListServiceActionsResponse -> Rep ListServiceActionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListServiceActionsResponse' 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:
--
-- 'nextPageToken', 'listServiceActionsResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'serviceActionSummaries', 'listServiceActionsResponse_serviceActionSummaries' - An object containing information about the service actions associated
-- with the provisioning artifact.
--
-- 'httpStatus', 'listServiceActionsResponse_httpStatus' - The response's http status code.
newListServiceActionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListServiceActionsResponse
newListServiceActionsResponse :: Int -> ListServiceActionsResponse
newListServiceActionsResponse Int
pHttpStatus_ =
  ListServiceActionsResponse' :: Maybe Text
-> Maybe [ServiceActionSummary]
-> Int
-> ListServiceActionsResponse
ListServiceActionsResponse'
    { $sel:nextPageToken:ListServiceActionsResponse' :: Maybe Text
nextPageToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceActionSummaries:ListServiceActionsResponse' :: Maybe [ServiceActionSummary]
serviceActionSummaries = Maybe [ServiceActionSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListServiceActionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
listServiceActionsResponse_nextPageToken :: Lens.Lens' ListServiceActionsResponse (Prelude.Maybe Prelude.Text)
listServiceActionsResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> ListServiceActionsResponse -> f ListServiceActionsResponse
listServiceActionsResponse_nextPageToken = (ListServiceActionsResponse -> Maybe Text)
-> (ListServiceActionsResponse
    -> Maybe Text -> ListServiceActionsResponse)
-> Lens' ListServiceActionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServiceActionsResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:ListServiceActionsResponse' :: ListServiceActionsResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: ListServiceActionsResponse
s@ListServiceActionsResponse' {} Maybe Text
a -> ListServiceActionsResponse
s {$sel:nextPageToken:ListServiceActionsResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: ListServiceActionsResponse)

-- | An object containing information about the service actions associated
-- with the provisioning artifact.
listServiceActionsResponse_serviceActionSummaries :: Lens.Lens' ListServiceActionsResponse (Prelude.Maybe [ServiceActionSummary])
listServiceActionsResponse_serviceActionSummaries :: (Maybe [ServiceActionSummary] -> f (Maybe [ServiceActionSummary]))
-> ListServiceActionsResponse -> f ListServiceActionsResponse
listServiceActionsResponse_serviceActionSummaries = (ListServiceActionsResponse -> Maybe [ServiceActionSummary])
-> (ListServiceActionsResponse
    -> Maybe [ServiceActionSummary] -> ListServiceActionsResponse)
-> Lens' ListServiceActionsResponse (Maybe [ServiceActionSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServiceActionsResponse' {Maybe [ServiceActionSummary]
serviceActionSummaries :: Maybe [ServiceActionSummary]
$sel:serviceActionSummaries:ListServiceActionsResponse' :: ListServiceActionsResponse -> Maybe [ServiceActionSummary]
serviceActionSummaries} -> Maybe [ServiceActionSummary]
serviceActionSummaries) (\s :: ListServiceActionsResponse
s@ListServiceActionsResponse' {} Maybe [ServiceActionSummary]
a -> ListServiceActionsResponse
s {$sel:serviceActionSummaries:ListServiceActionsResponse' :: Maybe [ServiceActionSummary]
serviceActionSummaries = Maybe [ServiceActionSummary]
a} :: ListServiceActionsResponse) ((Maybe [ServiceActionSummary] -> f (Maybe [ServiceActionSummary]))
 -> ListServiceActionsResponse -> f ListServiceActionsResponse)
-> ((Maybe [ServiceActionSummary]
     -> f (Maybe [ServiceActionSummary]))
    -> Maybe [ServiceActionSummary]
    -> f (Maybe [ServiceActionSummary]))
-> (Maybe [ServiceActionSummary]
    -> f (Maybe [ServiceActionSummary]))
-> ListServiceActionsResponse
-> f ListServiceActionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ServiceActionSummary]
  [ServiceActionSummary]
  [ServiceActionSummary]
  [ServiceActionSummary]
-> Iso
     (Maybe [ServiceActionSummary])
     (Maybe [ServiceActionSummary])
     (Maybe [ServiceActionSummary])
     (Maybe [ServiceActionSummary])
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
  [ServiceActionSummary]
  [ServiceActionSummary]
  [ServiceActionSummary]
  [ServiceActionSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListServiceActionsResponse