{-# 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.ServiceCatalog.CreateConstraint
(
CreateConstraint (..),
newCreateConstraint,
createConstraint_acceptLanguage,
createConstraint_description,
createConstraint_portfolioId,
createConstraint_productId,
createConstraint_parameters,
createConstraint_type,
createConstraint_idempotencyToken,
CreateConstraintResponse (..),
newCreateConstraintResponse,
createConstraintResponse_status,
createConstraintResponse_constraintDetail,
createConstraintResponse_constraintParameters,
createConstraintResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.ServiceCatalog.Types
data CreateConstraint = CreateConstraint'
{
CreateConstraint -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
CreateConstraint -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateConstraint -> Text
portfolioId :: Prelude.Text,
CreateConstraint -> Text
productId :: Prelude.Text,
CreateConstraint -> Text
parameters :: Prelude.Text,
CreateConstraint -> Text
type' :: Prelude.Text,
CreateConstraint -> Text
idempotencyToken :: Prelude.Text
}
deriving (CreateConstraint -> CreateConstraint -> Bool
(CreateConstraint -> CreateConstraint -> Bool)
-> (CreateConstraint -> CreateConstraint -> Bool)
-> Eq CreateConstraint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConstraint -> CreateConstraint -> Bool
$c/= :: CreateConstraint -> CreateConstraint -> Bool
== :: CreateConstraint -> CreateConstraint -> Bool
$c== :: CreateConstraint -> CreateConstraint -> Bool
Prelude.Eq, ReadPrec [CreateConstraint]
ReadPrec CreateConstraint
Int -> ReadS CreateConstraint
ReadS [CreateConstraint]
(Int -> ReadS CreateConstraint)
-> ReadS [CreateConstraint]
-> ReadPrec CreateConstraint
-> ReadPrec [CreateConstraint]
-> Read CreateConstraint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConstraint]
$creadListPrec :: ReadPrec [CreateConstraint]
readPrec :: ReadPrec CreateConstraint
$creadPrec :: ReadPrec CreateConstraint
readList :: ReadS [CreateConstraint]
$creadList :: ReadS [CreateConstraint]
readsPrec :: Int -> ReadS CreateConstraint
$creadsPrec :: Int -> ReadS CreateConstraint
Prelude.Read, Int -> CreateConstraint -> ShowS
[CreateConstraint] -> ShowS
CreateConstraint -> String
(Int -> CreateConstraint -> ShowS)
-> (CreateConstraint -> String)
-> ([CreateConstraint] -> ShowS)
-> Show CreateConstraint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConstraint] -> ShowS
$cshowList :: [CreateConstraint] -> ShowS
show :: CreateConstraint -> String
$cshow :: CreateConstraint -> String
showsPrec :: Int -> CreateConstraint -> ShowS
$cshowsPrec :: Int -> CreateConstraint -> ShowS
Prelude.Show, (forall x. CreateConstraint -> Rep CreateConstraint x)
-> (forall x. Rep CreateConstraint x -> CreateConstraint)
-> Generic CreateConstraint
forall x. Rep CreateConstraint x -> CreateConstraint
forall x. CreateConstraint -> Rep CreateConstraint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateConstraint x -> CreateConstraint
$cfrom :: forall x. CreateConstraint -> Rep CreateConstraint x
Prelude.Generic)
newCreateConstraint ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateConstraint
newCreateConstraint :: Text -> Text -> Text -> Text -> Text -> CreateConstraint
newCreateConstraint
Text
pPortfolioId_
Text
pProductId_
Text
pParameters_
Text
pType_
Text
pIdempotencyToken_ =
CreateConstraint' :: Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> CreateConstraint
CreateConstraint'
{ $sel:acceptLanguage:CreateConstraint' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateConstraint' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:portfolioId:CreateConstraint' :: Text
portfolioId = Text
pPortfolioId_,
$sel:productId:CreateConstraint' :: Text
productId = Text
pProductId_,
$sel:parameters:CreateConstraint' :: Text
parameters = Text
pParameters_,
$sel:type':CreateConstraint' :: Text
type' = Text
pType_,
$sel:idempotencyToken:CreateConstraint' :: Text
idempotencyToken = Text
pIdempotencyToken_
}
createConstraint_acceptLanguage :: Lens.Lens' CreateConstraint (Prelude.Maybe Prelude.Text)
createConstraint_acceptLanguage :: (Maybe Text -> f (Maybe Text))
-> CreateConstraint -> f CreateConstraint
createConstraint_acceptLanguage = (CreateConstraint -> Maybe Text)
-> (CreateConstraint -> Maybe Text -> CreateConstraint)
-> Lens CreateConstraint CreateConstraint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraint' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:CreateConstraint' :: CreateConstraint -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: CreateConstraint
s@CreateConstraint' {} Maybe Text
a -> CreateConstraint
s {$sel:acceptLanguage:CreateConstraint' :: Maybe Text
acceptLanguage = Maybe Text
a} :: CreateConstraint)
createConstraint_description :: Lens.Lens' CreateConstraint (Prelude.Maybe Prelude.Text)
createConstraint_description :: (Maybe Text -> f (Maybe Text))
-> CreateConstraint -> f CreateConstraint
createConstraint_description = (CreateConstraint -> Maybe Text)
-> (CreateConstraint -> Maybe Text -> CreateConstraint)
-> Lens CreateConstraint CreateConstraint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraint' {Maybe Text
description :: Maybe Text
$sel:description:CreateConstraint' :: CreateConstraint -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateConstraint
s@CreateConstraint' {} Maybe Text
a -> CreateConstraint
s {$sel:description:CreateConstraint' :: Maybe Text
description = Maybe Text
a} :: CreateConstraint)
createConstraint_portfolioId :: Lens.Lens' CreateConstraint Prelude.Text
createConstraint_portfolioId :: (Text -> f Text) -> CreateConstraint -> f CreateConstraint
createConstraint_portfolioId = (CreateConstraint -> Text)
-> (CreateConstraint -> Text -> CreateConstraint)
-> Lens CreateConstraint CreateConstraint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraint' {Text
portfolioId :: Text
$sel:portfolioId:CreateConstraint' :: CreateConstraint -> Text
portfolioId} -> Text
portfolioId) (\s :: CreateConstraint
s@CreateConstraint' {} Text
a -> CreateConstraint
s {$sel:portfolioId:CreateConstraint' :: Text
portfolioId = Text
a} :: CreateConstraint)
createConstraint_productId :: Lens.Lens' CreateConstraint Prelude.Text
createConstraint_productId :: (Text -> f Text) -> CreateConstraint -> f CreateConstraint
createConstraint_productId = (CreateConstraint -> Text)
-> (CreateConstraint -> Text -> CreateConstraint)
-> Lens CreateConstraint CreateConstraint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraint' {Text
productId :: Text
$sel:productId:CreateConstraint' :: CreateConstraint -> Text
productId} -> Text
productId) (\s :: CreateConstraint
s@CreateConstraint' {} Text
a -> CreateConstraint
s {$sel:productId:CreateConstraint' :: Text
productId = Text
a} :: CreateConstraint)
createConstraint_parameters :: Lens.Lens' CreateConstraint Prelude.Text
createConstraint_parameters :: (Text -> f Text) -> CreateConstraint -> f CreateConstraint
createConstraint_parameters = (CreateConstraint -> Text)
-> (CreateConstraint -> Text -> CreateConstraint)
-> Lens CreateConstraint CreateConstraint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraint' {Text
parameters :: Text
$sel:parameters:CreateConstraint' :: CreateConstraint -> Text
parameters} -> Text
parameters) (\s :: CreateConstraint
s@CreateConstraint' {} Text
a -> CreateConstraint
s {$sel:parameters:CreateConstraint' :: Text
parameters = Text
a} :: CreateConstraint)
createConstraint_type :: Lens.Lens' CreateConstraint Prelude.Text
createConstraint_type :: (Text -> f Text) -> CreateConstraint -> f CreateConstraint
createConstraint_type = (CreateConstraint -> Text)
-> (CreateConstraint -> Text -> CreateConstraint)
-> Lens CreateConstraint CreateConstraint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraint' {Text
type' :: Text
$sel:type':CreateConstraint' :: CreateConstraint -> Text
type'} -> Text
type') (\s :: CreateConstraint
s@CreateConstraint' {} Text
a -> CreateConstraint
s {$sel:type':CreateConstraint' :: Text
type' = Text
a} :: CreateConstraint)
createConstraint_idempotencyToken :: Lens.Lens' CreateConstraint Prelude.Text
createConstraint_idempotencyToken :: (Text -> f Text) -> CreateConstraint -> f CreateConstraint
createConstraint_idempotencyToken = (CreateConstraint -> Text)
-> (CreateConstraint -> Text -> CreateConstraint)
-> Lens CreateConstraint CreateConstraint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraint' {Text
idempotencyToken :: Text
$sel:idempotencyToken:CreateConstraint' :: CreateConstraint -> Text
idempotencyToken} -> Text
idempotencyToken) (\s :: CreateConstraint
s@CreateConstraint' {} Text
a -> CreateConstraint
s {$sel:idempotencyToken:CreateConstraint' :: Text
idempotencyToken = Text
a} :: CreateConstraint)
instance Core.AWSRequest CreateConstraint where
type
AWSResponse CreateConstraint =
CreateConstraintResponse
request :: CreateConstraint -> Request CreateConstraint
request = Service -> CreateConstraint -> Request CreateConstraint
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateConstraint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateConstraint)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateConstraint))
-> Logger
-> Service
-> Proxy CreateConstraint
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateConstraint)))
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 RequestStatus
-> Maybe ConstraintDetail
-> Maybe Text
-> Int
-> CreateConstraintResponse
CreateConstraintResponse'
(Maybe RequestStatus
-> Maybe ConstraintDetail
-> Maybe Text
-> Int
-> CreateConstraintResponse)
-> Either String (Maybe RequestStatus)
-> Either
String
(Maybe ConstraintDetail
-> Maybe Text -> Int -> CreateConstraintResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RequestStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
Either
String
(Maybe ConstraintDetail
-> Maybe Text -> Int -> CreateConstraintResponse)
-> Either String (Maybe ConstraintDetail)
-> Either String (Maybe Text -> Int -> CreateConstraintResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConstraintDetail)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ConstraintDetail")
Either String (Maybe Text -> Int -> CreateConstraintResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateConstraintResponse)
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
"ConstraintParameters")
Either String (Int -> CreateConstraintResponse)
-> Either String Int -> Either String CreateConstraintResponse
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 CreateConstraint
instance Prelude.NFData CreateConstraint
instance Core.ToHeaders CreateConstraint where
toHeaders :: CreateConstraint -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateConstraint -> 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
"AWS242ServiceCatalogService.CreateConstraint" ::
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 CreateConstraint where
toJSON :: CreateConstraint -> Value
toJSON CreateConstraint' {Maybe Text
Text
idempotencyToken :: Text
type' :: Text
parameters :: Text
productId :: Text
portfolioId :: Text
description :: Maybe Text
acceptLanguage :: Maybe Text
$sel:idempotencyToken:CreateConstraint' :: CreateConstraint -> Text
$sel:type':CreateConstraint' :: CreateConstraint -> Text
$sel:parameters:CreateConstraint' :: CreateConstraint -> Text
$sel:productId:CreateConstraint' :: CreateConstraint -> Text
$sel:portfolioId:CreateConstraint' :: CreateConstraint -> Text
$sel:description:CreateConstraint' :: CreateConstraint -> Maybe Text
$sel:acceptLanguage:CreateConstraint' :: CreateConstraint -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AcceptLanguage" 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
acceptLanguage,
(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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PortfolioId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
portfolioId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ProductId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
productId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Parameters" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parameters),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Type" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
type'),
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 CreateConstraint where
toPath :: CreateConstraint -> ByteString
toPath = ByteString -> CreateConstraint -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateConstraint where
toQuery :: CreateConstraint -> QueryString
toQuery = QueryString -> CreateConstraint -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateConstraintResponse = CreateConstraintResponse'
{
CreateConstraintResponse -> Maybe RequestStatus
status :: Prelude.Maybe RequestStatus,
CreateConstraintResponse -> Maybe ConstraintDetail
constraintDetail :: Prelude.Maybe ConstraintDetail,
CreateConstraintResponse -> Maybe Text
constraintParameters :: Prelude.Maybe Prelude.Text,
CreateConstraintResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateConstraintResponse -> CreateConstraintResponse -> Bool
(CreateConstraintResponse -> CreateConstraintResponse -> Bool)
-> (CreateConstraintResponse -> CreateConstraintResponse -> Bool)
-> Eq CreateConstraintResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConstraintResponse -> CreateConstraintResponse -> Bool
$c/= :: CreateConstraintResponse -> CreateConstraintResponse -> Bool
== :: CreateConstraintResponse -> CreateConstraintResponse -> Bool
$c== :: CreateConstraintResponse -> CreateConstraintResponse -> Bool
Prelude.Eq, ReadPrec [CreateConstraintResponse]
ReadPrec CreateConstraintResponse
Int -> ReadS CreateConstraintResponse
ReadS [CreateConstraintResponse]
(Int -> ReadS CreateConstraintResponse)
-> ReadS [CreateConstraintResponse]
-> ReadPrec CreateConstraintResponse
-> ReadPrec [CreateConstraintResponse]
-> Read CreateConstraintResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConstraintResponse]
$creadListPrec :: ReadPrec [CreateConstraintResponse]
readPrec :: ReadPrec CreateConstraintResponse
$creadPrec :: ReadPrec CreateConstraintResponse
readList :: ReadS [CreateConstraintResponse]
$creadList :: ReadS [CreateConstraintResponse]
readsPrec :: Int -> ReadS CreateConstraintResponse
$creadsPrec :: Int -> ReadS CreateConstraintResponse
Prelude.Read, Int -> CreateConstraintResponse -> ShowS
[CreateConstraintResponse] -> ShowS
CreateConstraintResponse -> String
(Int -> CreateConstraintResponse -> ShowS)
-> (CreateConstraintResponse -> String)
-> ([CreateConstraintResponse] -> ShowS)
-> Show CreateConstraintResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConstraintResponse] -> ShowS
$cshowList :: [CreateConstraintResponse] -> ShowS
show :: CreateConstraintResponse -> String
$cshow :: CreateConstraintResponse -> String
showsPrec :: Int -> CreateConstraintResponse -> ShowS
$cshowsPrec :: Int -> CreateConstraintResponse -> ShowS
Prelude.Show, (forall x.
CreateConstraintResponse -> Rep CreateConstraintResponse x)
-> (forall x.
Rep CreateConstraintResponse x -> CreateConstraintResponse)
-> Generic CreateConstraintResponse
forall x.
Rep CreateConstraintResponse x -> CreateConstraintResponse
forall x.
CreateConstraintResponse -> Rep CreateConstraintResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConstraintResponse x -> CreateConstraintResponse
$cfrom :: forall x.
CreateConstraintResponse -> Rep CreateConstraintResponse x
Prelude.Generic)
newCreateConstraintResponse ::
Prelude.Int ->
CreateConstraintResponse
newCreateConstraintResponse :: Int -> CreateConstraintResponse
newCreateConstraintResponse Int
pHttpStatus_ =
CreateConstraintResponse' :: Maybe RequestStatus
-> Maybe ConstraintDetail
-> Maybe Text
-> Int
-> CreateConstraintResponse
CreateConstraintResponse'
{ $sel:status:CreateConstraintResponse' :: Maybe RequestStatus
status = Maybe RequestStatus
forall a. Maybe a
Prelude.Nothing,
$sel:constraintDetail:CreateConstraintResponse' :: Maybe ConstraintDetail
constraintDetail = Maybe ConstraintDetail
forall a. Maybe a
Prelude.Nothing,
$sel:constraintParameters:CreateConstraintResponse' :: Maybe Text
constraintParameters = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateConstraintResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createConstraintResponse_status :: Lens.Lens' CreateConstraintResponse (Prelude.Maybe RequestStatus)
createConstraintResponse_status :: (Maybe RequestStatus -> f (Maybe RequestStatus))
-> CreateConstraintResponse -> f CreateConstraintResponse
createConstraintResponse_status = (CreateConstraintResponse -> Maybe RequestStatus)
-> (CreateConstraintResponse
-> Maybe RequestStatus -> CreateConstraintResponse)
-> Lens
CreateConstraintResponse
CreateConstraintResponse
(Maybe RequestStatus)
(Maybe RequestStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraintResponse' {Maybe RequestStatus
status :: Maybe RequestStatus
$sel:status:CreateConstraintResponse' :: CreateConstraintResponse -> Maybe RequestStatus
status} -> Maybe RequestStatus
status) (\s :: CreateConstraintResponse
s@CreateConstraintResponse' {} Maybe RequestStatus
a -> CreateConstraintResponse
s {$sel:status:CreateConstraintResponse' :: Maybe RequestStatus
status = Maybe RequestStatus
a} :: CreateConstraintResponse)
createConstraintResponse_constraintDetail :: Lens.Lens' CreateConstraintResponse (Prelude.Maybe ConstraintDetail)
createConstraintResponse_constraintDetail :: (Maybe ConstraintDetail -> f (Maybe ConstraintDetail))
-> CreateConstraintResponse -> f CreateConstraintResponse
createConstraintResponse_constraintDetail = (CreateConstraintResponse -> Maybe ConstraintDetail)
-> (CreateConstraintResponse
-> Maybe ConstraintDetail -> CreateConstraintResponse)
-> Lens
CreateConstraintResponse
CreateConstraintResponse
(Maybe ConstraintDetail)
(Maybe ConstraintDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraintResponse' {Maybe ConstraintDetail
constraintDetail :: Maybe ConstraintDetail
$sel:constraintDetail:CreateConstraintResponse' :: CreateConstraintResponse -> Maybe ConstraintDetail
constraintDetail} -> Maybe ConstraintDetail
constraintDetail) (\s :: CreateConstraintResponse
s@CreateConstraintResponse' {} Maybe ConstraintDetail
a -> CreateConstraintResponse
s {$sel:constraintDetail:CreateConstraintResponse' :: Maybe ConstraintDetail
constraintDetail = Maybe ConstraintDetail
a} :: CreateConstraintResponse)
createConstraintResponse_constraintParameters :: Lens.Lens' CreateConstraintResponse (Prelude.Maybe Prelude.Text)
createConstraintResponse_constraintParameters :: (Maybe Text -> f (Maybe Text))
-> CreateConstraintResponse -> f CreateConstraintResponse
createConstraintResponse_constraintParameters = (CreateConstraintResponse -> Maybe Text)
-> (CreateConstraintResponse
-> Maybe Text -> CreateConstraintResponse)
-> Lens
CreateConstraintResponse
CreateConstraintResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraintResponse' {Maybe Text
constraintParameters :: Maybe Text
$sel:constraintParameters:CreateConstraintResponse' :: CreateConstraintResponse -> Maybe Text
constraintParameters} -> Maybe Text
constraintParameters) (\s :: CreateConstraintResponse
s@CreateConstraintResponse' {} Maybe Text
a -> CreateConstraintResponse
s {$sel:constraintParameters:CreateConstraintResponse' :: Maybe Text
constraintParameters = Maybe Text
a} :: CreateConstraintResponse)
createConstraintResponse_httpStatus :: Lens.Lens' CreateConstraintResponse Prelude.Int
createConstraintResponse_httpStatus :: (Int -> f Int)
-> CreateConstraintResponse -> f CreateConstraintResponse
createConstraintResponse_httpStatus = (CreateConstraintResponse -> Int)
-> (CreateConstraintResponse -> Int -> CreateConstraintResponse)
-> Lens CreateConstraintResponse CreateConstraintResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConstraintResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateConstraintResponse' :: CreateConstraintResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateConstraintResponse
s@CreateConstraintResponse' {} Int
a -> CreateConstraintResponse
s {$sel:httpStatus:CreateConstraintResponse' :: Int
httpStatus = Int
a} :: CreateConstraintResponse)
instance Prelude.NFData CreateConstraintResponse