{-# 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.CreateAccelerator
(
CreateAccelerator (..),
newCreateAccelerator,
createAccelerator_enabled,
createAccelerator_ipAddressType,
createAccelerator_tags,
createAccelerator_ipAddresses,
createAccelerator_name,
createAccelerator_idempotencyToken,
CreateAcceleratorResponse (..),
newCreateAcceleratorResponse,
createAcceleratorResponse_accelerator,
createAcceleratorResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GlobalAccelerator.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateAccelerator = CreateAccelerator'
{
CreateAccelerator -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
CreateAccelerator -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
CreateAccelerator -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateAccelerator -> Maybe [Text]
ipAddresses :: Prelude.Maybe [Prelude.Text],
CreateAccelerator -> Text
name :: Prelude.Text,
CreateAccelerator -> Text
idempotencyToken :: Prelude.Text
}
deriving (CreateAccelerator -> CreateAccelerator -> Bool
(CreateAccelerator -> CreateAccelerator -> Bool)
-> (CreateAccelerator -> CreateAccelerator -> Bool)
-> Eq CreateAccelerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAccelerator -> CreateAccelerator -> Bool
$c/= :: CreateAccelerator -> CreateAccelerator -> Bool
== :: CreateAccelerator -> CreateAccelerator -> Bool
$c== :: CreateAccelerator -> CreateAccelerator -> Bool
Prelude.Eq, ReadPrec [CreateAccelerator]
ReadPrec CreateAccelerator
Int -> ReadS CreateAccelerator
ReadS [CreateAccelerator]
(Int -> ReadS CreateAccelerator)
-> ReadS [CreateAccelerator]
-> ReadPrec CreateAccelerator
-> ReadPrec [CreateAccelerator]
-> Read CreateAccelerator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAccelerator]
$creadListPrec :: ReadPrec [CreateAccelerator]
readPrec :: ReadPrec CreateAccelerator
$creadPrec :: ReadPrec CreateAccelerator
readList :: ReadS [CreateAccelerator]
$creadList :: ReadS [CreateAccelerator]
readsPrec :: Int -> ReadS CreateAccelerator
$creadsPrec :: Int -> ReadS CreateAccelerator
Prelude.Read, Int -> CreateAccelerator -> ShowS
[CreateAccelerator] -> ShowS
CreateAccelerator -> String
(Int -> CreateAccelerator -> ShowS)
-> (CreateAccelerator -> String)
-> ([CreateAccelerator] -> ShowS)
-> Show CreateAccelerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAccelerator] -> ShowS
$cshowList :: [CreateAccelerator] -> ShowS
show :: CreateAccelerator -> String
$cshow :: CreateAccelerator -> String
showsPrec :: Int -> CreateAccelerator -> ShowS
$cshowsPrec :: Int -> CreateAccelerator -> ShowS
Prelude.Show, (forall x. CreateAccelerator -> Rep CreateAccelerator x)
-> (forall x. Rep CreateAccelerator x -> CreateAccelerator)
-> Generic CreateAccelerator
forall x. Rep CreateAccelerator x -> CreateAccelerator
forall x. CreateAccelerator -> Rep CreateAccelerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAccelerator x -> CreateAccelerator
$cfrom :: forall x. CreateAccelerator -> Rep CreateAccelerator x
Prelude.Generic)
newCreateAccelerator ::
Prelude.Text ->
Prelude.Text ->
CreateAccelerator
newCreateAccelerator :: Text -> Text -> CreateAccelerator
newCreateAccelerator Text
pName_ Text
pIdempotencyToken_ =
CreateAccelerator' :: Maybe Bool
-> Maybe IpAddressType
-> Maybe [Tag]
-> Maybe [Text]
-> Text
-> Text
-> CreateAccelerator
CreateAccelerator'
{ $sel:enabled:CreateAccelerator' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressType:CreateAccelerator' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateAccelerator' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddresses:CreateAccelerator' :: Maybe [Text]
ipAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateAccelerator' :: Text
name = Text
pName_,
$sel:idempotencyToken:CreateAccelerator' :: Text
idempotencyToken = Text
pIdempotencyToken_
}
createAccelerator_enabled :: Lens.Lens' CreateAccelerator (Prelude.Maybe Prelude.Bool)
createAccelerator_enabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateAccelerator -> f CreateAccelerator
createAccelerator_enabled = (CreateAccelerator -> Maybe Bool)
-> (CreateAccelerator -> Maybe Bool -> CreateAccelerator)
-> Lens
CreateAccelerator CreateAccelerator (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccelerator' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:CreateAccelerator' :: CreateAccelerator -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: CreateAccelerator
s@CreateAccelerator' {} Maybe Bool
a -> CreateAccelerator
s {$sel:enabled:CreateAccelerator' :: Maybe Bool
enabled = Maybe Bool
a} :: CreateAccelerator)
createAccelerator_ipAddressType :: Lens.Lens' CreateAccelerator (Prelude.Maybe IpAddressType)
createAccelerator_ipAddressType :: (Maybe IpAddressType -> f (Maybe IpAddressType))
-> CreateAccelerator -> f CreateAccelerator
createAccelerator_ipAddressType = (CreateAccelerator -> Maybe IpAddressType)
-> (CreateAccelerator -> Maybe IpAddressType -> CreateAccelerator)
-> Lens
CreateAccelerator
CreateAccelerator
(Maybe IpAddressType)
(Maybe IpAddressType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccelerator' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:CreateAccelerator' :: CreateAccelerator -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: CreateAccelerator
s@CreateAccelerator' {} Maybe IpAddressType
a -> CreateAccelerator
s {$sel:ipAddressType:CreateAccelerator' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: CreateAccelerator)
createAccelerator_tags :: Lens.Lens' CreateAccelerator (Prelude.Maybe [Tag])
createAccelerator_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAccelerator -> f CreateAccelerator
createAccelerator_tags = (CreateAccelerator -> Maybe [Tag])
-> (CreateAccelerator -> Maybe [Tag] -> CreateAccelerator)
-> Lens
CreateAccelerator CreateAccelerator (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccelerator' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateAccelerator' :: CreateAccelerator -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateAccelerator
s@CreateAccelerator' {} Maybe [Tag]
a -> CreateAccelerator
s {$sel:tags:CreateAccelerator' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateAccelerator) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAccelerator -> f CreateAccelerator)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAccelerator
-> f CreateAccelerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAccelerator_ipAddresses :: Lens.Lens' CreateAccelerator (Prelude.Maybe [Prelude.Text])
createAccelerator_ipAddresses :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateAccelerator -> f CreateAccelerator
createAccelerator_ipAddresses = (CreateAccelerator -> Maybe [Text])
-> (CreateAccelerator -> Maybe [Text] -> CreateAccelerator)
-> Lens
CreateAccelerator CreateAccelerator (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccelerator' {Maybe [Text]
ipAddresses :: Maybe [Text]
$sel:ipAddresses:CreateAccelerator' :: CreateAccelerator -> Maybe [Text]
ipAddresses} -> Maybe [Text]
ipAddresses) (\s :: CreateAccelerator
s@CreateAccelerator' {} Maybe [Text]
a -> CreateAccelerator
s {$sel:ipAddresses:CreateAccelerator' :: Maybe [Text]
ipAddresses = Maybe [Text]
a} :: CreateAccelerator) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateAccelerator -> f CreateAccelerator)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateAccelerator
-> f CreateAccelerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAccelerator_name :: Lens.Lens' CreateAccelerator Prelude.Text
createAccelerator_name :: (Text -> f Text) -> CreateAccelerator -> f CreateAccelerator
createAccelerator_name = (CreateAccelerator -> Text)
-> (CreateAccelerator -> Text -> CreateAccelerator)
-> Lens CreateAccelerator CreateAccelerator Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccelerator' {Text
name :: Text
$sel:name:CreateAccelerator' :: CreateAccelerator -> Text
name} -> Text
name) (\s :: CreateAccelerator
s@CreateAccelerator' {} Text
a -> CreateAccelerator
s {$sel:name:CreateAccelerator' :: Text
name = Text
a} :: CreateAccelerator)
createAccelerator_idempotencyToken :: Lens.Lens' CreateAccelerator Prelude.Text
createAccelerator_idempotencyToken :: (Text -> f Text) -> CreateAccelerator -> f CreateAccelerator
createAccelerator_idempotencyToken = (CreateAccelerator -> Text)
-> (CreateAccelerator -> Text -> CreateAccelerator)
-> Lens CreateAccelerator CreateAccelerator Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccelerator' {Text
idempotencyToken :: Text
$sel:idempotencyToken:CreateAccelerator' :: CreateAccelerator -> Text
idempotencyToken} -> Text
idempotencyToken) (\s :: CreateAccelerator
s@CreateAccelerator' {} Text
a -> CreateAccelerator
s {$sel:idempotencyToken:CreateAccelerator' :: Text
idempotencyToken = Text
a} :: CreateAccelerator)
instance Core.AWSRequest CreateAccelerator where
type
AWSResponse CreateAccelerator =
CreateAcceleratorResponse
request :: CreateAccelerator -> Request CreateAccelerator
request = Service -> CreateAccelerator -> Request CreateAccelerator
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAccelerator
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateAccelerator)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAccelerator))
-> Logger
-> Service
-> Proxy CreateAccelerator
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateAccelerator)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Accelerator -> Int -> CreateAcceleratorResponse
CreateAcceleratorResponse'
(Maybe Accelerator -> Int -> CreateAcceleratorResponse)
-> Either String (Maybe Accelerator)
-> Either String (Int -> CreateAcceleratorResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Accelerator)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Accelerator")
Either String (Int -> CreateAcceleratorResponse)
-> Either String Int -> Either String CreateAcceleratorResponse
forall (f :: * -> *) a b. Applicative f => 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 CreateAccelerator
instance Prelude.NFData CreateAccelerator
instance Core.ToHeaders CreateAccelerator where
toHeaders :: CreateAccelerator -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateAccelerator -> 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
"GlobalAccelerator_V20180706.CreateAccelerator" ::
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 CreateAccelerator where
toJSON :: CreateAccelerator -> Value
toJSON CreateAccelerator' {Maybe Bool
Maybe [Text]
Maybe [Tag]
Maybe IpAddressType
Text
idempotencyToken :: Text
name :: Text
ipAddresses :: Maybe [Text]
tags :: Maybe [Tag]
ipAddressType :: Maybe IpAddressType
enabled :: Maybe Bool
$sel:idempotencyToken:CreateAccelerator' :: CreateAccelerator -> Text
$sel:name:CreateAccelerator' :: CreateAccelerator -> Text
$sel:ipAddresses:CreateAccelerator' :: CreateAccelerator -> Maybe [Text]
$sel:tags:CreateAccelerator' :: CreateAccelerator -> Maybe [Tag]
$sel:ipAddressType:CreateAccelerator' :: CreateAccelerator -> Maybe IpAddressType
$sel:enabled:CreateAccelerator' :: CreateAccelerator -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enabled,
(Text
"IpAddressType" Text -> IpAddressType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (IpAddressType -> Pair) -> Maybe IpAddressType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IpAddressType
ipAddressType,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Text
"IpAddresses" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
ipAddresses,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
idempotencyToken)
]
)
instance Core.ToPath CreateAccelerator where
toPath :: CreateAccelerator -> ByteString
toPath = ByteString -> CreateAccelerator -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateAccelerator where
toQuery :: CreateAccelerator -> QueryString
toQuery = QueryString -> CreateAccelerator -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAcceleratorResponse = CreateAcceleratorResponse'
{
CreateAcceleratorResponse -> Maybe Accelerator
accelerator :: Prelude.Maybe Accelerator,
CreateAcceleratorResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateAcceleratorResponse -> CreateAcceleratorResponse -> Bool
(CreateAcceleratorResponse -> CreateAcceleratorResponse -> Bool)
-> (CreateAcceleratorResponse -> CreateAcceleratorResponse -> Bool)
-> Eq CreateAcceleratorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAcceleratorResponse -> CreateAcceleratorResponse -> Bool
$c/= :: CreateAcceleratorResponse -> CreateAcceleratorResponse -> Bool
== :: CreateAcceleratorResponse -> CreateAcceleratorResponse -> Bool
$c== :: CreateAcceleratorResponse -> CreateAcceleratorResponse -> Bool
Prelude.Eq, ReadPrec [CreateAcceleratorResponse]
ReadPrec CreateAcceleratorResponse
Int -> ReadS CreateAcceleratorResponse
ReadS [CreateAcceleratorResponse]
(Int -> ReadS CreateAcceleratorResponse)
-> ReadS [CreateAcceleratorResponse]
-> ReadPrec CreateAcceleratorResponse
-> ReadPrec [CreateAcceleratorResponse]
-> Read CreateAcceleratorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAcceleratorResponse]
$creadListPrec :: ReadPrec [CreateAcceleratorResponse]
readPrec :: ReadPrec CreateAcceleratorResponse
$creadPrec :: ReadPrec CreateAcceleratorResponse
readList :: ReadS [CreateAcceleratorResponse]
$creadList :: ReadS [CreateAcceleratorResponse]
readsPrec :: Int -> ReadS CreateAcceleratorResponse
$creadsPrec :: Int -> ReadS CreateAcceleratorResponse
Prelude.Read, Int -> CreateAcceleratorResponse -> ShowS
[CreateAcceleratorResponse] -> ShowS
CreateAcceleratorResponse -> String
(Int -> CreateAcceleratorResponse -> ShowS)
-> (CreateAcceleratorResponse -> String)
-> ([CreateAcceleratorResponse] -> ShowS)
-> Show CreateAcceleratorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAcceleratorResponse] -> ShowS
$cshowList :: [CreateAcceleratorResponse] -> ShowS
show :: CreateAcceleratorResponse -> String
$cshow :: CreateAcceleratorResponse -> String
showsPrec :: Int -> CreateAcceleratorResponse -> ShowS
$cshowsPrec :: Int -> CreateAcceleratorResponse -> ShowS
Prelude.Show, (forall x.
CreateAcceleratorResponse -> Rep CreateAcceleratorResponse x)
-> (forall x.
Rep CreateAcceleratorResponse x -> CreateAcceleratorResponse)
-> Generic CreateAcceleratorResponse
forall x.
Rep CreateAcceleratorResponse x -> CreateAcceleratorResponse
forall x.
CreateAcceleratorResponse -> Rep CreateAcceleratorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAcceleratorResponse x -> CreateAcceleratorResponse
$cfrom :: forall x.
CreateAcceleratorResponse -> Rep CreateAcceleratorResponse x
Prelude.Generic)
newCreateAcceleratorResponse ::
Prelude.Int ->
CreateAcceleratorResponse
newCreateAcceleratorResponse :: Int -> CreateAcceleratorResponse
newCreateAcceleratorResponse Int
pHttpStatus_ =
CreateAcceleratorResponse' :: Maybe Accelerator -> Int -> CreateAcceleratorResponse
CreateAcceleratorResponse'
{ $sel:accelerator:CreateAcceleratorResponse' :: Maybe Accelerator
accelerator =
Maybe Accelerator
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateAcceleratorResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createAcceleratorResponse_accelerator :: Lens.Lens' CreateAcceleratorResponse (Prelude.Maybe Accelerator)
createAcceleratorResponse_accelerator :: (Maybe Accelerator -> f (Maybe Accelerator))
-> CreateAcceleratorResponse -> f CreateAcceleratorResponse
createAcceleratorResponse_accelerator = (CreateAcceleratorResponse -> Maybe Accelerator)
-> (CreateAcceleratorResponse
-> Maybe Accelerator -> CreateAcceleratorResponse)
-> Lens
CreateAcceleratorResponse
CreateAcceleratorResponse
(Maybe Accelerator)
(Maybe Accelerator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAcceleratorResponse' {Maybe Accelerator
accelerator :: Maybe Accelerator
$sel:accelerator:CreateAcceleratorResponse' :: CreateAcceleratorResponse -> Maybe Accelerator
accelerator} -> Maybe Accelerator
accelerator) (\s :: CreateAcceleratorResponse
s@CreateAcceleratorResponse' {} Maybe Accelerator
a -> CreateAcceleratorResponse
s {$sel:accelerator:CreateAcceleratorResponse' :: Maybe Accelerator
accelerator = Maybe Accelerator
a} :: CreateAcceleratorResponse)
createAcceleratorResponse_httpStatus :: Lens.Lens' CreateAcceleratorResponse Prelude.Int
createAcceleratorResponse_httpStatus :: (Int -> f Int)
-> CreateAcceleratorResponse -> f CreateAcceleratorResponse
createAcceleratorResponse_httpStatus = (CreateAcceleratorResponse -> Int)
-> (CreateAcceleratorResponse -> Int -> CreateAcceleratorResponse)
-> Lens CreateAcceleratorResponse CreateAcceleratorResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAcceleratorResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAcceleratorResponse' :: CreateAcceleratorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAcceleratorResponse
s@CreateAcceleratorResponse' {} Int
a -> CreateAcceleratorResponse
s {$sel:httpStatus:CreateAcceleratorResponse' :: Int
httpStatus = Int
a} :: CreateAcceleratorResponse)
instance Prelude.NFData CreateAcceleratorResponse