{-# 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.AppStream.DeleteUsageReportSubscription
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Disables usage report generation.
module Amazonka.AppStream.DeleteUsageReportSubscription
  ( -- * Creating a Request
    DeleteUsageReportSubscription (..),
    newDeleteUsageReportSubscription,

    -- * Destructuring the Response
    DeleteUsageReportSubscriptionResponse (..),
    newDeleteUsageReportSubscriptionResponse,

    -- * Response Lenses
    deleteUsageReportSubscriptionResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'DeleteUsageReportSubscription' 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.
newDeleteUsageReportSubscription ::
  DeleteUsageReportSubscription
newDeleteUsageReportSubscription :: DeleteUsageReportSubscription
newDeleteUsageReportSubscription =
  DeleteUsageReportSubscription
DeleteUsageReportSubscription'

instance
  Core.AWSRequest
    DeleteUsageReportSubscription
  where
  type
    AWSResponse DeleteUsageReportSubscription =
      DeleteUsageReportSubscriptionResponse
  request :: (Service -> Service)
-> DeleteUsageReportSubscription
-> Request DeleteUsageReportSubscription
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 DeleteUsageReportSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteUsageReportSubscription)))
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 -> DeleteUsageReportSubscriptionResponse
DeleteUsageReportSubscriptionResponse'
            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
    DeleteUsageReportSubscription
  where
  hashWithSalt :: Int -> DeleteUsageReportSubscription -> Int
hashWithSalt Int
_salt DeleteUsageReportSubscription
_ =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()

instance Prelude.NFData DeleteUsageReportSubscription where
  rnf :: DeleteUsageReportSubscription -> ()
rnf DeleteUsageReportSubscription
_ = ()

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

instance Data.ToJSON DeleteUsageReportSubscription where
  toJSON :: DeleteUsageReportSubscription -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

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

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

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

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

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

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