{-# 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.Route53RecoveryReadiness.CreateRecoveryGroup
-- 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 new Recovery Group.
module Amazonka.Route53RecoveryReadiness.CreateRecoveryGroup
  ( -- * Creating a Request
    CreateRecoveryGroup (..),
    newCreateRecoveryGroup,

    -- * Request Lenses
    createRecoveryGroup_cells,
    createRecoveryGroup_tags,
    createRecoveryGroup_recoveryGroupName,

    -- * Destructuring the Response
    CreateRecoveryGroupResponse (..),
    newCreateRecoveryGroupResponse,

    -- * Response Lenses
    createRecoveryGroupResponse_cells,
    createRecoveryGroupResponse_recoveryGroupName,
    createRecoveryGroupResponse_recoveryGroupArn,
    createRecoveryGroupResponse_tags,
    createRecoveryGroupResponse_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.Route53RecoveryReadiness.Types

-- | The RecoveryGroup to create
--
-- /See:/ 'newCreateRecoveryGroup' smart constructor.
data CreateRecoveryGroup = CreateRecoveryGroup'
  { -- | A list of Cell arns
    CreateRecoveryGroup -> Maybe [Text]
cells :: Prelude.Maybe [Prelude.Text],
    CreateRecoveryGroup -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the RecoveryGroup to create
    CreateRecoveryGroup -> Text
recoveryGroupName :: Prelude.Text
  }
  deriving (CreateRecoveryGroup -> CreateRecoveryGroup -> Bool
(CreateRecoveryGroup -> CreateRecoveryGroup -> Bool)
-> (CreateRecoveryGroup -> CreateRecoveryGroup -> Bool)
-> Eq CreateRecoveryGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRecoveryGroup -> CreateRecoveryGroup -> Bool
$c/= :: CreateRecoveryGroup -> CreateRecoveryGroup -> Bool
== :: CreateRecoveryGroup -> CreateRecoveryGroup -> Bool
$c== :: CreateRecoveryGroup -> CreateRecoveryGroup -> Bool
Prelude.Eq, ReadPrec [CreateRecoveryGroup]
ReadPrec CreateRecoveryGroup
Int -> ReadS CreateRecoveryGroup
ReadS [CreateRecoveryGroup]
(Int -> ReadS CreateRecoveryGroup)
-> ReadS [CreateRecoveryGroup]
-> ReadPrec CreateRecoveryGroup
-> ReadPrec [CreateRecoveryGroup]
-> Read CreateRecoveryGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRecoveryGroup]
$creadListPrec :: ReadPrec [CreateRecoveryGroup]
readPrec :: ReadPrec CreateRecoveryGroup
$creadPrec :: ReadPrec CreateRecoveryGroup
readList :: ReadS [CreateRecoveryGroup]
$creadList :: ReadS [CreateRecoveryGroup]
readsPrec :: Int -> ReadS CreateRecoveryGroup
$creadsPrec :: Int -> ReadS CreateRecoveryGroup
Prelude.Read, Int -> CreateRecoveryGroup -> ShowS
[CreateRecoveryGroup] -> ShowS
CreateRecoveryGroup -> String
(Int -> CreateRecoveryGroup -> ShowS)
-> (CreateRecoveryGroup -> String)
-> ([CreateRecoveryGroup] -> ShowS)
-> Show CreateRecoveryGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRecoveryGroup] -> ShowS
$cshowList :: [CreateRecoveryGroup] -> ShowS
show :: CreateRecoveryGroup -> String
$cshow :: CreateRecoveryGroup -> String
showsPrec :: Int -> CreateRecoveryGroup -> ShowS
$cshowsPrec :: Int -> CreateRecoveryGroup -> ShowS
Prelude.Show, (forall x. CreateRecoveryGroup -> Rep CreateRecoveryGroup x)
-> (forall x. Rep CreateRecoveryGroup x -> CreateRecoveryGroup)
-> Generic CreateRecoveryGroup
forall x. Rep CreateRecoveryGroup x -> CreateRecoveryGroup
forall x. CreateRecoveryGroup -> Rep CreateRecoveryGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRecoveryGroup x -> CreateRecoveryGroup
$cfrom :: forall x. CreateRecoveryGroup -> Rep CreateRecoveryGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateRecoveryGroup' 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:
--
-- 'cells', 'createRecoveryGroup_cells' - A list of Cell arns
--
-- 'tags', 'createRecoveryGroup_tags' - Undocumented member.
--
-- 'recoveryGroupName', 'createRecoveryGroup_recoveryGroupName' - The name of the RecoveryGroup to create
newCreateRecoveryGroup ::
  -- | 'recoveryGroupName'
  Prelude.Text ->
  CreateRecoveryGroup
newCreateRecoveryGroup :: Text -> CreateRecoveryGroup
newCreateRecoveryGroup Text
pRecoveryGroupName_ =
  CreateRecoveryGroup' :: Maybe [Text]
-> Maybe (HashMap Text Text) -> Text -> CreateRecoveryGroup
CreateRecoveryGroup'
    { $sel:cells:CreateRecoveryGroup' :: Maybe [Text]
cells = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRecoveryGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryGroupName:CreateRecoveryGroup' :: Text
recoveryGroupName = Text
pRecoveryGroupName_
    }

-- | A list of Cell arns
createRecoveryGroup_cells :: Lens.Lens' CreateRecoveryGroup (Prelude.Maybe [Prelude.Text])
createRecoveryGroup_cells :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateRecoveryGroup -> f CreateRecoveryGroup
createRecoveryGroup_cells = (CreateRecoveryGroup -> Maybe [Text])
-> (CreateRecoveryGroup -> Maybe [Text] -> CreateRecoveryGroup)
-> Lens
     CreateRecoveryGroup
     CreateRecoveryGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecoveryGroup' {Maybe [Text]
cells :: Maybe [Text]
$sel:cells:CreateRecoveryGroup' :: CreateRecoveryGroup -> Maybe [Text]
cells} -> Maybe [Text]
cells) (\s :: CreateRecoveryGroup
s@CreateRecoveryGroup' {} Maybe [Text]
a -> CreateRecoveryGroup
s {$sel:cells:CreateRecoveryGroup' :: Maybe [Text]
cells = Maybe [Text]
a} :: CreateRecoveryGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateRecoveryGroup -> f CreateRecoveryGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateRecoveryGroup
-> f CreateRecoveryGroup
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

-- | Undocumented member.
createRecoveryGroup_tags :: Lens.Lens' CreateRecoveryGroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRecoveryGroup_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRecoveryGroup -> f CreateRecoveryGroup
createRecoveryGroup_tags = (CreateRecoveryGroup -> Maybe (HashMap Text Text))
-> (CreateRecoveryGroup
    -> Maybe (HashMap Text Text) -> CreateRecoveryGroup)
-> Lens
     CreateRecoveryGroup
     CreateRecoveryGroup
     (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 (\CreateRecoveryGroup' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRecoveryGroup' :: CreateRecoveryGroup -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRecoveryGroup
s@CreateRecoveryGroup' {} Maybe (HashMap Text Text)
a -> CreateRecoveryGroup
s {$sel:tags:CreateRecoveryGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRecoveryGroup) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateRecoveryGroup -> f CreateRecoveryGroup)
-> ((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)))
-> CreateRecoveryGroup
-> f CreateRecoveryGroup
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 name of the RecoveryGroup to create
createRecoveryGroup_recoveryGroupName :: Lens.Lens' CreateRecoveryGroup Prelude.Text
createRecoveryGroup_recoveryGroupName :: (Text -> f Text) -> CreateRecoveryGroup -> f CreateRecoveryGroup
createRecoveryGroup_recoveryGroupName = (CreateRecoveryGroup -> Text)
-> (CreateRecoveryGroup -> Text -> CreateRecoveryGroup)
-> Lens CreateRecoveryGroup CreateRecoveryGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecoveryGroup' {Text
recoveryGroupName :: Text
$sel:recoveryGroupName:CreateRecoveryGroup' :: CreateRecoveryGroup -> Text
recoveryGroupName} -> Text
recoveryGroupName) (\s :: CreateRecoveryGroup
s@CreateRecoveryGroup' {} Text
a -> CreateRecoveryGroup
s {$sel:recoveryGroupName:CreateRecoveryGroup' :: Text
recoveryGroupName = Text
a} :: CreateRecoveryGroup)

instance Core.AWSRequest CreateRecoveryGroup where
  type
    AWSResponse CreateRecoveryGroup =
      CreateRecoveryGroupResponse
  request :: CreateRecoveryGroup -> Request CreateRecoveryGroup
request = Service -> CreateRecoveryGroup -> Request CreateRecoveryGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateRecoveryGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRecoveryGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateRecoveryGroup))
-> Logger
-> Service
-> Proxy CreateRecoveryGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRecoveryGroup)))
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
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRecoveryGroupResponse
CreateRecoveryGroupResponse'
            (Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateRecoveryGroupResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRecoveryGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"cells" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRecoveryGroupResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> CreateRecoveryGroupResponse)
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
"recoveryGroupName")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> CreateRecoveryGroupResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> CreateRecoveryGroupResponse)
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
"recoveryGroupArn")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> CreateRecoveryGroupResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateRecoveryGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> CreateRecoveryGroupResponse)
-> Either String Int -> Either String CreateRecoveryGroupResponse
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 CreateRecoveryGroup

instance Prelude.NFData CreateRecoveryGroup

instance Core.ToHeaders CreateRecoveryGroup where
  toHeaders :: CreateRecoveryGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateRecoveryGroup -> 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 CreateRecoveryGroup where
  toJSON :: CreateRecoveryGroup -> Value
toJSON CreateRecoveryGroup' {Maybe [Text]
Maybe (HashMap Text Text)
Text
recoveryGroupName :: Text
tags :: Maybe (HashMap Text Text)
cells :: Maybe [Text]
$sel:recoveryGroupName:CreateRecoveryGroup' :: CreateRecoveryGroup -> Text
$sel:tags:CreateRecoveryGroup' :: CreateRecoveryGroup -> Maybe (HashMap Text Text)
$sel:cells:CreateRecoveryGroup' :: CreateRecoveryGroup -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"cells" 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]
cells,
            (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
"recoveryGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
recoveryGroupName)
          ]
      )

instance Core.ToPath CreateRecoveryGroup where
  toPath :: CreateRecoveryGroup -> ByteString
toPath = ByteString -> CreateRecoveryGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/recoverygroups"

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

-- | /See:/ 'newCreateRecoveryGroupResponse' smart constructor.
data CreateRecoveryGroupResponse = CreateRecoveryGroupResponse'
  { -- | A list of Cell arns
    CreateRecoveryGroupResponse -> Maybe [Text]
cells :: Prelude.Maybe [Prelude.Text],
    -- | The name of the RecoveryGroup
    CreateRecoveryGroupResponse -> Maybe Text
recoveryGroupName :: Prelude.Maybe Prelude.Text,
    -- | The arn for the RecoveryGroup
    CreateRecoveryGroupResponse -> Maybe Text
recoveryGroupArn :: Prelude.Maybe Prelude.Text,
    CreateRecoveryGroupResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateRecoveryGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRecoveryGroupResponse -> CreateRecoveryGroupResponse -> Bool
(CreateRecoveryGroupResponse
 -> CreateRecoveryGroupResponse -> Bool)
-> (CreateRecoveryGroupResponse
    -> CreateRecoveryGroupResponse -> Bool)
-> Eq CreateRecoveryGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRecoveryGroupResponse -> CreateRecoveryGroupResponse -> Bool
$c/= :: CreateRecoveryGroupResponse -> CreateRecoveryGroupResponse -> Bool
== :: CreateRecoveryGroupResponse -> CreateRecoveryGroupResponse -> Bool
$c== :: CreateRecoveryGroupResponse -> CreateRecoveryGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateRecoveryGroupResponse]
ReadPrec CreateRecoveryGroupResponse
Int -> ReadS CreateRecoveryGroupResponse
ReadS [CreateRecoveryGroupResponse]
(Int -> ReadS CreateRecoveryGroupResponse)
-> ReadS [CreateRecoveryGroupResponse]
-> ReadPrec CreateRecoveryGroupResponse
-> ReadPrec [CreateRecoveryGroupResponse]
-> Read CreateRecoveryGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRecoveryGroupResponse]
$creadListPrec :: ReadPrec [CreateRecoveryGroupResponse]
readPrec :: ReadPrec CreateRecoveryGroupResponse
$creadPrec :: ReadPrec CreateRecoveryGroupResponse
readList :: ReadS [CreateRecoveryGroupResponse]
$creadList :: ReadS [CreateRecoveryGroupResponse]
readsPrec :: Int -> ReadS CreateRecoveryGroupResponse
$creadsPrec :: Int -> ReadS CreateRecoveryGroupResponse
Prelude.Read, Int -> CreateRecoveryGroupResponse -> ShowS
[CreateRecoveryGroupResponse] -> ShowS
CreateRecoveryGroupResponse -> String
(Int -> CreateRecoveryGroupResponse -> ShowS)
-> (CreateRecoveryGroupResponse -> String)
-> ([CreateRecoveryGroupResponse] -> ShowS)
-> Show CreateRecoveryGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRecoveryGroupResponse] -> ShowS
$cshowList :: [CreateRecoveryGroupResponse] -> ShowS
show :: CreateRecoveryGroupResponse -> String
$cshow :: CreateRecoveryGroupResponse -> String
showsPrec :: Int -> CreateRecoveryGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateRecoveryGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateRecoveryGroupResponse -> Rep CreateRecoveryGroupResponse x)
-> (forall x.
    Rep CreateRecoveryGroupResponse x -> CreateRecoveryGroupResponse)
-> Generic CreateRecoveryGroupResponse
forall x.
Rep CreateRecoveryGroupResponse x -> CreateRecoveryGroupResponse
forall x.
CreateRecoveryGroupResponse -> Rep CreateRecoveryGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRecoveryGroupResponse x -> CreateRecoveryGroupResponse
$cfrom :: forall x.
CreateRecoveryGroupResponse -> Rep CreateRecoveryGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRecoveryGroupResponse' 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:
--
-- 'cells', 'createRecoveryGroupResponse_cells' - A list of Cell arns
--
-- 'recoveryGroupName', 'createRecoveryGroupResponse_recoveryGroupName' - The name of the RecoveryGroup
--
-- 'recoveryGroupArn', 'createRecoveryGroupResponse_recoveryGroupArn' - The arn for the RecoveryGroup
--
-- 'tags', 'createRecoveryGroupResponse_tags' - Undocumented member.
--
-- 'httpStatus', 'createRecoveryGroupResponse_httpStatus' - The response's http status code.
newCreateRecoveryGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRecoveryGroupResponse
newCreateRecoveryGroupResponse :: Int -> CreateRecoveryGroupResponse
newCreateRecoveryGroupResponse Int
pHttpStatus_ =
  CreateRecoveryGroupResponse' :: Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRecoveryGroupResponse
CreateRecoveryGroupResponse'
    { $sel:cells:CreateRecoveryGroupResponse' :: Maybe [Text]
cells =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryGroupName:CreateRecoveryGroupResponse' :: Maybe Text
recoveryGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryGroupArn:CreateRecoveryGroupResponse' :: Maybe Text
recoveryGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRecoveryGroupResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRecoveryGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of Cell arns
createRecoveryGroupResponse_cells :: Lens.Lens' CreateRecoveryGroupResponse (Prelude.Maybe [Prelude.Text])
createRecoveryGroupResponse_cells :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateRecoveryGroupResponse -> f CreateRecoveryGroupResponse
createRecoveryGroupResponse_cells = (CreateRecoveryGroupResponse -> Maybe [Text])
-> (CreateRecoveryGroupResponse
    -> Maybe [Text] -> CreateRecoveryGroupResponse)
-> Lens
     CreateRecoveryGroupResponse
     CreateRecoveryGroupResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecoveryGroupResponse' {Maybe [Text]
cells :: Maybe [Text]
$sel:cells:CreateRecoveryGroupResponse' :: CreateRecoveryGroupResponse -> Maybe [Text]
cells} -> Maybe [Text]
cells) (\s :: CreateRecoveryGroupResponse
s@CreateRecoveryGroupResponse' {} Maybe [Text]
a -> CreateRecoveryGroupResponse
s {$sel:cells:CreateRecoveryGroupResponse' :: Maybe [Text]
cells = Maybe [Text]
a} :: CreateRecoveryGroupResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateRecoveryGroupResponse -> f CreateRecoveryGroupResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateRecoveryGroupResponse
-> f CreateRecoveryGroupResponse
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

-- | The name of the RecoveryGroup
createRecoveryGroupResponse_recoveryGroupName :: Lens.Lens' CreateRecoveryGroupResponse (Prelude.Maybe Prelude.Text)
createRecoveryGroupResponse_recoveryGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateRecoveryGroupResponse -> f CreateRecoveryGroupResponse
createRecoveryGroupResponse_recoveryGroupName = (CreateRecoveryGroupResponse -> Maybe Text)
-> (CreateRecoveryGroupResponse
    -> Maybe Text -> CreateRecoveryGroupResponse)
-> Lens
     CreateRecoveryGroupResponse
     CreateRecoveryGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecoveryGroupResponse' {Maybe Text
recoveryGroupName :: Maybe Text
$sel:recoveryGroupName:CreateRecoveryGroupResponse' :: CreateRecoveryGroupResponse -> Maybe Text
recoveryGroupName} -> Maybe Text
recoveryGroupName) (\s :: CreateRecoveryGroupResponse
s@CreateRecoveryGroupResponse' {} Maybe Text
a -> CreateRecoveryGroupResponse
s {$sel:recoveryGroupName:CreateRecoveryGroupResponse' :: Maybe Text
recoveryGroupName = Maybe Text
a} :: CreateRecoveryGroupResponse)

-- | The arn for the RecoveryGroup
createRecoveryGroupResponse_recoveryGroupArn :: Lens.Lens' CreateRecoveryGroupResponse (Prelude.Maybe Prelude.Text)
createRecoveryGroupResponse_recoveryGroupArn :: (Maybe Text -> f (Maybe Text))
-> CreateRecoveryGroupResponse -> f CreateRecoveryGroupResponse
createRecoveryGroupResponse_recoveryGroupArn = (CreateRecoveryGroupResponse -> Maybe Text)
-> (CreateRecoveryGroupResponse
    -> Maybe Text -> CreateRecoveryGroupResponse)
-> Lens
     CreateRecoveryGroupResponse
     CreateRecoveryGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecoveryGroupResponse' {Maybe Text
recoveryGroupArn :: Maybe Text
$sel:recoveryGroupArn:CreateRecoveryGroupResponse' :: CreateRecoveryGroupResponse -> Maybe Text
recoveryGroupArn} -> Maybe Text
recoveryGroupArn) (\s :: CreateRecoveryGroupResponse
s@CreateRecoveryGroupResponse' {} Maybe Text
a -> CreateRecoveryGroupResponse
s {$sel:recoveryGroupArn:CreateRecoveryGroupResponse' :: Maybe Text
recoveryGroupArn = Maybe Text
a} :: CreateRecoveryGroupResponse)

-- | Undocumented member.
createRecoveryGroupResponse_tags :: Lens.Lens' CreateRecoveryGroupResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRecoveryGroupResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRecoveryGroupResponse -> f CreateRecoveryGroupResponse
createRecoveryGroupResponse_tags = (CreateRecoveryGroupResponse -> Maybe (HashMap Text Text))
-> (CreateRecoveryGroupResponse
    -> Maybe (HashMap Text Text) -> CreateRecoveryGroupResponse)
-> Lens
     CreateRecoveryGroupResponse
     CreateRecoveryGroupResponse
     (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 (\CreateRecoveryGroupResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRecoveryGroupResponse' :: CreateRecoveryGroupResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRecoveryGroupResponse
s@CreateRecoveryGroupResponse' {} Maybe (HashMap Text Text)
a -> CreateRecoveryGroupResponse
s {$sel:tags:CreateRecoveryGroupResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRecoveryGroupResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateRecoveryGroupResponse -> f CreateRecoveryGroupResponse)
-> ((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)))
-> CreateRecoveryGroupResponse
-> f CreateRecoveryGroupResponse
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 response's http status code.
createRecoveryGroupResponse_httpStatus :: Lens.Lens' CreateRecoveryGroupResponse Prelude.Int
createRecoveryGroupResponse_httpStatus :: (Int -> f Int)
-> CreateRecoveryGroupResponse -> f CreateRecoveryGroupResponse
createRecoveryGroupResponse_httpStatus = (CreateRecoveryGroupResponse -> Int)
-> (CreateRecoveryGroupResponse
    -> Int -> CreateRecoveryGroupResponse)
-> Lens
     CreateRecoveryGroupResponse CreateRecoveryGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRecoveryGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRecoveryGroupResponse' :: CreateRecoveryGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRecoveryGroupResponse
s@CreateRecoveryGroupResponse' {} Int
a -> CreateRecoveryGroupResponse
s {$sel:httpStatus:CreateRecoveryGroupResponse' :: Int
httpStatus = Int
a} :: CreateRecoveryGroupResponse)

instance Prelude.NFData CreateRecoveryGroupResponse