{-# 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.UpdateResourceSet
-- 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)
--
-- Updates an existing Resource Set.
module Amazonka.Route53RecoveryReadiness.UpdateResourceSet
  ( -- * Creating a Request
    UpdateResourceSet (..),
    newUpdateResourceSet,

    -- * Request Lenses
    updateResourceSet_resourceSetName,
    updateResourceSet_resourceSetType,
    updateResourceSet_resources,

    -- * Destructuring the Response
    UpdateResourceSetResponse (..),
    newUpdateResourceSetResponse,

    -- * Response Lenses
    updateResourceSetResponse_resourceSetName,
    updateResourceSetResponse_resourceSetType,
    updateResourceSetResponse_resources,
    updateResourceSetResponse_resourceSetArn,
    updateResourceSetResponse_tags,
    updateResourceSetResponse_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

-- | configuration for the desired
--
-- /See:/ 'newUpdateResourceSet' smart constructor.
data UpdateResourceSet = UpdateResourceSet'
  { -- | The ResourceSet to update
    UpdateResourceSet -> Text
resourceSetName :: Prelude.Text,
    -- | AWS Resource Type of the resources in the ResourceSet
    UpdateResourceSet -> Text
resourceSetType :: Prelude.Text,
    -- | A list of Resource objects
    UpdateResourceSet -> [Resource]
resources :: [Resource]
  }
  deriving (UpdateResourceSet -> UpdateResourceSet -> Bool
(UpdateResourceSet -> UpdateResourceSet -> Bool)
-> (UpdateResourceSet -> UpdateResourceSet -> Bool)
-> Eq UpdateResourceSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResourceSet -> UpdateResourceSet -> Bool
$c/= :: UpdateResourceSet -> UpdateResourceSet -> Bool
== :: UpdateResourceSet -> UpdateResourceSet -> Bool
$c== :: UpdateResourceSet -> UpdateResourceSet -> Bool
Prelude.Eq, ReadPrec [UpdateResourceSet]
ReadPrec UpdateResourceSet
Int -> ReadS UpdateResourceSet
ReadS [UpdateResourceSet]
(Int -> ReadS UpdateResourceSet)
-> ReadS [UpdateResourceSet]
-> ReadPrec UpdateResourceSet
-> ReadPrec [UpdateResourceSet]
-> Read UpdateResourceSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResourceSet]
$creadListPrec :: ReadPrec [UpdateResourceSet]
readPrec :: ReadPrec UpdateResourceSet
$creadPrec :: ReadPrec UpdateResourceSet
readList :: ReadS [UpdateResourceSet]
$creadList :: ReadS [UpdateResourceSet]
readsPrec :: Int -> ReadS UpdateResourceSet
$creadsPrec :: Int -> ReadS UpdateResourceSet
Prelude.Read, Int -> UpdateResourceSet -> ShowS
[UpdateResourceSet] -> ShowS
UpdateResourceSet -> String
(Int -> UpdateResourceSet -> ShowS)
-> (UpdateResourceSet -> String)
-> ([UpdateResourceSet] -> ShowS)
-> Show UpdateResourceSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResourceSet] -> ShowS
$cshowList :: [UpdateResourceSet] -> ShowS
show :: UpdateResourceSet -> String
$cshow :: UpdateResourceSet -> String
showsPrec :: Int -> UpdateResourceSet -> ShowS
$cshowsPrec :: Int -> UpdateResourceSet -> ShowS
Prelude.Show, (forall x. UpdateResourceSet -> Rep UpdateResourceSet x)
-> (forall x. Rep UpdateResourceSet x -> UpdateResourceSet)
-> Generic UpdateResourceSet
forall x. Rep UpdateResourceSet x -> UpdateResourceSet
forall x. UpdateResourceSet -> Rep UpdateResourceSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateResourceSet x -> UpdateResourceSet
$cfrom :: forall x. UpdateResourceSet -> Rep UpdateResourceSet x
Prelude.Generic)

-- |
-- Create a value of 'UpdateResourceSet' 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:
--
-- 'resourceSetName', 'updateResourceSet_resourceSetName' - The ResourceSet to update
--
-- 'resourceSetType', 'updateResourceSet_resourceSetType' - AWS Resource Type of the resources in the ResourceSet
--
-- 'resources', 'updateResourceSet_resources' - A list of Resource objects
newUpdateResourceSet ::
  -- | 'resourceSetName'
  Prelude.Text ->
  -- | 'resourceSetType'
  Prelude.Text ->
  UpdateResourceSet
newUpdateResourceSet :: Text -> Text -> UpdateResourceSet
newUpdateResourceSet
  Text
pResourceSetName_
  Text
pResourceSetType_ =
    UpdateResourceSet' :: Text -> Text -> [Resource] -> UpdateResourceSet
UpdateResourceSet'
      { $sel:resourceSetName:UpdateResourceSet' :: Text
resourceSetName =
          Text
pResourceSetName_,
        $sel:resourceSetType:UpdateResourceSet' :: Text
resourceSetType = Text
pResourceSetType_,
        $sel:resources:UpdateResourceSet' :: [Resource]
resources = [Resource]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The ResourceSet to update
updateResourceSet_resourceSetName :: Lens.Lens' UpdateResourceSet Prelude.Text
updateResourceSet_resourceSetName :: (Text -> f Text) -> UpdateResourceSet -> f UpdateResourceSet
updateResourceSet_resourceSetName = (UpdateResourceSet -> Text)
-> (UpdateResourceSet -> Text -> UpdateResourceSet)
-> Lens UpdateResourceSet UpdateResourceSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceSet' {Text
resourceSetName :: Text
$sel:resourceSetName:UpdateResourceSet' :: UpdateResourceSet -> Text
resourceSetName} -> Text
resourceSetName) (\s :: UpdateResourceSet
s@UpdateResourceSet' {} Text
a -> UpdateResourceSet
s {$sel:resourceSetName:UpdateResourceSet' :: Text
resourceSetName = Text
a} :: UpdateResourceSet)

-- | AWS Resource Type of the resources in the ResourceSet
updateResourceSet_resourceSetType :: Lens.Lens' UpdateResourceSet Prelude.Text
updateResourceSet_resourceSetType :: (Text -> f Text) -> UpdateResourceSet -> f UpdateResourceSet
updateResourceSet_resourceSetType = (UpdateResourceSet -> Text)
-> (UpdateResourceSet -> Text -> UpdateResourceSet)
-> Lens UpdateResourceSet UpdateResourceSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceSet' {Text
resourceSetType :: Text
$sel:resourceSetType:UpdateResourceSet' :: UpdateResourceSet -> Text
resourceSetType} -> Text
resourceSetType) (\s :: UpdateResourceSet
s@UpdateResourceSet' {} Text
a -> UpdateResourceSet
s {$sel:resourceSetType:UpdateResourceSet' :: Text
resourceSetType = Text
a} :: UpdateResourceSet)

-- | A list of Resource objects
updateResourceSet_resources :: Lens.Lens' UpdateResourceSet [Resource]
updateResourceSet_resources :: ([Resource] -> f [Resource])
-> UpdateResourceSet -> f UpdateResourceSet
updateResourceSet_resources = (UpdateResourceSet -> [Resource])
-> (UpdateResourceSet -> [Resource] -> UpdateResourceSet)
-> Lens UpdateResourceSet UpdateResourceSet [Resource] [Resource]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceSet' {[Resource]
resources :: [Resource]
$sel:resources:UpdateResourceSet' :: UpdateResourceSet -> [Resource]
resources} -> [Resource]
resources) (\s :: UpdateResourceSet
s@UpdateResourceSet' {} [Resource]
a -> UpdateResourceSet
s {$sel:resources:UpdateResourceSet' :: [Resource]
resources = [Resource]
a} :: UpdateResourceSet) (([Resource] -> f [Resource])
 -> UpdateResourceSet -> f UpdateResourceSet)
-> (([Resource] -> f [Resource]) -> [Resource] -> f [Resource])
-> ([Resource] -> f [Resource])
-> UpdateResourceSet
-> f UpdateResourceSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Resource] -> f [Resource]) -> [Resource] -> f [Resource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData UpdateResourceSet

instance Core.ToHeaders UpdateResourceSet where
  toHeaders :: UpdateResourceSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateResourceSet -> 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 UpdateResourceSet where
  toJSON :: UpdateResourceSet -> Value
toJSON UpdateResourceSet' {[Resource]
Text
resources :: [Resource]
resourceSetType :: Text
resourceSetName :: Text
$sel:resources:UpdateResourceSet' :: UpdateResourceSet -> [Resource]
$sel:resourceSetType:UpdateResourceSet' :: UpdateResourceSet -> Text
$sel:resourceSetName:UpdateResourceSet' :: UpdateResourceSet -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"resourceSetType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceSetType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"resources" Text -> [Resource] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Resource]
resources)
          ]
      )

instance Core.ToPath UpdateResourceSet where
  toPath :: UpdateResourceSet -> ByteString
toPath UpdateResourceSet' {[Resource]
Text
resources :: [Resource]
resourceSetType :: Text
resourceSetName :: Text
$sel:resources:UpdateResourceSet' :: UpdateResourceSet -> [Resource]
$sel:resourceSetType:UpdateResourceSet' :: UpdateResourceSet -> Text
$sel:resourceSetName:UpdateResourceSet' :: UpdateResourceSet -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/resourcesets/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
resourceSetName]

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

-- | /See:/ 'newUpdateResourceSetResponse' smart constructor.
data UpdateResourceSetResponse = UpdateResourceSetResponse'
  { -- | The name of the ResourceSet
    UpdateResourceSetResponse -> Maybe Text
resourceSetName :: Prelude.Maybe Prelude.Text,
    -- | AWS Resource Type of the resources in the ResourceSet
    UpdateResourceSetResponse -> Maybe Text
resourceSetType :: Prelude.Maybe Prelude.Text,
    -- | A list of Resource objects
    UpdateResourceSetResponse -> Maybe [Resource]
resources :: Prelude.Maybe [Resource],
    -- | The arn for the ResourceSet
    UpdateResourceSetResponse -> Maybe Text
resourceSetArn :: Prelude.Maybe Prelude.Text,
    UpdateResourceSetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    UpdateResourceSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateResourceSetResponse -> UpdateResourceSetResponse -> Bool
(UpdateResourceSetResponse -> UpdateResourceSetResponse -> Bool)
-> (UpdateResourceSetResponse -> UpdateResourceSetResponse -> Bool)
-> Eq UpdateResourceSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResourceSetResponse -> UpdateResourceSetResponse -> Bool
$c/= :: UpdateResourceSetResponse -> UpdateResourceSetResponse -> Bool
== :: UpdateResourceSetResponse -> UpdateResourceSetResponse -> Bool
$c== :: UpdateResourceSetResponse -> UpdateResourceSetResponse -> Bool
Prelude.Eq, ReadPrec [UpdateResourceSetResponse]
ReadPrec UpdateResourceSetResponse
Int -> ReadS UpdateResourceSetResponse
ReadS [UpdateResourceSetResponse]
(Int -> ReadS UpdateResourceSetResponse)
-> ReadS [UpdateResourceSetResponse]
-> ReadPrec UpdateResourceSetResponse
-> ReadPrec [UpdateResourceSetResponse]
-> Read UpdateResourceSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResourceSetResponse]
$creadListPrec :: ReadPrec [UpdateResourceSetResponse]
readPrec :: ReadPrec UpdateResourceSetResponse
$creadPrec :: ReadPrec UpdateResourceSetResponse
readList :: ReadS [UpdateResourceSetResponse]
$creadList :: ReadS [UpdateResourceSetResponse]
readsPrec :: Int -> ReadS UpdateResourceSetResponse
$creadsPrec :: Int -> ReadS UpdateResourceSetResponse
Prelude.Read, Int -> UpdateResourceSetResponse -> ShowS
[UpdateResourceSetResponse] -> ShowS
UpdateResourceSetResponse -> String
(Int -> UpdateResourceSetResponse -> ShowS)
-> (UpdateResourceSetResponse -> String)
-> ([UpdateResourceSetResponse] -> ShowS)
-> Show UpdateResourceSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResourceSetResponse] -> ShowS
$cshowList :: [UpdateResourceSetResponse] -> ShowS
show :: UpdateResourceSetResponse -> String
$cshow :: UpdateResourceSetResponse -> String
showsPrec :: Int -> UpdateResourceSetResponse -> ShowS
$cshowsPrec :: Int -> UpdateResourceSetResponse -> ShowS
Prelude.Show, (forall x.
 UpdateResourceSetResponse -> Rep UpdateResourceSetResponse x)
-> (forall x.
    Rep UpdateResourceSetResponse x -> UpdateResourceSetResponse)
-> Generic UpdateResourceSetResponse
forall x.
Rep UpdateResourceSetResponse x -> UpdateResourceSetResponse
forall x.
UpdateResourceSetResponse -> Rep UpdateResourceSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateResourceSetResponse x -> UpdateResourceSetResponse
$cfrom :: forall x.
UpdateResourceSetResponse -> Rep UpdateResourceSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateResourceSetResponse' 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:
--
-- 'resourceSetName', 'updateResourceSetResponse_resourceSetName' - The name of the ResourceSet
--
-- 'resourceSetType', 'updateResourceSetResponse_resourceSetType' - AWS Resource Type of the resources in the ResourceSet
--
-- 'resources', 'updateResourceSetResponse_resources' - A list of Resource objects
--
-- 'resourceSetArn', 'updateResourceSetResponse_resourceSetArn' - The arn for the ResourceSet
--
-- 'tags', 'updateResourceSetResponse_tags' - Undocumented member.
--
-- 'httpStatus', 'updateResourceSetResponse_httpStatus' - The response's http status code.
newUpdateResourceSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateResourceSetResponse
newUpdateResourceSetResponse :: Int -> UpdateResourceSetResponse
newUpdateResourceSetResponse Int
pHttpStatus_ =
  UpdateResourceSetResponse' :: Maybe Text
-> Maybe Text
-> Maybe [Resource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> UpdateResourceSetResponse
UpdateResourceSetResponse'
    { $sel:resourceSetName:UpdateResourceSetResponse' :: Maybe Text
resourceSetName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSetType:UpdateResourceSetResponse' :: Maybe Text
resourceSetType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resources:UpdateResourceSetResponse' :: Maybe [Resource]
resources = Maybe [Resource]
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSetArn:UpdateResourceSetResponse' :: Maybe Text
resourceSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateResourceSetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateResourceSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the ResourceSet
updateResourceSetResponse_resourceSetName :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe Prelude.Text)
updateResourceSetResponse_resourceSetName :: (Maybe Text -> f (Maybe Text))
-> UpdateResourceSetResponse -> f UpdateResourceSetResponse
updateResourceSetResponse_resourceSetName = (UpdateResourceSetResponse -> Maybe Text)
-> (UpdateResourceSetResponse
    -> Maybe Text -> UpdateResourceSetResponse)
-> Lens
     UpdateResourceSetResponse
     UpdateResourceSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceSetResponse' {Maybe Text
resourceSetName :: Maybe Text
$sel:resourceSetName:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe Text
resourceSetName} -> Maybe Text
resourceSetName) (\s :: UpdateResourceSetResponse
s@UpdateResourceSetResponse' {} Maybe Text
a -> UpdateResourceSetResponse
s {$sel:resourceSetName:UpdateResourceSetResponse' :: Maybe Text
resourceSetName = Maybe Text
a} :: UpdateResourceSetResponse)

-- | AWS Resource Type of the resources in the ResourceSet
updateResourceSetResponse_resourceSetType :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe Prelude.Text)
updateResourceSetResponse_resourceSetType :: (Maybe Text -> f (Maybe Text))
-> UpdateResourceSetResponse -> f UpdateResourceSetResponse
updateResourceSetResponse_resourceSetType = (UpdateResourceSetResponse -> Maybe Text)
-> (UpdateResourceSetResponse
    -> Maybe Text -> UpdateResourceSetResponse)
-> Lens
     UpdateResourceSetResponse
     UpdateResourceSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceSetResponse' {Maybe Text
resourceSetType :: Maybe Text
$sel:resourceSetType:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe Text
resourceSetType} -> Maybe Text
resourceSetType) (\s :: UpdateResourceSetResponse
s@UpdateResourceSetResponse' {} Maybe Text
a -> UpdateResourceSetResponse
s {$sel:resourceSetType:UpdateResourceSetResponse' :: Maybe Text
resourceSetType = Maybe Text
a} :: UpdateResourceSetResponse)

-- | A list of Resource objects
updateResourceSetResponse_resources :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe [Resource])
updateResourceSetResponse_resources :: (Maybe [Resource] -> f (Maybe [Resource]))
-> UpdateResourceSetResponse -> f UpdateResourceSetResponse
updateResourceSetResponse_resources = (UpdateResourceSetResponse -> Maybe [Resource])
-> (UpdateResourceSetResponse
    -> Maybe [Resource] -> UpdateResourceSetResponse)
-> Lens
     UpdateResourceSetResponse
     UpdateResourceSetResponse
     (Maybe [Resource])
     (Maybe [Resource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceSetResponse' {Maybe [Resource]
resources :: Maybe [Resource]
$sel:resources:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe [Resource]
resources} -> Maybe [Resource]
resources) (\s :: UpdateResourceSetResponse
s@UpdateResourceSetResponse' {} Maybe [Resource]
a -> UpdateResourceSetResponse
s {$sel:resources:UpdateResourceSetResponse' :: Maybe [Resource]
resources = Maybe [Resource]
a} :: UpdateResourceSetResponse) ((Maybe [Resource] -> f (Maybe [Resource]))
 -> UpdateResourceSetResponse -> f UpdateResourceSetResponse)
-> ((Maybe [Resource] -> f (Maybe [Resource]))
    -> Maybe [Resource] -> f (Maybe [Resource]))
-> (Maybe [Resource] -> f (Maybe [Resource]))
-> UpdateResourceSetResponse
-> f UpdateResourceSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Resource] [Resource] [Resource] [Resource]
-> Iso
     (Maybe [Resource])
     (Maybe [Resource])
     (Maybe [Resource])
     (Maybe [Resource])
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 [Resource] [Resource] [Resource] [Resource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The arn for the ResourceSet
updateResourceSetResponse_resourceSetArn :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe Prelude.Text)
updateResourceSetResponse_resourceSetArn :: (Maybe Text -> f (Maybe Text))
-> UpdateResourceSetResponse -> f UpdateResourceSetResponse
updateResourceSetResponse_resourceSetArn = (UpdateResourceSetResponse -> Maybe Text)
-> (UpdateResourceSetResponse
    -> Maybe Text -> UpdateResourceSetResponse)
-> Lens
     UpdateResourceSetResponse
     UpdateResourceSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceSetResponse' {Maybe Text
resourceSetArn :: Maybe Text
$sel:resourceSetArn:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe Text
resourceSetArn} -> Maybe Text
resourceSetArn) (\s :: UpdateResourceSetResponse
s@UpdateResourceSetResponse' {} Maybe Text
a -> UpdateResourceSetResponse
s {$sel:resourceSetArn:UpdateResourceSetResponse' :: Maybe Text
resourceSetArn = Maybe Text
a} :: UpdateResourceSetResponse)

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

instance Prelude.NFData UpdateResourceSetResponse