{-# 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.SSM.DeleteInventory
-- 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)
--
-- Delete a custom inventory type or the data associated with a custom
-- Inventory type. Deleting a custom inventory type is also referred to as
-- deleting a custom inventory schema.
module Amazonka.SSM.DeleteInventory
  ( -- * Creating a Request
    DeleteInventory (..),
    newDeleteInventory,

    -- * Request Lenses
    deleteInventory_clientToken,
    deleteInventory_schemaDeleteOption,
    deleteInventory_dryRun,
    deleteInventory_typeName,

    -- * Destructuring the Response
    DeleteInventoryResponse (..),
    newDeleteInventoryResponse,

    -- * Response Lenses
    deleteInventoryResponse_typeName,
    deleteInventoryResponse_deletionSummary,
    deleteInventoryResponse_deletionId,
    deleteInventoryResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSM.Types

-- | /See:/ 'newDeleteInventory' smart constructor.
data DeleteInventory = DeleteInventory'
  { -- | User-provided idempotency token.
    DeleteInventory -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | Use the @SchemaDeleteOption@ to delete a custom inventory type (schema).
    -- If you don\'t choose this option, the system only deletes existing
    -- inventory data associated with the custom inventory type. Choose one of
    -- the following options:
    --
    -- DisableSchema: If you choose this option, the system ignores all
    -- inventory data for the specified version, and any earlier versions. To
    -- enable this schema again, you must call the @PutInventory@ operation for
    -- a version greater than the disabled version.
    --
    -- DeleteSchema: This option deletes the specified custom type from the
    -- Inventory service. You can recreate the schema later, if you want.
    DeleteInventory -> Maybe InventorySchemaDeleteOption
schemaDeleteOption :: Prelude.Maybe InventorySchemaDeleteOption,
    -- | Use this option to view a summary of the deletion request without
    -- deleting any data or the data type. This option is useful when you only
    -- want to understand what will be deleted. Once you validate that the data
    -- to be deleted is what you intend to delete, you can run the same command
    -- without specifying the @DryRun@ option.
    DeleteInventory -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The name of the custom inventory type for which you want to delete
    -- either all previously collected data or the inventory type itself.
    DeleteInventory -> Text
typeName :: Prelude.Text
  }
  deriving (DeleteInventory -> DeleteInventory -> Bool
(DeleteInventory -> DeleteInventory -> Bool)
-> (DeleteInventory -> DeleteInventory -> Bool)
-> Eq DeleteInventory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInventory -> DeleteInventory -> Bool
$c/= :: DeleteInventory -> DeleteInventory -> Bool
== :: DeleteInventory -> DeleteInventory -> Bool
$c== :: DeleteInventory -> DeleteInventory -> Bool
Prelude.Eq, ReadPrec [DeleteInventory]
ReadPrec DeleteInventory
Int -> ReadS DeleteInventory
ReadS [DeleteInventory]
(Int -> ReadS DeleteInventory)
-> ReadS [DeleteInventory]
-> ReadPrec DeleteInventory
-> ReadPrec [DeleteInventory]
-> Read DeleteInventory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInventory]
$creadListPrec :: ReadPrec [DeleteInventory]
readPrec :: ReadPrec DeleteInventory
$creadPrec :: ReadPrec DeleteInventory
readList :: ReadS [DeleteInventory]
$creadList :: ReadS [DeleteInventory]
readsPrec :: Int -> ReadS DeleteInventory
$creadsPrec :: Int -> ReadS DeleteInventory
Prelude.Read, Int -> DeleteInventory -> ShowS
[DeleteInventory] -> ShowS
DeleteInventory -> String
(Int -> DeleteInventory -> ShowS)
-> (DeleteInventory -> String)
-> ([DeleteInventory] -> ShowS)
-> Show DeleteInventory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInventory] -> ShowS
$cshowList :: [DeleteInventory] -> ShowS
show :: DeleteInventory -> String
$cshow :: DeleteInventory -> String
showsPrec :: Int -> DeleteInventory -> ShowS
$cshowsPrec :: Int -> DeleteInventory -> ShowS
Prelude.Show, (forall x. DeleteInventory -> Rep DeleteInventory x)
-> (forall x. Rep DeleteInventory x -> DeleteInventory)
-> Generic DeleteInventory
forall x. Rep DeleteInventory x -> DeleteInventory
forall x. DeleteInventory -> Rep DeleteInventory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteInventory x -> DeleteInventory
$cfrom :: forall x. DeleteInventory -> Rep DeleteInventory x
Prelude.Generic)

-- |
-- Create a value of 'DeleteInventory' 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:
--
-- 'clientToken', 'deleteInventory_clientToken' - User-provided idempotency token.
--
-- 'schemaDeleteOption', 'deleteInventory_schemaDeleteOption' - Use the @SchemaDeleteOption@ to delete a custom inventory type (schema).
-- If you don\'t choose this option, the system only deletes existing
-- inventory data associated with the custom inventory type. Choose one of
-- the following options:
--
-- DisableSchema: If you choose this option, the system ignores all
-- inventory data for the specified version, and any earlier versions. To
-- enable this schema again, you must call the @PutInventory@ operation for
-- a version greater than the disabled version.
--
-- DeleteSchema: This option deletes the specified custom type from the
-- Inventory service. You can recreate the schema later, if you want.
--
-- 'dryRun', 'deleteInventory_dryRun' - Use this option to view a summary of the deletion request without
-- deleting any data or the data type. This option is useful when you only
-- want to understand what will be deleted. Once you validate that the data
-- to be deleted is what you intend to delete, you can run the same command
-- without specifying the @DryRun@ option.
--
-- 'typeName', 'deleteInventory_typeName' - The name of the custom inventory type for which you want to delete
-- either all previously collected data or the inventory type itself.
newDeleteInventory ::
  -- | 'typeName'
  Prelude.Text ->
  DeleteInventory
newDeleteInventory :: Text -> DeleteInventory
newDeleteInventory Text
pTypeName_ =
  DeleteInventory' :: Maybe Text
-> Maybe InventorySchemaDeleteOption
-> Maybe Bool
-> Text
-> DeleteInventory
DeleteInventory'
    { $sel:clientToken:DeleteInventory' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaDeleteOption:DeleteInventory' :: Maybe InventorySchemaDeleteOption
schemaDeleteOption = Maybe InventorySchemaDeleteOption
forall a. Maybe a
Prelude.Nothing,
      $sel:dryRun:DeleteInventory' :: Maybe Bool
dryRun = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:typeName:DeleteInventory' :: Text
typeName = Text
pTypeName_
    }

-- | User-provided idempotency token.
deleteInventory_clientToken :: Lens.Lens' DeleteInventory (Prelude.Maybe Prelude.Text)
deleteInventory_clientToken :: (Maybe Text -> f (Maybe Text))
-> DeleteInventory -> f DeleteInventory
deleteInventory_clientToken = (DeleteInventory -> Maybe Text)
-> (DeleteInventory -> Maybe Text -> DeleteInventory)
-> Lens DeleteInventory DeleteInventory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInventory' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:DeleteInventory' :: DeleteInventory -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: DeleteInventory
s@DeleteInventory' {} Maybe Text
a -> DeleteInventory
s {$sel:clientToken:DeleteInventory' :: Maybe Text
clientToken = Maybe Text
a} :: DeleteInventory)

-- | Use the @SchemaDeleteOption@ to delete a custom inventory type (schema).
-- If you don\'t choose this option, the system only deletes existing
-- inventory data associated with the custom inventory type. Choose one of
-- the following options:
--
-- DisableSchema: If you choose this option, the system ignores all
-- inventory data for the specified version, and any earlier versions. To
-- enable this schema again, you must call the @PutInventory@ operation for
-- a version greater than the disabled version.
--
-- DeleteSchema: This option deletes the specified custom type from the
-- Inventory service. You can recreate the schema later, if you want.
deleteInventory_schemaDeleteOption :: Lens.Lens' DeleteInventory (Prelude.Maybe InventorySchemaDeleteOption)
deleteInventory_schemaDeleteOption :: (Maybe InventorySchemaDeleteOption
 -> f (Maybe InventorySchemaDeleteOption))
-> DeleteInventory -> f DeleteInventory
deleteInventory_schemaDeleteOption = (DeleteInventory -> Maybe InventorySchemaDeleteOption)
-> (DeleteInventory
    -> Maybe InventorySchemaDeleteOption -> DeleteInventory)
-> Lens
     DeleteInventory
     DeleteInventory
     (Maybe InventorySchemaDeleteOption)
     (Maybe InventorySchemaDeleteOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInventory' {Maybe InventorySchemaDeleteOption
schemaDeleteOption :: Maybe InventorySchemaDeleteOption
$sel:schemaDeleteOption:DeleteInventory' :: DeleteInventory -> Maybe InventorySchemaDeleteOption
schemaDeleteOption} -> Maybe InventorySchemaDeleteOption
schemaDeleteOption) (\s :: DeleteInventory
s@DeleteInventory' {} Maybe InventorySchemaDeleteOption
a -> DeleteInventory
s {$sel:schemaDeleteOption:DeleteInventory' :: Maybe InventorySchemaDeleteOption
schemaDeleteOption = Maybe InventorySchemaDeleteOption
a} :: DeleteInventory)

-- | Use this option to view a summary of the deletion request without
-- deleting any data or the data type. This option is useful when you only
-- want to understand what will be deleted. Once you validate that the data
-- to be deleted is what you intend to delete, you can run the same command
-- without specifying the @DryRun@ option.
deleteInventory_dryRun :: Lens.Lens' DeleteInventory (Prelude.Maybe Prelude.Bool)
deleteInventory_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> DeleteInventory -> f DeleteInventory
deleteInventory_dryRun = (DeleteInventory -> Maybe Bool)
-> (DeleteInventory -> Maybe Bool -> DeleteInventory)
-> Lens DeleteInventory DeleteInventory (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInventory' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DeleteInventory' :: DeleteInventory -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DeleteInventory
s@DeleteInventory' {} Maybe Bool
a -> DeleteInventory
s {$sel:dryRun:DeleteInventory' :: Maybe Bool
dryRun = Maybe Bool
a} :: DeleteInventory)

-- | The name of the custom inventory type for which you want to delete
-- either all previously collected data or the inventory type itself.
deleteInventory_typeName :: Lens.Lens' DeleteInventory Prelude.Text
deleteInventory_typeName :: (Text -> f Text) -> DeleteInventory -> f DeleteInventory
deleteInventory_typeName = (DeleteInventory -> Text)
-> (DeleteInventory -> Text -> DeleteInventory)
-> Lens DeleteInventory DeleteInventory Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInventory' {Text
typeName :: Text
$sel:typeName:DeleteInventory' :: DeleteInventory -> Text
typeName} -> Text
typeName) (\s :: DeleteInventory
s@DeleteInventory' {} Text
a -> DeleteInventory
s {$sel:typeName:DeleteInventory' :: Text
typeName = Text
a} :: DeleteInventory)

instance Core.AWSRequest DeleteInventory where
  type
    AWSResponse DeleteInventory =
      DeleteInventoryResponse
  request :: DeleteInventory -> Request DeleteInventory
request = Service -> DeleteInventory -> Request DeleteInventory
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteInventory
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteInventory)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteInventory))
-> Logger
-> Service
-> Proxy DeleteInventory
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteInventory)))
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 InventoryDeletionSummary
-> Maybe Text
-> Int
-> DeleteInventoryResponse
DeleteInventoryResponse'
            (Maybe Text
 -> Maybe InventoryDeletionSummary
 -> Maybe Text
 -> Int
 -> DeleteInventoryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe InventoryDeletionSummary
      -> Maybe Text -> Int -> DeleteInventoryResponse)
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
"TypeName")
            Either
  String
  (Maybe InventoryDeletionSummary
   -> Maybe Text -> Int -> DeleteInventoryResponse)
-> Either String (Maybe InventoryDeletionSummary)
-> Either String (Maybe Text -> Int -> DeleteInventoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe InventoryDeletionSummary)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DeletionSummary")
            Either String (Maybe Text -> Int -> DeleteInventoryResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeleteInventoryResponse)
forall (f :: * -> *) a b. Applicative f => 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
"DeletionId")
            Either String (Int -> DeleteInventoryResponse)
-> Either String Int -> Either String DeleteInventoryResponse
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 DeleteInventory

instance Prelude.NFData DeleteInventory

instance Core.ToHeaders DeleteInventory where
  toHeaders :: DeleteInventory -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteInventory -> 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
"AmazonSSM.DeleteInventory" :: 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 DeleteInventory where
  toJSON :: DeleteInventory -> Value
toJSON DeleteInventory' {Maybe Bool
Maybe Text
Maybe InventorySchemaDeleteOption
Text
typeName :: Text
dryRun :: Maybe Bool
schemaDeleteOption :: Maybe InventorySchemaDeleteOption
clientToken :: Maybe Text
$sel:typeName:DeleteInventory' :: DeleteInventory -> Text
$sel:dryRun:DeleteInventory' :: DeleteInventory -> Maybe Bool
$sel:schemaDeleteOption:DeleteInventory' :: DeleteInventory -> Maybe InventorySchemaDeleteOption
$sel:clientToken:DeleteInventory' :: DeleteInventory -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            (Text
"SchemaDeleteOption" Text -> InventorySchemaDeleteOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InventorySchemaDeleteOption -> Pair)
-> Maybe InventorySchemaDeleteOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InventorySchemaDeleteOption
schemaDeleteOption,
            (Text
"DryRun" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TypeName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
typeName)
          ]
      )

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

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

-- | /See:/ 'newDeleteInventoryResponse' smart constructor.
data DeleteInventoryResponse = DeleteInventoryResponse'
  { -- | The name of the inventory data type specified in the request.
    DeleteInventoryResponse -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    -- | A summary of the delete operation. For more information about this
    -- summary, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary Deleting custom inventory>
    -- in the /Amazon Web Services Systems Manager User Guide/.
    DeleteInventoryResponse -> Maybe InventoryDeletionSummary
deletionSummary :: Prelude.Maybe InventoryDeletionSummary,
    -- | Every @DeleteInventory@ operation is assigned a unique ID. This option
    -- returns a unique ID. You can use this ID to query the status of a delete
    -- operation. This option is useful for ensuring that a delete operation
    -- has completed before you begin other operations.
    DeleteInventoryResponse -> Maybe Text
deletionId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DeleteInventoryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteInventoryResponse -> DeleteInventoryResponse -> Bool
(DeleteInventoryResponse -> DeleteInventoryResponse -> Bool)
-> (DeleteInventoryResponse -> DeleteInventoryResponse -> Bool)
-> Eq DeleteInventoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInventoryResponse -> DeleteInventoryResponse -> Bool
$c/= :: DeleteInventoryResponse -> DeleteInventoryResponse -> Bool
== :: DeleteInventoryResponse -> DeleteInventoryResponse -> Bool
$c== :: DeleteInventoryResponse -> DeleteInventoryResponse -> Bool
Prelude.Eq, ReadPrec [DeleteInventoryResponse]
ReadPrec DeleteInventoryResponse
Int -> ReadS DeleteInventoryResponse
ReadS [DeleteInventoryResponse]
(Int -> ReadS DeleteInventoryResponse)
-> ReadS [DeleteInventoryResponse]
-> ReadPrec DeleteInventoryResponse
-> ReadPrec [DeleteInventoryResponse]
-> Read DeleteInventoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInventoryResponse]
$creadListPrec :: ReadPrec [DeleteInventoryResponse]
readPrec :: ReadPrec DeleteInventoryResponse
$creadPrec :: ReadPrec DeleteInventoryResponse
readList :: ReadS [DeleteInventoryResponse]
$creadList :: ReadS [DeleteInventoryResponse]
readsPrec :: Int -> ReadS DeleteInventoryResponse
$creadsPrec :: Int -> ReadS DeleteInventoryResponse
Prelude.Read, Int -> DeleteInventoryResponse -> ShowS
[DeleteInventoryResponse] -> ShowS
DeleteInventoryResponse -> String
(Int -> DeleteInventoryResponse -> ShowS)
-> (DeleteInventoryResponse -> String)
-> ([DeleteInventoryResponse] -> ShowS)
-> Show DeleteInventoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInventoryResponse] -> ShowS
$cshowList :: [DeleteInventoryResponse] -> ShowS
show :: DeleteInventoryResponse -> String
$cshow :: DeleteInventoryResponse -> String
showsPrec :: Int -> DeleteInventoryResponse -> ShowS
$cshowsPrec :: Int -> DeleteInventoryResponse -> ShowS
Prelude.Show, (forall x.
 DeleteInventoryResponse -> Rep DeleteInventoryResponse x)
-> (forall x.
    Rep DeleteInventoryResponse x -> DeleteInventoryResponse)
-> Generic DeleteInventoryResponse
forall x. Rep DeleteInventoryResponse x -> DeleteInventoryResponse
forall x. DeleteInventoryResponse -> Rep DeleteInventoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteInventoryResponse x -> DeleteInventoryResponse
$cfrom :: forall x. DeleteInventoryResponse -> Rep DeleteInventoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteInventoryResponse' 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:
--
-- 'typeName', 'deleteInventoryResponse_typeName' - The name of the inventory data type specified in the request.
--
-- 'deletionSummary', 'deleteInventoryResponse_deletionSummary' - A summary of the delete operation. For more information about this
-- summary, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary Deleting custom inventory>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- 'deletionId', 'deleteInventoryResponse_deletionId' - Every @DeleteInventory@ operation is assigned a unique ID. This option
-- returns a unique ID. You can use this ID to query the status of a delete
-- operation. This option is useful for ensuring that a delete operation
-- has completed before you begin other operations.
--
-- 'httpStatus', 'deleteInventoryResponse_httpStatus' - The response's http status code.
newDeleteInventoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteInventoryResponse
newDeleteInventoryResponse :: Int -> DeleteInventoryResponse
newDeleteInventoryResponse Int
pHttpStatus_ =
  DeleteInventoryResponse' :: Maybe Text
-> Maybe InventoryDeletionSummary
-> Maybe Text
-> Int
-> DeleteInventoryResponse
DeleteInventoryResponse'
    { $sel:typeName:DeleteInventoryResponse' :: Maybe Text
typeName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deletionSummary:DeleteInventoryResponse' :: Maybe InventoryDeletionSummary
deletionSummary = Maybe InventoryDeletionSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:deletionId:DeleteInventoryResponse' :: Maybe Text
deletionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteInventoryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the inventory data type specified in the request.
deleteInventoryResponse_typeName :: Lens.Lens' DeleteInventoryResponse (Prelude.Maybe Prelude.Text)
deleteInventoryResponse_typeName :: (Maybe Text -> f (Maybe Text))
-> DeleteInventoryResponse -> f DeleteInventoryResponse
deleteInventoryResponse_typeName = (DeleteInventoryResponse -> Maybe Text)
-> (DeleteInventoryResponse
    -> Maybe Text -> DeleteInventoryResponse)
-> Lens
     DeleteInventoryResponse
     DeleteInventoryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInventoryResponse' {Maybe Text
typeName :: Maybe Text
$sel:typeName:DeleteInventoryResponse' :: DeleteInventoryResponse -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: DeleteInventoryResponse
s@DeleteInventoryResponse' {} Maybe Text
a -> DeleteInventoryResponse
s {$sel:typeName:DeleteInventoryResponse' :: Maybe Text
typeName = Maybe Text
a} :: DeleteInventoryResponse)

-- | A summary of the delete operation. For more information about this
-- summary, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary Deleting custom inventory>
-- in the /Amazon Web Services Systems Manager User Guide/.
deleteInventoryResponse_deletionSummary :: Lens.Lens' DeleteInventoryResponse (Prelude.Maybe InventoryDeletionSummary)
deleteInventoryResponse_deletionSummary :: (Maybe InventoryDeletionSummary
 -> f (Maybe InventoryDeletionSummary))
-> DeleteInventoryResponse -> f DeleteInventoryResponse
deleteInventoryResponse_deletionSummary = (DeleteInventoryResponse -> Maybe InventoryDeletionSummary)
-> (DeleteInventoryResponse
    -> Maybe InventoryDeletionSummary -> DeleteInventoryResponse)
-> Lens
     DeleteInventoryResponse
     DeleteInventoryResponse
     (Maybe InventoryDeletionSummary)
     (Maybe InventoryDeletionSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInventoryResponse' {Maybe InventoryDeletionSummary
deletionSummary :: Maybe InventoryDeletionSummary
$sel:deletionSummary:DeleteInventoryResponse' :: DeleteInventoryResponse -> Maybe InventoryDeletionSummary
deletionSummary} -> Maybe InventoryDeletionSummary
deletionSummary) (\s :: DeleteInventoryResponse
s@DeleteInventoryResponse' {} Maybe InventoryDeletionSummary
a -> DeleteInventoryResponse
s {$sel:deletionSummary:DeleteInventoryResponse' :: Maybe InventoryDeletionSummary
deletionSummary = Maybe InventoryDeletionSummary
a} :: DeleteInventoryResponse)

-- | Every @DeleteInventory@ operation is assigned a unique ID. This option
-- returns a unique ID. You can use this ID to query the status of a delete
-- operation. This option is useful for ensuring that a delete operation
-- has completed before you begin other operations.
deleteInventoryResponse_deletionId :: Lens.Lens' DeleteInventoryResponse (Prelude.Maybe Prelude.Text)
deleteInventoryResponse_deletionId :: (Maybe Text -> f (Maybe Text))
-> DeleteInventoryResponse -> f DeleteInventoryResponse
deleteInventoryResponse_deletionId = (DeleteInventoryResponse -> Maybe Text)
-> (DeleteInventoryResponse
    -> Maybe Text -> DeleteInventoryResponse)
-> Lens
     DeleteInventoryResponse
     DeleteInventoryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInventoryResponse' {Maybe Text
deletionId :: Maybe Text
$sel:deletionId:DeleteInventoryResponse' :: DeleteInventoryResponse -> Maybe Text
deletionId} -> Maybe Text
deletionId) (\s :: DeleteInventoryResponse
s@DeleteInventoryResponse' {} Maybe Text
a -> DeleteInventoryResponse
s {$sel:deletionId:DeleteInventoryResponse' :: Maybe Text
deletionId = Maybe Text
a} :: DeleteInventoryResponse)

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

instance Prelude.NFData DeleteInventoryResponse