{-# 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.ServiceCatalog.Types.ProvisioningPreferences
-- 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.ServiceCatalog.Types.ProvisioningPreferences 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

-- | The user-defined preferences that will be applied when updating a
-- provisioned product. Not all preferences are applicable to all
-- provisioned product type
--
-- One or more Amazon Web Services accounts that will have access to the
-- provisioned product.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The Amazon Web Services accounts specified should be within the list of
-- accounts in the @STACKSET@ constraint. To get the list of accounts in
-- the @STACKSET@ constraint, use the @DescribeProvisioningParameters@
-- operation.
--
-- If no values are specified, the default value is all accounts from the
-- @STACKSET@ constraint.
--
-- /See:/ 'newProvisioningPreferences' smart constructor.
data ProvisioningPreferences = ProvisioningPreferences'
  { -- | One or more Amazon Web Services accounts where the provisioned product
    -- will be available.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- The specified accounts should be within the list of accounts from the
    -- @STACKSET@ constraint. To get the list of accounts in the @STACKSET@
    -- constraint, use the @DescribeProvisioningParameters@ operation.
    --
    -- If no values are specified, the default value is all acounts from the
    -- @STACKSET@ constraint.
    ProvisioningPreferences -> Maybe [Text]
stackSetAccounts :: Prelude.Maybe [Prelude.Text],
    -- | The number of accounts, per Region, for which this operation can fail
    -- before Service Catalog stops the operation in that Region. If the
    -- operation is stopped in a Region, Service Catalog doesn\'t attempt the
    -- operation in any subsequent Regions.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetFailureToleranceCount@ or
    -- @StackSetFailureTolerancePercentage@, but not both.
    --
    -- The default value is @0@ if no value is specified.
    ProvisioningPreferences -> Maybe Natural
stackSetFailureToleranceCount :: Prelude.Maybe Prelude.Natural,
    -- | The percentage of accounts, per Region, for which this stack operation
    -- can fail before Service Catalog stops the operation in that Region. If
    -- the operation is stopped in a Region, Service Catalog doesn\'t attempt
    -- the operation in any subsequent Regions.
    --
    -- When calculating the number of accounts based on the specified
    -- percentage, Service Catalog rounds down to the next whole number.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetFailureToleranceCount@ or
    -- @StackSetFailureTolerancePercentage@, but not both.
    ProvisioningPreferences -> Maybe Natural
stackSetFailureTolerancePercentage :: Prelude.Maybe Prelude.Natural,
    -- | The maximum number of accounts in which to perform this operation at one
    -- time. This is dependent on the value of @StackSetFailureToleranceCount@.
    -- @StackSetMaxConcurrentCount@ is at most one more than the
    -- @StackSetFailureToleranceCount@.
    --
    -- Note that this setting lets you specify the maximum for operations. For
    -- large deployments, under certain circumstances the actual number of
    -- accounts acted upon concurrently may be lower due to service throttling.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
    -- @StackSetMaxConcurrentPercentage@, but not both.
    ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyCount :: Prelude.Maybe Prelude.Natural,
    -- | The maximum percentage of accounts in which to perform this operation at
    -- one time.
    --
    -- When calculating the number of accounts based on the specified
    -- percentage, Service Catalog rounds down to the next whole number. This
    -- is true except in cases where rounding down would result is zero. In
    -- this case, Service Catalog sets the number as @1@ instead.
    --
    -- Note that this setting lets you specify the maximum for operations. For
    -- large deployments, under certain circumstances the actual number of
    -- accounts acted upon concurrently may be lower due to service throttling.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
    -- @StackSetMaxConcurrentPercentage@, but not both.
    ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyPercentage :: Prelude.Maybe Prelude.Natural,
    -- | One or more Amazon Web Services Regions where the provisioned product
    -- will be available.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- The specified Regions should be within the list of Regions from the
    -- @STACKSET@ constraint. To get the list of Regions in the @STACKSET@
    -- constraint, use the @DescribeProvisioningParameters@ operation.
    --
    -- If no values are specified, the default value is all Regions from the
    -- @STACKSET@ constraint.
    ProvisioningPreferences -> Maybe [Text]
stackSetRegions :: Prelude.Maybe [Prelude.Text]
  }
  deriving (ProvisioningPreferences -> ProvisioningPreferences -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
$c/= :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
== :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
$c== :: ProvisioningPreferences -> ProvisioningPreferences -> Bool
Prelude.Eq, ReadPrec [ProvisioningPreferences]
ReadPrec ProvisioningPreferences
Int -> ReadS ProvisioningPreferences
ReadS [ProvisioningPreferences]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisioningPreferences]
$creadListPrec :: ReadPrec [ProvisioningPreferences]
readPrec :: ReadPrec ProvisioningPreferences
$creadPrec :: ReadPrec ProvisioningPreferences
readList :: ReadS [ProvisioningPreferences]
$creadList :: ReadS [ProvisioningPreferences]
readsPrec :: Int -> ReadS ProvisioningPreferences
$creadsPrec :: Int -> ReadS ProvisioningPreferences
Prelude.Read, Int -> ProvisioningPreferences -> ShowS
[ProvisioningPreferences] -> ShowS
ProvisioningPreferences -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisioningPreferences] -> ShowS
$cshowList :: [ProvisioningPreferences] -> ShowS
show :: ProvisioningPreferences -> String
$cshow :: ProvisioningPreferences -> String
showsPrec :: Int -> ProvisioningPreferences -> ShowS
$cshowsPrec :: Int -> ProvisioningPreferences -> ShowS
Prelude.Show, forall x. Rep ProvisioningPreferences x -> ProvisioningPreferences
forall x. ProvisioningPreferences -> Rep ProvisioningPreferences x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProvisioningPreferences x -> ProvisioningPreferences
$cfrom :: forall x. ProvisioningPreferences -> Rep ProvisioningPreferences x
Prelude.Generic)

-- |
-- Create a value of 'ProvisioningPreferences' 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:
--
-- 'stackSetAccounts', 'provisioningPreferences_stackSetAccounts' - One or more Amazon Web Services accounts where the provisioned product
-- will be available.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The specified accounts should be within the list of accounts from the
-- @STACKSET@ constraint. To get the list of accounts in the @STACKSET@
-- constraint, use the @DescribeProvisioningParameters@ operation.
--
-- If no values are specified, the default value is all acounts from the
-- @STACKSET@ constraint.
--
-- 'stackSetFailureToleranceCount', 'provisioningPreferences_stackSetFailureToleranceCount' - The number of accounts, per Region, for which this operation can fail
-- before Service Catalog stops the operation in that Region. If the
-- operation is stopped in a Region, Service Catalog doesn\'t attempt the
-- operation in any subsequent Regions.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
--
-- The default value is @0@ if no value is specified.
--
-- 'stackSetFailureTolerancePercentage', 'provisioningPreferences_stackSetFailureTolerancePercentage' - The percentage of accounts, per Region, for which this stack operation
-- can fail before Service Catalog stops the operation in that Region. If
-- the operation is stopped in a Region, Service Catalog doesn\'t attempt
-- the operation in any subsequent Regions.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
--
-- 'stackSetMaxConcurrencyCount', 'provisioningPreferences_stackSetMaxConcurrencyCount' - The maximum number of accounts in which to perform this operation at one
-- time. This is dependent on the value of @StackSetFailureToleranceCount@.
-- @StackSetMaxConcurrentCount@ is at most one more than the
-- @StackSetFailureToleranceCount@.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
--
-- 'stackSetMaxConcurrencyPercentage', 'provisioningPreferences_stackSetMaxConcurrencyPercentage' - The maximum percentage of accounts in which to perform this operation at
-- one time.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number. This
-- is true except in cases where rounding down would result is zero. In
-- this case, Service Catalog sets the number as @1@ instead.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
--
-- 'stackSetRegions', 'provisioningPreferences_stackSetRegions' - One or more Amazon Web Services Regions where the provisioned product
-- will be available.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The specified Regions should be within the list of Regions from the
-- @STACKSET@ constraint. To get the list of Regions in the @STACKSET@
-- constraint, use the @DescribeProvisioningParameters@ operation.
--
-- If no values are specified, the default value is all Regions from the
-- @STACKSET@ constraint.
newProvisioningPreferences ::
  ProvisioningPreferences
newProvisioningPreferences :: ProvisioningPreferences
newProvisioningPreferences =
  ProvisioningPreferences'
    { $sel:stackSetAccounts:ProvisioningPreferences' :: Maybe [Text]
stackSetAccounts =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: Maybe Natural
stackSetFailureToleranceCount = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: Maybe Natural
stackSetFailureTolerancePercentage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyCount = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyPercentage = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetRegions:ProvisioningPreferences' :: Maybe [Text]
stackSetRegions = forall a. Maybe a
Prelude.Nothing
    }

-- | One or more Amazon Web Services accounts where the provisioned product
-- will be available.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The specified accounts should be within the list of accounts from the
-- @STACKSET@ constraint. To get the list of accounts in the @STACKSET@
-- constraint, use the @DescribeProvisioningParameters@ operation.
--
-- If no values are specified, the default value is all acounts from the
-- @STACKSET@ constraint.
provisioningPreferences_stackSetAccounts :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe [Prelude.Text])
provisioningPreferences_stackSetAccounts :: Lens' ProvisioningPreferences (Maybe [Text])
provisioningPreferences_stackSetAccounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe [Text]
stackSetAccounts :: Maybe [Text]
$sel:stackSetAccounts:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
stackSetAccounts} -> Maybe [Text]
stackSetAccounts) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe [Text]
a -> ProvisioningPreferences
s {$sel:stackSetAccounts:ProvisioningPreferences' :: Maybe [Text]
stackSetAccounts = Maybe [Text]
a} :: ProvisioningPreferences) 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 number of accounts, per Region, for which this operation can fail
-- before Service Catalog stops the operation in that Region. If the
-- operation is stopped in a Region, Service Catalog doesn\'t attempt the
-- operation in any subsequent Regions.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
--
-- The default value is @0@ if no value is specified.
provisioningPreferences_stackSetFailureToleranceCount :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetFailureToleranceCount :: Lens' ProvisioningPreferences (Maybe Natural)
provisioningPreferences_stackSetFailureToleranceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetFailureToleranceCount} -> Maybe Natural
stackSetFailureToleranceCount) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: Maybe Natural
stackSetFailureToleranceCount = Maybe Natural
a} :: ProvisioningPreferences)

-- | The percentage of accounts, per Region, for which this stack operation
-- can fail before Service Catalog stops the operation in that Region. If
-- the operation is stopped in a Region, Service Catalog doesn\'t attempt
-- the operation in any subsequent Regions.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
provisioningPreferences_stackSetFailureTolerancePercentage :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetFailureTolerancePercentage :: Lens' ProvisioningPreferences (Maybe Natural)
provisioningPreferences_stackSetFailureTolerancePercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetFailureTolerancePercentage} -> Maybe Natural
stackSetFailureTolerancePercentage) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: Maybe Natural
stackSetFailureTolerancePercentage = Maybe Natural
a} :: ProvisioningPreferences)

-- | The maximum number of accounts in which to perform this operation at one
-- time. This is dependent on the value of @StackSetFailureToleranceCount@.
-- @StackSetMaxConcurrentCount@ is at most one more than the
-- @StackSetFailureToleranceCount@.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
provisioningPreferences_stackSetMaxConcurrencyCount :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetMaxConcurrencyCount :: Lens' ProvisioningPreferences (Maybe Natural)
provisioningPreferences_stackSetMaxConcurrencyCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyCount} -> Maybe Natural
stackSetMaxConcurrencyCount) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyCount = Maybe Natural
a} :: ProvisioningPreferences)

-- | The maximum percentage of accounts in which to perform this operation at
-- one time.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number. This
-- is true except in cases where rounding down would result is zero. In
-- this case, Service Catalog sets the number as @1@ instead.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
provisioningPreferences_stackSetMaxConcurrencyPercentage :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe Prelude.Natural)
provisioningPreferences_stackSetMaxConcurrencyPercentage :: Lens' ProvisioningPreferences (Maybe Natural)
provisioningPreferences_stackSetMaxConcurrencyPercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe Natural
stackSetMaxConcurrencyPercentage :: Maybe Natural
$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyPercentage} -> Maybe Natural
stackSetMaxConcurrencyPercentage) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe Natural
a -> ProvisioningPreferences
s {$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyPercentage = Maybe Natural
a} :: ProvisioningPreferences)

-- | One or more Amazon Web Services Regions where the provisioned product
-- will be available.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The specified Regions should be within the list of Regions from the
-- @STACKSET@ constraint. To get the list of Regions in the @STACKSET@
-- constraint, use the @DescribeProvisioningParameters@ operation.
--
-- If no values are specified, the default value is all Regions from the
-- @STACKSET@ constraint.
provisioningPreferences_stackSetRegions :: Lens.Lens' ProvisioningPreferences (Prelude.Maybe [Prelude.Text])
provisioningPreferences_stackSetRegions :: Lens' ProvisioningPreferences (Maybe [Text])
provisioningPreferences_stackSetRegions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisioningPreferences' {Maybe [Text]
stackSetRegions :: Maybe [Text]
$sel:stackSetRegions:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
stackSetRegions} -> Maybe [Text]
stackSetRegions) (\s :: ProvisioningPreferences
s@ProvisioningPreferences' {} Maybe [Text]
a -> ProvisioningPreferences
s {$sel:stackSetRegions:ProvisioningPreferences' :: Maybe [Text]
stackSetRegions = Maybe [Text]
a} :: ProvisioningPreferences) 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

instance Prelude.Hashable ProvisioningPreferences where
  hashWithSalt :: Int -> ProvisioningPreferences -> Int
hashWithSalt Int
_salt ProvisioningPreferences' {Maybe Natural
Maybe [Text]
stackSetRegions :: Maybe [Text]
stackSetMaxConcurrencyPercentage :: Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetAccounts:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
stackSetAccounts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetFailureToleranceCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetFailureTolerancePercentage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetMaxConcurrencyCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetMaxConcurrencyPercentage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
stackSetRegions

instance Prelude.NFData ProvisioningPreferences where
  rnf :: ProvisioningPreferences -> ()
rnf ProvisioningPreferences' {Maybe Natural
Maybe [Text]
stackSetRegions :: Maybe [Text]
stackSetMaxConcurrencyPercentage :: Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetAccounts:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
stackSetAccounts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetFailureToleranceCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetFailureTolerancePercentage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetMaxConcurrencyCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetMaxConcurrencyPercentage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
stackSetRegions

instance Data.ToJSON ProvisioningPreferences where
  toJSON :: ProvisioningPreferences -> Value
toJSON ProvisioningPreferences' {Maybe Natural
Maybe [Text]
stackSetRegions :: Maybe [Text]
stackSetMaxConcurrencyPercentage :: Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
$sel:stackSetMaxConcurrencyPercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetMaxConcurrencyCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureTolerancePercentage:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureToleranceCount:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe Natural
$sel:stackSetAccounts:ProvisioningPreferences' :: ProvisioningPreferences -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"StackSetAccounts" 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]
stackSetAccounts,
            (Key
"StackSetFailureToleranceCount" 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 Natural
stackSetFailureToleranceCount,
            (Key
"StackSetFailureTolerancePercentage" 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 Natural
stackSetFailureTolerancePercentage,
            (Key
"StackSetMaxConcurrencyCount" 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 Natural
stackSetMaxConcurrencyCount,
            (Key
"StackSetMaxConcurrencyPercentage" 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 Natural
stackSetMaxConcurrencyPercentage,
            (Key
"StackSetRegions" 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]
stackSetRegions
          ]
      )