{-# 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-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)
--
-- 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.Lens as Lens
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
(DeleteUsageReportSubscription
 -> DeleteUsageReportSubscription -> Bool)
-> (DeleteUsageReportSubscription
    -> DeleteUsageReportSubscription -> Bool)
-> Eq DeleteUsageReportSubscription
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]
(Int -> ReadS DeleteUsageReportSubscription)
-> ReadS [DeleteUsageReportSubscription]
-> ReadPrec DeleteUsageReportSubscription
-> ReadPrec [DeleteUsageReportSubscription]
-> Read 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
(Int -> DeleteUsageReportSubscription -> ShowS)
-> (DeleteUsageReportSubscription -> String)
-> ([DeleteUsageReportSubscription] -> ShowS)
-> Show DeleteUsageReportSubscription
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.
 DeleteUsageReportSubscription
 -> Rep DeleteUsageReportSubscription x)
-> (forall x.
    Rep DeleteUsageReportSubscription x
    -> DeleteUsageReportSubscription)
-> Generic DeleteUsageReportSubscription
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 :: DeleteUsageReportSubscription
-> Request DeleteUsageReportSubscription
request = Service
-> DeleteUsageReportSubscription
-> Request DeleteUsageReportSubscription
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteUsageReportSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteUsageReportSubscription)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse DeleteUsageReportSubscription))
-> Logger
-> Service
-> Proxy DeleteUsageReportSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteUsageReportSubscription)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> DeleteUsageReportSubscriptionResponse
DeleteUsageReportSubscriptionResponse'
            (Int -> DeleteUsageReportSubscriptionResponse)
-> Either String Int
-> Either String DeleteUsageReportSubscriptionResponse
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))
      )

instance
  Prelude.Hashable
    DeleteUsageReportSubscription

instance Prelude.NFData DeleteUsageReportSubscription

instance Core.ToHeaders DeleteUsageReportSubscription where
  toHeaders :: DeleteUsageReportSubscription -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteUsageReportSubscription -> 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
"PhotonAdminProxyService.DeleteUsageReportSubscription" ::
                          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 DeleteUsageReportSubscription where
  toJSON :: DeleteUsageReportSubscription -> Value
toJSON = Value -> DeleteUsageReportSubscription -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

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

instance Core.ToQuery DeleteUsageReportSubscription where
  toQuery :: DeleteUsageReportSubscription -> QueryString
toQuery = QueryString -> DeleteUsageReportSubscription -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(DeleteUsageReportSubscriptionResponse
 -> DeleteUsageReportSubscriptionResponse -> Bool)
-> (DeleteUsageReportSubscriptionResponse
    -> DeleteUsageReportSubscriptionResponse -> Bool)
-> Eq DeleteUsageReportSubscriptionResponse
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]
(Int -> ReadS DeleteUsageReportSubscriptionResponse)
-> ReadS [DeleteUsageReportSubscriptionResponse]
-> ReadPrec DeleteUsageReportSubscriptionResponse
-> ReadPrec [DeleteUsageReportSubscriptionResponse]
-> Read 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
(Int -> DeleteUsageReportSubscriptionResponse -> ShowS)
-> (DeleteUsageReportSubscriptionResponse -> String)
-> ([DeleteUsageReportSubscriptionResponse] -> ShowS)
-> Show DeleteUsageReportSubscriptionResponse
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.
 DeleteUsageReportSubscriptionResponse
 -> Rep DeleteUsageReportSubscriptionResponse x)
-> (forall x.
    Rep DeleteUsageReportSubscriptionResponse x
    -> DeleteUsageReportSubscriptionResponse)
-> Generic DeleteUsageReportSubscriptionResponse
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' :: Int -> DeleteUsageReportSubscriptionResponse
DeleteUsageReportSubscriptionResponse'
    { $sel:httpStatus:DeleteUsageReportSubscriptionResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
deleteUsageReportSubscriptionResponse_httpStatus :: Lens.Lens' DeleteUsageReportSubscriptionResponse Prelude.Int
deleteUsageReportSubscriptionResponse_httpStatus :: (Int -> f Int)
-> DeleteUsageReportSubscriptionResponse
-> f DeleteUsageReportSubscriptionResponse
deleteUsageReportSubscriptionResponse_httpStatus = (DeleteUsageReportSubscriptionResponse -> Int)
-> (DeleteUsageReportSubscriptionResponse
    -> Int -> DeleteUsageReportSubscriptionResponse)
-> Lens
     DeleteUsageReportSubscriptionResponse
     DeleteUsageReportSubscriptionResponse
     Int
     Int
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