{-# 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.Omics.DeleteReferenceStore
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes a genome reference store.
module Amazonka.Omics.DeleteReferenceStore
  ( -- * Creating a Request
    DeleteReferenceStore (..),
    newDeleteReferenceStore,

    -- * Request Lenses
    deleteReferenceStore_id,

    -- * Destructuring the Response
    DeleteReferenceStoreResponse (..),
    newDeleteReferenceStoreResponse,

    -- * Response Lenses
    deleteReferenceStoreResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDeleteReferenceStore' smart constructor.
data DeleteReferenceStore = DeleteReferenceStore'
  { -- | The store\'s ID.
    DeleteReferenceStore -> Text
id :: Prelude.Text
  }
  deriving (DeleteReferenceStore -> DeleteReferenceStore -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReferenceStore -> DeleteReferenceStore -> Bool
$c/= :: DeleteReferenceStore -> DeleteReferenceStore -> Bool
== :: DeleteReferenceStore -> DeleteReferenceStore -> Bool
$c== :: DeleteReferenceStore -> DeleteReferenceStore -> Bool
Prelude.Eq, ReadPrec [DeleteReferenceStore]
ReadPrec DeleteReferenceStore
Int -> ReadS DeleteReferenceStore
ReadS [DeleteReferenceStore]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReferenceStore]
$creadListPrec :: ReadPrec [DeleteReferenceStore]
readPrec :: ReadPrec DeleteReferenceStore
$creadPrec :: ReadPrec DeleteReferenceStore
readList :: ReadS [DeleteReferenceStore]
$creadList :: ReadS [DeleteReferenceStore]
readsPrec :: Int -> ReadS DeleteReferenceStore
$creadsPrec :: Int -> ReadS DeleteReferenceStore
Prelude.Read, Int -> DeleteReferenceStore -> ShowS
[DeleteReferenceStore] -> ShowS
DeleteReferenceStore -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReferenceStore] -> ShowS
$cshowList :: [DeleteReferenceStore] -> ShowS
show :: DeleteReferenceStore -> String
$cshow :: DeleteReferenceStore -> String
showsPrec :: Int -> DeleteReferenceStore -> ShowS
$cshowsPrec :: Int -> DeleteReferenceStore -> ShowS
Prelude.Show, forall x. Rep DeleteReferenceStore x -> DeleteReferenceStore
forall x. DeleteReferenceStore -> Rep DeleteReferenceStore x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReferenceStore x -> DeleteReferenceStore
$cfrom :: forall x. DeleteReferenceStore -> Rep DeleteReferenceStore x
Prelude.Generic)

-- |
-- Create a value of 'DeleteReferenceStore' 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:
--
-- 'id', 'deleteReferenceStore_id' - The store\'s ID.
newDeleteReferenceStore ::
  -- | 'id'
  Prelude.Text ->
  DeleteReferenceStore
newDeleteReferenceStore :: Text -> DeleteReferenceStore
newDeleteReferenceStore Text
pId_ =
  DeleteReferenceStore' {$sel:id:DeleteReferenceStore' :: Text
id = Text
pId_}

-- | The store\'s ID.
deleteReferenceStore_id :: Lens.Lens' DeleteReferenceStore Prelude.Text
deleteReferenceStore_id :: Lens' DeleteReferenceStore Text
deleteReferenceStore_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReferenceStore' {Text
id :: Text
$sel:id:DeleteReferenceStore' :: DeleteReferenceStore -> Text
id} -> Text
id) (\s :: DeleteReferenceStore
s@DeleteReferenceStore' {} Text
a -> DeleteReferenceStore
s {$sel:id:DeleteReferenceStore' :: Text
id = Text
a} :: DeleteReferenceStore)

instance Core.AWSRequest DeleteReferenceStore where
  type
    AWSResponse DeleteReferenceStore =
      DeleteReferenceStoreResponse
  request :: (Service -> Service)
-> DeleteReferenceStore -> Request DeleteReferenceStore
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteReferenceStore
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteReferenceStore)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> DeleteReferenceStoreResponse
DeleteReferenceStoreResponse'
            forall (f :: * -> *) a b. Functor 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 DeleteReferenceStore where
  hashWithSalt :: Int -> DeleteReferenceStore -> Int
hashWithSalt Int
_salt DeleteReferenceStore' {Text
id :: Text
$sel:id:DeleteReferenceStore' :: DeleteReferenceStore -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

instance Prelude.NFData DeleteReferenceStore where
  rnf :: DeleteReferenceStore -> ()
rnf DeleteReferenceStore' {Text
id :: Text
$sel:id:DeleteReferenceStore' :: DeleteReferenceStore -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
id

instance Data.ToHeaders DeleteReferenceStore where
  toHeaders :: DeleteReferenceStore -> 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.ToPath DeleteReferenceStore where
  toPath :: DeleteReferenceStore -> ByteString
toPath DeleteReferenceStore' {Text
id :: Text
$sel:id:DeleteReferenceStore' :: DeleteReferenceStore -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/referencestore/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
id]

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

-- | /See:/ 'newDeleteReferenceStoreResponse' smart constructor.
data DeleteReferenceStoreResponse = DeleteReferenceStoreResponse'
  { -- | The response's http status code.
    DeleteReferenceStoreResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteReferenceStoreResponse
-> DeleteReferenceStoreResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReferenceStoreResponse
-> DeleteReferenceStoreResponse -> Bool
$c/= :: DeleteReferenceStoreResponse
-> DeleteReferenceStoreResponse -> Bool
== :: DeleteReferenceStoreResponse
-> DeleteReferenceStoreResponse -> Bool
$c== :: DeleteReferenceStoreResponse
-> DeleteReferenceStoreResponse -> Bool
Prelude.Eq, ReadPrec [DeleteReferenceStoreResponse]
ReadPrec DeleteReferenceStoreResponse
Int -> ReadS DeleteReferenceStoreResponse
ReadS [DeleteReferenceStoreResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReferenceStoreResponse]
$creadListPrec :: ReadPrec [DeleteReferenceStoreResponse]
readPrec :: ReadPrec DeleteReferenceStoreResponse
$creadPrec :: ReadPrec DeleteReferenceStoreResponse
readList :: ReadS [DeleteReferenceStoreResponse]
$creadList :: ReadS [DeleteReferenceStoreResponse]
readsPrec :: Int -> ReadS DeleteReferenceStoreResponse
$creadsPrec :: Int -> ReadS DeleteReferenceStoreResponse
Prelude.Read, Int -> DeleteReferenceStoreResponse -> ShowS
[DeleteReferenceStoreResponse] -> ShowS
DeleteReferenceStoreResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReferenceStoreResponse] -> ShowS
$cshowList :: [DeleteReferenceStoreResponse] -> ShowS
show :: DeleteReferenceStoreResponse -> String
$cshow :: DeleteReferenceStoreResponse -> String
showsPrec :: Int -> DeleteReferenceStoreResponse -> ShowS
$cshowsPrec :: Int -> DeleteReferenceStoreResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteReferenceStoreResponse x -> DeleteReferenceStoreResponse
forall x.
DeleteReferenceStoreResponse -> Rep DeleteReferenceStoreResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteReferenceStoreResponse x -> DeleteReferenceStoreResponse
$cfrom :: forall x.
DeleteReferenceStoreResponse -> Rep DeleteReferenceStoreResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteReferenceStoreResponse' 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', 'deleteReferenceStoreResponse_httpStatus' - The response's http status code.
newDeleteReferenceStoreResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteReferenceStoreResponse
newDeleteReferenceStoreResponse :: Int -> DeleteReferenceStoreResponse
newDeleteReferenceStoreResponse Int
pHttpStatus_ =
  DeleteReferenceStoreResponse'
    { $sel:httpStatus:DeleteReferenceStoreResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData DeleteReferenceStoreResponse where
  rnf :: DeleteReferenceStoreResponse -> ()
rnf DeleteReferenceStoreResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReferenceStoreResponse' :: DeleteReferenceStoreResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus