{-# 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.IoTWireless.CreateDestination
(
CreateDestination (..),
newCreateDestination,
createDestination_clientRequestToken,
createDestination_description,
createDestination_tags,
createDestination_name,
createDestination_expressionType,
createDestination_expression,
createDestination_roleArn,
CreateDestinationResponse (..),
newCreateDestinationResponse,
createDestinationResponse_arn,
createDestinationResponse_name,
createDestinationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.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 CreateDestination = CreateDestination'
{
CreateDestination -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateDestination -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateDestination -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateDestination -> Text
name :: Prelude.Text,
CreateDestination -> ExpressionType
expressionType :: ExpressionType,
CreateDestination -> Text
expression :: Prelude.Text,
CreateDestination -> Text
roleArn :: Prelude.Text
}
deriving (CreateDestination -> CreateDestination -> Bool
(CreateDestination -> CreateDestination -> Bool)
-> (CreateDestination -> CreateDestination -> Bool)
-> Eq CreateDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDestination -> CreateDestination -> Bool
$c/= :: CreateDestination -> CreateDestination -> Bool
== :: CreateDestination -> CreateDestination -> Bool
$c== :: CreateDestination -> CreateDestination -> Bool
Prelude.Eq, ReadPrec [CreateDestination]
ReadPrec CreateDestination
Int -> ReadS CreateDestination
ReadS [CreateDestination]
(Int -> ReadS CreateDestination)
-> ReadS [CreateDestination]
-> ReadPrec CreateDestination
-> ReadPrec [CreateDestination]
-> Read CreateDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDestination]
$creadListPrec :: ReadPrec [CreateDestination]
readPrec :: ReadPrec CreateDestination
$creadPrec :: ReadPrec CreateDestination
readList :: ReadS [CreateDestination]
$creadList :: ReadS [CreateDestination]
readsPrec :: Int -> ReadS CreateDestination
$creadsPrec :: Int -> ReadS CreateDestination
Prelude.Read, Int -> CreateDestination -> ShowS
[CreateDestination] -> ShowS
CreateDestination -> String
(Int -> CreateDestination -> ShowS)
-> (CreateDestination -> String)
-> ([CreateDestination] -> ShowS)
-> Show CreateDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDestination] -> ShowS
$cshowList :: [CreateDestination] -> ShowS
show :: CreateDestination -> String
$cshow :: CreateDestination -> String
showsPrec :: Int -> CreateDestination -> ShowS
$cshowsPrec :: Int -> CreateDestination -> ShowS
Prelude.Show, (forall x. CreateDestination -> Rep CreateDestination x)
-> (forall x. Rep CreateDestination x -> CreateDestination)
-> Generic CreateDestination
forall x. Rep CreateDestination x -> CreateDestination
forall x. CreateDestination -> Rep CreateDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDestination x -> CreateDestination
$cfrom :: forall x. CreateDestination -> Rep CreateDestination x
Prelude.Generic)
newCreateDestination ::
Prelude.Text ->
ExpressionType ->
Prelude.Text ->
Prelude.Text ->
CreateDestination
newCreateDestination :: Text -> ExpressionType -> Text -> Text -> CreateDestination
newCreateDestination
Text
pName_
ExpressionType
pExpressionType_
Text
pExpression_
Text
pRoleArn_ =
CreateDestination' :: Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> ExpressionType
-> Text
-> Text
-> CreateDestination
CreateDestination'
{ $sel:clientRequestToken:CreateDestination' :: Maybe Text
clientRequestToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateDestination' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateDestination' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateDestination' :: Text
name = Text
pName_,
$sel:expressionType:CreateDestination' :: ExpressionType
expressionType = ExpressionType
pExpressionType_,
$sel:expression:CreateDestination' :: Text
expression = Text
pExpression_,
$sel:roleArn:CreateDestination' :: Text
roleArn = Text
pRoleArn_
}
createDestination_clientRequestToken :: Lens.Lens' CreateDestination (Prelude.Maybe Prelude.Text)
createDestination_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateDestination -> f CreateDestination
createDestination_clientRequestToken = (CreateDestination -> Maybe Text)
-> (CreateDestination -> Maybe Text -> CreateDestination)
-> Lens
CreateDestination CreateDestination (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestination' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateDestination' :: CreateDestination -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateDestination
s@CreateDestination' {} Maybe Text
a -> CreateDestination
s {$sel:clientRequestToken:CreateDestination' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateDestination)
createDestination_description :: Lens.Lens' CreateDestination (Prelude.Maybe Prelude.Text)
createDestination_description :: (Maybe Text -> f (Maybe Text))
-> CreateDestination -> f CreateDestination
createDestination_description = (CreateDestination -> Maybe Text)
-> (CreateDestination -> Maybe Text -> CreateDestination)
-> Lens
CreateDestination CreateDestination (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestination' {Maybe Text
description :: Maybe Text
$sel:description:CreateDestination' :: CreateDestination -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateDestination
s@CreateDestination' {} Maybe Text
a -> CreateDestination
s {$sel:description:CreateDestination' :: Maybe Text
description = Maybe Text
a} :: CreateDestination)
createDestination_tags :: Lens.Lens' CreateDestination (Prelude.Maybe [Tag])
createDestination_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDestination -> f CreateDestination
createDestination_tags = (CreateDestination -> Maybe [Tag])
-> (CreateDestination -> Maybe [Tag] -> CreateDestination)
-> Lens
CreateDestination CreateDestination (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestination' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDestination' :: CreateDestination -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDestination
s@CreateDestination' {} Maybe [Tag]
a -> CreateDestination
s {$sel:tags:CreateDestination' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDestination) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDestination -> f CreateDestination)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDestination
-> f CreateDestination
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
createDestination_name :: Lens.Lens' CreateDestination Prelude.Text
createDestination_name :: (Text -> f Text) -> CreateDestination -> f CreateDestination
createDestination_name = (CreateDestination -> Text)
-> (CreateDestination -> Text -> CreateDestination)
-> Lens CreateDestination CreateDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestination' {Text
name :: Text
$sel:name:CreateDestination' :: CreateDestination -> Text
name} -> Text
name) (\s :: CreateDestination
s@CreateDestination' {} Text
a -> CreateDestination
s {$sel:name:CreateDestination' :: Text
name = Text
a} :: CreateDestination)
createDestination_expressionType :: Lens.Lens' CreateDestination ExpressionType
createDestination_expressionType :: (ExpressionType -> f ExpressionType)
-> CreateDestination -> f CreateDestination
createDestination_expressionType = (CreateDestination -> ExpressionType)
-> (CreateDestination -> ExpressionType -> CreateDestination)
-> Lens
CreateDestination CreateDestination ExpressionType ExpressionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestination' {ExpressionType
expressionType :: ExpressionType
$sel:expressionType:CreateDestination' :: CreateDestination -> ExpressionType
expressionType} -> ExpressionType
expressionType) (\s :: CreateDestination
s@CreateDestination' {} ExpressionType
a -> CreateDestination
s {$sel:expressionType:CreateDestination' :: ExpressionType
expressionType = ExpressionType
a} :: CreateDestination)
createDestination_expression :: Lens.Lens' CreateDestination Prelude.Text
createDestination_expression :: (Text -> f Text) -> CreateDestination -> f CreateDestination
createDestination_expression = (CreateDestination -> Text)
-> (CreateDestination -> Text -> CreateDestination)
-> Lens CreateDestination CreateDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestination' {Text
expression :: Text
$sel:expression:CreateDestination' :: CreateDestination -> Text
expression} -> Text
expression) (\s :: CreateDestination
s@CreateDestination' {} Text
a -> CreateDestination
s {$sel:expression:CreateDestination' :: Text
expression = Text
a} :: CreateDestination)
createDestination_roleArn :: Lens.Lens' CreateDestination Prelude.Text
createDestination_roleArn :: (Text -> f Text) -> CreateDestination -> f CreateDestination
createDestination_roleArn = (CreateDestination -> Text)
-> (CreateDestination -> Text -> CreateDestination)
-> Lens CreateDestination CreateDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestination' {Text
roleArn :: Text
$sel:roleArn:CreateDestination' :: CreateDestination -> Text
roleArn} -> Text
roleArn) (\s :: CreateDestination
s@CreateDestination' {} Text
a -> CreateDestination
s {$sel:roleArn:CreateDestination' :: Text
roleArn = Text
a} :: CreateDestination)
instance Core.AWSRequest CreateDestination where
type
AWSResponse CreateDestination =
CreateDestinationResponse
request :: CreateDestination -> Request CreateDestination
request = Service -> CreateDestination -> Request CreateDestination
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateDestination
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateDestination)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateDestination))
-> Logger
-> Service
-> Proxy CreateDestination
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateDestination)))
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 Text -> Maybe Text -> Int -> CreateDestinationResponse
CreateDestinationResponse'
(Maybe Text -> Maybe Text -> Int -> CreateDestinationResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateDestinationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Arn")
Either String (Maybe Text -> Int -> CreateDestinationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateDestinationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
Either String (Int -> CreateDestinationResponse)
-> Either String Int -> Either String CreateDestinationResponse
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 CreateDestination
instance Prelude.NFData CreateDestination
instance Core.ToHeaders CreateDestination where
toHeaders :: CreateDestination -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateDestination -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CreateDestination where
toJSON :: CreateDestination -> Value
toJSON CreateDestination' {Maybe [Tag]
Maybe Text
Text
ExpressionType
roleArn :: Text
expression :: Text
expressionType :: ExpressionType
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
clientRequestToken :: Maybe Text
$sel:roleArn:CreateDestination' :: CreateDestination -> Text
$sel:expression:CreateDestination' :: CreateDestination -> Text
$sel:expressionType:CreateDestination' :: CreateDestination -> ExpressionType
$sel:name:CreateDestination' :: CreateDestination -> Text
$sel:tags:CreateDestination' :: CreateDestination -> Maybe [Tag]
$sel:description:CreateDestination' :: CreateDestination -> Maybe Text
$sel:clientRequestToken:CreateDestination' :: CreateDestination -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ClientRequestToken" 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
clientRequestToken,
(Text
"Description" 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
description,
(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,
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
"ExpressionType" Text -> ExpressionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ExpressionType
expressionType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Expression" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
expression),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
]
)
instance Core.ToPath CreateDestination where
toPath :: CreateDestination -> ByteString
toPath = ByteString -> CreateDestination -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/destinations"
instance Core.ToQuery CreateDestination where
toQuery :: CreateDestination -> QueryString
toQuery = QueryString -> CreateDestination -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateDestinationResponse = CreateDestinationResponse'
{
CreateDestinationResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateDestinationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateDestinationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateDestinationResponse -> CreateDestinationResponse -> Bool
(CreateDestinationResponse -> CreateDestinationResponse -> Bool)
-> (CreateDestinationResponse -> CreateDestinationResponse -> Bool)
-> Eq CreateDestinationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDestinationResponse -> CreateDestinationResponse -> Bool
$c/= :: CreateDestinationResponse -> CreateDestinationResponse -> Bool
== :: CreateDestinationResponse -> CreateDestinationResponse -> Bool
$c== :: CreateDestinationResponse -> CreateDestinationResponse -> Bool
Prelude.Eq, ReadPrec [CreateDestinationResponse]
ReadPrec CreateDestinationResponse
Int -> ReadS CreateDestinationResponse
ReadS [CreateDestinationResponse]
(Int -> ReadS CreateDestinationResponse)
-> ReadS [CreateDestinationResponse]
-> ReadPrec CreateDestinationResponse
-> ReadPrec [CreateDestinationResponse]
-> Read CreateDestinationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDestinationResponse]
$creadListPrec :: ReadPrec [CreateDestinationResponse]
readPrec :: ReadPrec CreateDestinationResponse
$creadPrec :: ReadPrec CreateDestinationResponse
readList :: ReadS [CreateDestinationResponse]
$creadList :: ReadS [CreateDestinationResponse]
readsPrec :: Int -> ReadS CreateDestinationResponse
$creadsPrec :: Int -> ReadS CreateDestinationResponse
Prelude.Read, Int -> CreateDestinationResponse -> ShowS
[CreateDestinationResponse] -> ShowS
CreateDestinationResponse -> String
(Int -> CreateDestinationResponse -> ShowS)
-> (CreateDestinationResponse -> String)
-> ([CreateDestinationResponse] -> ShowS)
-> Show CreateDestinationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDestinationResponse] -> ShowS
$cshowList :: [CreateDestinationResponse] -> ShowS
show :: CreateDestinationResponse -> String
$cshow :: CreateDestinationResponse -> String
showsPrec :: Int -> CreateDestinationResponse -> ShowS
$cshowsPrec :: Int -> CreateDestinationResponse -> ShowS
Prelude.Show, (forall x.
CreateDestinationResponse -> Rep CreateDestinationResponse x)
-> (forall x.
Rep CreateDestinationResponse x -> CreateDestinationResponse)
-> Generic CreateDestinationResponse
forall x.
Rep CreateDestinationResponse x -> CreateDestinationResponse
forall x.
CreateDestinationResponse -> Rep CreateDestinationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDestinationResponse x -> CreateDestinationResponse
$cfrom :: forall x.
CreateDestinationResponse -> Rep CreateDestinationResponse x
Prelude.Generic)
newCreateDestinationResponse ::
Prelude.Int ->
CreateDestinationResponse
newCreateDestinationResponse :: Int -> CreateDestinationResponse
newCreateDestinationResponse Int
pHttpStatus_ =
CreateDestinationResponse' :: Maybe Text -> Maybe Text -> Int -> CreateDestinationResponse
CreateDestinationResponse'
{ $sel:arn:CreateDestinationResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateDestinationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateDestinationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createDestinationResponse_arn :: Lens.Lens' CreateDestinationResponse (Prelude.Maybe Prelude.Text)
createDestinationResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateDestinationResponse -> f CreateDestinationResponse
createDestinationResponse_arn = (CreateDestinationResponse -> Maybe Text)
-> (CreateDestinationResponse
-> Maybe Text -> CreateDestinationResponse)
-> Lens
CreateDestinationResponse
CreateDestinationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestinationResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateDestinationResponse' :: CreateDestinationResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateDestinationResponse
s@CreateDestinationResponse' {} Maybe Text
a -> CreateDestinationResponse
s {$sel:arn:CreateDestinationResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateDestinationResponse)
createDestinationResponse_name :: Lens.Lens' CreateDestinationResponse (Prelude.Maybe Prelude.Text)
createDestinationResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateDestinationResponse -> f CreateDestinationResponse
createDestinationResponse_name = (CreateDestinationResponse -> Maybe Text)
-> (CreateDestinationResponse
-> Maybe Text -> CreateDestinationResponse)
-> Lens
CreateDestinationResponse
CreateDestinationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestinationResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateDestinationResponse' :: CreateDestinationResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateDestinationResponse
s@CreateDestinationResponse' {} Maybe Text
a -> CreateDestinationResponse
s {$sel:name:CreateDestinationResponse' :: Maybe Text
name = Maybe Text
a} :: CreateDestinationResponse)
createDestinationResponse_httpStatus :: Lens.Lens' CreateDestinationResponse Prelude.Int
createDestinationResponse_httpStatus :: (Int -> f Int)
-> CreateDestinationResponse -> f CreateDestinationResponse
createDestinationResponse_httpStatus = (CreateDestinationResponse -> Int)
-> (CreateDestinationResponse -> Int -> CreateDestinationResponse)
-> Lens CreateDestinationResponse CreateDestinationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDestinationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDestinationResponse' :: CreateDestinationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDestinationResponse
s@CreateDestinationResponse' {} Int
a -> CreateDestinationResponse
s {$sel:httpStatus:CreateDestinationResponse' :: Int
httpStatus = Int
a} :: CreateDestinationResponse)
instance Prelude.NFData CreateDestinationResponse