{-# 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.Backup.DescribeFramework
-- 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)
--
-- Returns the framework details for the specified @FrameworkName@.
module Amazonka.Backup.DescribeFramework
  ( -- * Creating a Request
    DescribeFramework (..),
    newDescribeFramework,

    -- * Request Lenses
    describeFramework_frameworkName,

    -- * Destructuring the Response
    DescribeFrameworkResponse (..),
    newDescribeFrameworkResponse,

    -- * Response Lenses
    describeFrameworkResponse_creationTime,
    describeFrameworkResponse_idempotencyToken,
    describeFrameworkResponse_frameworkDescription,
    describeFrameworkResponse_frameworkStatus,
    describeFrameworkResponse_frameworkControls,
    describeFrameworkResponse_frameworkArn,
    describeFrameworkResponse_deploymentStatus,
    describeFrameworkResponse_frameworkName,
    describeFrameworkResponse_httpStatus,
  )
where

import Amazonka.Backup.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:/ 'newDescribeFramework' smart constructor.
data DescribeFramework = DescribeFramework'
  { -- | The unique name of a framework.
    DescribeFramework -> Text
frameworkName :: Prelude.Text
  }
  deriving (DescribeFramework -> DescribeFramework -> Bool
(DescribeFramework -> DescribeFramework -> Bool)
-> (DescribeFramework -> DescribeFramework -> Bool)
-> Eq DescribeFramework
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFramework -> DescribeFramework -> Bool
$c/= :: DescribeFramework -> DescribeFramework -> Bool
== :: DescribeFramework -> DescribeFramework -> Bool
$c== :: DescribeFramework -> DescribeFramework -> Bool
Prelude.Eq, ReadPrec [DescribeFramework]
ReadPrec DescribeFramework
Int -> ReadS DescribeFramework
ReadS [DescribeFramework]
(Int -> ReadS DescribeFramework)
-> ReadS [DescribeFramework]
-> ReadPrec DescribeFramework
-> ReadPrec [DescribeFramework]
-> Read DescribeFramework
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFramework]
$creadListPrec :: ReadPrec [DescribeFramework]
readPrec :: ReadPrec DescribeFramework
$creadPrec :: ReadPrec DescribeFramework
readList :: ReadS [DescribeFramework]
$creadList :: ReadS [DescribeFramework]
readsPrec :: Int -> ReadS DescribeFramework
$creadsPrec :: Int -> ReadS DescribeFramework
Prelude.Read, Int -> DescribeFramework -> ShowS
[DescribeFramework] -> ShowS
DescribeFramework -> String
(Int -> DescribeFramework -> ShowS)
-> (DescribeFramework -> String)
-> ([DescribeFramework] -> ShowS)
-> Show DescribeFramework
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFramework] -> ShowS
$cshowList :: [DescribeFramework] -> ShowS
show :: DescribeFramework -> String
$cshow :: DescribeFramework -> String
showsPrec :: Int -> DescribeFramework -> ShowS
$cshowsPrec :: Int -> DescribeFramework -> ShowS
Prelude.Show, (forall x. DescribeFramework -> Rep DescribeFramework x)
-> (forall x. Rep DescribeFramework x -> DescribeFramework)
-> Generic DescribeFramework
forall x. Rep DescribeFramework x -> DescribeFramework
forall x. DescribeFramework -> Rep DescribeFramework x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeFramework x -> DescribeFramework
$cfrom :: forall x. DescribeFramework -> Rep DescribeFramework x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFramework' 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:
--
-- 'frameworkName', 'describeFramework_frameworkName' - The unique name of a framework.
newDescribeFramework ::
  -- | 'frameworkName'
  Prelude.Text ->
  DescribeFramework
newDescribeFramework :: Text -> DescribeFramework
newDescribeFramework Text
pFrameworkName_ =
  DescribeFramework' :: Text -> DescribeFramework
DescribeFramework' {$sel:frameworkName:DescribeFramework' :: Text
frameworkName = Text
pFrameworkName_}

-- | The unique name of a framework.
describeFramework_frameworkName :: Lens.Lens' DescribeFramework Prelude.Text
describeFramework_frameworkName :: (Text -> f Text) -> DescribeFramework -> f DescribeFramework
describeFramework_frameworkName = (DescribeFramework -> Text)
-> (DescribeFramework -> Text -> DescribeFramework)
-> Lens DescribeFramework DescribeFramework Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFramework' {Text
frameworkName :: Text
$sel:frameworkName:DescribeFramework' :: DescribeFramework -> Text
frameworkName} -> Text
frameworkName) (\s :: DescribeFramework
s@DescribeFramework' {} Text
a -> DescribeFramework
s {$sel:frameworkName:DescribeFramework' :: Text
frameworkName = Text
a} :: DescribeFramework)

instance Core.AWSRequest DescribeFramework where
  type
    AWSResponse DescribeFramework =
      DescribeFrameworkResponse
  request :: DescribeFramework -> Request DescribeFramework
request = Service -> DescribeFramework -> Request DescribeFramework
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeFramework
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFramework)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeFramework))
-> Logger
-> Service
-> Proxy DescribeFramework
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFramework)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [FrameworkControl]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeFrameworkResponse
DescribeFrameworkResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [FrameworkControl]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeFrameworkResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FrameworkControl]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFrameworkResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FrameworkControl]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFrameworkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [FrameworkControl]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFrameworkResponse)
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
"IdempotencyToken")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [FrameworkControl]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFrameworkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [FrameworkControl]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFrameworkResponse)
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
"FrameworkDescription")
            Either
  String
  (Maybe Text
   -> Maybe [FrameworkControl]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFrameworkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [FrameworkControl]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFrameworkResponse)
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
"FrameworkStatus")
            Either
  String
  (Maybe [FrameworkControl]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFrameworkResponse)
-> Either String (Maybe [FrameworkControl])
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> DescribeFrameworkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [FrameworkControl]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FrameworkControls"
                            Either String (Maybe (Maybe [FrameworkControl]))
-> Maybe [FrameworkControl]
-> Either String (Maybe [FrameworkControl])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FrameworkControl]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> DescribeFrameworkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> DescribeFrameworkResponse)
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
"FrameworkArn")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> DescribeFrameworkResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeFrameworkResponse)
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
"DeploymentStatus")
            Either String (Maybe Text -> Int -> DescribeFrameworkResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeFrameworkResponse)
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
"FrameworkName")
            Either String (Int -> DescribeFrameworkResponse)
-> Either String Int -> Either String DescribeFrameworkResponse
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 DescribeFramework

instance Prelude.NFData DescribeFramework

instance Core.ToHeaders DescribeFramework where
  toHeaders :: DescribeFramework -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeFramework -> 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.ToPath DescribeFramework where
  toPath :: DescribeFramework -> ByteString
toPath DescribeFramework' {Text
frameworkName :: Text
$sel:frameworkName:DescribeFramework' :: DescribeFramework -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/audit/frameworks/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
frameworkName]

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

-- | /See:/ 'newDescribeFrameworkResponse' smart constructor.
data DescribeFrameworkResponse = DescribeFrameworkResponse'
  { -- | The date and time that a framework is created, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @CreationTime@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    DescribeFrameworkResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | A customer-chosen string that you can use to distinguish between
    -- otherwise identical calls to @DescribeFrameworkOutput@. Retrying a
    -- successful request with the same idempotency token results in a success
    -- message with no action taken.
    DescribeFrameworkResponse -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
    -- | An optional description of the framework.
    DescribeFrameworkResponse -> Maybe Text
frameworkDescription :: Prelude.Maybe Prelude.Text,
    -- | A framework consists of one or more controls. Each control governs a
    -- resource, such as backup plans, backup selections, backup vaults, or
    -- recovery points. You can also turn Config recording on or off for each
    -- resource. The statuses are:
    --
    -- -   @ACTIVE@ when recording is turned on for all resources governed by
    --     the framework.
    --
    -- -   @PARTIALLY_ACTIVE@ when recording is turned off for at least one
    --     resource governed by the framework.
    --
    -- -   @INACTIVE@ when recording is turned off for all resources governed
    --     by the framework.
    --
    -- -   @UNAVAILABLE@ when Backup is unable to validate recording status at
    --     this time.
    DescribeFrameworkResponse -> Maybe Text
frameworkStatus :: Prelude.Maybe Prelude.Text,
    -- | A list of the controls that make up the framework. Each control in the
    -- list has a name, input parameters, and scope.
    DescribeFrameworkResponse -> Maybe [FrameworkControl]
frameworkControls :: Prelude.Maybe [FrameworkControl],
    -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The
    -- format of the ARN depends on the resource type.
    DescribeFrameworkResponse -> Maybe Text
frameworkArn :: Prelude.Maybe Prelude.Text,
    -- | The deployment status of a framework. The statuses are:
    --
    -- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@
    DescribeFrameworkResponse -> Maybe Text
deploymentStatus :: Prelude.Maybe Prelude.Text,
    -- | The unique name of a framework.
    DescribeFrameworkResponse -> Maybe Text
frameworkName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeFrameworkResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeFrameworkResponse -> DescribeFrameworkResponse -> Bool
(DescribeFrameworkResponse -> DescribeFrameworkResponse -> Bool)
-> (DescribeFrameworkResponse -> DescribeFrameworkResponse -> Bool)
-> Eq DescribeFrameworkResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFrameworkResponse -> DescribeFrameworkResponse -> Bool
$c/= :: DescribeFrameworkResponse -> DescribeFrameworkResponse -> Bool
== :: DescribeFrameworkResponse -> DescribeFrameworkResponse -> Bool
$c== :: DescribeFrameworkResponse -> DescribeFrameworkResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFrameworkResponse]
ReadPrec DescribeFrameworkResponse
Int -> ReadS DescribeFrameworkResponse
ReadS [DescribeFrameworkResponse]
(Int -> ReadS DescribeFrameworkResponse)
-> ReadS [DescribeFrameworkResponse]
-> ReadPrec DescribeFrameworkResponse
-> ReadPrec [DescribeFrameworkResponse]
-> Read DescribeFrameworkResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFrameworkResponse]
$creadListPrec :: ReadPrec [DescribeFrameworkResponse]
readPrec :: ReadPrec DescribeFrameworkResponse
$creadPrec :: ReadPrec DescribeFrameworkResponse
readList :: ReadS [DescribeFrameworkResponse]
$creadList :: ReadS [DescribeFrameworkResponse]
readsPrec :: Int -> ReadS DescribeFrameworkResponse
$creadsPrec :: Int -> ReadS DescribeFrameworkResponse
Prelude.Read, Int -> DescribeFrameworkResponse -> ShowS
[DescribeFrameworkResponse] -> ShowS
DescribeFrameworkResponse -> String
(Int -> DescribeFrameworkResponse -> ShowS)
-> (DescribeFrameworkResponse -> String)
-> ([DescribeFrameworkResponse] -> ShowS)
-> Show DescribeFrameworkResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFrameworkResponse] -> ShowS
$cshowList :: [DescribeFrameworkResponse] -> ShowS
show :: DescribeFrameworkResponse -> String
$cshow :: DescribeFrameworkResponse -> String
showsPrec :: Int -> DescribeFrameworkResponse -> ShowS
$cshowsPrec :: Int -> DescribeFrameworkResponse -> ShowS
Prelude.Show, (forall x.
 DescribeFrameworkResponse -> Rep DescribeFrameworkResponse x)
-> (forall x.
    Rep DescribeFrameworkResponse x -> DescribeFrameworkResponse)
-> Generic DescribeFrameworkResponse
forall x.
Rep DescribeFrameworkResponse x -> DescribeFrameworkResponse
forall x.
DescribeFrameworkResponse -> Rep DescribeFrameworkResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFrameworkResponse x -> DescribeFrameworkResponse
$cfrom :: forall x.
DescribeFrameworkResponse -> Rep DescribeFrameworkResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFrameworkResponse' 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:
--
-- 'creationTime', 'describeFrameworkResponse_creationTime' - The date and time that a framework is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'idempotencyToken', 'describeFrameworkResponse_idempotencyToken' - A customer-chosen string that you can use to distinguish between
-- otherwise identical calls to @DescribeFrameworkOutput@. Retrying a
-- successful request with the same idempotency token results in a success
-- message with no action taken.
--
-- 'frameworkDescription', 'describeFrameworkResponse_frameworkDescription' - An optional description of the framework.
--
-- 'frameworkStatus', 'describeFrameworkResponse_frameworkStatus' - A framework consists of one or more controls. Each control governs a
-- resource, such as backup plans, backup selections, backup vaults, or
-- recovery points. You can also turn Config recording on or off for each
-- resource. The statuses are:
--
-- -   @ACTIVE@ when recording is turned on for all resources governed by
--     the framework.
--
-- -   @PARTIALLY_ACTIVE@ when recording is turned off for at least one
--     resource governed by the framework.
--
-- -   @INACTIVE@ when recording is turned off for all resources governed
--     by the framework.
--
-- -   @UNAVAILABLE@ when Backup is unable to validate recording status at
--     this time.
--
-- 'frameworkControls', 'describeFrameworkResponse_frameworkControls' - A list of the controls that make up the framework. Each control in the
-- list has a name, input parameters, and scope.
--
-- 'frameworkArn', 'describeFrameworkResponse_frameworkArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The
-- format of the ARN depends on the resource type.
--
-- 'deploymentStatus', 'describeFrameworkResponse_deploymentStatus' - The deployment status of a framework. The statuses are:
--
-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@
--
-- 'frameworkName', 'describeFrameworkResponse_frameworkName' - The unique name of a framework.
--
-- 'httpStatus', 'describeFrameworkResponse_httpStatus' - The response's http status code.
newDescribeFrameworkResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeFrameworkResponse
newDescribeFrameworkResponse :: Int -> DescribeFrameworkResponse
newDescribeFrameworkResponse Int
pHttpStatus_ =
  DescribeFrameworkResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [FrameworkControl]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeFrameworkResponse
DescribeFrameworkResponse'
    { $sel:creationTime:DescribeFrameworkResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:idempotencyToken:DescribeFrameworkResponse' :: Maybe Text
idempotencyToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkDescription:DescribeFrameworkResponse' :: Maybe Text
frameworkDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkStatus:DescribeFrameworkResponse' :: Maybe Text
frameworkStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkControls:DescribeFrameworkResponse' :: Maybe [FrameworkControl]
frameworkControls = Maybe [FrameworkControl]
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkArn:DescribeFrameworkResponse' :: Maybe Text
frameworkArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentStatus:DescribeFrameworkResponse' :: Maybe Text
deploymentStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkName:DescribeFrameworkResponse' :: Maybe Text
frameworkName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeFrameworkResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time that a framework is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
describeFrameworkResponse_creationTime :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.UTCTime)
describeFrameworkResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_creationTime = (DescribeFrameworkResponse -> Maybe POSIX)
-> (DescribeFrameworkResponse
    -> Maybe POSIX -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe POSIX
a -> DescribeFrameworkResponse
s {$sel:creationTime:DescribeFrameworkResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeFrameworkResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeFrameworkResponse -> f DescribeFrameworkResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFrameworkResponse
-> f DescribeFrameworkResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A customer-chosen string that you can use to distinguish between
-- otherwise identical calls to @DescribeFrameworkOutput@. Retrying a
-- successful request with the same idempotency token results in a success
-- message with no action taken.
describeFrameworkResponse_idempotencyToken :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)
describeFrameworkResponse_idempotencyToken :: (Maybe Text -> f (Maybe Text))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_idempotencyToken = (DescribeFrameworkResponse -> Maybe Text)
-> (DescribeFrameworkResponse
    -> Maybe Text -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe Text
a -> DescribeFrameworkResponse
s {$sel:idempotencyToken:DescribeFrameworkResponse' :: Maybe Text
idempotencyToken = Maybe Text
a} :: DescribeFrameworkResponse)

-- | An optional description of the framework.
describeFrameworkResponse_frameworkDescription :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)
describeFrameworkResponse_frameworkDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_frameworkDescription = (DescribeFrameworkResponse -> Maybe Text)
-> (DescribeFrameworkResponse
    -> Maybe Text -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe Text
frameworkDescription :: Maybe Text
$sel:frameworkDescription:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe Text
frameworkDescription} -> Maybe Text
frameworkDescription) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe Text
a -> DescribeFrameworkResponse
s {$sel:frameworkDescription:DescribeFrameworkResponse' :: Maybe Text
frameworkDescription = Maybe Text
a} :: DescribeFrameworkResponse)

-- | A framework consists of one or more controls. Each control governs a
-- resource, such as backup plans, backup selections, backup vaults, or
-- recovery points. You can also turn Config recording on or off for each
-- resource. The statuses are:
--
-- -   @ACTIVE@ when recording is turned on for all resources governed by
--     the framework.
--
-- -   @PARTIALLY_ACTIVE@ when recording is turned off for at least one
--     resource governed by the framework.
--
-- -   @INACTIVE@ when recording is turned off for all resources governed
--     by the framework.
--
-- -   @UNAVAILABLE@ when Backup is unable to validate recording status at
--     this time.
describeFrameworkResponse_frameworkStatus :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)
describeFrameworkResponse_frameworkStatus :: (Maybe Text -> f (Maybe Text))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_frameworkStatus = (DescribeFrameworkResponse -> Maybe Text)
-> (DescribeFrameworkResponse
    -> Maybe Text -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe Text
frameworkStatus :: Maybe Text
$sel:frameworkStatus:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe Text
frameworkStatus} -> Maybe Text
frameworkStatus) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe Text
a -> DescribeFrameworkResponse
s {$sel:frameworkStatus:DescribeFrameworkResponse' :: Maybe Text
frameworkStatus = Maybe Text
a} :: DescribeFrameworkResponse)

-- | A list of the controls that make up the framework. Each control in the
-- list has a name, input parameters, and scope.
describeFrameworkResponse_frameworkControls :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe [FrameworkControl])
describeFrameworkResponse_frameworkControls :: (Maybe [FrameworkControl] -> f (Maybe [FrameworkControl]))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_frameworkControls = (DescribeFrameworkResponse -> Maybe [FrameworkControl])
-> (DescribeFrameworkResponse
    -> Maybe [FrameworkControl] -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe [FrameworkControl])
     (Maybe [FrameworkControl])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe [FrameworkControl]
frameworkControls :: Maybe [FrameworkControl]
$sel:frameworkControls:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe [FrameworkControl]
frameworkControls} -> Maybe [FrameworkControl]
frameworkControls) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe [FrameworkControl]
a -> DescribeFrameworkResponse
s {$sel:frameworkControls:DescribeFrameworkResponse' :: Maybe [FrameworkControl]
frameworkControls = Maybe [FrameworkControl]
a} :: DescribeFrameworkResponse) ((Maybe [FrameworkControl] -> f (Maybe [FrameworkControl]))
 -> DescribeFrameworkResponse -> f DescribeFrameworkResponse)
-> ((Maybe [FrameworkControl] -> f (Maybe [FrameworkControl]))
    -> Maybe [FrameworkControl] -> f (Maybe [FrameworkControl]))
-> (Maybe [FrameworkControl] -> f (Maybe [FrameworkControl]))
-> DescribeFrameworkResponse
-> f DescribeFrameworkResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [FrameworkControl]
  [FrameworkControl]
  [FrameworkControl]
  [FrameworkControl]
-> Iso
     (Maybe [FrameworkControl])
     (Maybe [FrameworkControl])
     (Maybe [FrameworkControl])
     (Maybe [FrameworkControl])
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
  [FrameworkControl]
  [FrameworkControl]
  [FrameworkControl]
  [FrameworkControl]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The
-- format of the ARN depends on the resource type.
describeFrameworkResponse_frameworkArn :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)
describeFrameworkResponse_frameworkArn :: (Maybe Text -> f (Maybe Text))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_frameworkArn = (DescribeFrameworkResponse -> Maybe Text)
-> (DescribeFrameworkResponse
    -> Maybe Text -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe Text
frameworkArn :: Maybe Text
$sel:frameworkArn:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe Text
frameworkArn} -> Maybe Text
frameworkArn) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe Text
a -> DescribeFrameworkResponse
s {$sel:frameworkArn:DescribeFrameworkResponse' :: Maybe Text
frameworkArn = Maybe Text
a} :: DescribeFrameworkResponse)

-- | The deployment status of a framework. The statuses are:
--
-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@
describeFrameworkResponse_deploymentStatus :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)
describeFrameworkResponse_deploymentStatus :: (Maybe Text -> f (Maybe Text))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_deploymentStatus = (DescribeFrameworkResponse -> Maybe Text)
-> (DescribeFrameworkResponse
    -> Maybe Text -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe Text
deploymentStatus :: Maybe Text
$sel:deploymentStatus:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe Text
deploymentStatus} -> Maybe Text
deploymentStatus) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe Text
a -> DescribeFrameworkResponse
s {$sel:deploymentStatus:DescribeFrameworkResponse' :: Maybe Text
deploymentStatus = Maybe Text
a} :: DescribeFrameworkResponse)

-- | The unique name of a framework.
describeFrameworkResponse_frameworkName :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)
describeFrameworkResponse_frameworkName :: (Maybe Text -> f (Maybe Text))
-> DescribeFrameworkResponse -> f DescribeFrameworkResponse
describeFrameworkResponse_frameworkName = (DescribeFrameworkResponse -> Maybe Text)
-> (DescribeFrameworkResponse
    -> Maybe Text -> DescribeFrameworkResponse)
-> Lens
     DescribeFrameworkResponse
     DescribeFrameworkResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFrameworkResponse' {Maybe Text
frameworkName :: Maybe Text
$sel:frameworkName:DescribeFrameworkResponse' :: DescribeFrameworkResponse -> Maybe Text
frameworkName} -> Maybe Text
frameworkName) (\s :: DescribeFrameworkResponse
s@DescribeFrameworkResponse' {} Maybe Text
a -> DescribeFrameworkResponse
s {$sel:frameworkName:DescribeFrameworkResponse' :: Maybe Text
frameworkName = Maybe Text
a} :: DescribeFrameworkResponse)

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

instance Prelude.NFData DescribeFrameworkResponse