{-# 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.GuardDuty.DescribePublishingDestination
-- 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)
--
-- Returns information about the publishing destination specified by the
-- provided @destinationId@.
module Amazonka.GuardDuty.DescribePublishingDestination
  ( -- * Creating a Request
    DescribePublishingDestination (..),
    newDescribePublishingDestination,

    -- * Request Lenses
    describePublishingDestination_detectorId,
    describePublishingDestination_destinationId,

    -- * Destructuring the Response
    DescribePublishingDestinationResponse (..),
    newDescribePublishingDestinationResponse,

    -- * Response Lenses
    describePublishingDestinationResponse_httpStatus,
    describePublishingDestinationResponse_destinationId,
    describePublishingDestinationResponse_destinationType,
    describePublishingDestinationResponse_status,
    describePublishingDestinationResponse_publishingFailureStartTimestamp,
    describePublishingDestinationResponse_destinationProperties,
  )
where

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

-- | /See:/ 'newDescribePublishingDestination' smart constructor.
data DescribePublishingDestination = DescribePublishingDestination'
  { -- | The unique ID of the detector associated with the publishing destination
    -- to retrieve.
    DescribePublishingDestination -> Text
detectorId :: Prelude.Text,
    -- | The ID of the publishing destination to retrieve.
    DescribePublishingDestination -> Text
destinationId :: Prelude.Text
  }
  deriving (DescribePublishingDestination
-> DescribePublishingDestination -> Bool
(DescribePublishingDestination
 -> DescribePublishingDestination -> Bool)
-> (DescribePublishingDestination
    -> DescribePublishingDestination -> Bool)
-> Eq DescribePublishingDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePublishingDestination
-> DescribePublishingDestination -> Bool
$c/= :: DescribePublishingDestination
-> DescribePublishingDestination -> Bool
== :: DescribePublishingDestination
-> DescribePublishingDestination -> Bool
$c== :: DescribePublishingDestination
-> DescribePublishingDestination -> Bool
Prelude.Eq, ReadPrec [DescribePublishingDestination]
ReadPrec DescribePublishingDestination
Int -> ReadS DescribePublishingDestination
ReadS [DescribePublishingDestination]
(Int -> ReadS DescribePublishingDestination)
-> ReadS [DescribePublishingDestination]
-> ReadPrec DescribePublishingDestination
-> ReadPrec [DescribePublishingDestination]
-> Read DescribePublishingDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePublishingDestination]
$creadListPrec :: ReadPrec [DescribePublishingDestination]
readPrec :: ReadPrec DescribePublishingDestination
$creadPrec :: ReadPrec DescribePublishingDestination
readList :: ReadS [DescribePublishingDestination]
$creadList :: ReadS [DescribePublishingDestination]
readsPrec :: Int -> ReadS DescribePublishingDestination
$creadsPrec :: Int -> ReadS DescribePublishingDestination
Prelude.Read, Int -> DescribePublishingDestination -> ShowS
[DescribePublishingDestination] -> ShowS
DescribePublishingDestination -> String
(Int -> DescribePublishingDestination -> ShowS)
-> (DescribePublishingDestination -> String)
-> ([DescribePublishingDestination] -> ShowS)
-> Show DescribePublishingDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePublishingDestination] -> ShowS
$cshowList :: [DescribePublishingDestination] -> ShowS
show :: DescribePublishingDestination -> String
$cshow :: DescribePublishingDestination -> String
showsPrec :: Int -> DescribePublishingDestination -> ShowS
$cshowsPrec :: Int -> DescribePublishingDestination -> ShowS
Prelude.Show, (forall x.
 DescribePublishingDestination
 -> Rep DescribePublishingDestination x)
-> (forall x.
    Rep DescribePublishingDestination x
    -> DescribePublishingDestination)
-> Generic DescribePublishingDestination
forall x.
Rep DescribePublishingDestination x
-> DescribePublishingDestination
forall x.
DescribePublishingDestination
-> Rep DescribePublishingDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePublishingDestination x
-> DescribePublishingDestination
$cfrom :: forall x.
DescribePublishingDestination
-> Rep DescribePublishingDestination x
Prelude.Generic)

-- |
-- Create a value of 'DescribePublishingDestination' 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:
--
-- 'detectorId', 'describePublishingDestination_detectorId' - The unique ID of the detector associated with the publishing destination
-- to retrieve.
--
-- 'destinationId', 'describePublishingDestination_destinationId' - The ID of the publishing destination to retrieve.
newDescribePublishingDestination ::
  -- | 'detectorId'
  Prelude.Text ->
  -- | 'destinationId'
  Prelude.Text ->
  DescribePublishingDestination
newDescribePublishingDestination :: Text -> Text -> DescribePublishingDestination
newDescribePublishingDestination
  Text
pDetectorId_
  Text
pDestinationId_ =
    DescribePublishingDestination' :: Text -> Text -> DescribePublishingDestination
DescribePublishingDestination'
      { $sel:detectorId:DescribePublishingDestination' :: Text
detectorId =
          Text
pDetectorId_,
        $sel:destinationId:DescribePublishingDestination' :: Text
destinationId = Text
pDestinationId_
      }

-- | The unique ID of the detector associated with the publishing destination
-- to retrieve.
describePublishingDestination_detectorId :: Lens.Lens' DescribePublishingDestination Prelude.Text
describePublishingDestination_detectorId :: (Text -> f Text)
-> DescribePublishingDestination -> f DescribePublishingDestination
describePublishingDestination_detectorId = (DescribePublishingDestination -> Text)
-> (DescribePublishingDestination
    -> Text -> DescribePublishingDestination)
-> Lens
     DescribePublishingDestination
     DescribePublishingDestination
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublishingDestination' {Text
detectorId :: Text
$sel:detectorId:DescribePublishingDestination' :: DescribePublishingDestination -> Text
detectorId} -> Text
detectorId) (\s :: DescribePublishingDestination
s@DescribePublishingDestination' {} Text
a -> DescribePublishingDestination
s {$sel:detectorId:DescribePublishingDestination' :: Text
detectorId = Text
a} :: DescribePublishingDestination)

-- | The ID of the publishing destination to retrieve.
describePublishingDestination_destinationId :: Lens.Lens' DescribePublishingDestination Prelude.Text
describePublishingDestination_destinationId :: (Text -> f Text)
-> DescribePublishingDestination -> f DescribePublishingDestination
describePublishingDestination_destinationId = (DescribePublishingDestination -> Text)
-> (DescribePublishingDestination
    -> Text -> DescribePublishingDestination)
-> Lens
     DescribePublishingDestination
     DescribePublishingDestination
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublishingDestination' {Text
destinationId :: Text
$sel:destinationId:DescribePublishingDestination' :: DescribePublishingDestination -> Text
destinationId} -> Text
destinationId) (\s :: DescribePublishingDestination
s@DescribePublishingDestination' {} Text
a -> DescribePublishingDestination
s {$sel:destinationId:DescribePublishingDestination' :: Text
destinationId = Text
a} :: DescribePublishingDestination)

instance
  Core.AWSRequest
    DescribePublishingDestination
  where
  type
    AWSResponse DescribePublishingDestination =
      DescribePublishingDestinationResponse
  request :: DescribePublishingDestination
-> Request DescribePublishingDestination
request = Service
-> DescribePublishingDestination
-> Request DescribePublishingDestination
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribePublishingDestination
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePublishingDestination)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribePublishingDestination))
-> Logger
-> Service
-> Proxy DescribePublishingDestination
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePublishingDestination)))
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 ->
          Int
-> Text
-> DestinationType
-> PublishingStatus
-> Integer
-> DestinationProperties
-> DescribePublishingDestinationResponse
DescribePublishingDestinationResponse'
            (Int
 -> Text
 -> DestinationType
 -> PublishingStatus
 -> Integer
 -> DestinationProperties
 -> DescribePublishingDestinationResponse)
-> Either String Int
-> Either
     String
     (Text
      -> DestinationType
      -> PublishingStatus
      -> Integer
      -> DestinationProperties
      -> DescribePublishingDestinationResponse)
forall (f :: * -> *) a b. Functor 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))
            Either
  String
  (Text
   -> DestinationType
   -> PublishingStatus
   -> Integer
   -> DestinationProperties
   -> DescribePublishingDestinationResponse)
-> Either String Text
-> Either
     String
     (DestinationType
      -> PublishingStatus
      -> Integer
      -> DestinationProperties
      -> DescribePublishingDestinationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"destinationId")
            Either
  String
  (DestinationType
   -> PublishingStatus
   -> Integer
   -> DestinationProperties
   -> DescribePublishingDestinationResponse)
-> Either String DestinationType
-> Either
     String
     (PublishingStatus
      -> Integer
      -> DestinationProperties
      -> DescribePublishingDestinationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String DestinationType
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"destinationType")
            Either
  String
  (PublishingStatus
   -> Integer
   -> DestinationProperties
   -> DescribePublishingDestinationResponse)
-> Either String PublishingStatus
-> Either
     String
     (Integer
      -> DestinationProperties -> DescribePublishingDestinationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String PublishingStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"status")
            Either
  String
  (Integer
   -> DestinationProperties -> DescribePublishingDestinationResponse)
-> Either String Integer
-> Either
     String
     (DestinationProperties -> DescribePublishingDestinationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Integer
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"publishingFailureStartTimestamp")
            Either
  String
  (DestinationProperties -> DescribePublishingDestinationResponse)
-> Either String DestinationProperties
-> Either String DescribePublishingDestinationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String DestinationProperties
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"destinationProperties")
      )

instance
  Prelude.Hashable
    DescribePublishingDestination

instance Prelude.NFData DescribePublishingDestination

instance Core.ToHeaders DescribePublishingDestination where
  toHeaders :: DescribePublishingDestination -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribePublishingDestination -> 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 DescribePublishingDestination where
  toPath :: DescribePublishingDestination -> ByteString
toPath DescribePublishingDestination' {Text
destinationId :: Text
detectorId :: Text
$sel:destinationId:DescribePublishingDestination' :: DescribePublishingDestination -> Text
$sel:detectorId:DescribePublishingDestination' :: DescribePublishingDestination -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/detector/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorId,
        ByteString
"/publishingDestination/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
destinationId
      ]

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

-- | /See:/ 'newDescribePublishingDestinationResponse' smart constructor.
data DescribePublishingDestinationResponse = DescribePublishingDestinationResponse'
  { -- | The response's http status code.
    DescribePublishingDestinationResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ID of the publishing destination.
    DescribePublishingDestinationResponse -> Text
destinationId :: Prelude.Text,
    -- | The type of publishing destination. Currently, only Amazon S3 buckets
    -- are supported.
    DescribePublishingDestinationResponse -> DestinationType
destinationType :: DestinationType,
    -- | The status of the publishing destination.
    DescribePublishingDestinationResponse -> PublishingStatus
status :: PublishingStatus,
    -- | The time, in epoch millisecond format, at which GuardDuty was first
    -- unable to publish findings to the destination.
    DescribePublishingDestinationResponse -> Integer
publishingFailureStartTimestamp :: Prelude.Integer,
    -- | A @DestinationProperties@ object that includes the @DestinationArn@ and
    -- @KmsKeyArn@ of the publishing destination.
    DescribePublishingDestinationResponse -> DestinationProperties
destinationProperties :: DestinationProperties
  }
  deriving (DescribePublishingDestinationResponse
-> DescribePublishingDestinationResponse -> Bool
(DescribePublishingDestinationResponse
 -> DescribePublishingDestinationResponse -> Bool)
-> (DescribePublishingDestinationResponse
    -> DescribePublishingDestinationResponse -> Bool)
-> Eq DescribePublishingDestinationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePublishingDestinationResponse
-> DescribePublishingDestinationResponse -> Bool
$c/= :: DescribePublishingDestinationResponse
-> DescribePublishingDestinationResponse -> Bool
== :: DescribePublishingDestinationResponse
-> DescribePublishingDestinationResponse -> Bool
$c== :: DescribePublishingDestinationResponse
-> DescribePublishingDestinationResponse -> Bool
Prelude.Eq, ReadPrec [DescribePublishingDestinationResponse]
ReadPrec DescribePublishingDestinationResponse
Int -> ReadS DescribePublishingDestinationResponse
ReadS [DescribePublishingDestinationResponse]
(Int -> ReadS DescribePublishingDestinationResponse)
-> ReadS [DescribePublishingDestinationResponse]
-> ReadPrec DescribePublishingDestinationResponse
-> ReadPrec [DescribePublishingDestinationResponse]
-> Read DescribePublishingDestinationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePublishingDestinationResponse]
$creadListPrec :: ReadPrec [DescribePublishingDestinationResponse]
readPrec :: ReadPrec DescribePublishingDestinationResponse
$creadPrec :: ReadPrec DescribePublishingDestinationResponse
readList :: ReadS [DescribePublishingDestinationResponse]
$creadList :: ReadS [DescribePublishingDestinationResponse]
readsPrec :: Int -> ReadS DescribePublishingDestinationResponse
$creadsPrec :: Int -> ReadS DescribePublishingDestinationResponse
Prelude.Read, Int -> DescribePublishingDestinationResponse -> ShowS
[DescribePublishingDestinationResponse] -> ShowS
DescribePublishingDestinationResponse -> String
(Int -> DescribePublishingDestinationResponse -> ShowS)
-> (DescribePublishingDestinationResponse -> String)
-> ([DescribePublishingDestinationResponse] -> ShowS)
-> Show DescribePublishingDestinationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePublishingDestinationResponse] -> ShowS
$cshowList :: [DescribePublishingDestinationResponse] -> ShowS
show :: DescribePublishingDestinationResponse -> String
$cshow :: DescribePublishingDestinationResponse -> String
showsPrec :: Int -> DescribePublishingDestinationResponse -> ShowS
$cshowsPrec :: Int -> DescribePublishingDestinationResponse -> ShowS
Prelude.Show, (forall x.
 DescribePublishingDestinationResponse
 -> Rep DescribePublishingDestinationResponse x)
-> (forall x.
    Rep DescribePublishingDestinationResponse x
    -> DescribePublishingDestinationResponse)
-> Generic DescribePublishingDestinationResponse
forall x.
Rep DescribePublishingDestinationResponse x
-> DescribePublishingDestinationResponse
forall x.
DescribePublishingDestinationResponse
-> Rep DescribePublishingDestinationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePublishingDestinationResponse x
-> DescribePublishingDestinationResponse
$cfrom :: forall x.
DescribePublishingDestinationResponse
-> Rep DescribePublishingDestinationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePublishingDestinationResponse' 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:
--
-- 'httpStatus', 'describePublishingDestinationResponse_httpStatus' - The response's http status code.
--
-- 'destinationId', 'describePublishingDestinationResponse_destinationId' - The ID of the publishing destination.
--
-- 'destinationType', 'describePublishingDestinationResponse_destinationType' - The type of publishing destination. Currently, only Amazon S3 buckets
-- are supported.
--
-- 'status', 'describePublishingDestinationResponse_status' - The status of the publishing destination.
--
-- 'publishingFailureStartTimestamp', 'describePublishingDestinationResponse_publishingFailureStartTimestamp' - The time, in epoch millisecond format, at which GuardDuty was first
-- unable to publish findings to the destination.
--
-- 'destinationProperties', 'describePublishingDestinationResponse_destinationProperties' - A @DestinationProperties@ object that includes the @DestinationArn@ and
-- @KmsKeyArn@ of the publishing destination.
newDescribePublishingDestinationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'destinationId'
  Prelude.Text ->
  -- | 'destinationType'
  DestinationType ->
  -- | 'status'
  PublishingStatus ->
  -- | 'publishingFailureStartTimestamp'
  Prelude.Integer ->
  -- | 'destinationProperties'
  DestinationProperties ->
  DescribePublishingDestinationResponse
newDescribePublishingDestinationResponse :: Int
-> Text
-> DestinationType
-> PublishingStatus
-> Integer
-> DestinationProperties
-> DescribePublishingDestinationResponse
newDescribePublishingDestinationResponse
  Int
pHttpStatus_
  Text
pDestinationId_
  DestinationType
pDestinationType_
  PublishingStatus
pStatus_
  Integer
pPublishingFailureStartTimestamp_
  DestinationProperties
pDestinationProperties_ =
    DescribePublishingDestinationResponse' :: Int
-> Text
-> DestinationType
-> PublishingStatus
-> Integer
-> DestinationProperties
-> DescribePublishingDestinationResponse
DescribePublishingDestinationResponse'
      { $sel:httpStatus:DescribePublishingDestinationResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:destinationId:DescribePublishingDestinationResponse' :: Text
destinationId = Text
pDestinationId_,
        $sel:destinationType:DescribePublishingDestinationResponse' :: DestinationType
destinationType = DestinationType
pDestinationType_,
        $sel:status:DescribePublishingDestinationResponse' :: PublishingStatus
status = PublishingStatus
pStatus_,
        $sel:publishingFailureStartTimestamp:DescribePublishingDestinationResponse' :: Integer
publishingFailureStartTimestamp =
          Integer
pPublishingFailureStartTimestamp_,
        $sel:destinationProperties:DescribePublishingDestinationResponse' :: DestinationProperties
destinationProperties =
          DestinationProperties
pDestinationProperties_
      }

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

-- | The ID of the publishing destination.
describePublishingDestinationResponse_destinationId :: Lens.Lens' DescribePublishingDestinationResponse Prelude.Text
describePublishingDestinationResponse_destinationId :: (Text -> f Text)
-> DescribePublishingDestinationResponse
-> f DescribePublishingDestinationResponse
describePublishingDestinationResponse_destinationId = (DescribePublishingDestinationResponse -> Text)
-> (DescribePublishingDestinationResponse
    -> Text -> DescribePublishingDestinationResponse)
-> Lens
     DescribePublishingDestinationResponse
     DescribePublishingDestinationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublishingDestinationResponse' {Text
destinationId :: Text
$sel:destinationId:DescribePublishingDestinationResponse' :: DescribePublishingDestinationResponse -> Text
destinationId} -> Text
destinationId) (\s :: DescribePublishingDestinationResponse
s@DescribePublishingDestinationResponse' {} Text
a -> DescribePublishingDestinationResponse
s {$sel:destinationId:DescribePublishingDestinationResponse' :: Text
destinationId = Text
a} :: DescribePublishingDestinationResponse)

-- | The type of publishing destination. Currently, only Amazon S3 buckets
-- are supported.
describePublishingDestinationResponse_destinationType :: Lens.Lens' DescribePublishingDestinationResponse DestinationType
describePublishingDestinationResponse_destinationType :: (DestinationType -> f DestinationType)
-> DescribePublishingDestinationResponse
-> f DescribePublishingDestinationResponse
describePublishingDestinationResponse_destinationType = (DescribePublishingDestinationResponse -> DestinationType)
-> (DescribePublishingDestinationResponse
    -> DestinationType -> DescribePublishingDestinationResponse)
-> Lens
     DescribePublishingDestinationResponse
     DescribePublishingDestinationResponse
     DestinationType
     DestinationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublishingDestinationResponse' {DestinationType
destinationType :: DestinationType
$sel:destinationType:DescribePublishingDestinationResponse' :: DescribePublishingDestinationResponse -> DestinationType
destinationType} -> DestinationType
destinationType) (\s :: DescribePublishingDestinationResponse
s@DescribePublishingDestinationResponse' {} DestinationType
a -> DescribePublishingDestinationResponse
s {$sel:destinationType:DescribePublishingDestinationResponse' :: DestinationType
destinationType = DestinationType
a} :: DescribePublishingDestinationResponse)

-- | The status of the publishing destination.
describePublishingDestinationResponse_status :: Lens.Lens' DescribePublishingDestinationResponse PublishingStatus
describePublishingDestinationResponse_status :: (PublishingStatus -> f PublishingStatus)
-> DescribePublishingDestinationResponse
-> f DescribePublishingDestinationResponse
describePublishingDestinationResponse_status = (DescribePublishingDestinationResponse -> PublishingStatus)
-> (DescribePublishingDestinationResponse
    -> PublishingStatus -> DescribePublishingDestinationResponse)
-> Lens
     DescribePublishingDestinationResponse
     DescribePublishingDestinationResponse
     PublishingStatus
     PublishingStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublishingDestinationResponse' {PublishingStatus
status :: PublishingStatus
$sel:status:DescribePublishingDestinationResponse' :: DescribePublishingDestinationResponse -> PublishingStatus
status} -> PublishingStatus
status) (\s :: DescribePublishingDestinationResponse
s@DescribePublishingDestinationResponse' {} PublishingStatus
a -> DescribePublishingDestinationResponse
s {$sel:status:DescribePublishingDestinationResponse' :: PublishingStatus
status = PublishingStatus
a} :: DescribePublishingDestinationResponse)

-- | The time, in epoch millisecond format, at which GuardDuty was first
-- unable to publish findings to the destination.
describePublishingDestinationResponse_publishingFailureStartTimestamp :: Lens.Lens' DescribePublishingDestinationResponse Prelude.Integer
describePublishingDestinationResponse_publishingFailureStartTimestamp :: (Integer -> f Integer)
-> DescribePublishingDestinationResponse
-> f DescribePublishingDestinationResponse
describePublishingDestinationResponse_publishingFailureStartTimestamp = (DescribePublishingDestinationResponse -> Integer)
-> (DescribePublishingDestinationResponse
    -> Integer -> DescribePublishingDestinationResponse)
-> Lens
     DescribePublishingDestinationResponse
     DescribePublishingDestinationResponse
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublishingDestinationResponse' {Integer
publishingFailureStartTimestamp :: Integer
$sel:publishingFailureStartTimestamp:DescribePublishingDestinationResponse' :: DescribePublishingDestinationResponse -> Integer
publishingFailureStartTimestamp} -> Integer
publishingFailureStartTimestamp) (\s :: DescribePublishingDestinationResponse
s@DescribePublishingDestinationResponse' {} Integer
a -> DescribePublishingDestinationResponse
s {$sel:publishingFailureStartTimestamp:DescribePublishingDestinationResponse' :: Integer
publishingFailureStartTimestamp = Integer
a} :: DescribePublishingDestinationResponse)

-- | A @DestinationProperties@ object that includes the @DestinationArn@ and
-- @KmsKeyArn@ of the publishing destination.
describePublishingDestinationResponse_destinationProperties :: Lens.Lens' DescribePublishingDestinationResponse DestinationProperties
describePublishingDestinationResponse_destinationProperties :: (DestinationProperties -> f DestinationProperties)
-> DescribePublishingDestinationResponse
-> f DescribePublishingDestinationResponse
describePublishingDestinationResponse_destinationProperties = (DescribePublishingDestinationResponse -> DestinationProperties)
-> (DescribePublishingDestinationResponse
    -> DestinationProperties -> DescribePublishingDestinationResponse)
-> Lens
     DescribePublishingDestinationResponse
     DescribePublishingDestinationResponse
     DestinationProperties
     DestinationProperties
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublishingDestinationResponse' {DestinationProperties
destinationProperties :: DestinationProperties
$sel:destinationProperties:DescribePublishingDestinationResponse' :: DescribePublishingDestinationResponse -> DestinationProperties
destinationProperties} -> DestinationProperties
destinationProperties) (\s :: DescribePublishingDestinationResponse
s@DescribePublishingDestinationResponse' {} DestinationProperties
a -> DescribePublishingDestinationResponse
s {$sel:destinationProperties:DescribePublishingDestinationResponse' :: DestinationProperties
destinationProperties = DestinationProperties
a} :: DescribePublishingDestinationResponse)

instance
  Prelude.NFData
    DescribePublishingDestinationResponse