{-# 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.CreateCell
-- 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 Cell.
module Amazonka.Route53RecoveryReadiness.CreateCell
  ( -- * Creating a Request
    CreateCell (..),
    newCreateCell,

    -- * Request Lenses
    createCell_cells,
    createCell_tags,
    createCell_cellName,

    -- * Destructuring the Response
    CreateCellResponse (..),
    newCreateCellResponse,

    -- * Response Lenses
    createCellResponse_cells,
    createCellResponse_parentReadinessScopes,
    createCellResponse_cellName,
    createCellResponse_cellArn,
    createCellResponse_tags,
    createCellResponse_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 Cell to create
--
-- /See:/ 'newCreateCell' smart constructor.
data CreateCell = CreateCell'
  { -- | A list of Cell arns contained within this Cell (for use in nested Cells,
    -- e.g. regions within which AZs)
    CreateCell -> Maybe [Text]
cells :: Prelude.Maybe [Prelude.Text],
    CreateCell -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the Cell to create
    CreateCell -> Text
cellName :: Prelude.Text
  }
  deriving (CreateCell -> CreateCell -> Bool
(CreateCell -> CreateCell -> Bool)
-> (CreateCell -> CreateCell -> Bool) -> Eq CreateCell
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCell -> CreateCell -> Bool
$c/= :: CreateCell -> CreateCell -> Bool
== :: CreateCell -> CreateCell -> Bool
$c== :: CreateCell -> CreateCell -> Bool
Prelude.Eq, ReadPrec [CreateCell]
ReadPrec CreateCell
Int -> ReadS CreateCell
ReadS [CreateCell]
(Int -> ReadS CreateCell)
-> ReadS [CreateCell]
-> ReadPrec CreateCell
-> ReadPrec [CreateCell]
-> Read CreateCell
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCell]
$creadListPrec :: ReadPrec [CreateCell]
readPrec :: ReadPrec CreateCell
$creadPrec :: ReadPrec CreateCell
readList :: ReadS [CreateCell]
$creadList :: ReadS [CreateCell]
readsPrec :: Int -> ReadS CreateCell
$creadsPrec :: Int -> ReadS CreateCell
Prelude.Read, Int -> CreateCell -> ShowS
[CreateCell] -> ShowS
CreateCell -> String
(Int -> CreateCell -> ShowS)
-> (CreateCell -> String)
-> ([CreateCell] -> ShowS)
-> Show CreateCell
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCell] -> ShowS
$cshowList :: [CreateCell] -> ShowS
show :: CreateCell -> String
$cshow :: CreateCell -> String
showsPrec :: Int -> CreateCell -> ShowS
$cshowsPrec :: Int -> CreateCell -> ShowS
Prelude.Show, (forall x. CreateCell -> Rep CreateCell x)
-> (forall x. Rep CreateCell x -> CreateCell) -> Generic CreateCell
forall x. Rep CreateCell x -> CreateCell
forall x. CreateCell -> Rep CreateCell x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCell x -> CreateCell
$cfrom :: forall x. CreateCell -> Rep CreateCell x
Prelude.Generic)

-- |
-- Create a value of 'CreateCell' 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', 'createCell_cells' - A list of Cell arns contained within this Cell (for use in nested Cells,
-- e.g. regions within which AZs)
--
-- 'tags', 'createCell_tags' - Undocumented member.
--
-- 'cellName', 'createCell_cellName' - The name of the Cell to create
newCreateCell ::
  -- | 'cellName'
  Prelude.Text ->
  CreateCell
newCreateCell :: Text -> CreateCell
newCreateCell Text
pCellName_ =
  CreateCell' :: Maybe [Text] -> Maybe (HashMap Text Text) -> Text -> CreateCell
CreateCell'
    { $sel:cells:CreateCell' :: Maybe [Text]
cells = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateCell' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:cellName:CreateCell' :: Text
cellName = Text
pCellName_
    }

-- | A list of Cell arns contained within this Cell (for use in nested Cells,
-- e.g. regions within which AZs)
createCell_cells :: Lens.Lens' CreateCell (Prelude.Maybe [Prelude.Text])
createCell_cells :: (Maybe [Text] -> f (Maybe [Text])) -> CreateCell -> f CreateCell
createCell_cells = (CreateCell -> Maybe [Text])
-> (CreateCell -> Maybe [Text] -> CreateCell)
-> Lens CreateCell CreateCell (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCell' {Maybe [Text]
cells :: Maybe [Text]
$sel:cells:CreateCell' :: CreateCell -> Maybe [Text]
cells} -> Maybe [Text]
cells) (\s :: CreateCell
s@CreateCell' {} Maybe [Text]
a -> CreateCell
s {$sel:cells:CreateCell' :: Maybe [Text]
cells = Maybe [Text]
a} :: CreateCell) ((Maybe [Text] -> f (Maybe [Text])) -> CreateCell -> f CreateCell)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCell
-> f CreateCell
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.
createCell_tags :: Lens.Lens' CreateCell (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createCell_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCell -> f CreateCell
createCell_tags = (CreateCell -> Maybe (HashMap Text Text))
-> (CreateCell -> Maybe (HashMap Text Text) -> CreateCell)
-> Lens
     CreateCell
     CreateCell
     (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 (\CreateCell' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateCell' :: CreateCell -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateCell
s@CreateCell' {} Maybe (HashMap Text Text)
a -> CreateCell
s {$sel:tags:CreateCell' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateCell) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateCell -> f CreateCell)
-> ((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)))
-> CreateCell
-> f CreateCell
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 Cell to create
createCell_cellName :: Lens.Lens' CreateCell Prelude.Text
createCell_cellName :: (Text -> f Text) -> CreateCell -> f CreateCell
createCell_cellName = (CreateCell -> Text)
-> (CreateCell -> Text -> CreateCell)
-> Lens CreateCell CreateCell Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCell' {Text
cellName :: Text
$sel:cellName:CreateCell' :: CreateCell -> Text
cellName} -> Text
cellName) (\s :: CreateCell
s@CreateCell' {} Text
a -> CreateCell
s {$sel:cellName:CreateCell' :: Text
cellName = Text
a} :: CreateCell)

instance Core.AWSRequest CreateCell where
  type AWSResponse CreateCell = CreateCellResponse
  request :: CreateCell -> Request CreateCell
request = Service -> CreateCell -> Request CreateCell
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateCell
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCell)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateCell))
-> Logger
-> Service
-> Proxy CreateCell
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCell)))
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 Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateCellResponse
CreateCellResponse'
            (Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateCellResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateCellResponse)
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 Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateCellResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateCellResponse)
forall (f :: * -> *) a b. Applicative f => 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
"parentReadinessScopes"
                            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
   -> CreateCellResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> CreateCellResponse)
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
"cellName")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> CreateCellResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> CreateCellResponse)
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
"cellArn")
            Either
  String (Maybe (HashMap Text Text) -> Int -> CreateCellResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateCellResponse)
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 -> CreateCellResponse)
-> Either String Int -> Either String CreateCellResponse
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 CreateCell

instance Prelude.NFData CreateCell

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

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

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

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

-- |
-- Create a value of 'CreateCellResponse' 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', 'createCellResponse_cells' - A list of Cell arns
--
-- 'parentReadinessScopes', 'createCellResponse_parentReadinessScopes' - A list of Cell ARNs and\/or RecoveryGroup ARNs
--
-- 'cellName', 'createCellResponse_cellName' - The name of the Cell
--
-- 'cellArn', 'createCellResponse_cellArn' - The arn for the Cell
--
-- 'tags', 'createCellResponse_tags' - Undocumented member.
--
-- 'httpStatus', 'createCellResponse_httpStatus' - The response's http status code.
newCreateCellResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateCellResponse
newCreateCellResponse :: Int -> CreateCellResponse
newCreateCellResponse Int
pHttpStatus_ =
  CreateCellResponse' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateCellResponse
CreateCellResponse'
    { $sel:cells:CreateCellResponse' :: Maybe [Text]
cells = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:parentReadinessScopes:CreateCellResponse' :: Maybe [Text]
parentReadinessScopes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:cellName:CreateCellResponse' :: Maybe Text
cellName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cellArn:CreateCellResponse' :: Maybe Text
cellArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateCellResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateCellResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A list of Cell ARNs and\/or RecoveryGroup ARNs
createCellResponse_parentReadinessScopes :: Lens.Lens' CreateCellResponse (Prelude.Maybe [Prelude.Text])
createCellResponse_parentReadinessScopes :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCellResponse -> f CreateCellResponse
createCellResponse_parentReadinessScopes = (CreateCellResponse -> Maybe [Text])
-> (CreateCellResponse -> Maybe [Text] -> CreateCellResponse)
-> Lens
     CreateCellResponse CreateCellResponse (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCellResponse' {Maybe [Text]
parentReadinessScopes :: Maybe [Text]
$sel:parentReadinessScopes:CreateCellResponse' :: CreateCellResponse -> Maybe [Text]
parentReadinessScopes} -> Maybe [Text]
parentReadinessScopes) (\s :: CreateCellResponse
s@CreateCellResponse' {} Maybe [Text]
a -> CreateCellResponse
s {$sel:parentReadinessScopes:CreateCellResponse' :: Maybe [Text]
parentReadinessScopes = Maybe [Text]
a} :: CreateCellResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateCellResponse -> f CreateCellResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCellResponse
-> f CreateCellResponse
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 Cell
createCellResponse_cellName :: Lens.Lens' CreateCellResponse (Prelude.Maybe Prelude.Text)
createCellResponse_cellName :: (Maybe Text -> f (Maybe Text))
-> CreateCellResponse -> f CreateCellResponse
createCellResponse_cellName = (CreateCellResponse -> Maybe Text)
-> (CreateCellResponse -> Maybe Text -> CreateCellResponse)
-> Lens
     CreateCellResponse CreateCellResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCellResponse' {Maybe Text
cellName :: Maybe Text
$sel:cellName:CreateCellResponse' :: CreateCellResponse -> Maybe Text
cellName} -> Maybe Text
cellName) (\s :: CreateCellResponse
s@CreateCellResponse' {} Maybe Text
a -> CreateCellResponse
s {$sel:cellName:CreateCellResponse' :: Maybe Text
cellName = Maybe Text
a} :: CreateCellResponse)

-- | The arn for the Cell
createCellResponse_cellArn :: Lens.Lens' CreateCellResponse (Prelude.Maybe Prelude.Text)
createCellResponse_cellArn :: (Maybe Text -> f (Maybe Text))
-> CreateCellResponse -> f CreateCellResponse
createCellResponse_cellArn = (CreateCellResponse -> Maybe Text)
-> (CreateCellResponse -> Maybe Text -> CreateCellResponse)
-> Lens
     CreateCellResponse CreateCellResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCellResponse' {Maybe Text
cellArn :: Maybe Text
$sel:cellArn:CreateCellResponse' :: CreateCellResponse -> Maybe Text
cellArn} -> Maybe Text
cellArn) (\s :: CreateCellResponse
s@CreateCellResponse' {} Maybe Text
a -> CreateCellResponse
s {$sel:cellArn:CreateCellResponse' :: Maybe Text
cellArn = Maybe Text
a} :: CreateCellResponse)

-- | Undocumented member.
createCellResponse_tags :: Lens.Lens' CreateCellResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createCellResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCellResponse -> f CreateCellResponse
createCellResponse_tags = (CreateCellResponse -> Maybe (HashMap Text Text))
-> (CreateCellResponse
    -> Maybe (HashMap Text Text) -> CreateCellResponse)
-> Lens
     CreateCellResponse
     CreateCellResponse
     (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 (\CreateCellResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateCellResponse' :: CreateCellResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateCellResponse
s@CreateCellResponse' {} Maybe (HashMap Text Text)
a -> CreateCellResponse
s {$sel:tags:CreateCellResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateCellResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateCellResponse -> f CreateCellResponse)
-> ((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)))
-> CreateCellResponse
-> f CreateCellResponse
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.
createCellResponse_httpStatus :: Lens.Lens' CreateCellResponse Prelude.Int
createCellResponse_httpStatus :: (Int -> f Int) -> CreateCellResponse -> f CreateCellResponse
createCellResponse_httpStatus = (CreateCellResponse -> Int)
-> (CreateCellResponse -> Int -> CreateCellResponse)
-> Lens CreateCellResponse CreateCellResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCellResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateCellResponse' :: CreateCellResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateCellResponse
s@CreateCellResponse' {} Int
a -> CreateCellResponse
s {$sel:httpStatus:CreateCellResponse' :: Int
httpStatus = Int
a} :: CreateCellResponse)

instance Prelude.NFData CreateCellResponse