{-# 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 #-}
module Amazonka.ApplicationInsights.DescribeComponentConfiguration
(
DescribeComponentConfiguration (..),
newDescribeComponentConfiguration,
describeComponentConfiguration_resourceGroupName,
describeComponentConfiguration_componentName,
DescribeComponentConfigurationResponse (..),
newDescribeComponentConfigurationResponse,
describeComponentConfigurationResponse_componentConfiguration,
describeComponentConfigurationResponse_monitor,
describeComponentConfigurationResponse_tier,
describeComponentConfigurationResponse_httpStatus,
)
where
import Amazonka.ApplicationInsights.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
data DescribeComponentConfiguration = DescribeComponentConfiguration'
{
DescribeComponentConfiguration -> Text
resourceGroupName :: Prelude.Text,
DescribeComponentConfiguration -> Text
componentName :: Prelude.Text
}
deriving (DescribeComponentConfiguration
-> DescribeComponentConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeComponentConfiguration
-> DescribeComponentConfiguration -> Bool
$c/= :: DescribeComponentConfiguration
-> DescribeComponentConfiguration -> Bool
== :: DescribeComponentConfiguration
-> DescribeComponentConfiguration -> Bool
$c== :: DescribeComponentConfiguration
-> DescribeComponentConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeComponentConfiguration]
ReadPrec DescribeComponentConfiguration
Int -> ReadS DescribeComponentConfiguration
ReadS [DescribeComponentConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeComponentConfiguration]
$creadListPrec :: ReadPrec [DescribeComponentConfiguration]
readPrec :: ReadPrec DescribeComponentConfiguration
$creadPrec :: ReadPrec DescribeComponentConfiguration
readList :: ReadS [DescribeComponentConfiguration]
$creadList :: ReadS [DescribeComponentConfiguration]
readsPrec :: Int -> ReadS DescribeComponentConfiguration
$creadsPrec :: Int -> ReadS DescribeComponentConfiguration
Prelude.Read, Int -> DescribeComponentConfiguration -> ShowS
[DescribeComponentConfiguration] -> ShowS
DescribeComponentConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeComponentConfiguration] -> ShowS
$cshowList :: [DescribeComponentConfiguration] -> ShowS
show :: DescribeComponentConfiguration -> String
$cshow :: DescribeComponentConfiguration -> String
showsPrec :: Int -> DescribeComponentConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeComponentConfiguration -> ShowS
Prelude.Show, forall x.
Rep DescribeComponentConfiguration x
-> DescribeComponentConfiguration
forall x.
DescribeComponentConfiguration
-> Rep DescribeComponentConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeComponentConfiguration x
-> DescribeComponentConfiguration
$cfrom :: forall x.
DescribeComponentConfiguration
-> Rep DescribeComponentConfiguration x
Prelude.Generic)
newDescribeComponentConfiguration ::
Prelude.Text ->
Prelude.Text ->
DescribeComponentConfiguration
newDescribeComponentConfiguration :: Text -> Text -> DescribeComponentConfiguration
newDescribeComponentConfiguration
Text
pResourceGroupName_
Text
pComponentName_ =
DescribeComponentConfiguration'
{ $sel:resourceGroupName:DescribeComponentConfiguration' :: Text
resourceGroupName =
Text
pResourceGroupName_,
$sel:componentName:DescribeComponentConfiguration' :: Text
componentName = Text
pComponentName_
}
describeComponentConfiguration_resourceGroupName :: Lens.Lens' DescribeComponentConfiguration Prelude.Text
describeComponentConfiguration_resourceGroupName :: Lens' DescribeComponentConfiguration Text
describeComponentConfiguration_resourceGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeComponentConfiguration' {Text
resourceGroupName :: Text
$sel:resourceGroupName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
resourceGroupName} -> Text
resourceGroupName) (\s :: DescribeComponentConfiguration
s@DescribeComponentConfiguration' {} Text
a -> DescribeComponentConfiguration
s {$sel:resourceGroupName:DescribeComponentConfiguration' :: Text
resourceGroupName = Text
a} :: DescribeComponentConfiguration)
describeComponentConfiguration_componentName :: Lens.Lens' DescribeComponentConfiguration Prelude.Text
describeComponentConfiguration_componentName :: Lens' DescribeComponentConfiguration Text
describeComponentConfiguration_componentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeComponentConfiguration' {Text
componentName :: Text
$sel:componentName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
componentName} -> Text
componentName) (\s :: DescribeComponentConfiguration
s@DescribeComponentConfiguration' {} Text
a -> DescribeComponentConfiguration
s {$sel:componentName:DescribeComponentConfiguration' :: Text
componentName = Text
a} :: DescribeComponentConfiguration)
instance
Core.AWSRequest
DescribeComponentConfiguration
where
type
AWSResponse DescribeComponentConfiguration =
DescribeComponentConfigurationResponse
request :: (Service -> Service)
-> DescribeComponentConfiguration
-> Request DescribeComponentConfiguration
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 DescribeComponentConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeComponentConfiguration)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Tier
-> Int
-> DescribeComponentConfigurationResponse
DescribeComponentConfigurationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ComponentConfiguration")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Monitor")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tier")
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
DescribeComponentConfiguration
where
hashWithSalt :: Int -> DescribeComponentConfiguration -> Int
hashWithSalt
Int
_salt
DescribeComponentConfiguration' {Text
componentName :: Text
resourceGroupName :: Text
$sel:componentName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
$sel:resourceGroupName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
componentName
instance
Prelude.NFData
DescribeComponentConfiguration
where
rnf :: DescribeComponentConfiguration -> ()
rnf DescribeComponentConfiguration' {Text
componentName :: Text
resourceGroupName :: Text
$sel:componentName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
$sel:resourceGroupName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
resourceGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
componentName
instance
Data.ToHeaders
DescribeComponentConfiguration
where
toHeaders :: DescribeComponentConfiguration -> 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
"EC2WindowsBarleyService.DescribeComponentConfiguration" ::
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 DescribeComponentConfiguration where
toJSON :: DescribeComponentConfiguration -> Value
toJSON DescribeComponentConfiguration' {Text
componentName :: Text
resourceGroupName :: Text
$sel:componentName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
$sel:resourceGroupName:DescribeComponentConfiguration' :: DescribeComponentConfiguration -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"ResourceGroupName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceGroupName),
forall a. a -> Maybe a
Prelude.Just
(Key
"ComponentName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
componentName)
]
)
instance Data.ToPath DescribeComponentConfiguration where
toPath :: DescribeComponentConfiguration -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DescribeComponentConfiguration where
toQuery :: DescribeComponentConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeComponentConfigurationResponse = DescribeComponentConfigurationResponse'
{
DescribeComponentConfigurationResponse -> Maybe Text
componentConfiguration :: Prelude.Maybe Prelude.Text,
DescribeComponentConfigurationResponse -> Maybe Bool
monitor :: Prelude.Maybe Prelude.Bool,
DescribeComponentConfigurationResponse -> Maybe Tier
tier :: Prelude.Maybe Tier,
DescribeComponentConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeComponentConfigurationResponse
-> DescribeComponentConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeComponentConfigurationResponse
-> DescribeComponentConfigurationResponse -> Bool
$c/= :: DescribeComponentConfigurationResponse
-> DescribeComponentConfigurationResponse -> Bool
== :: DescribeComponentConfigurationResponse
-> DescribeComponentConfigurationResponse -> Bool
$c== :: DescribeComponentConfigurationResponse
-> DescribeComponentConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeComponentConfigurationResponse]
ReadPrec DescribeComponentConfigurationResponse
Int -> ReadS DescribeComponentConfigurationResponse
ReadS [DescribeComponentConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeComponentConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeComponentConfigurationResponse]
readPrec :: ReadPrec DescribeComponentConfigurationResponse
$creadPrec :: ReadPrec DescribeComponentConfigurationResponse
readList :: ReadS [DescribeComponentConfigurationResponse]
$creadList :: ReadS [DescribeComponentConfigurationResponse]
readsPrec :: Int -> ReadS DescribeComponentConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeComponentConfigurationResponse
Prelude.Read, Int -> DescribeComponentConfigurationResponse -> ShowS
[DescribeComponentConfigurationResponse] -> ShowS
DescribeComponentConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeComponentConfigurationResponse] -> ShowS
$cshowList :: [DescribeComponentConfigurationResponse] -> ShowS
show :: DescribeComponentConfigurationResponse -> String
$cshow :: DescribeComponentConfigurationResponse -> String
showsPrec :: Int -> DescribeComponentConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeComponentConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeComponentConfigurationResponse x
-> DescribeComponentConfigurationResponse
forall x.
DescribeComponentConfigurationResponse
-> Rep DescribeComponentConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeComponentConfigurationResponse x
-> DescribeComponentConfigurationResponse
$cfrom :: forall x.
DescribeComponentConfigurationResponse
-> Rep DescribeComponentConfigurationResponse x
Prelude.Generic)
newDescribeComponentConfigurationResponse ::
Prelude.Int ->
DescribeComponentConfigurationResponse
newDescribeComponentConfigurationResponse :: Int -> DescribeComponentConfigurationResponse
newDescribeComponentConfigurationResponse
Int
pHttpStatus_ =
DescribeComponentConfigurationResponse'
{ $sel:componentConfiguration:DescribeComponentConfigurationResponse' :: Maybe Text
componentConfiguration =
forall a. Maybe a
Prelude.Nothing,
$sel:monitor:DescribeComponentConfigurationResponse' :: Maybe Bool
monitor = forall a. Maybe a
Prelude.Nothing,
$sel:tier:DescribeComponentConfigurationResponse' :: Maybe Tier
tier = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeComponentConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeComponentConfigurationResponse_componentConfiguration :: Lens.Lens' DescribeComponentConfigurationResponse (Prelude.Maybe Prelude.Text)
describeComponentConfigurationResponse_componentConfiguration :: Lens' DescribeComponentConfigurationResponse (Maybe Text)
describeComponentConfigurationResponse_componentConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeComponentConfigurationResponse' {Maybe Text
componentConfiguration :: Maybe Text
$sel:componentConfiguration:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Maybe Text
componentConfiguration} -> Maybe Text
componentConfiguration) (\s :: DescribeComponentConfigurationResponse
s@DescribeComponentConfigurationResponse' {} Maybe Text
a -> DescribeComponentConfigurationResponse
s {$sel:componentConfiguration:DescribeComponentConfigurationResponse' :: Maybe Text
componentConfiguration = Maybe Text
a} :: DescribeComponentConfigurationResponse)
describeComponentConfigurationResponse_monitor :: Lens.Lens' DescribeComponentConfigurationResponse (Prelude.Maybe Prelude.Bool)
describeComponentConfigurationResponse_monitor :: Lens' DescribeComponentConfigurationResponse (Maybe Bool)
describeComponentConfigurationResponse_monitor = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeComponentConfigurationResponse' {Maybe Bool
monitor :: Maybe Bool
$sel:monitor:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Maybe Bool
monitor} -> Maybe Bool
monitor) (\s :: DescribeComponentConfigurationResponse
s@DescribeComponentConfigurationResponse' {} Maybe Bool
a -> DescribeComponentConfigurationResponse
s {$sel:monitor:DescribeComponentConfigurationResponse' :: Maybe Bool
monitor = Maybe Bool
a} :: DescribeComponentConfigurationResponse)
describeComponentConfigurationResponse_tier :: Lens.Lens' DescribeComponentConfigurationResponse (Prelude.Maybe Tier)
describeComponentConfigurationResponse_tier :: Lens' DescribeComponentConfigurationResponse (Maybe Tier)
describeComponentConfigurationResponse_tier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeComponentConfigurationResponse' {Maybe Tier
tier :: Maybe Tier
$sel:tier:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Maybe Tier
tier} -> Maybe Tier
tier) (\s :: DescribeComponentConfigurationResponse
s@DescribeComponentConfigurationResponse' {} Maybe Tier
a -> DescribeComponentConfigurationResponse
s {$sel:tier:DescribeComponentConfigurationResponse' :: Maybe Tier
tier = Maybe Tier
a} :: DescribeComponentConfigurationResponse)
describeComponentConfigurationResponse_httpStatus :: Lens.Lens' DescribeComponentConfigurationResponse Prelude.Int
describeComponentConfigurationResponse_httpStatus :: Lens' DescribeComponentConfigurationResponse Int
describeComponentConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeComponentConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeComponentConfigurationResponse
s@DescribeComponentConfigurationResponse' {} Int
a -> DescribeComponentConfigurationResponse
s {$sel:httpStatus:DescribeComponentConfigurationResponse' :: Int
httpStatus = Int
a} :: DescribeComponentConfigurationResponse)
instance
Prelude.NFData
DescribeComponentConfigurationResponse
where
rnf :: DescribeComponentConfigurationResponse -> ()
rnf DescribeComponentConfigurationResponse' {Int
Maybe Bool
Maybe Text
Maybe Tier
httpStatus :: Int
tier :: Maybe Tier
monitor :: Maybe Bool
componentConfiguration :: Maybe Text
$sel:httpStatus:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Int
$sel:tier:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Maybe Tier
$sel:monitor:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Maybe Bool
$sel:componentConfiguration:DescribeComponentConfigurationResponse' :: DescribeComponentConfigurationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
monitor
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Tier
tier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus