{-# 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.Support.CreateCase
(
CreateCase (..),
newCreateCase,
createCase_severityCode,
createCase_issueType,
createCase_ccEmailAddresses,
createCase_language,
createCase_categoryCode,
createCase_serviceCode,
createCase_attachmentSetId,
createCase_subject,
createCase_communicationBody,
CreateCaseResponse (..),
newCreateCaseResponse,
createCaseResponse_caseId,
createCaseResponse_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.Support.Types
data CreateCase = CreateCase'
{
CreateCase -> Maybe Text
severityCode :: Prelude.Maybe Prelude.Text,
CreateCase -> Maybe Text
issueType :: Prelude.Maybe Prelude.Text,
CreateCase -> Maybe [Text]
ccEmailAddresses :: Prelude.Maybe [Prelude.Text],
CreateCase -> Maybe Text
language :: Prelude.Maybe Prelude.Text,
CreateCase -> Maybe Text
categoryCode :: Prelude.Maybe Prelude.Text,
CreateCase -> Maybe Text
serviceCode :: Prelude.Maybe Prelude.Text,
CreateCase -> Maybe Text
attachmentSetId :: Prelude.Maybe Prelude.Text,
CreateCase -> Text
subject :: Prelude.Text,
CreateCase -> Text
communicationBody :: Prelude.Text
}
deriving (CreateCase -> CreateCase -> Bool
(CreateCase -> CreateCase -> Bool)
-> (CreateCase -> CreateCase -> Bool) -> Eq CreateCase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCase -> CreateCase -> Bool
$c/= :: CreateCase -> CreateCase -> Bool
== :: CreateCase -> CreateCase -> Bool
$c== :: CreateCase -> CreateCase -> Bool
Prelude.Eq, ReadPrec [CreateCase]
ReadPrec CreateCase
Int -> ReadS CreateCase
ReadS [CreateCase]
(Int -> ReadS CreateCase)
-> ReadS [CreateCase]
-> ReadPrec CreateCase
-> ReadPrec [CreateCase]
-> Read CreateCase
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCase]
$creadListPrec :: ReadPrec [CreateCase]
readPrec :: ReadPrec CreateCase
$creadPrec :: ReadPrec CreateCase
readList :: ReadS [CreateCase]
$creadList :: ReadS [CreateCase]
readsPrec :: Int -> ReadS CreateCase
$creadsPrec :: Int -> ReadS CreateCase
Prelude.Read, Int -> CreateCase -> ShowS
[CreateCase] -> ShowS
CreateCase -> String
(Int -> CreateCase -> ShowS)
-> (CreateCase -> String)
-> ([CreateCase] -> ShowS)
-> Show CreateCase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCase] -> ShowS
$cshowList :: [CreateCase] -> ShowS
show :: CreateCase -> String
$cshow :: CreateCase -> String
showsPrec :: Int -> CreateCase -> ShowS
$cshowsPrec :: Int -> CreateCase -> ShowS
Prelude.Show, (forall x. CreateCase -> Rep CreateCase x)
-> (forall x. Rep CreateCase x -> CreateCase) -> Generic CreateCase
forall x. Rep CreateCase x -> CreateCase
forall x. CreateCase -> Rep CreateCase x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCase x -> CreateCase
$cfrom :: forall x. CreateCase -> Rep CreateCase x
Prelude.Generic)
newCreateCase ::
Prelude.Text ->
Prelude.Text ->
CreateCase
newCreateCase :: Text -> Text -> CreateCase
newCreateCase Text
pSubject_ Text
pCommunicationBody_ =
CreateCase' :: Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> CreateCase
CreateCase'
{ $sel:severityCode:CreateCase' :: Maybe Text
severityCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:issueType:CreateCase' :: Maybe Text
issueType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ccEmailAddresses:CreateCase' :: Maybe [Text]
ccEmailAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:language:CreateCase' :: Maybe Text
language = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:categoryCode:CreateCase' :: Maybe Text
categoryCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceCode:CreateCase' :: Maybe Text
serviceCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachmentSetId:CreateCase' :: Maybe Text
attachmentSetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subject:CreateCase' :: Text
subject = Text
pSubject_,
$sel:communicationBody:CreateCase' :: Text
communicationBody = Text
pCommunicationBody_
}
createCase_severityCode :: Lens.Lens' CreateCase (Prelude.Maybe Prelude.Text)
createCase_severityCode :: (Maybe Text -> f (Maybe Text)) -> CreateCase -> f CreateCase
createCase_severityCode = (CreateCase -> Maybe Text)
-> (CreateCase -> Maybe Text -> CreateCase)
-> Lens CreateCase CreateCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Maybe Text
severityCode :: Maybe Text
$sel:severityCode:CreateCase' :: CreateCase -> Maybe Text
severityCode} -> Maybe Text
severityCode) (\s :: CreateCase
s@CreateCase' {} Maybe Text
a -> CreateCase
s {$sel:severityCode:CreateCase' :: Maybe Text
severityCode = Maybe Text
a} :: CreateCase)
createCase_issueType :: Lens.Lens' CreateCase (Prelude.Maybe Prelude.Text)
createCase_issueType :: (Maybe Text -> f (Maybe Text)) -> CreateCase -> f CreateCase
createCase_issueType = (CreateCase -> Maybe Text)
-> (CreateCase -> Maybe Text -> CreateCase)
-> Lens CreateCase CreateCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Maybe Text
issueType :: Maybe Text
$sel:issueType:CreateCase' :: CreateCase -> Maybe Text
issueType} -> Maybe Text
issueType) (\s :: CreateCase
s@CreateCase' {} Maybe Text
a -> CreateCase
s {$sel:issueType:CreateCase' :: Maybe Text
issueType = Maybe Text
a} :: CreateCase)
createCase_ccEmailAddresses :: Lens.Lens' CreateCase (Prelude.Maybe [Prelude.Text])
createCase_ccEmailAddresses :: (Maybe [Text] -> f (Maybe [Text])) -> CreateCase -> f CreateCase
createCase_ccEmailAddresses = (CreateCase -> Maybe [Text])
-> (CreateCase -> Maybe [Text] -> CreateCase)
-> Lens CreateCase CreateCase (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Maybe [Text]
ccEmailAddresses :: Maybe [Text]
$sel:ccEmailAddresses:CreateCase' :: CreateCase -> Maybe [Text]
ccEmailAddresses} -> Maybe [Text]
ccEmailAddresses) (\s :: CreateCase
s@CreateCase' {} Maybe [Text]
a -> CreateCase
s {$sel:ccEmailAddresses:CreateCase' :: Maybe [Text]
ccEmailAddresses = Maybe [Text]
a} :: CreateCase) ((Maybe [Text] -> f (Maybe [Text])) -> CreateCase -> f CreateCase)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCase
-> f CreateCase
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
createCase_language :: Lens.Lens' CreateCase (Prelude.Maybe Prelude.Text)
createCase_language :: (Maybe Text -> f (Maybe Text)) -> CreateCase -> f CreateCase
createCase_language = (CreateCase -> Maybe Text)
-> (CreateCase -> Maybe Text -> CreateCase)
-> Lens CreateCase CreateCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Maybe Text
language :: Maybe Text
$sel:language:CreateCase' :: CreateCase -> Maybe Text
language} -> Maybe Text
language) (\s :: CreateCase
s@CreateCase' {} Maybe Text
a -> CreateCase
s {$sel:language:CreateCase' :: Maybe Text
language = Maybe Text
a} :: CreateCase)
createCase_categoryCode :: Lens.Lens' CreateCase (Prelude.Maybe Prelude.Text)
createCase_categoryCode :: (Maybe Text -> f (Maybe Text)) -> CreateCase -> f CreateCase
createCase_categoryCode = (CreateCase -> Maybe Text)
-> (CreateCase -> Maybe Text -> CreateCase)
-> Lens CreateCase CreateCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Maybe Text
categoryCode :: Maybe Text
$sel:categoryCode:CreateCase' :: CreateCase -> Maybe Text
categoryCode} -> Maybe Text
categoryCode) (\s :: CreateCase
s@CreateCase' {} Maybe Text
a -> CreateCase
s {$sel:categoryCode:CreateCase' :: Maybe Text
categoryCode = Maybe Text
a} :: CreateCase)
createCase_serviceCode :: Lens.Lens' CreateCase (Prelude.Maybe Prelude.Text)
createCase_serviceCode :: (Maybe Text -> f (Maybe Text)) -> CreateCase -> f CreateCase
createCase_serviceCode = (CreateCase -> Maybe Text)
-> (CreateCase -> Maybe Text -> CreateCase)
-> Lens CreateCase CreateCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Maybe Text
serviceCode :: Maybe Text
$sel:serviceCode:CreateCase' :: CreateCase -> Maybe Text
serviceCode} -> Maybe Text
serviceCode) (\s :: CreateCase
s@CreateCase' {} Maybe Text
a -> CreateCase
s {$sel:serviceCode:CreateCase' :: Maybe Text
serviceCode = Maybe Text
a} :: CreateCase)
createCase_attachmentSetId :: Lens.Lens' CreateCase (Prelude.Maybe Prelude.Text)
createCase_attachmentSetId :: (Maybe Text -> f (Maybe Text)) -> CreateCase -> f CreateCase
createCase_attachmentSetId = (CreateCase -> Maybe Text)
-> (CreateCase -> Maybe Text -> CreateCase)
-> Lens CreateCase CreateCase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Maybe Text
attachmentSetId :: Maybe Text
$sel:attachmentSetId:CreateCase' :: CreateCase -> Maybe Text
attachmentSetId} -> Maybe Text
attachmentSetId) (\s :: CreateCase
s@CreateCase' {} Maybe Text
a -> CreateCase
s {$sel:attachmentSetId:CreateCase' :: Maybe Text
attachmentSetId = Maybe Text
a} :: CreateCase)
createCase_subject :: Lens.Lens' CreateCase Prelude.Text
createCase_subject :: (Text -> f Text) -> CreateCase -> f CreateCase
createCase_subject = (CreateCase -> Text)
-> (CreateCase -> Text -> CreateCase)
-> Lens CreateCase CreateCase Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Text
subject :: Text
$sel:subject:CreateCase' :: CreateCase -> Text
subject} -> Text
subject) (\s :: CreateCase
s@CreateCase' {} Text
a -> CreateCase
s {$sel:subject:CreateCase' :: Text
subject = Text
a} :: CreateCase)
createCase_communicationBody :: Lens.Lens' CreateCase Prelude.Text
createCase_communicationBody :: (Text -> f Text) -> CreateCase -> f CreateCase
createCase_communicationBody = (CreateCase -> Text)
-> (CreateCase -> Text -> CreateCase)
-> Lens CreateCase CreateCase Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCase' {Text
communicationBody :: Text
$sel:communicationBody:CreateCase' :: CreateCase -> Text
communicationBody} -> Text
communicationBody) (\s :: CreateCase
s@CreateCase' {} Text
a -> CreateCase
s {$sel:communicationBody:CreateCase' :: Text
communicationBody = Text
a} :: CreateCase)
instance Core.AWSRequest CreateCase where
type AWSResponse CreateCase = CreateCaseResponse
request :: CreateCase -> Request CreateCase
request = Service -> CreateCase -> Request CreateCase
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateCase
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCase)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateCase))
-> Logger
-> Service
-> Proxy CreateCase
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCase)))
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 -> Int -> CreateCaseResponse
CreateCaseResponse'
(Maybe Text -> Int -> CreateCaseResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateCaseResponse)
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
"caseId")
Either String (Int -> CreateCaseResponse)
-> Either String Int -> Either String CreateCaseResponse
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 CreateCase
instance Prelude.NFData CreateCase
instance Core.ToHeaders CreateCase where
toHeaders :: CreateCase -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateCase -> 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
"AWSSupport_20130415.CreateCase" ::
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 CreateCase where
toJSON :: CreateCase -> Value
toJSON CreateCase' {Maybe [Text]
Maybe Text
Text
communicationBody :: Text
subject :: Text
attachmentSetId :: Maybe Text
serviceCode :: Maybe Text
categoryCode :: Maybe Text
language :: Maybe Text
ccEmailAddresses :: Maybe [Text]
issueType :: Maybe Text
severityCode :: Maybe Text
$sel:communicationBody:CreateCase' :: CreateCase -> Text
$sel:subject:CreateCase' :: CreateCase -> Text
$sel:attachmentSetId:CreateCase' :: CreateCase -> Maybe Text
$sel:serviceCode:CreateCase' :: CreateCase -> Maybe Text
$sel:categoryCode:CreateCase' :: CreateCase -> Maybe Text
$sel:language:CreateCase' :: CreateCase -> Maybe Text
$sel:ccEmailAddresses:CreateCase' :: CreateCase -> Maybe [Text]
$sel:issueType:CreateCase' :: CreateCase -> Maybe Text
$sel:severityCode:CreateCase' :: CreateCase -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"severityCode" 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
severityCode,
(Text
"issueType" 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
issueType,
(Text
"ccEmailAddresses" 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]
ccEmailAddresses,
(Text
"language" 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
language,
(Text
"categoryCode" 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
categoryCode,
(Text
"serviceCode" 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
serviceCode,
(Text
"attachmentSetId" 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
attachmentSetId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"subject" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
subject),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"communicationBody" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
communicationBody)
]
)
instance Core.ToPath CreateCase where
toPath :: CreateCase -> ByteString
toPath = ByteString -> CreateCase -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateCase where
toQuery :: CreateCase -> QueryString
toQuery = QueryString -> CreateCase -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateCaseResponse = CreateCaseResponse'
{
CreateCaseResponse -> Maybe Text
caseId :: Prelude.Maybe Prelude.Text,
CreateCaseResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateCaseResponse -> CreateCaseResponse -> Bool
(CreateCaseResponse -> CreateCaseResponse -> Bool)
-> (CreateCaseResponse -> CreateCaseResponse -> Bool)
-> Eq CreateCaseResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCaseResponse -> CreateCaseResponse -> Bool
$c/= :: CreateCaseResponse -> CreateCaseResponse -> Bool
== :: CreateCaseResponse -> CreateCaseResponse -> Bool
$c== :: CreateCaseResponse -> CreateCaseResponse -> Bool
Prelude.Eq, ReadPrec [CreateCaseResponse]
ReadPrec CreateCaseResponse
Int -> ReadS CreateCaseResponse
ReadS [CreateCaseResponse]
(Int -> ReadS CreateCaseResponse)
-> ReadS [CreateCaseResponse]
-> ReadPrec CreateCaseResponse
-> ReadPrec [CreateCaseResponse]
-> Read CreateCaseResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCaseResponse]
$creadListPrec :: ReadPrec [CreateCaseResponse]
readPrec :: ReadPrec CreateCaseResponse
$creadPrec :: ReadPrec CreateCaseResponse
readList :: ReadS [CreateCaseResponse]
$creadList :: ReadS [CreateCaseResponse]
readsPrec :: Int -> ReadS CreateCaseResponse
$creadsPrec :: Int -> ReadS CreateCaseResponse
Prelude.Read, Int -> CreateCaseResponse -> ShowS
[CreateCaseResponse] -> ShowS
CreateCaseResponse -> String
(Int -> CreateCaseResponse -> ShowS)
-> (CreateCaseResponse -> String)
-> ([CreateCaseResponse] -> ShowS)
-> Show CreateCaseResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCaseResponse] -> ShowS
$cshowList :: [CreateCaseResponse] -> ShowS
show :: CreateCaseResponse -> String
$cshow :: CreateCaseResponse -> String
showsPrec :: Int -> CreateCaseResponse -> ShowS
$cshowsPrec :: Int -> CreateCaseResponse -> ShowS
Prelude.Show, (forall x. CreateCaseResponse -> Rep CreateCaseResponse x)
-> (forall x. Rep CreateCaseResponse x -> CreateCaseResponse)
-> Generic CreateCaseResponse
forall x. Rep CreateCaseResponse x -> CreateCaseResponse
forall x. CreateCaseResponse -> Rep CreateCaseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCaseResponse x -> CreateCaseResponse
$cfrom :: forall x. CreateCaseResponse -> Rep CreateCaseResponse x
Prelude.Generic)
newCreateCaseResponse ::
Prelude.Int ->
CreateCaseResponse
newCreateCaseResponse :: Int -> CreateCaseResponse
newCreateCaseResponse Int
pHttpStatus_ =
CreateCaseResponse' :: Maybe Text -> Int -> CreateCaseResponse
CreateCaseResponse'
{ $sel:caseId:CreateCaseResponse' :: Maybe Text
caseId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateCaseResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createCaseResponse_caseId :: Lens.Lens' CreateCaseResponse (Prelude.Maybe Prelude.Text)
createCaseResponse_caseId :: (Maybe Text -> f (Maybe Text))
-> CreateCaseResponse -> f CreateCaseResponse
createCaseResponse_caseId = (CreateCaseResponse -> Maybe Text)
-> (CreateCaseResponse -> Maybe Text -> CreateCaseResponse)
-> Lens
CreateCaseResponse CreateCaseResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCaseResponse' {Maybe Text
caseId :: Maybe Text
$sel:caseId:CreateCaseResponse' :: CreateCaseResponse -> Maybe Text
caseId} -> Maybe Text
caseId) (\s :: CreateCaseResponse
s@CreateCaseResponse' {} Maybe Text
a -> CreateCaseResponse
s {$sel:caseId:CreateCaseResponse' :: Maybe Text
caseId = Maybe Text
a} :: CreateCaseResponse)
createCaseResponse_httpStatus :: Lens.Lens' CreateCaseResponse Prelude.Int
createCaseResponse_httpStatus :: (Int -> f Int) -> CreateCaseResponse -> f CreateCaseResponse
createCaseResponse_httpStatus = (CreateCaseResponse -> Int)
-> (CreateCaseResponse -> Int -> CreateCaseResponse)
-> Lens CreateCaseResponse CreateCaseResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCaseResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateCaseResponse' :: CreateCaseResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateCaseResponse
s@CreateCaseResponse' {} Int
a -> CreateCaseResponse
s {$sel:httpStatus:CreateCaseResponse' :: Int
httpStatus = Int
a} :: CreateCaseResponse)
instance Prelude.NFData CreateCaseResponse