{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Backup.Types.BackupSelection
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Backup.Types.BackupSelection where

import Amazonka.Backup.Types.Condition
import Amazonka.Backup.Types.Conditions
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

-- | Used to specify a set of resources to a backup plan.
--
-- Specifying your desired @Conditions@, @ListOfTags@, @NotResources@,
-- and\/or @Resources@ is recommended. If none of these are specified,
-- Backup will attempt to select all supported and opted-in storage
-- resources, which could have unintended cost implications.
--
-- /See:/ 'newBackupSelection' smart constructor.
data BackupSelection = BackupSelection'
  { -- | A list of conditions that you define to assign resources to your backup
    -- plans using tags. For example,
    -- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.
    -- Condition operators are case sensitive.
    --
    -- @Conditions@ differs from @ListOfTags@ as follows:
    --
    -- -   When you specify more than one condition, you only assign the
    --     resources that match ALL conditions (using AND logic).
    --
    -- -   @Conditions@ supports @StringEquals@, @StringLike@,
    --     @StringNotEquals@, and @StringNotLike@. @ListOfTags@ only supports
    --     @StringEquals@.
    BackupSelection -> Maybe Conditions
conditions :: Prelude.Maybe Conditions,
    -- | A list of conditions that you define to assign resources to your backup
    -- plans using tags. For example,
    -- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.
    -- Condition operators are case sensitive.
    --
    -- @ListOfTags@ differs from @Conditions@ as follows:
    --
    -- -   When you specify more than one condition, you assign all resources
    --     that match AT LEAST ONE condition (using OR logic).
    --
    -- -   @ListOfTags@ only supports @StringEquals@. @Conditions@ supports
    --     @StringEquals@, @StringLike@, @StringNotEquals@, and
    --     @StringNotLike@.
    BackupSelection -> Maybe [Condition]
listOfTags :: Prelude.Maybe [Condition],
    -- | A list of Amazon Resource Names (ARNs) to exclude from a backup plan.
    -- The maximum number of ARNs is 500 without wildcards, or 30 ARNs with
    -- wildcards.
    --
    -- If you need to exclude many resources from a backup plan, consider a
    -- different resource selection strategy, such as assigning only one or a
    -- few resource types or refining your resource selection using tags.
    BackupSelection -> Maybe [Text]
notResources :: Prelude.Maybe [Prelude.Text],
    -- | A list of Amazon Resource Names (ARNs) to assign to a backup plan. The
    -- maximum number of ARNs is 500 without wildcards, or 30 ARNs with
    -- wildcards.
    --
    -- If you need to assign many resources to a backup plan, consider a
    -- different resource selection strategy, such as assigning all resources
    -- of a resource type or refining your resource selection using tags.
    BackupSelection -> Maybe [Text]
resources :: Prelude.Maybe [Prelude.Text],
    -- | The display name of a resource selection document. Must contain 1 to 50
    -- alphanumeric or \'-_.\' characters.
    BackupSelection -> Text
selectionName :: Prelude.Text,
    -- | The ARN of the IAM role that Backup uses to authenticate when backing up
    -- the target resource; for example,
    -- @arn:aws:iam::123456789012:role\/S3Access@.
    BackupSelection -> Text
iamRoleArn :: Prelude.Text
  }
  deriving (BackupSelection -> BackupSelection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackupSelection -> BackupSelection -> Bool
$c/= :: BackupSelection -> BackupSelection -> Bool
== :: BackupSelection -> BackupSelection -> Bool
$c== :: BackupSelection -> BackupSelection -> Bool
Prelude.Eq, ReadPrec [BackupSelection]
ReadPrec BackupSelection
Int -> ReadS BackupSelection
ReadS [BackupSelection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BackupSelection]
$creadListPrec :: ReadPrec [BackupSelection]
readPrec :: ReadPrec BackupSelection
$creadPrec :: ReadPrec BackupSelection
readList :: ReadS [BackupSelection]
$creadList :: ReadS [BackupSelection]
readsPrec :: Int -> ReadS BackupSelection
$creadsPrec :: Int -> ReadS BackupSelection
Prelude.Read, Int -> BackupSelection -> ShowS
[BackupSelection] -> ShowS
BackupSelection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BackupSelection] -> ShowS
$cshowList :: [BackupSelection] -> ShowS
show :: BackupSelection -> String
$cshow :: BackupSelection -> String
showsPrec :: Int -> BackupSelection -> ShowS
$cshowsPrec :: Int -> BackupSelection -> ShowS
Prelude.Show, forall x. Rep BackupSelection x -> BackupSelection
forall x. BackupSelection -> Rep BackupSelection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BackupSelection x -> BackupSelection
$cfrom :: forall x. BackupSelection -> Rep BackupSelection x
Prelude.Generic)

-- |
-- Create a value of 'BackupSelection' 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:
--
-- 'conditions', 'backupSelection_conditions' - A list of conditions that you define to assign resources to your backup
-- plans using tags. For example,
-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.
-- Condition operators are case sensitive.
--
-- @Conditions@ differs from @ListOfTags@ as follows:
--
-- -   When you specify more than one condition, you only assign the
--     resources that match ALL conditions (using AND logic).
--
-- -   @Conditions@ supports @StringEquals@, @StringLike@,
--     @StringNotEquals@, and @StringNotLike@. @ListOfTags@ only supports
--     @StringEquals@.
--
-- 'listOfTags', 'backupSelection_listOfTags' - A list of conditions that you define to assign resources to your backup
-- plans using tags. For example,
-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.
-- Condition operators are case sensitive.
--
-- @ListOfTags@ differs from @Conditions@ as follows:
--
-- -   When you specify more than one condition, you assign all resources
--     that match AT LEAST ONE condition (using OR logic).
--
-- -   @ListOfTags@ only supports @StringEquals@. @Conditions@ supports
--     @StringEquals@, @StringLike@, @StringNotEquals@, and
--     @StringNotLike@.
--
-- 'notResources', 'backupSelection_notResources' - A list of Amazon Resource Names (ARNs) to exclude from a backup plan.
-- The maximum number of ARNs is 500 without wildcards, or 30 ARNs with
-- wildcards.
--
-- If you need to exclude many resources from a backup plan, consider a
-- different resource selection strategy, such as assigning only one or a
-- few resource types or refining your resource selection using tags.
--
-- 'resources', 'backupSelection_resources' - A list of Amazon Resource Names (ARNs) to assign to a backup plan. The
-- maximum number of ARNs is 500 without wildcards, or 30 ARNs with
-- wildcards.
--
-- If you need to assign many resources to a backup plan, consider a
-- different resource selection strategy, such as assigning all resources
-- of a resource type or refining your resource selection using tags.
--
-- 'selectionName', 'backupSelection_selectionName' - The display name of a resource selection document. Must contain 1 to 50
-- alphanumeric or \'-_.\' characters.
--
-- 'iamRoleArn', 'backupSelection_iamRoleArn' - The ARN of the IAM role that Backup uses to authenticate when backing up
-- the target resource; for example,
-- @arn:aws:iam::123456789012:role\/S3Access@.
newBackupSelection ::
  -- | 'selectionName'
  Prelude.Text ->
  -- | 'iamRoleArn'
  Prelude.Text ->
  BackupSelection
newBackupSelection :: Text -> Text -> BackupSelection
newBackupSelection Text
pSelectionName_ Text
pIamRoleArn_ =
  BackupSelection'
    { $sel:conditions:BackupSelection' :: Maybe Conditions
conditions = forall a. Maybe a
Prelude.Nothing,
      $sel:listOfTags:BackupSelection' :: Maybe [Condition]
listOfTags = forall a. Maybe a
Prelude.Nothing,
      $sel:notResources:BackupSelection' :: Maybe [Text]
notResources = forall a. Maybe a
Prelude.Nothing,
      $sel:resources:BackupSelection' :: Maybe [Text]
resources = forall a. Maybe a
Prelude.Nothing,
      $sel:selectionName:BackupSelection' :: Text
selectionName = Text
pSelectionName_,
      $sel:iamRoleArn:BackupSelection' :: Text
iamRoleArn = Text
pIamRoleArn_
    }

-- | A list of conditions that you define to assign resources to your backup
-- plans using tags. For example,
-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.
-- Condition operators are case sensitive.
--
-- @Conditions@ differs from @ListOfTags@ as follows:
--
-- -   When you specify more than one condition, you only assign the
--     resources that match ALL conditions (using AND logic).
--
-- -   @Conditions@ supports @StringEquals@, @StringLike@,
--     @StringNotEquals@, and @StringNotLike@. @ListOfTags@ only supports
--     @StringEquals@.
backupSelection_conditions :: Lens.Lens' BackupSelection (Prelude.Maybe Conditions)
backupSelection_conditions :: Lens' BackupSelection (Maybe Conditions)
backupSelection_conditions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSelection' {Maybe Conditions
conditions :: Maybe Conditions
$sel:conditions:BackupSelection' :: BackupSelection -> Maybe Conditions
conditions} -> Maybe Conditions
conditions) (\s :: BackupSelection
s@BackupSelection' {} Maybe Conditions
a -> BackupSelection
s {$sel:conditions:BackupSelection' :: Maybe Conditions
conditions = Maybe Conditions
a} :: BackupSelection)

-- | A list of conditions that you define to assign resources to your backup
-- plans using tags. For example,
-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.
-- Condition operators are case sensitive.
--
-- @ListOfTags@ differs from @Conditions@ as follows:
--
-- -   When you specify more than one condition, you assign all resources
--     that match AT LEAST ONE condition (using OR logic).
--
-- -   @ListOfTags@ only supports @StringEquals@. @Conditions@ supports
--     @StringEquals@, @StringLike@, @StringNotEquals@, and
--     @StringNotLike@.
backupSelection_listOfTags :: Lens.Lens' BackupSelection (Prelude.Maybe [Condition])
backupSelection_listOfTags :: Lens' BackupSelection (Maybe [Condition])
backupSelection_listOfTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSelection' {Maybe [Condition]
listOfTags :: Maybe [Condition]
$sel:listOfTags:BackupSelection' :: BackupSelection -> Maybe [Condition]
listOfTags} -> Maybe [Condition]
listOfTags) (\s :: BackupSelection
s@BackupSelection' {} Maybe [Condition]
a -> BackupSelection
s {$sel:listOfTags:BackupSelection' :: Maybe [Condition]
listOfTags = Maybe [Condition]
a} :: BackupSelection) 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

-- | A list of Amazon Resource Names (ARNs) to exclude from a backup plan.
-- The maximum number of ARNs is 500 without wildcards, or 30 ARNs with
-- wildcards.
--
-- If you need to exclude many resources from a backup plan, consider a
-- different resource selection strategy, such as assigning only one or a
-- few resource types or refining your resource selection using tags.
backupSelection_notResources :: Lens.Lens' BackupSelection (Prelude.Maybe [Prelude.Text])
backupSelection_notResources :: Lens' BackupSelection (Maybe [Text])
backupSelection_notResources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSelection' {Maybe [Text]
notResources :: Maybe [Text]
$sel:notResources:BackupSelection' :: BackupSelection -> Maybe [Text]
notResources} -> Maybe [Text]
notResources) (\s :: BackupSelection
s@BackupSelection' {} Maybe [Text]
a -> BackupSelection
s {$sel:notResources:BackupSelection' :: Maybe [Text]
notResources = Maybe [Text]
a} :: BackupSelection) 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

-- | A list of Amazon Resource Names (ARNs) to assign to a backup plan. The
-- maximum number of ARNs is 500 without wildcards, or 30 ARNs with
-- wildcards.
--
-- If you need to assign many resources to a backup plan, consider a
-- different resource selection strategy, such as assigning all resources
-- of a resource type or refining your resource selection using tags.
backupSelection_resources :: Lens.Lens' BackupSelection (Prelude.Maybe [Prelude.Text])
backupSelection_resources :: Lens' BackupSelection (Maybe [Text])
backupSelection_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSelection' {Maybe [Text]
resources :: Maybe [Text]
$sel:resources:BackupSelection' :: BackupSelection -> Maybe [Text]
resources} -> Maybe [Text]
resources) (\s :: BackupSelection
s@BackupSelection' {} Maybe [Text]
a -> BackupSelection
s {$sel:resources:BackupSelection' :: Maybe [Text]
resources = Maybe [Text]
a} :: BackupSelection) 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 display name of a resource selection document. Must contain 1 to 50
-- alphanumeric or \'-_.\' characters.
backupSelection_selectionName :: Lens.Lens' BackupSelection Prelude.Text
backupSelection_selectionName :: Lens' BackupSelection Text
backupSelection_selectionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSelection' {Text
selectionName :: Text
$sel:selectionName:BackupSelection' :: BackupSelection -> Text
selectionName} -> Text
selectionName) (\s :: BackupSelection
s@BackupSelection' {} Text
a -> BackupSelection
s {$sel:selectionName:BackupSelection' :: Text
selectionName = Text
a} :: BackupSelection)

-- | The ARN of the IAM role that Backup uses to authenticate when backing up
-- the target resource; for example,
-- @arn:aws:iam::123456789012:role\/S3Access@.
backupSelection_iamRoleArn :: Lens.Lens' BackupSelection Prelude.Text
backupSelection_iamRoleArn :: Lens' BackupSelection Text
backupSelection_iamRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackupSelection' {Text
iamRoleArn :: Text
$sel:iamRoleArn:BackupSelection' :: BackupSelection -> Text
iamRoleArn} -> Text
iamRoleArn) (\s :: BackupSelection
s@BackupSelection' {} Text
a -> BackupSelection
s {$sel:iamRoleArn:BackupSelection' :: Text
iamRoleArn = Text
a} :: BackupSelection)

instance Data.FromJSON BackupSelection where
  parseJSON :: Value -> Parser BackupSelection
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BackupSelection"
      ( \Object
x ->
          Maybe Conditions
-> Maybe [Condition]
-> Maybe [Text]
-> Maybe [Text]
-> Text
-> Text
-> BackupSelection
BackupSelection'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Conditions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ListOfTags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= 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 -> Parser (Maybe a)
Data..:? Key
"NotResources" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= 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 -> Parser (Maybe a)
Data..:? Key
"Resources" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= 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 -> Parser a
Data..: Key
"SelectionName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"IamRoleArn")
      )

instance Prelude.Hashable BackupSelection where
  hashWithSalt :: Int -> BackupSelection -> Int
hashWithSalt Int
_salt BackupSelection' {Maybe [Text]
Maybe [Condition]
Maybe Conditions
Text
iamRoleArn :: Text
selectionName :: Text
resources :: Maybe [Text]
notResources :: Maybe [Text]
listOfTags :: Maybe [Condition]
conditions :: Maybe Conditions
$sel:iamRoleArn:BackupSelection' :: BackupSelection -> Text
$sel:selectionName:BackupSelection' :: BackupSelection -> Text
$sel:resources:BackupSelection' :: BackupSelection -> Maybe [Text]
$sel:notResources:BackupSelection' :: BackupSelection -> Maybe [Text]
$sel:listOfTags:BackupSelection' :: BackupSelection -> Maybe [Condition]
$sel:conditions:BackupSelection' :: BackupSelection -> Maybe Conditions
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Conditions
conditions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Condition]
listOfTags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
notResources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
resources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
selectionName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
iamRoleArn

instance Prelude.NFData BackupSelection where
  rnf :: BackupSelection -> ()
rnf BackupSelection' {Maybe [Text]
Maybe [Condition]
Maybe Conditions
Text
iamRoleArn :: Text
selectionName :: Text
resources :: Maybe [Text]
notResources :: Maybe [Text]
listOfTags :: Maybe [Condition]
conditions :: Maybe Conditions
$sel:iamRoleArn:BackupSelection' :: BackupSelection -> Text
$sel:selectionName:BackupSelection' :: BackupSelection -> Text
$sel:resources:BackupSelection' :: BackupSelection -> Maybe [Text]
$sel:notResources:BackupSelection' :: BackupSelection -> Maybe [Text]
$sel:listOfTags:BackupSelection' :: BackupSelection -> Maybe [Condition]
$sel:conditions:BackupSelection' :: BackupSelection -> Maybe Conditions
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Conditions
conditions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Condition]
listOfTags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
notResources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
resources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
selectionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
iamRoleArn

instance Data.ToJSON BackupSelection where
  toJSON :: BackupSelection -> Value
toJSON BackupSelection' {Maybe [Text]
Maybe [Condition]
Maybe Conditions
Text
iamRoleArn :: Text
selectionName :: Text
resources :: Maybe [Text]
notResources :: Maybe [Text]
listOfTags :: Maybe [Condition]
conditions :: Maybe Conditions
$sel:iamRoleArn:BackupSelection' :: BackupSelection -> Text
$sel:selectionName:BackupSelection' :: BackupSelection -> Text
$sel:resources:BackupSelection' :: BackupSelection -> Maybe [Text]
$sel:notResources:BackupSelection' :: BackupSelection -> Maybe [Text]
$sel:listOfTags:BackupSelection' :: BackupSelection -> Maybe [Condition]
$sel:conditions:BackupSelection' :: BackupSelection -> Maybe Conditions
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Conditions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Conditions
conditions,
            (Key
"ListOfTags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Condition]
listOfTags,
            (Key
"NotResources" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
notResources,
            (Key
"Resources" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resources,
            forall a. a -> Maybe a
Prelude.Just (Key
"SelectionName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
selectionName),
            forall a. a -> Maybe a
Prelude.Just (Key
"IamRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
iamRoleArn)
          ]
      )