{-# 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.GlobalAccelerator.DescribeCustomRoutingAcceleratorAttributes
(
DescribeCustomRoutingAcceleratorAttributes (..),
newDescribeCustomRoutingAcceleratorAttributes,
describeCustomRoutingAcceleratorAttributes_acceleratorArn,
DescribeCustomRoutingAcceleratorAttributesResponse (..),
newDescribeCustomRoutingAcceleratorAttributesResponse,
describeCustomRoutingAcceleratorAttributesResponse_acceleratorAttributes,
describeCustomRoutingAcceleratorAttributesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GlobalAccelerator.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeCustomRoutingAcceleratorAttributes = DescribeCustomRoutingAcceleratorAttributes'
{
DescribeCustomRoutingAcceleratorAttributes -> Text
acceleratorArn :: Prelude.Text
}
deriving (DescribeCustomRoutingAcceleratorAttributes
-> DescribeCustomRoutingAcceleratorAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCustomRoutingAcceleratorAttributes
-> DescribeCustomRoutingAcceleratorAttributes -> Bool
$c/= :: DescribeCustomRoutingAcceleratorAttributes
-> DescribeCustomRoutingAcceleratorAttributes -> Bool
== :: DescribeCustomRoutingAcceleratorAttributes
-> DescribeCustomRoutingAcceleratorAttributes -> Bool
$c== :: DescribeCustomRoutingAcceleratorAttributes
-> DescribeCustomRoutingAcceleratorAttributes -> Bool
Prelude.Eq, ReadPrec [DescribeCustomRoutingAcceleratorAttributes]
ReadPrec DescribeCustomRoutingAcceleratorAttributes
Int -> ReadS DescribeCustomRoutingAcceleratorAttributes
ReadS [DescribeCustomRoutingAcceleratorAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCustomRoutingAcceleratorAttributes]
$creadListPrec :: ReadPrec [DescribeCustomRoutingAcceleratorAttributes]
readPrec :: ReadPrec DescribeCustomRoutingAcceleratorAttributes
$creadPrec :: ReadPrec DescribeCustomRoutingAcceleratorAttributes
readList :: ReadS [DescribeCustomRoutingAcceleratorAttributes]
$creadList :: ReadS [DescribeCustomRoutingAcceleratorAttributes]
readsPrec :: Int -> ReadS DescribeCustomRoutingAcceleratorAttributes
$creadsPrec :: Int -> ReadS DescribeCustomRoutingAcceleratorAttributes
Prelude.Read, Int -> DescribeCustomRoutingAcceleratorAttributes -> ShowS
[DescribeCustomRoutingAcceleratorAttributes] -> ShowS
DescribeCustomRoutingAcceleratorAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCustomRoutingAcceleratorAttributes] -> ShowS
$cshowList :: [DescribeCustomRoutingAcceleratorAttributes] -> ShowS
show :: DescribeCustomRoutingAcceleratorAttributes -> String
$cshow :: DescribeCustomRoutingAcceleratorAttributes -> String
showsPrec :: Int -> DescribeCustomRoutingAcceleratorAttributes -> ShowS
$cshowsPrec :: Int -> DescribeCustomRoutingAcceleratorAttributes -> ShowS
Prelude.Show, forall x.
Rep DescribeCustomRoutingAcceleratorAttributes x
-> DescribeCustomRoutingAcceleratorAttributes
forall x.
DescribeCustomRoutingAcceleratorAttributes
-> Rep DescribeCustomRoutingAcceleratorAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCustomRoutingAcceleratorAttributes x
-> DescribeCustomRoutingAcceleratorAttributes
$cfrom :: forall x.
DescribeCustomRoutingAcceleratorAttributes
-> Rep DescribeCustomRoutingAcceleratorAttributes x
Prelude.Generic)
newDescribeCustomRoutingAcceleratorAttributes ::
Prelude.Text ->
DescribeCustomRoutingAcceleratorAttributes
newDescribeCustomRoutingAcceleratorAttributes :: Text -> DescribeCustomRoutingAcceleratorAttributes
newDescribeCustomRoutingAcceleratorAttributes
Text
pAcceleratorArn_ =
DescribeCustomRoutingAcceleratorAttributes'
{ $sel:acceleratorArn:DescribeCustomRoutingAcceleratorAttributes' :: Text
acceleratorArn =
Text
pAcceleratorArn_
}
describeCustomRoutingAcceleratorAttributes_acceleratorArn :: Lens.Lens' DescribeCustomRoutingAcceleratorAttributes Prelude.Text
describeCustomRoutingAcceleratorAttributes_acceleratorArn :: Lens' DescribeCustomRoutingAcceleratorAttributes Text
describeCustomRoutingAcceleratorAttributes_acceleratorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomRoutingAcceleratorAttributes' {Text
acceleratorArn :: Text
$sel:acceleratorArn:DescribeCustomRoutingAcceleratorAttributes' :: DescribeCustomRoutingAcceleratorAttributes -> Text
acceleratorArn} -> Text
acceleratorArn) (\s :: DescribeCustomRoutingAcceleratorAttributes
s@DescribeCustomRoutingAcceleratorAttributes' {} Text
a -> DescribeCustomRoutingAcceleratorAttributes
s {$sel:acceleratorArn:DescribeCustomRoutingAcceleratorAttributes' :: Text
acceleratorArn = Text
a} :: DescribeCustomRoutingAcceleratorAttributes)
instance
Core.AWSRequest
DescribeCustomRoutingAcceleratorAttributes
where
type
AWSResponse
DescribeCustomRoutingAcceleratorAttributes =
DescribeCustomRoutingAcceleratorAttributesResponse
request :: (Service -> Service)
-> DescribeCustomRoutingAcceleratorAttributes
-> Request DescribeCustomRoutingAcceleratorAttributes
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 DescribeCustomRoutingAcceleratorAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DescribeCustomRoutingAcceleratorAttributes)))
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 CustomRoutingAcceleratorAttributes
-> Int -> DescribeCustomRoutingAcceleratorAttributesResponse
DescribeCustomRoutingAcceleratorAttributesResponse'
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
"AcceleratorAttributes")
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
DescribeCustomRoutingAcceleratorAttributes
where
hashWithSalt :: Int -> DescribeCustomRoutingAcceleratorAttributes -> Int
hashWithSalt
Int
_salt
DescribeCustomRoutingAcceleratorAttributes' {Text
acceleratorArn :: Text
$sel:acceleratorArn:DescribeCustomRoutingAcceleratorAttributes' :: DescribeCustomRoutingAcceleratorAttributes -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
acceleratorArn
instance
Prelude.NFData
DescribeCustomRoutingAcceleratorAttributes
where
rnf :: DescribeCustomRoutingAcceleratorAttributes -> ()
rnf DescribeCustomRoutingAcceleratorAttributes' {Text
acceleratorArn :: Text
$sel:acceleratorArn:DescribeCustomRoutingAcceleratorAttributes' :: DescribeCustomRoutingAcceleratorAttributes -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
acceleratorArn
instance
Data.ToHeaders
DescribeCustomRoutingAcceleratorAttributes
where
toHeaders :: DescribeCustomRoutingAcceleratorAttributes -> 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
"GlobalAccelerator_V20180706.DescribeCustomRoutingAcceleratorAttributes" ::
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
DescribeCustomRoutingAcceleratorAttributes
where
toJSON :: DescribeCustomRoutingAcceleratorAttributes -> Value
toJSON
DescribeCustomRoutingAcceleratorAttributes' {Text
acceleratorArn :: Text
$sel:acceleratorArn:DescribeCustomRoutingAcceleratorAttributes' :: DescribeCustomRoutingAcceleratorAttributes -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"AcceleratorArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
acceleratorArn)
]
)
instance
Data.ToPath
DescribeCustomRoutingAcceleratorAttributes
where
toPath :: DescribeCustomRoutingAcceleratorAttributes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DescribeCustomRoutingAcceleratorAttributes
where
toQuery :: DescribeCustomRoutingAcceleratorAttributes -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeCustomRoutingAcceleratorAttributesResponse = DescribeCustomRoutingAcceleratorAttributesResponse'
{
DescribeCustomRoutingAcceleratorAttributesResponse
-> Maybe CustomRoutingAcceleratorAttributes
acceleratorAttributes :: Prelude.Maybe CustomRoutingAcceleratorAttributes,
DescribeCustomRoutingAcceleratorAttributesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeCustomRoutingAcceleratorAttributesResponse
-> DescribeCustomRoutingAcceleratorAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCustomRoutingAcceleratorAttributesResponse
-> DescribeCustomRoutingAcceleratorAttributesResponse -> Bool
$c/= :: DescribeCustomRoutingAcceleratorAttributesResponse
-> DescribeCustomRoutingAcceleratorAttributesResponse -> Bool
== :: DescribeCustomRoutingAcceleratorAttributesResponse
-> DescribeCustomRoutingAcceleratorAttributesResponse -> Bool
$c== :: DescribeCustomRoutingAcceleratorAttributesResponse
-> DescribeCustomRoutingAcceleratorAttributesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCustomRoutingAcceleratorAttributesResponse]
ReadPrec DescribeCustomRoutingAcceleratorAttributesResponse
Int -> ReadS DescribeCustomRoutingAcceleratorAttributesResponse
ReadS [DescribeCustomRoutingAcceleratorAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCustomRoutingAcceleratorAttributesResponse]
$creadListPrec :: ReadPrec [DescribeCustomRoutingAcceleratorAttributesResponse]
readPrec :: ReadPrec DescribeCustomRoutingAcceleratorAttributesResponse
$creadPrec :: ReadPrec DescribeCustomRoutingAcceleratorAttributesResponse
readList :: ReadS [DescribeCustomRoutingAcceleratorAttributesResponse]
$creadList :: ReadS [DescribeCustomRoutingAcceleratorAttributesResponse]
readsPrec :: Int -> ReadS DescribeCustomRoutingAcceleratorAttributesResponse
$creadsPrec :: Int -> ReadS DescribeCustomRoutingAcceleratorAttributesResponse
Prelude.Read, Int -> DescribeCustomRoutingAcceleratorAttributesResponse -> ShowS
[DescribeCustomRoutingAcceleratorAttributesResponse] -> ShowS
DescribeCustomRoutingAcceleratorAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCustomRoutingAcceleratorAttributesResponse] -> ShowS
$cshowList :: [DescribeCustomRoutingAcceleratorAttributesResponse] -> ShowS
show :: DescribeCustomRoutingAcceleratorAttributesResponse -> String
$cshow :: DescribeCustomRoutingAcceleratorAttributesResponse -> String
showsPrec :: Int -> DescribeCustomRoutingAcceleratorAttributesResponse -> ShowS
$cshowsPrec :: Int -> DescribeCustomRoutingAcceleratorAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeCustomRoutingAcceleratorAttributesResponse x
-> DescribeCustomRoutingAcceleratorAttributesResponse
forall x.
DescribeCustomRoutingAcceleratorAttributesResponse
-> Rep DescribeCustomRoutingAcceleratorAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCustomRoutingAcceleratorAttributesResponse x
-> DescribeCustomRoutingAcceleratorAttributesResponse
$cfrom :: forall x.
DescribeCustomRoutingAcceleratorAttributesResponse
-> Rep DescribeCustomRoutingAcceleratorAttributesResponse x
Prelude.Generic)
newDescribeCustomRoutingAcceleratorAttributesResponse ::
Prelude.Int ->
DescribeCustomRoutingAcceleratorAttributesResponse
newDescribeCustomRoutingAcceleratorAttributesResponse :: Int -> DescribeCustomRoutingAcceleratorAttributesResponse
newDescribeCustomRoutingAcceleratorAttributesResponse
Int
pHttpStatus_ =
DescribeCustomRoutingAcceleratorAttributesResponse'
{ $sel:acceleratorAttributes:DescribeCustomRoutingAcceleratorAttributesResponse' :: Maybe CustomRoutingAcceleratorAttributes
acceleratorAttributes =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeCustomRoutingAcceleratorAttributesResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
describeCustomRoutingAcceleratorAttributesResponse_acceleratorAttributes :: Lens.Lens' DescribeCustomRoutingAcceleratorAttributesResponse (Prelude.Maybe CustomRoutingAcceleratorAttributes)
describeCustomRoutingAcceleratorAttributesResponse_acceleratorAttributes :: Lens'
DescribeCustomRoutingAcceleratorAttributesResponse
(Maybe CustomRoutingAcceleratorAttributes)
describeCustomRoutingAcceleratorAttributesResponse_acceleratorAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomRoutingAcceleratorAttributesResponse' {Maybe CustomRoutingAcceleratorAttributes
acceleratorAttributes :: Maybe CustomRoutingAcceleratorAttributes
$sel:acceleratorAttributes:DescribeCustomRoutingAcceleratorAttributesResponse' :: DescribeCustomRoutingAcceleratorAttributesResponse
-> Maybe CustomRoutingAcceleratorAttributes
acceleratorAttributes} -> Maybe CustomRoutingAcceleratorAttributes
acceleratorAttributes) (\s :: DescribeCustomRoutingAcceleratorAttributesResponse
s@DescribeCustomRoutingAcceleratorAttributesResponse' {} Maybe CustomRoutingAcceleratorAttributes
a -> DescribeCustomRoutingAcceleratorAttributesResponse
s {$sel:acceleratorAttributes:DescribeCustomRoutingAcceleratorAttributesResponse' :: Maybe CustomRoutingAcceleratorAttributes
acceleratorAttributes = Maybe CustomRoutingAcceleratorAttributes
a} :: DescribeCustomRoutingAcceleratorAttributesResponse)
describeCustomRoutingAcceleratorAttributesResponse_httpStatus :: Lens.Lens' DescribeCustomRoutingAcceleratorAttributesResponse Prelude.Int
describeCustomRoutingAcceleratorAttributesResponse_httpStatus :: Lens' DescribeCustomRoutingAcceleratorAttributesResponse Int
describeCustomRoutingAcceleratorAttributesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomRoutingAcceleratorAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeCustomRoutingAcceleratorAttributesResponse' :: DescribeCustomRoutingAcceleratorAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeCustomRoutingAcceleratorAttributesResponse
s@DescribeCustomRoutingAcceleratorAttributesResponse' {} Int
a -> DescribeCustomRoutingAcceleratorAttributesResponse
s {$sel:httpStatus:DescribeCustomRoutingAcceleratorAttributesResponse' :: Int
httpStatus = Int
a} :: DescribeCustomRoutingAcceleratorAttributesResponse)
instance
Prelude.NFData
DescribeCustomRoutingAcceleratorAttributesResponse
where
rnf :: DescribeCustomRoutingAcceleratorAttributesResponse -> ()
rnf
DescribeCustomRoutingAcceleratorAttributesResponse' {Int
Maybe CustomRoutingAcceleratorAttributes
httpStatus :: Int
acceleratorAttributes :: Maybe CustomRoutingAcceleratorAttributes
$sel:httpStatus:DescribeCustomRoutingAcceleratorAttributesResponse' :: DescribeCustomRoutingAcceleratorAttributesResponse -> Int
$sel:acceleratorAttributes:DescribeCustomRoutingAcceleratorAttributesResponse' :: DescribeCustomRoutingAcceleratorAttributesResponse
-> Maybe CustomRoutingAcceleratorAttributes
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomRoutingAcceleratorAttributes
acceleratorAttributes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus