{-# 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.CloudWatchEvents.PutPartnerEvents
-- 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)
--
-- This is used by SaaS partners to write events to a customer\'s partner
-- event bus. Amazon Web Services customers do not use this operation.
module Amazonka.CloudWatchEvents.PutPartnerEvents
  ( -- * Creating a Request
    PutPartnerEvents (..),
    newPutPartnerEvents,

    -- * Request Lenses
    putPartnerEvents_entries,

    -- * Destructuring the Response
    PutPartnerEventsResponse (..),
    newPutPartnerEventsResponse,

    -- * Response Lenses
    putPartnerEventsResponse_failedEntryCount,
    putPartnerEventsResponse_entries,
    putPartnerEventsResponse_httpStatus,
  )
where

import Amazonka.CloudWatchEvents.Types
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

-- | /See:/ 'newPutPartnerEvents' smart constructor.
data PutPartnerEvents = PutPartnerEvents'
  { -- | The list of events to write to the event bus.
    PutPartnerEvents -> NonEmpty PutPartnerEventsRequestEntry
entries :: Prelude.NonEmpty PutPartnerEventsRequestEntry
  }
  deriving (PutPartnerEvents -> PutPartnerEvents -> Bool
(PutPartnerEvents -> PutPartnerEvents -> Bool)
-> (PutPartnerEvents -> PutPartnerEvents -> Bool)
-> Eq PutPartnerEvents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutPartnerEvents -> PutPartnerEvents -> Bool
$c/= :: PutPartnerEvents -> PutPartnerEvents -> Bool
== :: PutPartnerEvents -> PutPartnerEvents -> Bool
$c== :: PutPartnerEvents -> PutPartnerEvents -> Bool
Prelude.Eq, ReadPrec [PutPartnerEvents]
ReadPrec PutPartnerEvents
Int -> ReadS PutPartnerEvents
ReadS [PutPartnerEvents]
(Int -> ReadS PutPartnerEvents)
-> ReadS [PutPartnerEvents]
-> ReadPrec PutPartnerEvents
-> ReadPrec [PutPartnerEvents]
-> Read PutPartnerEvents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutPartnerEvents]
$creadListPrec :: ReadPrec [PutPartnerEvents]
readPrec :: ReadPrec PutPartnerEvents
$creadPrec :: ReadPrec PutPartnerEvents
readList :: ReadS [PutPartnerEvents]
$creadList :: ReadS [PutPartnerEvents]
readsPrec :: Int -> ReadS PutPartnerEvents
$creadsPrec :: Int -> ReadS PutPartnerEvents
Prelude.Read, Int -> PutPartnerEvents -> ShowS
[PutPartnerEvents] -> ShowS
PutPartnerEvents -> String
(Int -> PutPartnerEvents -> ShowS)
-> (PutPartnerEvents -> String)
-> ([PutPartnerEvents] -> ShowS)
-> Show PutPartnerEvents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutPartnerEvents] -> ShowS
$cshowList :: [PutPartnerEvents] -> ShowS
show :: PutPartnerEvents -> String
$cshow :: PutPartnerEvents -> String
showsPrec :: Int -> PutPartnerEvents -> ShowS
$cshowsPrec :: Int -> PutPartnerEvents -> ShowS
Prelude.Show, (forall x. PutPartnerEvents -> Rep PutPartnerEvents x)
-> (forall x. Rep PutPartnerEvents x -> PutPartnerEvents)
-> Generic PutPartnerEvents
forall x. Rep PutPartnerEvents x -> PutPartnerEvents
forall x. PutPartnerEvents -> Rep PutPartnerEvents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutPartnerEvents x -> PutPartnerEvents
$cfrom :: forall x. PutPartnerEvents -> Rep PutPartnerEvents x
Prelude.Generic)

-- |
-- Create a value of 'PutPartnerEvents' 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:
--
-- 'entries', 'putPartnerEvents_entries' - The list of events to write to the event bus.
newPutPartnerEvents ::
  -- | 'entries'
  Prelude.NonEmpty PutPartnerEventsRequestEntry ->
  PutPartnerEvents
newPutPartnerEvents :: NonEmpty PutPartnerEventsRequestEntry -> PutPartnerEvents
newPutPartnerEvents NonEmpty PutPartnerEventsRequestEntry
pEntries_ =
  PutPartnerEvents' :: NonEmpty PutPartnerEventsRequestEntry -> PutPartnerEvents
PutPartnerEvents'
    { $sel:entries:PutPartnerEvents' :: NonEmpty PutPartnerEventsRequestEntry
entries =
        Tagged
  (NonEmpty PutPartnerEventsRequestEntry)
  (Identity (NonEmpty PutPartnerEventsRequestEntry))
-> Tagged
     (NonEmpty PutPartnerEventsRequestEntry)
     (Identity (NonEmpty PutPartnerEventsRequestEntry))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty PutPartnerEventsRequestEntry)
   (Identity (NonEmpty PutPartnerEventsRequestEntry))
 -> Tagged
      (NonEmpty PutPartnerEventsRequestEntry)
      (Identity (NonEmpty PutPartnerEventsRequestEntry)))
-> NonEmpty PutPartnerEventsRequestEntry
-> NonEmpty PutPartnerEventsRequestEntry
forall t b. AReview t b -> b -> t
Lens.# NonEmpty PutPartnerEventsRequestEntry
pEntries_
    }

-- | The list of events to write to the event bus.
putPartnerEvents_entries :: Lens.Lens' PutPartnerEvents (Prelude.NonEmpty PutPartnerEventsRequestEntry)
putPartnerEvents_entries :: (NonEmpty PutPartnerEventsRequestEntry
 -> f (NonEmpty PutPartnerEventsRequestEntry))
-> PutPartnerEvents -> f PutPartnerEvents
putPartnerEvents_entries = (PutPartnerEvents -> NonEmpty PutPartnerEventsRequestEntry)
-> (PutPartnerEvents
    -> NonEmpty PutPartnerEventsRequestEntry -> PutPartnerEvents)
-> Lens
     PutPartnerEvents
     PutPartnerEvents
     (NonEmpty PutPartnerEventsRequestEntry)
     (NonEmpty PutPartnerEventsRequestEntry)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEvents' {NonEmpty PutPartnerEventsRequestEntry
entries :: NonEmpty PutPartnerEventsRequestEntry
$sel:entries:PutPartnerEvents' :: PutPartnerEvents -> NonEmpty PutPartnerEventsRequestEntry
entries} -> NonEmpty PutPartnerEventsRequestEntry
entries) (\s :: PutPartnerEvents
s@PutPartnerEvents' {} NonEmpty PutPartnerEventsRequestEntry
a -> PutPartnerEvents
s {$sel:entries:PutPartnerEvents' :: NonEmpty PutPartnerEventsRequestEntry
entries = NonEmpty PutPartnerEventsRequestEntry
a} :: PutPartnerEvents) ((NonEmpty PutPartnerEventsRequestEntry
  -> f (NonEmpty PutPartnerEventsRequestEntry))
 -> PutPartnerEvents -> f PutPartnerEvents)
-> ((NonEmpty PutPartnerEventsRequestEntry
     -> f (NonEmpty PutPartnerEventsRequestEntry))
    -> NonEmpty PutPartnerEventsRequestEntry
    -> f (NonEmpty PutPartnerEventsRequestEntry))
-> (NonEmpty PutPartnerEventsRequestEntry
    -> f (NonEmpty PutPartnerEventsRequestEntry))
-> PutPartnerEvents
-> f PutPartnerEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty PutPartnerEventsRequestEntry
 -> f (NonEmpty PutPartnerEventsRequestEntry))
-> NonEmpty PutPartnerEventsRequestEntry
-> f (NonEmpty PutPartnerEventsRequestEntry)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData PutPartnerEvents

instance Core.ToHeaders PutPartnerEvents where
  toHeaders :: PutPartnerEvents -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutPartnerEvents -> 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
"AWSEvents.PutPartnerEvents" :: 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 PutPartnerEvents where
  toJSON :: PutPartnerEvents -> Value
toJSON PutPartnerEvents' {NonEmpty PutPartnerEventsRequestEntry
entries :: NonEmpty PutPartnerEventsRequestEntry
$sel:entries:PutPartnerEvents' :: PutPartnerEvents -> NonEmpty PutPartnerEventsRequestEntry
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Key
"Entries" Key -> NonEmpty PutPartnerEventsRequestEntry -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..= NonEmpty PutPartnerEventsRequestEntry
entries)]
      )

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

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

-- | /See:/ 'newPutPartnerEventsResponse' smart constructor.
data PutPartnerEventsResponse = PutPartnerEventsResponse'
  { -- | The number of events from this operation that could not be written to
    -- the partner event bus.
    PutPartnerEventsResponse -> Maybe Int
failedEntryCount :: Prelude.Maybe Prelude.Int,
    -- | The list of events from this operation that were successfully written to
    -- the partner event bus.
    PutPartnerEventsResponse -> Maybe [PutPartnerEventsResultEntry]
entries :: Prelude.Maybe [PutPartnerEventsResultEntry],
    -- | The response's http status code.
    PutPartnerEventsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutPartnerEventsResponse -> PutPartnerEventsResponse -> Bool
(PutPartnerEventsResponse -> PutPartnerEventsResponse -> Bool)
-> (PutPartnerEventsResponse -> PutPartnerEventsResponse -> Bool)
-> Eq PutPartnerEventsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutPartnerEventsResponse -> PutPartnerEventsResponse -> Bool
$c/= :: PutPartnerEventsResponse -> PutPartnerEventsResponse -> Bool
== :: PutPartnerEventsResponse -> PutPartnerEventsResponse -> Bool
$c== :: PutPartnerEventsResponse -> PutPartnerEventsResponse -> Bool
Prelude.Eq, ReadPrec [PutPartnerEventsResponse]
ReadPrec PutPartnerEventsResponse
Int -> ReadS PutPartnerEventsResponse
ReadS [PutPartnerEventsResponse]
(Int -> ReadS PutPartnerEventsResponse)
-> ReadS [PutPartnerEventsResponse]
-> ReadPrec PutPartnerEventsResponse
-> ReadPrec [PutPartnerEventsResponse]
-> Read PutPartnerEventsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutPartnerEventsResponse]
$creadListPrec :: ReadPrec [PutPartnerEventsResponse]
readPrec :: ReadPrec PutPartnerEventsResponse
$creadPrec :: ReadPrec PutPartnerEventsResponse
readList :: ReadS [PutPartnerEventsResponse]
$creadList :: ReadS [PutPartnerEventsResponse]
readsPrec :: Int -> ReadS PutPartnerEventsResponse
$creadsPrec :: Int -> ReadS PutPartnerEventsResponse
Prelude.Read, Int -> PutPartnerEventsResponse -> ShowS
[PutPartnerEventsResponse] -> ShowS
PutPartnerEventsResponse -> String
(Int -> PutPartnerEventsResponse -> ShowS)
-> (PutPartnerEventsResponse -> String)
-> ([PutPartnerEventsResponse] -> ShowS)
-> Show PutPartnerEventsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutPartnerEventsResponse] -> ShowS
$cshowList :: [PutPartnerEventsResponse] -> ShowS
show :: PutPartnerEventsResponse -> String
$cshow :: PutPartnerEventsResponse -> String
showsPrec :: Int -> PutPartnerEventsResponse -> ShowS
$cshowsPrec :: Int -> PutPartnerEventsResponse -> ShowS
Prelude.Show, (forall x.
 PutPartnerEventsResponse -> Rep PutPartnerEventsResponse x)
-> (forall x.
    Rep PutPartnerEventsResponse x -> PutPartnerEventsResponse)
-> Generic PutPartnerEventsResponse
forall x.
Rep PutPartnerEventsResponse x -> PutPartnerEventsResponse
forall x.
PutPartnerEventsResponse -> Rep PutPartnerEventsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutPartnerEventsResponse x -> PutPartnerEventsResponse
$cfrom :: forall x.
PutPartnerEventsResponse -> Rep PutPartnerEventsResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutPartnerEventsResponse' 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:
--
-- 'failedEntryCount', 'putPartnerEventsResponse_failedEntryCount' - The number of events from this operation that could not be written to
-- the partner event bus.
--
-- 'entries', 'putPartnerEventsResponse_entries' - The list of events from this operation that were successfully written to
-- the partner event bus.
--
-- 'httpStatus', 'putPartnerEventsResponse_httpStatus' - The response's http status code.
newPutPartnerEventsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutPartnerEventsResponse
newPutPartnerEventsResponse :: Int -> PutPartnerEventsResponse
newPutPartnerEventsResponse Int
pHttpStatus_ =
  PutPartnerEventsResponse' :: Maybe Int
-> Maybe [PutPartnerEventsResultEntry]
-> Int
-> PutPartnerEventsResponse
PutPartnerEventsResponse'
    { $sel:failedEntryCount:PutPartnerEventsResponse' :: Maybe Int
failedEntryCount =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:entries:PutPartnerEventsResponse' :: Maybe [PutPartnerEventsResultEntry]
entries = Maybe [PutPartnerEventsResultEntry]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutPartnerEventsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The number of events from this operation that could not be written to
-- the partner event bus.
putPartnerEventsResponse_failedEntryCount :: Lens.Lens' PutPartnerEventsResponse (Prelude.Maybe Prelude.Int)
putPartnerEventsResponse_failedEntryCount :: (Maybe Int -> f (Maybe Int))
-> PutPartnerEventsResponse -> f PutPartnerEventsResponse
putPartnerEventsResponse_failedEntryCount = (PutPartnerEventsResponse -> Maybe Int)
-> (PutPartnerEventsResponse
    -> Maybe Int -> PutPartnerEventsResponse)
-> Lens
     PutPartnerEventsResponse
     PutPartnerEventsResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEventsResponse' {Maybe Int
failedEntryCount :: Maybe Int
$sel:failedEntryCount:PutPartnerEventsResponse' :: PutPartnerEventsResponse -> Maybe Int
failedEntryCount} -> Maybe Int
failedEntryCount) (\s :: PutPartnerEventsResponse
s@PutPartnerEventsResponse' {} Maybe Int
a -> PutPartnerEventsResponse
s {$sel:failedEntryCount:PutPartnerEventsResponse' :: Maybe Int
failedEntryCount = Maybe Int
a} :: PutPartnerEventsResponse)

-- | The list of events from this operation that were successfully written to
-- the partner event bus.
putPartnerEventsResponse_entries :: Lens.Lens' PutPartnerEventsResponse (Prelude.Maybe [PutPartnerEventsResultEntry])
putPartnerEventsResponse_entries :: (Maybe [PutPartnerEventsResultEntry]
 -> f (Maybe [PutPartnerEventsResultEntry]))
-> PutPartnerEventsResponse -> f PutPartnerEventsResponse
putPartnerEventsResponse_entries = (PutPartnerEventsResponse -> Maybe [PutPartnerEventsResultEntry])
-> (PutPartnerEventsResponse
    -> Maybe [PutPartnerEventsResultEntry] -> PutPartnerEventsResponse)
-> Lens
     PutPartnerEventsResponse
     PutPartnerEventsResponse
     (Maybe [PutPartnerEventsResultEntry])
     (Maybe [PutPartnerEventsResultEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutPartnerEventsResponse' {Maybe [PutPartnerEventsResultEntry]
entries :: Maybe [PutPartnerEventsResultEntry]
$sel:entries:PutPartnerEventsResponse' :: PutPartnerEventsResponse -> Maybe [PutPartnerEventsResultEntry]
entries} -> Maybe [PutPartnerEventsResultEntry]
entries) (\s :: PutPartnerEventsResponse
s@PutPartnerEventsResponse' {} Maybe [PutPartnerEventsResultEntry]
a -> PutPartnerEventsResponse
s {$sel:entries:PutPartnerEventsResponse' :: Maybe [PutPartnerEventsResultEntry]
entries = Maybe [PutPartnerEventsResultEntry]
a} :: PutPartnerEventsResponse) ((Maybe [PutPartnerEventsResultEntry]
  -> f (Maybe [PutPartnerEventsResultEntry]))
 -> PutPartnerEventsResponse -> f PutPartnerEventsResponse)
-> ((Maybe [PutPartnerEventsResultEntry]
     -> f (Maybe [PutPartnerEventsResultEntry]))
    -> Maybe [PutPartnerEventsResultEntry]
    -> f (Maybe [PutPartnerEventsResultEntry]))
-> (Maybe [PutPartnerEventsResultEntry]
    -> f (Maybe [PutPartnerEventsResultEntry]))
-> PutPartnerEventsResponse
-> f PutPartnerEventsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PutPartnerEventsResultEntry]
  [PutPartnerEventsResultEntry]
  [PutPartnerEventsResultEntry]
  [PutPartnerEventsResultEntry]
-> Iso
     (Maybe [PutPartnerEventsResultEntry])
     (Maybe [PutPartnerEventsResultEntry])
     (Maybe [PutPartnerEventsResultEntry])
     (Maybe [PutPartnerEventsResultEntry])
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
  [PutPartnerEventsResultEntry]
  [PutPartnerEventsResultEntry]
  [PutPartnerEventsResultEntry]
  [PutPartnerEventsResultEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData PutPartnerEventsResponse