{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Connect.CreateUseCase
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a use case for an integration association.
module Amazonka.Connect.CreateUseCase
  ( -- * Creating a Request
    CreateUseCase (..),
    newCreateUseCase,

    -- * Request Lenses
    createUseCase_tags,
    createUseCase_instanceId,
    createUseCase_integrationAssociationId,
    createUseCase_useCaseType,

    -- * Destructuring the Response
    CreateUseCaseResponse (..),
    newCreateUseCaseResponse,

    -- * Response Lenses
    createUseCaseResponse_useCaseArn,
    createUseCaseResponse_useCaseId,
    createUseCaseResponse_httpStatus,
  )
where

import Amazonka.Connect.Types
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

-- | /See:/ 'newCreateUseCase' smart constructor.
data CreateUseCase = CreateUseCase'
  { -- | One or more tags.
    CreateUseCase -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    CreateUseCase -> Text
instanceId :: Prelude.Text,
    -- | The identifier for the integration association.
    CreateUseCase -> Text
integrationAssociationId :: Prelude.Text,
    -- | The type of use case to associate to the integration association. Each
    -- integration association can have only one of each use case type.
    CreateUseCase -> UseCaseType
useCaseType :: UseCaseType
  }
  deriving (CreateUseCase -> CreateUseCase -> Bool
(CreateUseCase -> CreateUseCase -> Bool)
-> (CreateUseCase -> CreateUseCase -> Bool) -> Eq CreateUseCase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUseCase -> CreateUseCase -> Bool
$c/= :: CreateUseCase -> CreateUseCase -> Bool
== :: CreateUseCase -> CreateUseCase -> Bool
$c== :: CreateUseCase -> CreateUseCase -> Bool
Prelude.Eq, ReadPrec [CreateUseCase]
ReadPrec CreateUseCase
Int -> ReadS CreateUseCase
ReadS [CreateUseCase]
(Int -> ReadS CreateUseCase)
-> ReadS [CreateUseCase]
-> ReadPrec CreateUseCase
-> ReadPrec [CreateUseCase]
-> Read CreateUseCase
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUseCase]
$creadListPrec :: ReadPrec [CreateUseCase]
readPrec :: ReadPrec CreateUseCase
$creadPrec :: ReadPrec CreateUseCase
readList :: ReadS [CreateUseCase]
$creadList :: ReadS [CreateUseCase]
readsPrec :: Int -> ReadS CreateUseCase
$creadsPrec :: Int -> ReadS CreateUseCase
Prelude.Read, Int -> CreateUseCase -> ShowS
[CreateUseCase] -> ShowS
CreateUseCase -> String
(Int -> CreateUseCase -> ShowS)
-> (CreateUseCase -> String)
-> ([CreateUseCase] -> ShowS)
-> Show CreateUseCase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUseCase] -> ShowS
$cshowList :: [CreateUseCase] -> ShowS
show :: CreateUseCase -> String
$cshow :: CreateUseCase -> String
showsPrec :: Int -> CreateUseCase -> ShowS
$cshowsPrec :: Int -> CreateUseCase -> ShowS
Prelude.Show, (forall x. CreateUseCase -> Rep CreateUseCase x)
-> (forall x. Rep CreateUseCase x -> CreateUseCase)
-> Generic CreateUseCase
forall x. Rep CreateUseCase x -> CreateUseCase
forall x. CreateUseCase -> Rep CreateUseCase x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateUseCase x -> CreateUseCase
$cfrom :: forall x. CreateUseCase -> Rep CreateUseCase x
Prelude.Generic)

-- |
-- Create a value of 'CreateUseCase' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'tags', 'createUseCase_tags' - One or more tags.
--
-- 'instanceId', 'createUseCase_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'integrationAssociationId', 'createUseCase_integrationAssociationId' - The identifier for the integration association.
--
-- 'useCaseType', 'createUseCase_useCaseType' - The type of use case to associate to the integration association. Each
-- integration association can have only one of each use case type.
newCreateUseCase ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'integrationAssociationId'
  Prelude.Text ->
  -- | 'useCaseType'
  UseCaseType ->
  CreateUseCase
newCreateUseCase :: Text -> Text -> UseCaseType -> CreateUseCase
newCreateUseCase
  Text
pInstanceId_
  Text
pIntegrationAssociationId_
  UseCaseType
pUseCaseType_ =
    CreateUseCase' :: Maybe (HashMap Text Text)
-> Text -> Text -> UseCaseType -> CreateUseCase
CreateUseCase'
      { $sel:tags:CreateUseCase' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceId:CreateUseCase' :: Text
instanceId = Text
pInstanceId_,
        $sel:integrationAssociationId:CreateUseCase' :: Text
integrationAssociationId =
          Text
pIntegrationAssociationId_,
        $sel:useCaseType:CreateUseCase' :: UseCaseType
useCaseType = UseCaseType
pUseCaseType_
      }

-- | One or more tags.
createUseCase_tags :: Lens.Lens' CreateUseCase (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createUseCase_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateUseCase -> f CreateUseCase
createUseCase_tags = (CreateUseCase -> Maybe (HashMap Text Text))
-> (CreateUseCase -> Maybe (HashMap Text Text) -> CreateUseCase)
-> Lens
     CreateUseCase
     CreateUseCase
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUseCase' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateUseCase' :: CreateUseCase -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateUseCase
s@CreateUseCase' {} Maybe (HashMap Text Text)
a -> CreateUseCase
s {$sel:tags:CreateUseCase' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateUseCase) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateUseCase -> f CreateUseCase)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateUseCase
-> f CreateUseCase
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
createUseCase_instanceId :: Lens.Lens' CreateUseCase Prelude.Text
createUseCase_instanceId :: (Text -> f Text) -> CreateUseCase -> f CreateUseCase
createUseCase_instanceId = (CreateUseCase -> Text)
-> (CreateUseCase -> Text -> CreateUseCase)
-> Lens CreateUseCase CreateUseCase Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUseCase' {Text
instanceId :: Text
$sel:instanceId:CreateUseCase' :: CreateUseCase -> Text
instanceId} -> Text
instanceId) (\s :: CreateUseCase
s@CreateUseCase' {} Text
a -> CreateUseCase
s {$sel:instanceId:CreateUseCase' :: Text
instanceId = Text
a} :: CreateUseCase)

-- | The identifier for the integration association.
createUseCase_integrationAssociationId :: Lens.Lens' CreateUseCase Prelude.Text
createUseCase_integrationAssociationId :: (Text -> f Text) -> CreateUseCase -> f CreateUseCase
createUseCase_integrationAssociationId = (CreateUseCase -> Text)
-> (CreateUseCase -> Text -> CreateUseCase)
-> Lens CreateUseCase CreateUseCase Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUseCase' {Text
integrationAssociationId :: Text
$sel:integrationAssociationId:CreateUseCase' :: CreateUseCase -> Text
integrationAssociationId} -> Text
integrationAssociationId) (\s :: CreateUseCase
s@CreateUseCase' {} Text
a -> CreateUseCase
s {$sel:integrationAssociationId:CreateUseCase' :: Text
integrationAssociationId = Text
a} :: CreateUseCase)

-- | The type of use case to associate to the integration association. Each
-- integration association can have only one of each use case type.
createUseCase_useCaseType :: Lens.Lens' CreateUseCase UseCaseType
createUseCase_useCaseType :: (UseCaseType -> f UseCaseType) -> CreateUseCase -> f CreateUseCase
createUseCase_useCaseType = (CreateUseCase -> UseCaseType)
-> (CreateUseCase -> UseCaseType -> CreateUseCase)
-> Lens CreateUseCase CreateUseCase UseCaseType UseCaseType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUseCase' {UseCaseType
useCaseType :: UseCaseType
$sel:useCaseType:CreateUseCase' :: CreateUseCase -> UseCaseType
useCaseType} -> UseCaseType
useCaseType) (\s :: CreateUseCase
s@CreateUseCase' {} UseCaseType
a -> CreateUseCase
s {$sel:useCaseType:CreateUseCase' :: UseCaseType
useCaseType = UseCaseType
a} :: CreateUseCase)

instance Core.AWSRequest CreateUseCase where
  type
    AWSResponse CreateUseCase =
      CreateUseCaseResponse
  request :: CreateUseCase -> Request CreateUseCase
request = Service -> CreateUseCase -> Request CreateUseCase
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateUseCase
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateUseCase)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateUseCase))
-> Logger
-> Service
-> Proxy CreateUseCase
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateUseCase)))
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 -> CreateUseCaseResponse
CreateUseCaseResponse'
            (Maybe Text -> Maybe Text -> Int -> CreateUseCaseResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateUseCaseResponse)
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
"UseCaseArn")
            Either String (Maybe Text -> Int -> CreateUseCaseResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateUseCaseResponse)
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
"UseCaseId")
            Either String (Int -> CreateUseCaseResponse)
-> Either String Int -> Either String CreateUseCaseResponse
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 CreateUseCase

instance Prelude.NFData CreateUseCase

instance Core.ToHeaders CreateUseCase where
  toHeaders :: CreateUseCase -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateUseCase -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 CreateUseCase where
  toJSON :: CreateUseCase -> Value
toJSON CreateUseCase' {Maybe (HashMap Text Text)
Text
UseCaseType
useCaseType :: UseCaseType
integrationAssociationId :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
$sel:useCaseType:CreateUseCase' :: CreateUseCase -> UseCaseType
$sel:integrationAssociationId:CreateUseCase' :: CreateUseCase -> Text
$sel:instanceId:CreateUseCase' :: CreateUseCase -> Text
$sel:tags:CreateUseCase' :: CreateUseCase -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UseCaseType" Text -> UseCaseType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UseCaseType
useCaseType)
          ]
      )

instance Core.ToPath CreateUseCase where
  toPath :: CreateUseCase -> ByteString
toPath CreateUseCase' {Maybe (HashMap Text Text)
Text
UseCaseType
useCaseType :: UseCaseType
integrationAssociationId :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
$sel:useCaseType:CreateUseCase' :: CreateUseCase -> UseCaseType
$sel:integrationAssociationId:CreateUseCase' :: CreateUseCase -> Text
$sel:instanceId:CreateUseCase' :: CreateUseCase -> Text
$sel:tags:CreateUseCase' :: CreateUseCase -> Maybe (HashMap Text Text)
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/instance/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
        ByteString
"/integration-associations/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
integrationAssociationId,
        ByteString
"/use-cases"
      ]

instance Core.ToQuery CreateUseCase where
  toQuery :: CreateUseCase -> QueryString
toQuery = QueryString -> CreateUseCase -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateUseCaseResponse' smart constructor.
data CreateUseCaseResponse = CreateUseCaseResponse'
  { -- | The Amazon Resource Name (ARN) for the use case.
    CreateUseCaseResponse -> Maybe Text
useCaseArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the use case.
    CreateUseCaseResponse -> Maybe Text
useCaseId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateUseCaseResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateUseCaseResponse -> CreateUseCaseResponse -> Bool
(CreateUseCaseResponse -> CreateUseCaseResponse -> Bool)
-> (CreateUseCaseResponse -> CreateUseCaseResponse -> Bool)
-> Eq CreateUseCaseResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUseCaseResponse -> CreateUseCaseResponse -> Bool
$c/= :: CreateUseCaseResponse -> CreateUseCaseResponse -> Bool
== :: CreateUseCaseResponse -> CreateUseCaseResponse -> Bool
$c== :: CreateUseCaseResponse -> CreateUseCaseResponse -> Bool
Prelude.Eq, ReadPrec [CreateUseCaseResponse]
ReadPrec CreateUseCaseResponse
Int -> ReadS CreateUseCaseResponse
ReadS [CreateUseCaseResponse]
(Int -> ReadS CreateUseCaseResponse)
-> ReadS [CreateUseCaseResponse]
-> ReadPrec CreateUseCaseResponse
-> ReadPrec [CreateUseCaseResponse]
-> Read CreateUseCaseResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUseCaseResponse]
$creadListPrec :: ReadPrec [CreateUseCaseResponse]
readPrec :: ReadPrec CreateUseCaseResponse
$creadPrec :: ReadPrec CreateUseCaseResponse
readList :: ReadS [CreateUseCaseResponse]
$creadList :: ReadS [CreateUseCaseResponse]
readsPrec :: Int -> ReadS CreateUseCaseResponse
$creadsPrec :: Int -> ReadS CreateUseCaseResponse
Prelude.Read, Int -> CreateUseCaseResponse -> ShowS
[CreateUseCaseResponse] -> ShowS
CreateUseCaseResponse -> String
(Int -> CreateUseCaseResponse -> ShowS)
-> (CreateUseCaseResponse -> String)
-> ([CreateUseCaseResponse] -> ShowS)
-> Show CreateUseCaseResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUseCaseResponse] -> ShowS
$cshowList :: [CreateUseCaseResponse] -> ShowS
show :: CreateUseCaseResponse -> String
$cshow :: CreateUseCaseResponse -> String
showsPrec :: Int -> CreateUseCaseResponse -> ShowS
$cshowsPrec :: Int -> CreateUseCaseResponse -> ShowS
Prelude.Show, (forall x. CreateUseCaseResponse -> Rep CreateUseCaseResponse x)
-> (forall x. Rep CreateUseCaseResponse x -> CreateUseCaseResponse)
-> Generic CreateUseCaseResponse
forall x. Rep CreateUseCaseResponse x -> CreateUseCaseResponse
forall x. CreateUseCaseResponse -> Rep CreateUseCaseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateUseCaseResponse x -> CreateUseCaseResponse
$cfrom :: forall x. CreateUseCaseResponse -> Rep CreateUseCaseResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateUseCaseResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'useCaseArn', 'createUseCaseResponse_useCaseArn' - The Amazon Resource Name (ARN) for the use case.
--
-- 'useCaseId', 'createUseCaseResponse_useCaseId' - The identifier of the use case.
--
-- 'httpStatus', 'createUseCaseResponse_httpStatus' - The response's http status code.
newCreateUseCaseResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateUseCaseResponse
newCreateUseCaseResponse :: Int -> CreateUseCaseResponse
newCreateUseCaseResponse Int
pHttpStatus_ =
  CreateUseCaseResponse' :: Maybe Text -> Maybe Text -> Int -> CreateUseCaseResponse
CreateUseCaseResponse'
    { $sel:useCaseArn:CreateUseCaseResponse' :: Maybe Text
useCaseArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:useCaseId:CreateUseCaseResponse' :: Maybe Text
useCaseId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateUseCaseResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) for the use case.
createUseCaseResponse_useCaseArn :: Lens.Lens' CreateUseCaseResponse (Prelude.Maybe Prelude.Text)
createUseCaseResponse_useCaseArn :: (Maybe Text -> f (Maybe Text))
-> CreateUseCaseResponse -> f CreateUseCaseResponse
createUseCaseResponse_useCaseArn = (CreateUseCaseResponse -> Maybe Text)
-> (CreateUseCaseResponse -> Maybe Text -> CreateUseCaseResponse)
-> Lens
     CreateUseCaseResponse
     CreateUseCaseResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUseCaseResponse' {Maybe Text
useCaseArn :: Maybe Text
$sel:useCaseArn:CreateUseCaseResponse' :: CreateUseCaseResponse -> Maybe Text
useCaseArn} -> Maybe Text
useCaseArn) (\s :: CreateUseCaseResponse
s@CreateUseCaseResponse' {} Maybe Text
a -> CreateUseCaseResponse
s {$sel:useCaseArn:CreateUseCaseResponse' :: Maybe Text
useCaseArn = Maybe Text
a} :: CreateUseCaseResponse)

-- | The identifier of the use case.
createUseCaseResponse_useCaseId :: Lens.Lens' CreateUseCaseResponse (Prelude.Maybe Prelude.Text)
createUseCaseResponse_useCaseId :: (Maybe Text -> f (Maybe Text))
-> CreateUseCaseResponse -> f CreateUseCaseResponse
createUseCaseResponse_useCaseId = (CreateUseCaseResponse -> Maybe Text)
-> (CreateUseCaseResponse -> Maybe Text -> CreateUseCaseResponse)
-> Lens
     CreateUseCaseResponse
     CreateUseCaseResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUseCaseResponse' {Maybe Text
useCaseId :: Maybe Text
$sel:useCaseId:CreateUseCaseResponse' :: CreateUseCaseResponse -> Maybe Text
useCaseId} -> Maybe Text
useCaseId) (\s :: CreateUseCaseResponse
s@CreateUseCaseResponse' {} Maybe Text
a -> CreateUseCaseResponse
s {$sel:useCaseId:CreateUseCaseResponse' :: Maybe Text
useCaseId = Maybe Text
a} :: CreateUseCaseResponse)

-- | The response's http status code.
createUseCaseResponse_httpStatus :: Lens.Lens' CreateUseCaseResponse Prelude.Int
createUseCaseResponse_httpStatus :: (Int -> f Int) -> CreateUseCaseResponse -> f CreateUseCaseResponse
createUseCaseResponse_httpStatus = (CreateUseCaseResponse -> Int)
-> (CreateUseCaseResponse -> Int -> CreateUseCaseResponse)
-> Lens CreateUseCaseResponse CreateUseCaseResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUseCaseResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateUseCaseResponse' :: CreateUseCaseResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateUseCaseResponse
s@CreateUseCaseResponse' {} Int
a -> CreateUseCaseResponse
s {$sel:httpStatus:CreateUseCaseResponse' :: Int
httpStatus = Int
a} :: CreateUseCaseResponse)

instance Prelude.NFData CreateUseCaseResponse