{-# 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.SecurityLake.DeleteAwsLogSource
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Removes a natively supported Amazon Web Service as an Amazon Security
-- Lake source. When you remove the source, Security Lake stops collecting
-- data from that source, and subscribers can no longer consume new data
-- from the source. Subscribers can still consume data that Security Lake
-- collected from the source before disablement.
--
-- You can choose any source type in any Amazon Web Services Region for
-- either accounts that are part of a trusted organization or standalone
-- accounts. At least one of the three dimensions is a mandatory input to
-- this API. However, you can supply any combination of the three
-- dimensions to this API.
--
-- By default, a dimension refers to the entire set. This is overridden
-- when you supply any one of the inputs. For instance, when you do not
-- specify members, the API disables all Security Lake member accounts for
-- sources. Similarly, when you do not specify Regions, Security Lake is
-- disabled for all the Regions where Security Lake is available as a
-- service.
--
-- When you don\'t provide a dimension, Security Lake assumes that the
-- missing dimension refers to the entire set. For example, if you don\'t
-- provide specific accounts, the API applies to the entire set of accounts
-- in your organization.
module Amazonka.SecurityLake.DeleteAwsLogSource
  ( -- * Creating a Request
    DeleteAwsLogSource (..),
    newDeleteAwsLogSource,

    -- * Request Lenses
    deleteAwsLogSource_disableAllDimensions,
    deleteAwsLogSource_disableSingleDimension,
    deleteAwsLogSource_disableTwoDimensions,
    deleteAwsLogSource_inputOrder,

    -- * Destructuring the Response
    DeleteAwsLogSourceResponse (..),
    newDeleteAwsLogSourceResponse,

    -- * Response Lenses
    deleteAwsLogSourceResponse_failed,
    deleteAwsLogSourceResponse_processing,
    deleteAwsLogSourceResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SecurityLake.Types

-- | /See:/ 'newDeleteAwsLogSource' smart constructor.
data DeleteAwsLogSource = DeleteAwsLogSource'
  { -- | Removes the specific Amazon Web Services sources from specific accounts
    -- and specific Regions.
    DeleteAwsLogSource -> Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text [Prelude.Text])),
    -- | Removes all Amazon Web Services sources from specific accounts or
    -- Regions.
    DeleteAwsLogSource -> Maybe [Text]
disableSingleDimension :: Prelude.Maybe [Prelude.Text],
    -- | Remove a specific Amazon Web Services source from specific accounts or
    -- Regions.
    DeleteAwsLogSource -> Maybe (HashMap Text [Text])
disableTwoDimensions :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | This is a mandatory input. Specify the input order to disable dimensions
    -- in Security Lake, namely Region (Amazon Web Services Region code, source
    -- type, and member (account ID of a specific Amazon Web Services account).
    DeleteAwsLogSource -> [Dimension]
inputOrder :: [Dimension]
  }
  deriving (DeleteAwsLogSource -> DeleteAwsLogSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAwsLogSource -> DeleteAwsLogSource -> Bool
$c/= :: DeleteAwsLogSource -> DeleteAwsLogSource -> Bool
== :: DeleteAwsLogSource -> DeleteAwsLogSource -> Bool
$c== :: DeleteAwsLogSource -> DeleteAwsLogSource -> Bool
Prelude.Eq, ReadPrec [DeleteAwsLogSource]
ReadPrec DeleteAwsLogSource
Int -> ReadS DeleteAwsLogSource
ReadS [DeleteAwsLogSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAwsLogSource]
$creadListPrec :: ReadPrec [DeleteAwsLogSource]
readPrec :: ReadPrec DeleteAwsLogSource
$creadPrec :: ReadPrec DeleteAwsLogSource
readList :: ReadS [DeleteAwsLogSource]
$creadList :: ReadS [DeleteAwsLogSource]
readsPrec :: Int -> ReadS DeleteAwsLogSource
$creadsPrec :: Int -> ReadS DeleteAwsLogSource
Prelude.Read, Int -> DeleteAwsLogSource -> ShowS
[DeleteAwsLogSource] -> ShowS
DeleteAwsLogSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAwsLogSource] -> ShowS
$cshowList :: [DeleteAwsLogSource] -> ShowS
show :: DeleteAwsLogSource -> String
$cshow :: DeleteAwsLogSource -> String
showsPrec :: Int -> DeleteAwsLogSource -> ShowS
$cshowsPrec :: Int -> DeleteAwsLogSource -> ShowS
Prelude.Show, forall x. Rep DeleteAwsLogSource x -> DeleteAwsLogSource
forall x. DeleteAwsLogSource -> Rep DeleteAwsLogSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAwsLogSource x -> DeleteAwsLogSource
$cfrom :: forall x. DeleteAwsLogSource -> Rep DeleteAwsLogSource x
Prelude.Generic)

-- |
-- Create a value of 'DeleteAwsLogSource' 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:
--
-- 'disableAllDimensions', 'deleteAwsLogSource_disableAllDimensions' - Removes the specific Amazon Web Services sources from specific accounts
-- and specific Regions.
--
-- 'disableSingleDimension', 'deleteAwsLogSource_disableSingleDimension' - Removes all Amazon Web Services sources from specific accounts or
-- Regions.
--
-- 'disableTwoDimensions', 'deleteAwsLogSource_disableTwoDimensions' - Remove a specific Amazon Web Services source from specific accounts or
-- Regions.
--
-- 'inputOrder', 'deleteAwsLogSource_inputOrder' - This is a mandatory input. Specify the input order to disable dimensions
-- in Security Lake, namely Region (Amazon Web Services Region code, source
-- type, and member (account ID of a specific Amazon Web Services account).
newDeleteAwsLogSource ::
  DeleteAwsLogSource
newDeleteAwsLogSource :: DeleteAwsLogSource
newDeleteAwsLogSource =
  DeleteAwsLogSource'
    { $sel:disableAllDimensions:DeleteAwsLogSource' :: Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions =
        forall a. Maybe a
Prelude.Nothing,
      $sel:disableSingleDimension:DeleteAwsLogSource' :: Maybe [Text]
disableSingleDimension = forall a. Maybe a
Prelude.Nothing,
      $sel:disableTwoDimensions:DeleteAwsLogSource' :: Maybe (HashMap Text [Text])
disableTwoDimensions = forall a. Maybe a
Prelude.Nothing,
      $sel:inputOrder:DeleteAwsLogSource' :: [Dimension]
inputOrder = forall a. Monoid a => a
Prelude.mempty
    }

-- | Removes the specific Amazon Web Services sources from specific accounts
-- and specific Regions.
deleteAwsLogSource_disableAllDimensions :: Lens.Lens' DeleteAwsLogSource (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text [Prelude.Text])))
deleteAwsLogSource_disableAllDimensions :: Lens'
  DeleteAwsLogSource (Maybe (HashMap Text (HashMap Text [Text])))
deleteAwsLogSource_disableAllDimensions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAwsLogSource' {Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions :: Maybe (HashMap Text (HashMap Text [Text]))
$sel:disableAllDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions} -> Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions) (\s :: DeleteAwsLogSource
s@DeleteAwsLogSource' {} Maybe (HashMap Text (HashMap Text [Text]))
a -> DeleteAwsLogSource
s {$sel:disableAllDimensions:DeleteAwsLogSource' :: Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions = Maybe (HashMap Text (HashMap Text [Text]))
a} :: DeleteAwsLogSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Removes all Amazon Web Services sources from specific accounts or
-- Regions.
deleteAwsLogSource_disableSingleDimension :: Lens.Lens' DeleteAwsLogSource (Prelude.Maybe [Prelude.Text])
deleteAwsLogSource_disableSingleDimension :: Lens' DeleteAwsLogSource (Maybe [Text])
deleteAwsLogSource_disableSingleDimension = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAwsLogSource' {Maybe [Text]
disableSingleDimension :: Maybe [Text]
$sel:disableSingleDimension:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe [Text]
disableSingleDimension} -> Maybe [Text]
disableSingleDimension) (\s :: DeleteAwsLogSource
s@DeleteAwsLogSource' {} Maybe [Text]
a -> DeleteAwsLogSource
s {$sel:disableSingleDimension:DeleteAwsLogSource' :: Maybe [Text]
disableSingleDimension = Maybe [Text]
a} :: DeleteAwsLogSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Remove a specific Amazon Web Services source from specific accounts or
-- Regions.
deleteAwsLogSource_disableTwoDimensions :: Lens.Lens' DeleteAwsLogSource (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
deleteAwsLogSource_disableTwoDimensions :: Lens' DeleteAwsLogSource (Maybe (HashMap Text [Text]))
deleteAwsLogSource_disableTwoDimensions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAwsLogSource' {Maybe (HashMap Text [Text])
disableTwoDimensions :: Maybe (HashMap Text [Text])
$sel:disableTwoDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text [Text])
disableTwoDimensions} -> Maybe (HashMap Text [Text])
disableTwoDimensions) (\s :: DeleteAwsLogSource
s@DeleteAwsLogSource' {} Maybe (HashMap Text [Text])
a -> DeleteAwsLogSource
s {$sel:disableTwoDimensions:DeleteAwsLogSource' :: Maybe (HashMap Text [Text])
disableTwoDimensions = Maybe (HashMap Text [Text])
a} :: DeleteAwsLogSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | This is a mandatory input. Specify the input order to disable dimensions
-- in Security Lake, namely Region (Amazon Web Services Region code, source
-- type, and member (account ID of a specific Amazon Web Services account).
deleteAwsLogSource_inputOrder :: Lens.Lens' DeleteAwsLogSource [Dimension]
deleteAwsLogSource_inputOrder :: Lens' DeleteAwsLogSource [Dimension]
deleteAwsLogSource_inputOrder = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAwsLogSource' {[Dimension]
inputOrder :: [Dimension]
$sel:inputOrder:DeleteAwsLogSource' :: DeleteAwsLogSource -> [Dimension]
inputOrder} -> [Dimension]
inputOrder) (\s :: DeleteAwsLogSource
s@DeleteAwsLogSource' {} [Dimension]
a -> DeleteAwsLogSource
s {$sel:inputOrder:DeleteAwsLogSource' :: [Dimension]
inputOrder = [Dimension]
a} :: DeleteAwsLogSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest DeleteAwsLogSource where
  type
    AWSResponse DeleteAwsLogSource =
      DeleteAwsLogSourceResponse
  request :: (Service -> Service)
-> DeleteAwsLogSource -> Request DeleteAwsLogSource
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteAwsLogSource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteAwsLogSource)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Text] -> Maybe [Text] -> Int -> DeleteAwsLogSourceResponse
DeleteAwsLogSourceResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"failed" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"processing" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DeleteAwsLogSource where
  hashWithSalt :: Int -> DeleteAwsLogSource -> Int
hashWithSalt Int
_salt DeleteAwsLogSource' {[Dimension]
Maybe [Text]
Maybe (HashMap Text [Text])
Maybe (HashMap Text (HashMap Text [Text]))
inputOrder :: [Dimension]
disableTwoDimensions :: Maybe (HashMap Text [Text])
disableSingleDimension :: Maybe [Text]
disableAllDimensions :: Maybe (HashMap Text (HashMap Text [Text]))
$sel:inputOrder:DeleteAwsLogSource' :: DeleteAwsLogSource -> [Dimension]
$sel:disableTwoDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text [Text])
$sel:disableSingleDimension:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe [Text]
$sel:disableAllDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text (HashMap Text [Text]))
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
disableSingleDimension
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text [Text])
disableTwoDimensions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Dimension]
inputOrder

instance Prelude.NFData DeleteAwsLogSource where
  rnf :: DeleteAwsLogSource -> ()
rnf DeleteAwsLogSource' {[Dimension]
Maybe [Text]
Maybe (HashMap Text [Text])
Maybe (HashMap Text (HashMap Text [Text]))
inputOrder :: [Dimension]
disableTwoDimensions :: Maybe (HashMap Text [Text])
disableSingleDimension :: Maybe [Text]
disableAllDimensions :: Maybe (HashMap Text (HashMap Text [Text]))
$sel:inputOrder:DeleteAwsLogSource' :: DeleteAwsLogSource -> [Dimension]
$sel:disableTwoDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text [Text])
$sel:disableSingleDimension:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe [Text]
$sel:disableAllDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text (HashMap Text [Text]))
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
disableSingleDimension
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text [Text])
disableTwoDimensions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Dimension]
inputOrder

instance Data.ToHeaders DeleteAwsLogSource where
  toHeaders :: DeleteAwsLogSource -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DeleteAwsLogSource where
  toJSON :: DeleteAwsLogSource -> Value
toJSON DeleteAwsLogSource' {[Dimension]
Maybe [Text]
Maybe (HashMap Text [Text])
Maybe (HashMap Text (HashMap Text [Text]))
inputOrder :: [Dimension]
disableTwoDimensions :: Maybe (HashMap Text [Text])
disableSingleDimension :: Maybe [Text]
disableAllDimensions :: Maybe (HashMap Text (HashMap Text [Text]))
$sel:inputOrder:DeleteAwsLogSource' :: DeleteAwsLogSource -> [Dimension]
$sel:disableTwoDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text [Text])
$sel:disableSingleDimension:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe [Text]
$sel:disableAllDimensions:DeleteAwsLogSource' :: DeleteAwsLogSource -> Maybe (HashMap Text (HashMap Text [Text]))
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"disableAllDimensions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text (HashMap Text [Text]))
disableAllDimensions,
            (Key
"disableSingleDimension" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
disableSingleDimension,
            (Key
"disableTwoDimensions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text [Text])
disableTwoDimensions,
            forall a. a -> Maybe a
Prelude.Just (Key
"inputOrder" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Dimension]
inputOrder)
          ]
      )

instance Data.ToPath DeleteAwsLogSource where
  toPath :: DeleteAwsLogSource -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v1/logsources/aws/delete"

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

-- | /See:/ 'newDeleteAwsLogSourceResponse' smart constructor.
data DeleteAwsLogSourceResponse = DeleteAwsLogSourceResponse'
  { -- | Deletion of the Amazon Web Services sources failed as the account is not
    -- a part of the organization.
    DeleteAwsLogSourceResponse -> Maybe [Text]
failed :: Prelude.Maybe [Prelude.Text],
    -- | Deletion of the Amazon Web Services sources is in progress.
    DeleteAwsLogSourceResponse -> Maybe [Text]
processing :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    DeleteAwsLogSourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteAwsLogSourceResponse -> DeleteAwsLogSourceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAwsLogSourceResponse -> DeleteAwsLogSourceResponse -> Bool
$c/= :: DeleteAwsLogSourceResponse -> DeleteAwsLogSourceResponse -> Bool
== :: DeleteAwsLogSourceResponse -> DeleteAwsLogSourceResponse -> Bool
$c== :: DeleteAwsLogSourceResponse -> DeleteAwsLogSourceResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAwsLogSourceResponse]
ReadPrec DeleteAwsLogSourceResponse
Int -> ReadS DeleteAwsLogSourceResponse
ReadS [DeleteAwsLogSourceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAwsLogSourceResponse]
$creadListPrec :: ReadPrec [DeleteAwsLogSourceResponse]
readPrec :: ReadPrec DeleteAwsLogSourceResponse
$creadPrec :: ReadPrec DeleteAwsLogSourceResponse
readList :: ReadS [DeleteAwsLogSourceResponse]
$creadList :: ReadS [DeleteAwsLogSourceResponse]
readsPrec :: Int -> ReadS DeleteAwsLogSourceResponse
$creadsPrec :: Int -> ReadS DeleteAwsLogSourceResponse
Prelude.Read, Int -> DeleteAwsLogSourceResponse -> ShowS
[DeleteAwsLogSourceResponse] -> ShowS
DeleteAwsLogSourceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAwsLogSourceResponse] -> ShowS
$cshowList :: [DeleteAwsLogSourceResponse] -> ShowS
show :: DeleteAwsLogSourceResponse -> String
$cshow :: DeleteAwsLogSourceResponse -> String
showsPrec :: Int -> DeleteAwsLogSourceResponse -> ShowS
$cshowsPrec :: Int -> DeleteAwsLogSourceResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteAwsLogSourceResponse x -> DeleteAwsLogSourceResponse
forall x.
DeleteAwsLogSourceResponse -> Rep DeleteAwsLogSourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAwsLogSourceResponse x -> DeleteAwsLogSourceResponse
$cfrom :: forall x.
DeleteAwsLogSourceResponse -> Rep DeleteAwsLogSourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteAwsLogSourceResponse' 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:
--
-- 'failed', 'deleteAwsLogSourceResponse_failed' - Deletion of the Amazon Web Services sources failed as the account is not
-- a part of the organization.
--
-- 'processing', 'deleteAwsLogSourceResponse_processing' - Deletion of the Amazon Web Services sources is in progress.
--
-- 'httpStatus', 'deleteAwsLogSourceResponse_httpStatus' - The response's http status code.
newDeleteAwsLogSourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteAwsLogSourceResponse
newDeleteAwsLogSourceResponse :: Int -> DeleteAwsLogSourceResponse
newDeleteAwsLogSourceResponse Int
pHttpStatus_ =
  DeleteAwsLogSourceResponse'
    { $sel:failed:DeleteAwsLogSourceResponse' :: Maybe [Text]
failed =
        forall a. Maybe a
Prelude.Nothing,
      $sel:processing:DeleteAwsLogSourceResponse' :: Maybe [Text]
processing = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteAwsLogSourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Deletion of the Amazon Web Services sources failed as the account is not
-- a part of the organization.
deleteAwsLogSourceResponse_failed :: Lens.Lens' DeleteAwsLogSourceResponse (Prelude.Maybe [Prelude.Text])
deleteAwsLogSourceResponse_failed :: Lens' DeleteAwsLogSourceResponse (Maybe [Text])
deleteAwsLogSourceResponse_failed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAwsLogSourceResponse' {Maybe [Text]
failed :: Maybe [Text]
$sel:failed:DeleteAwsLogSourceResponse' :: DeleteAwsLogSourceResponse -> Maybe [Text]
failed} -> Maybe [Text]
failed) (\s :: DeleteAwsLogSourceResponse
s@DeleteAwsLogSourceResponse' {} Maybe [Text]
a -> DeleteAwsLogSourceResponse
s {$sel:failed:DeleteAwsLogSourceResponse' :: Maybe [Text]
failed = Maybe [Text]
a} :: DeleteAwsLogSourceResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Deletion of the Amazon Web Services sources is in progress.
deleteAwsLogSourceResponse_processing :: Lens.Lens' DeleteAwsLogSourceResponse (Prelude.Maybe [Prelude.Text])
deleteAwsLogSourceResponse_processing :: Lens' DeleteAwsLogSourceResponse (Maybe [Text])
deleteAwsLogSourceResponse_processing = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAwsLogSourceResponse' {Maybe [Text]
processing :: Maybe [Text]
$sel:processing:DeleteAwsLogSourceResponse' :: DeleteAwsLogSourceResponse -> Maybe [Text]
processing} -> Maybe [Text]
processing) (\s :: DeleteAwsLogSourceResponse
s@DeleteAwsLogSourceResponse' {} Maybe [Text]
a -> DeleteAwsLogSourceResponse
s {$sel:processing:DeleteAwsLogSourceResponse' :: Maybe [Text]
processing = Maybe [Text]
a} :: DeleteAwsLogSourceResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DeleteAwsLogSourceResponse where
  rnf :: DeleteAwsLogSourceResponse -> ()
rnf DeleteAwsLogSourceResponse' {Int
Maybe [Text]
httpStatus :: Int
processing :: Maybe [Text]
failed :: Maybe [Text]
$sel:httpStatus:DeleteAwsLogSourceResponse' :: DeleteAwsLogSourceResponse -> Int
$sel:processing:DeleteAwsLogSourceResponse' :: DeleteAwsLogSourceResponse -> Maybe [Text]
$sel:failed:DeleteAwsLogSourceResponse' :: DeleteAwsLogSourceResponse -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
failed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
processing
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus