{-# 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.EC2.DisableAwsNetworkPerformanceMetricSubscription
-- 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 Infrastructure Performance metric subscriptions.
module Amazonka.EC2.DisableAwsNetworkPerformanceMetricSubscription
  ( -- * Creating a Request
    DisableAwsNetworkPerformanceMetricSubscription (..),
    newDisableAwsNetworkPerformanceMetricSubscription,

    -- * Request Lenses
    disableAwsNetworkPerformanceMetricSubscription_destination,
    disableAwsNetworkPerformanceMetricSubscription_dryRun,
    disableAwsNetworkPerformanceMetricSubscription_metric,
    disableAwsNetworkPerformanceMetricSubscription_source,
    disableAwsNetworkPerformanceMetricSubscription_statistic,

    -- * Destructuring the Response
    DisableAwsNetworkPerformanceMetricSubscriptionResponse (..),
    newDisableAwsNetworkPerformanceMetricSubscriptionResponse,

    -- * Response Lenses
    disableAwsNetworkPerformanceMetricSubscriptionResponse_output,
    disableAwsNetworkPerformanceMetricSubscriptionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDisableAwsNetworkPerformanceMetricSubscription' smart constructor.
data DisableAwsNetworkPerformanceMetricSubscription = DisableAwsNetworkPerformanceMetricSubscription'
  { -- | The target Region or Availability Zone that the metric subscription is
    -- disabled for. For example, @eu-north-1@.
    DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
destination :: Prelude.Maybe Prelude.Text,
    -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DisableAwsNetworkPerformanceMetricSubscription -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The metric used for the disabled subscription.
    DisableAwsNetworkPerformanceMetricSubscription -> Maybe MetricType
metric :: Prelude.Maybe MetricType,
    -- | The source Region or Availability Zone that the metric subscription is
    -- disabled for. For example, @us-east-1@.
    DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | The statistic used for the disabled subscription.
    DisableAwsNetworkPerformanceMetricSubscription
-> Maybe StatisticType
statistic :: Prelude.Maybe StatisticType
  }
  deriving (DisableAwsNetworkPerformanceMetricSubscription
-> DisableAwsNetworkPerformanceMetricSubscription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableAwsNetworkPerformanceMetricSubscription
-> DisableAwsNetworkPerformanceMetricSubscription -> Bool
$c/= :: DisableAwsNetworkPerformanceMetricSubscription
-> DisableAwsNetworkPerformanceMetricSubscription -> Bool
== :: DisableAwsNetworkPerformanceMetricSubscription
-> DisableAwsNetworkPerformanceMetricSubscription -> Bool
$c== :: DisableAwsNetworkPerformanceMetricSubscription
-> DisableAwsNetworkPerformanceMetricSubscription -> Bool
Prelude.Eq, ReadPrec [DisableAwsNetworkPerformanceMetricSubscription]
ReadPrec DisableAwsNetworkPerformanceMetricSubscription
Int -> ReadS DisableAwsNetworkPerformanceMetricSubscription
ReadS [DisableAwsNetworkPerformanceMetricSubscription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableAwsNetworkPerformanceMetricSubscription]
$creadListPrec :: ReadPrec [DisableAwsNetworkPerformanceMetricSubscription]
readPrec :: ReadPrec DisableAwsNetworkPerformanceMetricSubscription
$creadPrec :: ReadPrec DisableAwsNetworkPerformanceMetricSubscription
readList :: ReadS [DisableAwsNetworkPerformanceMetricSubscription]
$creadList :: ReadS [DisableAwsNetworkPerformanceMetricSubscription]
readsPrec :: Int -> ReadS DisableAwsNetworkPerformanceMetricSubscription
$creadsPrec :: Int -> ReadS DisableAwsNetworkPerformanceMetricSubscription
Prelude.Read, Int -> DisableAwsNetworkPerformanceMetricSubscription -> ShowS
[DisableAwsNetworkPerformanceMetricSubscription] -> ShowS
DisableAwsNetworkPerformanceMetricSubscription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableAwsNetworkPerformanceMetricSubscription] -> ShowS
$cshowList :: [DisableAwsNetworkPerformanceMetricSubscription] -> ShowS
show :: DisableAwsNetworkPerformanceMetricSubscription -> String
$cshow :: DisableAwsNetworkPerformanceMetricSubscription -> String
showsPrec :: Int -> DisableAwsNetworkPerformanceMetricSubscription -> ShowS
$cshowsPrec :: Int -> DisableAwsNetworkPerformanceMetricSubscription -> ShowS
Prelude.Show, forall x.
Rep DisableAwsNetworkPerformanceMetricSubscription x
-> DisableAwsNetworkPerformanceMetricSubscription
forall x.
DisableAwsNetworkPerformanceMetricSubscription
-> Rep DisableAwsNetworkPerformanceMetricSubscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableAwsNetworkPerformanceMetricSubscription x
-> DisableAwsNetworkPerformanceMetricSubscription
$cfrom :: forall x.
DisableAwsNetworkPerformanceMetricSubscription
-> Rep DisableAwsNetworkPerformanceMetricSubscription x
Prelude.Generic)

-- |
-- Create a value of 'DisableAwsNetworkPerformanceMetricSubscription' 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:
--
-- 'destination', 'disableAwsNetworkPerformanceMetricSubscription_destination' - The target Region or Availability Zone that the metric subscription is
-- disabled for. For example, @eu-north-1@.
--
-- 'dryRun', 'disableAwsNetworkPerformanceMetricSubscription_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'metric', 'disableAwsNetworkPerformanceMetricSubscription_metric' - The metric used for the disabled subscription.
--
-- 'source', 'disableAwsNetworkPerformanceMetricSubscription_source' - The source Region or Availability Zone that the metric subscription is
-- disabled for. For example, @us-east-1@.
--
-- 'statistic', 'disableAwsNetworkPerformanceMetricSubscription_statistic' - The statistic used for the disabled subscription.
newDisableAwsNetworkPerformanceMetricSubscription ::
  DisableAwsNetworkPerformanceMetricSubscription
newDisableAwsNetworkPerformanceMetricSubscription :: DisableAwsNetworkPerformanceMetricSubscription
newDisableAwsNetworkPerformanceMetricSubscription =
  DisableAwsNetworkPerformanceMetricSubscription'
    { $sel:destination:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe Text
destination =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dryRun:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:metric:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe MetricType
metric = forall a. Maybe a
Prelude.Nothing,
      $sel:source:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe Text
source = forall a. Maybe a
Prelude.Nothing,
      $sel:statistic:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe StatisticType
statistic = forall a. Maybe a
Prelude.Nothing
    }

-- | The target Region or Availability Zone that the metric subscription is
-- disabled for. For example, @eu-north-1@.
disableAwsNetworkPerformanceMetricSubscription_destination :: Lens.Lens' DisableAwsNetworkPerformanceMetricSubscription (Prelude.Maybe Prelude.Text)
disableAwsNetworkPerformanceMetricSubscription_destination :: Lens' DisableAwsNetworkPerformanceMetricSubscription (Maybe Text)
disableAwsNetworkPerformanceMetricSubscription_destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAwsNetworkPerformanceMetricSubscription' {Maybe Text
destination :: Maybe Text
$sel:destination:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
destination} -> Maybe Text
destination) (\s :: DisableAwsNetworkPerformanceMetricSubscription
s@DisableAwsNetworkPerformanceMetricSubscription' {} Maybe Text
a -> DisableAwsNetworkPerformanceMetricSubscription
s {$sel:destination:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe Text
destination = Maybe Text
a} :: DisableAwsNetworkPerformanceMetricSubscription)

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
disableAwsNetworkPerformanceMetricSubscription_dryRun :: Lens.Lens' DisableAwsNetworkPerformanceMetricSubscription (Prelude.Maybe Prelude.Bool)
disableAwsNetworkPerformanceMetricSubscription_dryRun :: Lens' DisableAwsNetworkPerformanceMetricSubscription (Maybe Bool)
disableAwsNetworkPerformanceMetricSubscription_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAwsNetworkPerformanceMetricSubscription' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DisableAwsNetworkPerformanceMetricSubscription
s@DisableAwsNetworkPerformanceMetricSubscription' {} Maybe Bool
a -> DisableAwsNetworkPerformanceMetricSubscription
s {$sel:dryRun:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe Bool
dryRun = Maybe Bool
a} :: DisableAwsNetworkPerformanceMetricSubscription)

-- | The metric used for the disabled subscription.
disableAwsNetworkPerformanceMetricSubscription_metric :: Lens.Lens' DisableAwsNetworkPerformanceMetricSubscription (Prelude.Maybe MetricType)
disableAwsNetworkPerformanceMetricSubscription_metric :: Lens'
  DisableAwsNetworkPerformanceMetricSubscription (Maybe MetricType)
disableAwsNetworkPerformanceMetricSubscription_metric = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAwsNetworkPerformanceMetricSubscription' {Maybe MetricType
metric :: Maybe MetricType
$sel:metric:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe MetricType
metric} -> Maybe MetricType
metric) (\s :: DisableAwsNetworkPerformanceMetricSubscription
s@DisableAwsNetworkPerformanceMetricSubscription' {} Maybe MetricType
a -> DisableAwsNetworkPerformanceMetricSubscription
s {$sel:metric:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe MetricType
metric = Maybe MetricType
a} :: DisableAwsNetworkPerformanceMetricSubscription)

-- | The source Region or Availability Zone that the metric subscription is
-- disabled for. For example, @us-east-1@.
disableAwsNetworkPerformanceMetricSubscription_source :: Lens.Lens' DisableAwsNetworkPerformanceMetricSubscription (Prelude.Maybe Prelude.Text)
disableAwsNetworkPerformanceMetricSubscription_source :: Lens' DisableAwsNetworkPerformanceMetricSubscription (Maybe Text)
disableAwsNetworkPerformanceMetricSubscription_source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAwsNetworkPerformanceMetricSubscription' {Maybe Text
source :: Maybe Text
$sel:source:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
source} -> Maybe Text
source) (\s :: DisableAwsNetworkPerformanceMetricSubscription
s@DisableAwsNetworkPerformanceMetricSubscription' {} Maybe Text
a -> DisableAwsNetworkPerformanceMetricSubscription
s {$sel:source:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe Text
source = Maybe Text
a} :: DisableAwsNetworkPerformanceMetricSubscription)

-- | The statistic used for the disabled subscription.
disableAwsNetworkPerformanceMetricSubscription_statistic :: Lens.Lens' DisableAwsNetworkPerformanceMetricSubscription (Prelude.Maybe StatisticType)
disableAwsNetworkPerformanceMetricSubscription_statistic :: Lens'
  DisableAwsNetworkPerformanceMetricSubscription
  (Maybe StatisticType)
disableAwsNetworkPerformanceMetricSubscription_statistic = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAwsNetworkPerformanceMetricSubscription' {Maybe StatisticType
statistic :: Maybe StatisticType
$sel:statistic:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription
-> Maybe StatisticType
statistic} -> Maybe StatisticType
statistic) (\s :: DisableAwsNetworkPerformanceMetricSubscription
s@DisableAwsNetworkPerformanceMetricSubscription' {} Maybe StatisticType
a -> DisableAwsNetworkPerformanceMetricSubscription
s {$sel:statistic:DisableAwsNetworkPerformanceMetricSubscription' :: Maybe StatisticType
statistic = Maybe StatisticType
a} :: DisableAwsNetworkPerformanceMetricSubscription)

instance
  Core.AWSRequest
    DisableAwsNetworkPerformanceMetricSubscription
  where
  type
    AWSResponse
      DisableAwsNetworkPerformanceMetricSubscription =
      DisableAwsNetworkPerformanceMetricSubscriptionResponse
  request :: (Service -> Service)
-> DisableAwsNetworkPerformanceMetricSubscription
-> Request DisableAwsNetworkPerformanceMetricSubscription
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisableAwsNetworkPerformanceMetricSubscription
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DisableAwsNetworkPerformanceMetricSubscription)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Int -> DisableAwsNetworkPerformanceMetricSubscriptionResponse
DisableAwsNetworkPerformanceMetricSubscriptionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"output")
            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
    DisableAwsNetworkPerformanceMetricSubscription
  where
  hashWithSalt :: Int -> DisableAwsNetworkPerformanceMetricSubscription -> Int
hashWithSalt
    Int
_salt
    DisableAwsNetworkPerformanceMetricSubscription' {Maybe Bool
Maybe Text
Maybe MetricType
Maybe StatisticType
statistic :: Maybe StatisticType
source :: Maybe Text
metric :: Maybe MetricType
dryRun :: Maybe Bool
destination :: Maybe Text
$sel:statistic:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription
-> Maybe StatisticType
$sel:source:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
$sel:metric:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe MetricType
$sel:dryRun:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Bool
$sel:destination:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destination
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MetricType
metric
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
source
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StatisticType
statistic

instance
  Prelude.NFData
    DisableAwsNetworkPerformanceMetricSubscription
  where
  rnf :: DisableAwsNetworkPerformanceMetricSubscription -> ()
rnf
    DisableAwsNetworkPerformanceMetricSubscription' {Maybe Bool
Maybe Text
Maybe MetricType
Maybe StatisticType
statistic :: Maybe StatisticType
source :: Maybe Text
metric :: Maybe MetricType
dryRun :: Maybe Bool
destination :: Maybe Text
$sel:statistic:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription
-> Maybe StatisticType
$sel:source:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
$sel:metric:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe MetricType
$sel:dryRun:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Bool
$sel:destination:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destination
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MetricType
metric
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
source
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StatisticType
statistic

instance
  Data.ToHeaders
    DisableAwsNetworkPerformanceMetricSubscription
  where
  toHeaders :: DisableAwsNetworkPerformanceMetricSubscription -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance
  Data.ToQuery
    DisableAwsNetworkPerformanceMetricSubscription
  where
  toQuery :: DisableAwsNetworkPerformanceMetricSubscription -> QueryString
toQuery
    DisableAwsNetworkPerformanceMetricSubscription' {Maybe Bool
Maybe Text
Maybe MetricType
Maybe StatisticType
statistic :: Maybe StatisticType
source :: Maybe Text
metric :: Maybe MetricType
dryRun :: Maybe Bool
destination :: Maybe Text
$sel:statistic:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription
-> Maybe StatisticType
$sel:source:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
$sel:metric:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe MetricType
$sel:dryRun:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Bool
$sel:destination:DisableAwsNetworkPerformanceMetricSubscription' :: DisableAwsNetworkPerformanceMetricSubscription -> Maybe Text
..} =
      forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"Action"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DisableAwsNetworkPerformanceMetricSubscription" ::
                        Prelude.ByteString
                    ),
          ByteString
"Version"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
          ByteString
"Destination" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
destination,
          ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
          ByteString
"Metric" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe MetricType
metric,
          ByteString
"Source" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
source,
          ByteString
"Statistic" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe StatisticType
statistic
        ]

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

-- |
-- Create a value of 'DisableAwsNetworkPerformanceMetricSubscriptionResponse' 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:
--
-- 'output', 'disableAwsNetworkPerformanceMetricSubscriptionResponse_output' - Indicates whether the unsubscribe action was successful.
--
-- 'httpStatus', 'disableAwsNetworkPerformanceMetricSubscriptionResponse_httpStatus' - The response's http status code.
newDisableAwsNetworkPerformanceMetricSubscriptionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DisableAwsNetworkPerformanceMetricSubscriptionResponse
newDisableAwsNetworkPerformanceMetricSubscriptionResponse :: Int -> DisableAwsNetworkPerformanceMetricSubscriptionResponse
newDisableAwsNetworkPerformanceMetricSubscriptionResponse
  Int
pHttpStatus_ =
    DisableAwsNetworkPerformanceMetricSubscriptionResponse'
      { $sel:output:DisableAwsNetworkPerformanceMetricSubscriptionResponse' :: Maybe Bool
output =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DisableAwsNetworkPerformanceMetricSubscriptionResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Indicates whether the unsubscribe action was successful.
disableAwsNetworkPerformanceMetricSubscriptionResponse_output :: Lens.Lens' DisableAwsNetworkPerformanceMetricSubscriptionResponse (Prelude.Maybe Prelude.Bool)
disableAwsNetworkPerformanceMetricSubscriptionResponse_output :: Lens'
  DisableAwsNetworkPerformanceMetricSubscriptionResponse (Maybe Bool)
disableAwsNetworkPerformanceMetricSubscriptionResponse_output = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableAwsNetworkPerformanceMetricSubscriptionResponse' {Maybe Bool
output :: Maybe Bool
$sel:output:DisableAwsNetworkPerformanceMetricSubscriptionResponse' :: DisableAwsNetworkPerformanceMetricSubscriptionResponse
-> Maybe Bool
output} -> Maybe Bool
output) (\s :: DisableAwsNetworkPerformanceMetricSubscriptionResponse
s@DisableAwsNetworkPerformanceMetricSubscriptionResponse' {} Maybe Bool
a -> DisableAwsNetworkPerformanceMetricSubscriptionResponse
s {$sel:output:DisableAwsNetworkPerformanceMetricSubscriptionResponse' :: Maybe Bool
output = Maybe Bool
a} :: DisableAwsNetworkPerformanceMetricSubscriptionResponse)

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

instance
  Prelude.NFData
    DisableAwsNetworkPerformanceMetricSubscriptionResponse
  where
  rnf :: DisableAwsNetworkPerformanceMetricSubscriptionResponse -> ()
rnf
    DisableAwsNetworkPerformanceMetricSubscriptionResponse' {Int
Maybe Bool
httpStatus :: Int
output :: Maybe Bool
$sel:httpStatus:DisableAwsNetworkPerformanceMetricSubscriptionResponse' :: DisableAwsNetworkPerformanceMetricSubscriptionResponse -> Int
$sel:output:DisableAwsNetworkPerformanceMetricSubscriptionResponse' :: DisableAwsNetworkPerformanceMetricSubscriptionResponse
-> Maybe Bool
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
output
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus