{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a 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_resourceSetArn,
    updateResourceSetResponse_resourceSetName,
    updateResourceSetResponse_resourceSetType,
    updateResourceSetResponse_resources,
    updateResourceSetResponse_tags,
    updateResourceSetResponse_httpStatus,
  )
where

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

-- | Name of a resource set.
--
-- /See:/ 'newUpdateResourceSet' smart constructor.
data UpdateResourceSet = UpdateResourceSet'
  { -- | Name of a resource set.
    UpdateResourceSet -> Text
resourceSetName :: Prelude.Text,
    -- | The resource type of the resources in the resource set. Enter one of the
    -- following values for resource type:
    --
    -- AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage,
    -- AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm,
    -- AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume,
    -- AWS::ElasticLoadBalancing::LoadBalancer,
    -- AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function,
    -- AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck,
    -- AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC,
    -- AWS::EC2::VPNConnection, AWS::EC2::VPNGateway,
    -- AWS::Route53RecoveryReadiness::DNSTargetResource
    UpdateResourceSet -> Text
resourceSetType :: Prelude.Text,
    -- | A list of resource objects.
    UpdateResourceSet -> [Resource]
resources :: [Resource]
  }
  deriving (UpdateResourceSet -> UpdateResourceSet -> Bool
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]
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
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. 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' - Name of a resource set.
--
-- 'resourceSetType', 'updateResourceSet_resourceSetType' - The resource type of the resources in the resource set. Enter one of the
-- following values for resource type:
--
-- AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage,
-- AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm,
-- AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume,
-- AWS::ElasticLoadBalancing::LoadBalancer,
-- AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function,
-- AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck,
-- AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC,
-- AWS::EC2::VPNConnection, AWS::EC2::VPNGateway,
-- AWS::Route53RecoveryReadiness::DNSTargetResource
--
-- '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'
      { $sel:resourceSetName:UpdateResourceSet' :: Text
resourceSetName =
          Text
pResourceSetName_,
        $sel:resourceSetType:UpdateResourceSet' :: Text
resourceSetType = Text
pResourceSetType_,
        $sel:resources:UpdateResourceSet' :: [Resource]
resources = forall a. Monoid a => a
Prelude.mempty
      }

-- | Name of a resource set.
updateResourceSet_resourceSetName :: Lens.Lens' UpdateResourceSet Prelude.Text
updateResourceSet_resourceSetName :: Lens' UpdateResourceSet Text
updateResourceSet_resourceSetName = 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)

-- | The resource type of the resources in the resource set. Enter one of the
-- following values for resource type:
--
-- AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage,
-- AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm,
-- AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume,
-- AWS::ElasticLoadBalancing::LoadBalancer,
-- AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function,
-- AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck,
-- AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC,
-- AWS::EC2::VPNConnection, AWS::EC2::VPNGateway,
-- AWS::Route53RecoveryReadiness::DNSTargetResource
updateResourceSet_resourceSetType :: Lens.Lens' UpdateResourceSet Prelude.Text
updateResourceSet_resourceSetType :: Lens' UpdateResourceSet Text
updateResourceSet_resourceSetType = 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 :: Lens' UpdateResourceSet [Resource]
updateResourceSet_resources = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest UpdateResourceSet where
  type
    AWSResponse UpdateResourceSet =
      UpdateResourceSetResponse
  request :: (Service -> Service)
-> UpdateResourceSet -> Request UpdateResourceSet
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateResourceSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateResourceSet)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Resource]
-> Maybe (HashMap Text Text)
-> Int
-> UpdateResourceSetResponse
UpdateResourceSetResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"resourceSetArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"resourceSetName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"resourceSetType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"resources" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateResourceSet where
  hashWithSalt :: Int -> UpdateResourceSet -> Int
hashWithSalt Int
_salt UpdateResourceSet' {[Resource]
Text
resources :: [Resource]
resourceSetType :: Text
resourceSetName :: Text
$sel:resources:UpdateResourceSet' :: UpdateResourceSet -> [Resource]
$sel:resourceSetType:UpdateResourceSet' :: UpdateResourceSet -> Text
$sel:resourceSetName:UpdateResourceSet' :: UpdateResourceSet -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceSetName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceSetType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Resource]
resources

instance Prelude.NFData UpdateResourceSet where
  rnf :: UpdateResourceSet -> ()
rnf UpdateResourceSet' {[Resource]
Text
resources :: [Resource]
resourceSetType :: Text
resourceSetName :: Text
$sel:resources:UpdateResourceSet' :: UpdateResourceSet -> [Resource]
$sel:resourceSetType:UpdateResourceSet' :: UpdateResourceSet -> Text
$sel:resourceSetName:UpdateResourceSet' :: UpdateResourceSet -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
resourceSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceSetType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Resource]
resources

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

instance Data.ToJSON 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
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"resourceSetType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceSetType),
            forall a. a -> Maybe a
Prelude.Just (Key
"resources" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Resource]
resources)
          ]
      )

instance Data.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
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/resourcesets/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
resourceSetName]

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

-- | /See:/ 'newUpdateResourceSetResponse' smart constructor.
data UpdateResourceSetResponse = UpdateResourceSetResponse'
  { -- | The Amazon Resource Name (ARN) for the resource set.
    UpdateResourceSetResponse -> Maybe Text
resourceSetArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the resource set.
    UpdateResourceSetResponse -> Maybe Text
resourceSetName :: Prelude.Maybe Prelude.Text,
    -- | The resource type of the resources in the resource set. Enter one of the
    -- following values for resource type:
    --
    -- AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage,
    -- AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm,
    -- AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume,
    -- AWS::ElasticLoadBalancing::LoadBalancer,
    -- AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function,
    -- AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck,
    -- AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC,
    -- AWS::EC2::VPNConnection, AWS::EC2::VPNGateway,
    -- AWS::Route53RecoveryReadiness::DNSTargetResource
    UpdateResourceSetResponse -> Maybe Text
resourceSetType :: Prelude.Maybe Prelude.Text,
    -- | A list of resource objects.
    UpdateResourceSetResponse -> Maybe [Resource]
resources :: Prelude.Maybe [Resource],
    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
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]
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
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.
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:
--
-- 'resourceSetArn', 'updateResourceSetResponse_resourceSetArn' - The Amazon Resource Name (ARN) for the resource set.
--
-- 'resourceSetName', 'updateResourceSetResponse_resourceSetName' - The name of the resource set.
--
-- 'resourceSetType', 'updateResourceSetResponse_resourceSetType' - The resource type of the resources in the resource set. Enter one of the
-- following values for resource type:
--
-- AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage,
-- AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm,
-- AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume,
-- AWS::ElasticLoadBalancing::LoadBalancer,
-- AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function,
-- AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck,
-- AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC,
-- AWS::EC2::VPNConnection, AWS::EC2::VPNGateway,
-- AWS::Route53RecoveryReadiness::DNSTargetResource
--
-- 'resources', 'updateResourceSetResponse_resources' - A list of resource objects.
--
-- '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'
    { $sel:resourceSetArn:UpdateResourceSetResponse' :: Maybe Text
resourceSetArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSetName:UpdateResourceSetResponse' :: Maybe Text
resourceSetName = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSetType:UpdateResourceSetResponse' :: Maybe Text
resourceSetType = forall a. Maybe a
Prelude.Nothing,
      $sel:resources:UpdateResourceSetResponse' :: Maybe [Resource]
resources = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateResourceSetResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateResourceSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) for the resource set.
updateResourceSetResponse_resourceSetArn :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe Prelude.Text)
updateResourceSetResponse_resourceSetArn :: Lens' UpdateResourceSetResponse (Maybe Text)
updateResourceSetResponse_resourceSetArn = 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)

-- | The name of the resource set.
updateResourceSetResponse_resourceSetName :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe Prelude.Text)
updateResourceSetResponse_resourceSetName :: Lens' UpdateResourceSetResponse (Maybe Text)
updateResourceSetResponse_resourceSetName = 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)

-- | The resource type of the resources in the resource set. Enter one of the
-- following values for resource type:
--
-- AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage,
-- AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm,
-- AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume,
-- AWS::ElasticLoadBalancing::LoadBalancer,
-- AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function,
-- AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck,
-- AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC,
-- AWS::EC2::VPNConnection, AWS::EC2::VPNGateway,
-- AWS::Route53RecoveryReadiness::DNSTargetResource
updateResourceSetResponse_resourceSetType :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe Prelude.Text)
updateResourceSetResponse_resourceSetType :: Lens' UpdateResourceSetResponse (Maybe Text)
updateResourceSetResponse_resourceSetType = 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 :: Lens' UpdateResourceSetResponse (Maybe [Resource])
updateResourceSetResponse_resources = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
updateResourceSetResponse_tags :: Lens.Lens' UpdateResourceSetResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateResourceSetResponse_tags :: Lens' UpdateResourceSetResponse (Maybe (HashMap Text Text))
updateResourceSetResponse_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall 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 :: Lens' UpdateResourceSetResponse Int
updateResourceSetResponse_httpStatus = 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 where
  rnf :: UpdateResourceSetResponse -> ()
rnf UpdateResourceSetResponse' {Int
Maybe [Resource]
Maybe Text
Maybe (HashMap Text Text)
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
resources :: Maybe [Resource]
resourceSetType :: Maybe Text
resourceSetName :: Maybe Text
resourceSetArn :: Maybe Text
$sel:httpStatus:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Int
$sel:tags:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe (HashMap Text Text)
$sel:resources:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe [Resource]
$sel:resourceSetType:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe Text
$sel:resourceSetName:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe Text
$sel:resourceSetArn:UpdateResourceSetResponse' :: UpdateResourceSetResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceSetArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceSetType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Resource]
resources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus