{-# 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.ResilienceHub.CreateApp
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a Resilience Hub application. A Resilience Hub application is a
-- collection of Amazon Web Services resources structured to prevent and
-- recover Amazon Web Services application disruptions. To describe a
-- Resilience Hub application, you provide an application name, resources
-- from one or more–up to five–CloudFormation stacks, and an appropriate
-- resiliency policy.
--
-- After you create a Resilience Hub application, you publish it so that
-- you can run a resiliency assessment on it. You can then use
-- recommendations from the assessment to improve resiliency by running
-- another assessment, comparing results, and then iterating the process
-- until you achieve your goals for recovery time objective (RTO) and
-- recovery point objective (RPO).
module Amazonka.ResilienceHub.CreateApp
  ( -- * Creating a Request
    CreateApp (..),
    newCreateApp,

    -- * Request Lenses
    createApp_assessmentSchedule,
    createApp_clientToken,
    createApp_description,
    createApp_policyArn,
    createApp_tags,
    createApp_name,

    -- * Destructuring the Response
    CreateAppResponse (..),
    newCreateAppResponse,

    -- * Response Lenses
    createAppResponse_httpStatus,
    createAppResponse_app,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import Amazonka.ResilienceHub.Types
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateApp' smart constructor.
data CreateApp = CreateApp'
  { -- | Assessment execution schedule with \'Daily\' or \'Disabled\' values.
    CreateApp -> Maybe AppAssessmentScheduleType
assessmentSchedule :: Prelude.Maybe AppAssessmentScheduleType,
    -- | Used for an idempotency token. A client token is a unique,
    -- case-sensitive string of up to 64 ASCII characters. You should not reuse
    -- the same client token for other API requests.
    CreateApp -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The optional description for an app.
    CreateApp -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the resiliency policy. The format for
    -- this ARN is:
    -- arn:@partition@:resiliencehub:@region@:@account@:resiliency-policy\/@policy-id@.
    -- For more information about ARNs, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /AWS General Reference/.
    CreateApp -> Maybe Text
policyArn :: Prelude.Maybe Prelude.Text,
    -- | The tags assigned to the resource. A tag is a label that you assign to
    -- an Amazon Web Services resource. Each tag consists of a key\/value pair.
    CreateApp -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The name for the application.
    CreateApp -> Text
name :: Prelude.Text
  }
  deriving (CreateApp -> CreateApp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateApp -> CreateApp -> Bool
$c/= :: CreateApp -> CreateApp -> Bool
== :: CreateApp -> CreateApp -> Bool
$c== :: CreateApp -> CreateApp -> Bool
Prelude.Eq, Int -> CreateApp -> ShowS
[CreateApp] -> ShowS
CreateApp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateApp] -> ShowS
$cshowList :: [CreateApp] -> ShowS
show :: CreateApp -> String
$cshow :: CreateApp -> String
showsPrec :: Int -> CreateApp -> ShowS
$cshowsPrec :: Int -> CreateApp -> ShowS
Prelude.Show, forall x. Rep CreateApp x -> CreateApp
forall x. CreateApp -> Rep CreateApp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateApp x -> CreateApp
$cfrom :: forall x. CreateApp -> Rep CreateApp x
Prelude.Generic)

-- |
-- Create a value of 'CreateApp' 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:
--
-- 'assessmentSchedule', 'createApp_assessmentSchedule' - Assessment execution schedule with \'Daily\' or \'Disabled\' values.
--
-- 'clientToken', 'createApp_clientToken' - Used for an idempotency token. A client token is a unique,
-- case-sensitive string of up to 64 ASCII characters. You should not reuse
-- the same client token for other API requests.
--
-- 'description', 'createApp_description' - The optional description for an app.
--
-- 'policyArn', 'createApp_policyArn' - The Amazon Resource Name (ARN) of the resiliency policy. The format for
-- this ARN is:
-- arn:@partition@:resiliencehub:@region@:@account@:resiliency-policy\/@policy-id@.
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
--
-- 'tags', 'createApp_tags' - The tags assigned to the resource. A tag is a label that you assign to
-- an Amazon Web Services resource. Each tag consists of a key\/value pair.
--
-- 'name', 'createApp_name' - The name for the application.
newCreateApp ::
  -- | 'name'
  Prelude.Text ->
  CreateApp
newCreateApp :: Text -> CreateApp
newCreateApp Text
pName_ =
  CreateApp'
    { $sel:assessmentSchedule:CreateApp' :: Maybe AppAssessmentScheduleType
assessmentSchedule = forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreateApp' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateApp' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:policyArn:CreateApp' :: Maybe Text
policyArn = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateApp' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateApp' :: Text
name = Text
pName_
    }

-- | Assessment execution schedule with \'Daily\' or \'Disabled\' values.
createApp_assessmentSchedule :: Lens.Lens' CreateApp (Prelude.Maybe AppAssessmentScheduleType)
createApp_assessmentSchedule :: Lens' CreateApp (Maybe AppAssessmentScheduleType)
createApp_assessmentSchedule = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApp' {Maybe AppAssessmentScheduleType
assessmentSchedule :: Maybe AppAssessmentScheduleType
$sel:assessmentSchedule:CreateApp' :: CreateApp -> Maybe AppAssessmentScheduleType
assessmentSchedule} -> Maybe AppAssessmentScheduleType
assessmentSchedule) (\s :: CreateApp
s@CreateApp' {} Maybe AppAssessmentScheduleType
a -> CreateApp
s {$sel:assessmentSchedule:CreateApp' :: Maybe AppAssessmentScheduleType
assessmentSchedule = Maybe AppAssessmentScheduleType
a} :: CreateApp)

-- | Used for an idempotency token. A client token is a unique,
-- case-sensitive string of up to 64 ASCII characters. You should not reuse
-- the same client token for other API requests.
createApp_clientToken :: Lens.Lens' CreateApp (Prelude.Maybe Prelude.Text)
createApp_clientToken :: Lens' CreateApp (Maybe Text)
createApp_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApp' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateApp' :: CreateApp -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateApp
s@CreateApp' {} Maybe Text
a -> CreateApp
s {$sel:clientToken:CreateApp' :: Maybe Text
clientToken = Maybe Text
a} :: CreateApp)

-- | The optional description for an app.
createApp_description :: Lens.Lens' CreateApp (Prelude.Maybe Prelude.Text)
createApp_description :: Lens' CreateApp (Maybe Text)
createApp_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApp' {Maybe Text
description :: Maybe Text
$sel:description:CreateApp' :: CreateApp -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateApp
s@CreateApp' {} Maybe Text
a -> CreateApp
s {$sel:description:CreateApp' :: Maybe Text
description = Maybe Text
a} :: CreateApp)

-- | The Amazon Resource Name (ARN) of the resiliency policy. The format for
-- this ARN is:
-- arn:@partition@:resiliencehub:@region@:@account@:resiliency-policy\/@policy-id@.
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
createApp_policyArn :: Lens.Lens' CreateApp (Prelude.Maybe Prelude.Text)
createApp_policyArn :: Lens' CreateApp (Maybe Text)
createApp_policyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApp' {Maybe Text
policyArn :: Maybe Text
$sel:policyArn:CreateApp' :: CreateApp -> Maybe Text
policyArn} -> Maybe Text
policyArn) (\s :: CreateApp
s@CreateApp' {} Maybe Text
a -> CreateApp
s {$sel:policyArn:CreateApp' :: Maybe Text
policyArn = Maybe Text
a} :: CreateApp)

-- | The tags assigned to the resource. A tag is a label that you assign to
-- an Amazon Web Services resource. Each tag consists of a key\/value pair.
createApp_tags :: Lens.Lens' CreateApp (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createApp_tags :: Lens' CreateApp (Maybe (HashMap Text Text))
createApp_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApp' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:CreateApp' :: CreateApp -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: CreateApp
s@CreateApp' {} Maybe (Sensitive (HashMap Text Text))
a -> CreateApp
s {$sel:tags:CreateApp' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: CreateApp) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | The name for the application.
createApp_name :: Lens.Lens' CreateApp Prelude.Text
createApp_name :: Lens' CreateApp Text
createApp_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApp' {Text
name :: Text
$sel:name:CreateApp' :: CreateApp -> Text
name} -> Text
name) (\s :: CreateApp
s@CreateApp' {} Text
a -> CreateApp
s {$sel:name:CreateApp' :: Text
name = Text
a} :: CreateApp)

instance Core.AWSRequest CreateApp where
  type AWSResponse CreateApp = CreateAppResponse
  request :: (Service -> Service) -> CreateApp -> Request CreateApp
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateApp
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateApp)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int -> App -> CreateAppResponse
CreateAppResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"app")
      )

instance Prelude.Hashable CreateApp where
  hashWithSalt :: Int -> CreateApp -> Int
hashWithSalt Int
_salt CreateApp' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe AppAssessmentScheduleType
Text
name :: Text
tags :: Maybe (Sensitive (HashMap Text Text))
policyArn :: Maybe Text
description :: Maybe Text
clientToken :: Maybe Text
assessmentSchedule :: Maybe AppAssessmentScheduleType
$sel:name:CreateApp' :: CreateApp -> Text
$sel:tags:CreateApp' :: CreateApp -> Maybe (Sensitive (HashMap Text Text))
$sel:policyArn:CreateApp' :: CreateApp -> Maybe Text
$sel:description:CreateApp' :: CreateApp -> Maybe Text
$sel:clientToken:CreateApp' :: CreateApp -> Maybe Text
$sel:assessmentSchedule:CreateApp' :: CreateApp -> Maybe AppAssessmentScheduleType
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppAssessmentScheduleType
assessmentSchedule
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
policyArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData CreateApp where
  rnf :: CreateApp -> ()
rnf CreateApp' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe AppAssessmentScheduleType
Text
name :: Text
tags :: Maybe (Sensitive (HashMap Text Text))
policyArn :: Maybe Text
description :: Maybe Text
clientToken :: Maybe Text
assessmentSchedule :: Maybe AppAssessmentScheduleType
$sel:name:CreateApp' :: CreateApp -> Text
$sel:tags:CreateApp' :: CreateApp -> Maybe (Sensitive (HashMap Text Text))
$sel:policyArn:CreateApp' :: CreateApp -> Maybe Text
$sel:description:CreateApp' :: CreateApp -> Maybe Text
$sel:clientToken:CreateApp' :: CreateApp -> Maybe Text
$sel:assessmentSchedule:CreateApp' :: CreateApp -> Maybe AppAssessmentScheduleType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AppAssessmentScheduleType
assessmentSchedule
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
policyArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders CreateApp where
  toHeaders :: CreateApp -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateApp where
  toJSON :: CreateApp -> Value
toJSON CreateApp' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe AppAssessmentScheduleType
Text
name :: Text
tags :: Maybe (Sensitive (HashMap Text Text))
policyArn :: Maybe Text
description :: Maybe Text
clientToken :: Maybe Text
assessmentSchedule :: Maybe AppAssessmentScheduleType
$sel:name:CreateApp' :: CreateApp -> Text
$sel:tags:CreateApp' :: CreateApp -> Maybe (Sensitive (HashMap Text Text))
$sel:policyArn:CreateApp' :: CreateApp -> Maybe Text
$sel:description:CreateApp' :: CreateApp -> Maybe Text
$sel:clientToken:CreateApp' :: CreateApp -> Maybe Text
$sel:assessmentSchedule:CreateApp' :: CreateApp -> Maybe AppAssessmentScheduleType
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"assessmentSchedule" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AppAssessmentScheduleType
assessmentSchedule,
            (Key
"clientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"policyArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
policyArn,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text Text))
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

instance Data.ToPath CreateApp where
  toPath :: CreateApp -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/create-app"

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

-- | /See:/ 'newCreateAppResponse' smart constructor.
data CreateAppResponse = CreateAppResponse'
  { -- | The response's http status code.
    CreateAppResponse -> Int
httpStatus :: Prelude.Int,
    -- | The created application returned as an object with details including
    -- compliance status, creation time, description, resiliency score, and
    -- more.
    CreateAppResponse -> App
app :: App
  }
  deriving (CreateAppResponse -> CreateAppResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAppResponse -> CreateAppResponse -> Bool
$c/= :: CreateAppResponse -> CreateAppResponse -> Bool
== :: CreateAppResponse -> CreateAppResponse -> Bool
$c== :: CreateAppResponse -> CreateAppResponse -> Bool
Prelude.Eq, Int -> CreateAppResponse -> ShowS
[CreateAppResponse] -> ShowS
CreateAppResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAppResponse] -> ShowS
$cshowList :: [CreateAppResponse] -> ShowS
show :: CreateAppResponse -> String
$cshow :: CreateAppResponse -> String
showsPrec :: Int -> CreateAppResponse -> ShowS
$cshowsPrec :: Int -> CreateAppResponse -> ShowS
Prelude.Show, forall x. Rep CreateAppResponse x -> CreateAppResponse
forall x. CreateAppResponse -> Rep CreateAppResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAppResponse x -> CreateAppResponse
$cfrom :: forall x. CreateAppResponse -> Rep CreateAppResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAppResponse' 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:
--
-- 'httpStatus', 'createAppResponse_httpStatus' - The response's http status code.
--
-- 'app', 'createAppResponse_app' - The created application returned as an object with details including
-- compliance status, creation time, description, resiliency score, and
-- more.
newCreateAppResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'app'
  App ->
  CreateAppResponse
newCreateAppResponse :: Int -> App -> CreateAppResponse
newCreateAppResponse Int
pHttpStatus_ App
pApp_ =
  CreateAppResponse'
    { $sel:httpStatus:CreateAppResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:app:CreateAppResponse' :: App
app = App
pApp_
    }

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

-- | The created application returned as an object with details including
-- compliance status, creation time, description, resiliency score, and
-- more.
createAppResponse_app :: Lens.Lens' CreateAppResponse App
createAppResponse_app :: Lens' CreateAppResponse App
createAppResponse_app = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAppResponse' {App
app :: App
$sel:app:CreateAppResponse' :: CreateAppResponse -> App
app} -> App
app) (\s :: CreateAppResponse
s@CreateAppResponse' {} App
a -> CreateAppResponse
s {$sel:app:CreateAppResponse' :: App
app = App
a} :: CreateAppResponse)

instance Prelude.NFData CreateAppResponse where
  rnf :: CreateAppResponse -> ()
rnf CreateAppResponse' {Int
App
app :: App
httpStatus :: Int
$sel:app:CreateAppResponse' :: CreateAppResponse -> App
$sel:httpStatus:CreateAppResponse' :: CreateAppResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf App
app