{-# 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.IoT.ListOutgoingCertificates
-- 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 certificates that are being transferred but not yet accepted.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions ListOutgoingCertificates>
-- action.
--
-- This operation returns paginated results.
module Amazonka.IoT.ListOutgoingCertificates
  ( -- * Creating a Request
    ListOutgoingCertificates (..),
    newListOutgoingCertificates,

    -- * Request Lenses
    listOutgoingCertificates_marker,
    listOutgoingCertificates_ascendingOrder,
    listOutgoingCertificates_pageSize,

    -- * Destructuring the Response
    ListOutgoingCertificatesResponse (..),
    newListOutgoingCertificatesResponse,

    -- * Response Lenses
    listOutgoingCertificatesResponse_nextMarker,
    listOutgoingCertificatesResponse_outgoingCertificates,
    listOutgoingCertificatesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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

-- | The input to the ListOutgoingCertificates operation.
--
-- /See:/ 'newListOutgoingCertificates' smart constructor.
data ListOutgoingCertificates = ListOutgoingCertificates'
  { -- | The marker for the next set of results.
    ListOutgoingCertificates -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Specifies the order for results. If True, the results are returned in
    -- ascending order, based on the creation date.
    ListOutgoingCertificates -> Maybe Bool
ascendingOrder :: Prelude.Maybe Prelude.Bool,
    -- | The result page size.
    ListOutgoingCertificates -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListOutgoingCertificates -> ListOutgoingCertificates -> Bool
(ListOutgoingCertificates -> ListOutgoingCertificates -> Bool)
-> (ListOutgoingCertificates -> ListOutgoingCertificates -> Bool)
-> Eq ListOutgoingCertificates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOutgoingCertificates -> ListOutgoingCertificates -> Bool
$c/= :: ListOutgoingCertificates -> ListOutgoingCertificates -> Bool
== :: ListOutgoingCertificates -> ListOutgoingCertificates -> Bool
$c== :: ListOutgoingCertificates -> ListOutgoingCertificates -> Bool
Prelude.Eq, ReadPrec [ListOutgoingCertificates]
ReadPrec ListOutgoingCertificates
Int -> ReadS ListOutgoingCertificates
ReadS [ListOutgoingCertificates]
(Int -> ReadS ListOutgoingCertificates)
-> ReadS [ListOutgoingCertificates]
-> ReadPrec ListOutgoingCertificates
-> ReadPrec [ListOutgoingCertificates]
-> Read ListOutgoingCertificates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOutgoingCertificates]
$creadListPrec :: ReadPrec [ListOutgoingCertificates]
readPrec :: ReadPrec ListOutgoingCertificates
$creadPrec :: ReadPrec ListOutgoingCertificates
readList :: ReadS [ListOutgoingCertificates]
$creadList :: ReadS [ListOutgoingCertificates]
readsPrec :: Int -> ReadS ListOutgoingCertificates
$creadsPrec :: Int -> ReadS ListOutgoingCertificates
Prelude.Read, Int -> ListOutgoingCertificates -> ShowS
[ListOutgoingCertificates] -> ShowS
ListOutgoingCertificates -> String
(Int -> ListOutgoingCertificates -> ShowS)
-> (ListOutgoingCertificates -> String)
-> ([ListOutgoingCertificates] -> ShowS)
-> Show ListOutgoingCertificates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOutgoingCertificates] -> ShowS
$cshowList :: [ListOutgoingCertificates] -> ShowS
show :: ListOutgoingCertificates -> String
$cshow :: ListOutgoingCertificates -> String
showsPrec :: Int -> ListOutgoingCertificates -> ShowS
$cshowsPrec :: Int -> ListOutgoingCertificates -> ShowS
Prelude.Show, (forall x.
 ListOutgoingCertificates -> Rep ListOutgoingCertificates x)
-> (forall x.
    Rep ListOutgoingCertificates x -> ListOutgoingCertificates)
-> Generic ListOutgoingCertificates
forall x.
Rep ListOutgoingCertificates x -> ListOutgoingCertificates
forall x.
ListOutgoingCertificates -> Rep ListOutgoingCertificates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListOutgoingCertificates x -> ListOutgoingCertificates
$cfrom :: forall x.
ListOutgoingCertificates -> Rep ListOutgoingCertificates x
Prelude.Generic)

-- |
-- Create a value of 'ListOutgoingCertificates' 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:
--
-- 'marker', 'listOutgoingCertificates_marker' - The marker for the next set of results.
--
-- 'ascendingOrder', 'listOutgoingCertificates_ascendingOrder' - Specifies the order for results. If True, the results are returned in
-- ascending order, based on the creation date.
--
-- 'pageSize', 'listOutgoingCertificates_pageSize' - The result page size.
newListOutgoingCertificates ::
  ListOutgoingCertificates
newListOutgoingCertificates :: ListOutgoingCertificates
newListOutgoingCertificates =
  ListOutgoingCertificates' :: Maybe Text
-> Maybe Bool -> Maybe Natural -> ListOutgoingCertificates
ListOutgoingCertificates'
    { $sel:marker:ListOutgoingCertificates' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ascendingOrder:ListOutgoingCertificates' :: Maybe Bool
ascendingOrder = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListOutgoingCertificates' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The marker for the next set of results.
listOutgoingCertificates_marker :: Lens.Lens' ListOutgoingCertificates (Prelude.Maybe Prelude.Text)
listOutgoingCertificates_marker :: (Maybe Text -> f (Maybe Text))
-> ListOutgoingCertificates -> f ListOutgoingCertificates
listOutgoingCertificates_marker = (ListOutgoingCertificates -> Maybe Text)
-> (ListOutgoingCertificates
    -> Maybe Text -> ListOutgoingCertificates)
-> Lens
     ListOutgoingCertificates
     ListOutgoingCertificates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutgoingCertificates' {Maybe Text
marker :: Maybe Text
$sel:marker:ListOutgoingCertificates' :: ListOutgoingCertificates -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListOutgoingCertificates
s@ListOutgoingCertificates' {} Maybe Text
a -> ListOutgoingCertificates
s {$sel:marker:ListOutgoingCertificates' :: Maybe Text
marker = Maybe Text
a} :: ListOutgoingCertificates)

-- | Specifies the order for results. If True, the results are returned in
-- ascending order, based on the creation date.
listOutgoingCertificates_ascendingOrder :: Lens.Lens' ListOutgoingCertificates (Prelude.Maybe Prelude.Bool)
listOutgoingCertificates_ascendingOrder :: (Maybe Bool -> f (Maybe Bool))
-> ListOutgoingCertificates -> f ListOutgoingCertificates
listOutgoingCertificates_ascendingOrder = (ListOutgoingCertificates -> Maybe Bool)
-> (ListOutgoingCertificates
    -> Maybe Bool -> ListOutgoingCertificates)
-> Lens
     ListOutgoingCertificates
     ListOutgoingCertificates
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutgoingCertificates' {Maybe Bool
ascendingOrder :: Maybe Bool
$sel:ascendingOrder:ListOutgoingCertificates' :: ListOutgoingCertificates -> Maybe Bool
ascendingOrder} -> Maybe Bool
ascendingOrder) (\s :: ListOutgoingCertificates
s@ListOutgoingCertificates' {} Maybe Bool
a -> ListOutgoingCertificates
s {$sel:ascendingOrder:ListOutgoingCertificates' :: Maybe Bool
ascendingOrder = Maybe Bool
a} :: ListOutgoingCertificates)

-- | The result page size.
listOutgoingCertificates_pageSize :: Lens.Lens' ListOutgoingCertificates (Prelude.Maybe Prelude.Natural)
listOutgoingCertificates_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListOutgoingCertificates -> f ListOutgoingCertificates
listOutgoingCertificates_pageSize = (ListOutgoingCertificates -> Maybe Natural)
-> (ListOutgoingCertificates
    -> Maybe Natural -> ListOutgoingCertificates)
-> Lens
     ListOutgoingCertificates
     ListOutgoingCertificates
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutgoingCertificates' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListOutgoingCertificates' :: ListOutgoingCertificates -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListOutgoingCertificates
s@ListOutgoingCertificates' {} Maybe Natural
a -> ListOutgoingCertificates
s {$sel:pageSize:ListOutgoingCertificates' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListOutgoingCertificates)

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

instance Prelude.NFData ListOutgoingCertificates

instance Core.ToHeaders ListOutgoingCertificates where
  toHeaders :: ListOutgoingCertificates -> ResponseHeaders
toHeaders = ResponseHeaders -> ListOutgoingCertificates -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ListOutgoingCertificates where
  toPath :: ListOutgoingCertificates -> ByteString
toPath = ByteString -> ListOutgoingCertificates -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/certificates-out-going"

instance Core.ToQuery ListOutgoingCertificates where
  toQuery :: ListOutgoingCertificates -> QueryString
toQuery ListOutgoingCertificates' {Maybe Bool
Maybe Natural
Maybe Text
pageSize :: Maybe Natural
ascendingOrder :: Maybe Bool
marker :: Maybe Text
$sel:pageSize:ListOutgoingCertificates' :: ListOutgoingCertificates -> Maybe Natural
$sel:ascendingOrder:ListOutgoingCertificates' :: ListOutgoingCertificates -> Maybe Bool
$sel:marker:ListOutgoingCertificates' :: ListOutgoingCertificates -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"isAscendingOrder" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
ascendingOrder,
        ByteString
"pageSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
pageSize
      ]

-- | The output from the ListOutgoingCertificates operation.
--
-- /See:/ 'newListOutgoingCertificatesResponse' smart constructor.
data ListOutgoingCertificatesResponse = ListOutgoingCertificatesResponse'
  { -- | The marker for the next set of results.
    ListOutgoingCertificatesResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The certificates that are being transferred but not yet accepted.
    ListOutgoingCertificatesResponse -> Maybe [OutgoingCertificate]
outgoingCertificates :: Prelude.Maybe [OutgoingCertificate],
    -- | The response's http status code.
    ListOutgoingCertificatesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListOutgoingCertificatesResponse
-> ListOutgoingCertificatesResponse -> Bool
(ListOutgoingCertificatesResponse
 -> ListOutgoingCertificatesResponse -> Bool)
-> (ListOutgoingCertificatesResponse
    -> ListOutgoingCertificatesResponse -> Bool)
-> Eq ListOutgoingCertificatesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOutgoingCertificatesResponse
-> ListOutgoingCertificatesResponse -> Bool
$c/= :: ListOutgoingCertificatesResponse
-> ListOutgoingCertificatesResponse -> Bool
== :: ListOutgoingCertificatesResponse
-> ListOutgoingCertificatesResponse -> Bool
$c== :: ListOutgoingCertificatesResponse
-> ListOutgoingCertificatesResponse -> Bool
Prelude.Eq, ReadPrec [ListOutgoingCertificatesResponse]
ReadPrec ListOutgoingCertificatesResponse
Int -> ReadS ListOutgoingCertificatesResponse
ReadS [ListOutgoingCertificatesResponse]
(Int -> ReadS ListOutgoingCertificatesResponse)
-> ReadS [ListOutgoingCertificatesResponse]
-> ReadPrec ListOutgoingCertificatesResponse
-> ReadPrec [ListOutgoingCertificatesResponse]
-> Read ListOutgoingCertificatesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOutgoingCertificatesResponse]
$creadListPrec :: ReadPrec [ListOutgoingCertificatesResponse]
readPrec :: ReadPrec ListOutgoingCertificatesResponse
$creadPrec :: ReadPrec ListOutgoingCertificatesResponse
readList :: ReadS [ListOutgoingCertificatesResponse]
$creadList :: ReadS [ListOutgoingCertificatesResponse]
readsPrec :: Int -> ReadS ListOutgoingCertificatesResponse
$creadsPrec :: Int -> ReadS ListOutgoingCertificatesResponse
Prelude.Read, Int -> ListOutgoingCertificatesResponse -> ShowS
[ListOutgoingCertificatesResponse] -> ShowS
ListOutgoingCertificatesResponse -> String
(Int -> ListOutgoingCertificatesResponse -> ShowS)
-> (ListOutgoingCertificatesResponse -> String)
-> ([ListOutgoingCertificatesResponse] -> ShowS)
-> Show ListOutgoingCertificatesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOutgoingCertificatesResponse] -> ShowS
$cshowList :: [ListOutgoingCertificatesResponse] -> ShowS
show :: ListOutgoingCertificatesResponse -> String
$cshow :: ListOutgoingCertificatesResponse -> String
showsPrec :: Int -> ListOutgoingCertificatesResponse -> ShowS
$cshowsPrec :: Int -> ListOutgoingCertificatesResponse -> ShowS
Prelude.Show, (forall x.
 ListOutgoingCertificatesResponse
 -> Rep ListOutgoingCertificatesResponse x)
-> (forall x.
    Rep ListOutgoingCertificatesResponse x
    -> ListOutgoingCertificatesResponse)
-> Generic ListOutgoingCertificatesResponse
forall x.
Rep ListOutgoingCertificatesResponse x
-> ListOutgoingCertificatesResponse
forall x.
ListOutgoingCertificatesResponse
-> Rep ListOutgoingCertificatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListOutgoingCertificatesResponse x
-> ListOutgoingCertificatesResponse
$cfrom :: forall x.
ListOutgoingCertificatesResponse
-> Rep ListOutgoingCertificatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListOutgoingCertificatesResponse' 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:
--
-- 'nextMarker', 'listOutgoingCertificatesResponse_nextMarker' - The marker for the next set of results.
--
-- 'outgoingCertificates', 'listOutgoingCertificatesResponse_outgoingCertificates' - The certificates that are being transferred but not yet accepted.
--
-- 'httpStatus', 'listOutgoingCertificatesResponse_httpStatus' - The response's http status code.
newListOutgoingCertificatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListOutgoingCertificatesResponse
newListOutgoingCertificatesResponse :: Int -> ListOutgoingCertificatesResponse
newListOutgoingCertificatesResponse Int
pHttpStatus_ =
  ListOutgoingCertificatesResponse' :: Maybe Text
-> Maybe [OutgoingCertificate]
-> Int
-> ListOutgoingCertificatesResponse
ListOutgoingCertificatesResponse'
    { $sel:nextMarker:ListOutgoingCertificatesResponse' :: Maybe Text
nextMarker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outgoingCertificates:ListOutgoingCertificatesResponse' :: Maybe [OutgoingCertificate]
outgoingCertificates = Maybe [OutgoingCertificate]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListOutgoingCertificatesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The marker for the next set of results.
listOutgoingCertificatesResponse_nextMarker :: Lens.Lens' ListOutgoingCertificatesResponse (Prelude.Maybe Prelude.Text)
listOutgoingCertificatesResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListOutgoingCertificatesResponse
-> f ListOutgoingCertificatesResponse
listOutgoingCertificatesResponse_nextMarker = (ListOutgoingCertificatesResponse -> Maybe Text)
-> (ListOutgoingCertificatesResponse
    -> Maybe Text -> ListOutgoingCertificatesResponse)
-> Lens' ListOutgoingCertificatesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutgoingCertificatesResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListOutgoingCertificatesResponse' :: ListOutgoingCertificatesResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListOutgoingCertificatesResponse
s@ListOutgoingCertificatesResponse' {} Maybe Text
a -> ListOutgoingCertificatesResponse
s {$sel:nextMarker:ListOutgoingCertificatesResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListOutgoingCertificatesResponse)

-- | The certificates that are being transferred but not yet accepted.
listOutgoingCertificatesResponse_outgoingCertificates :: Lens.Lens' ListOutgoingCertificatesResponse (Prelude.Maybe [OutgoingCertificate])
listOutgoingCertificatesResponse_outgoingCertificates :: (Maybe [OutgoingCertificate] -> f (Maybe [OutgoingCertificate]))
-> ListOutgoingCertificatesResponse
-> f ListOutgoingCertificatesResponse
listOutgoingCertificatesResponse_outgoingCertificates = (ListOutgoingCertificatesResponse -> Maybe [OutgoingCertificate])
-> (ListOutgoingCertificatesResponse
    -> Maybe [OutgoingCertificate] -> ListOutgoingCertificatesResponse)
-> Lens'
     ListOutgoingCertificatesResponse (Maybe [OutgoingCertificate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutgoingCertificatesResponse' {Maybe [OutgoingCertificate]
outgoingCertificates :: Maybe [OutgoingCertificate]
$sel:outgoingCertificates:ListOutgoingCertificatesResponse' :: ListOutgoingCertificatesResponse -> Maybe [OutgoingCertificate]
outgoingCertificates} -> Maybe [OutgoingCertificate]
outgoingCertificates) (\s :: ListOutgoingCertificatesResponse
s@ListOutgoingCertificatesResponse' {} Maybe [OutgoingCertificate]
a -> ListOutgoingCertificatesResponse
s {$sel:outgoingCertificates:ListOutgoingCertificatesResponse' :: Maybe [OutgoingCertificate]
outgoingCertificates = Maybe [OutgoingCertificate]
a} :: ListOutgoingCertificatesResponse) ((Maybe [OutgoingCertificate] -> f (Maybe [OutgoingCertificate]))
 -> ListOutgoingCertificatesResponse
 -> f ListOutgoingCertificatesResponse)
-> ((Maybe [OutgoingCertificate]
     -> f (Maybe [OutgoingCertificate]))
    -> Maybe [OutgoingCertificate] -> f (Maybe [OutgoingCertificate]))
-> (Maybe [OutgoingCertificate] -> f (Maybe [OutgoingCertificate]))
-> ListOutgoingCertificatesResponse
-> f ListOutgoingCertificatesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OutgoingCertificate]
  [OutgoingCertificate]
  [OutgoingCertificate]
  [OutgoingCertificate]
-> Iso
     (Maybe [OutgoingCertificate])
     (Maybe [OutgoingCertificate])
     (Maybe [OutgoingCertificate])
     (Maybe [OutgoingCertificate])
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
  [OutgoingCertificate]
  [OutgoingCertificate]
  [OutgoingCertificate]
  [OutgoingCertificate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListOutgoingCertificatesResponse