{-# 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.CloudSearch.Types.ScalingParametersStatus
-- 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)
module Amazonka.CloudSearch.Types.ScalingParametersStatus where

import Amazonka.CloudSearch.Types.OptionStatus
import Amazonka.CloudSearch.Types.ScalingParameters
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The status and configuration of a search domain\'s scaling parameters.
--
-- /See:/ 'newScalingParametersStatus' smart constructor.
data ScalingParametersStatus = ScalingParametersStatus'
  { ScalingParametersStatus -> ScalingParameters
options :: ScalingParameters,
    ScalingParametersStatus -> OptionStatus
status :: OptionStatus
  }
  deriving (ScalingParametersStatus -> ScalingParametersStatus -> Bool
(ScalingParametersStatus -> ScalingParametersStatus -> Bool)
-> (ScalingParametersStatus -> ScalingParametersStatus -> Bool)
-> Eq ScalingParametersStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScalingParametersStatus -> ScalingParametersStatus -> Bool
$c/= :: ScalingParametersStatus -> ScalingParametersStatus -> Bool
== :: ScalingParametersStatus -> ScalingParametersStatus -> Bool
$c== :: ScalingParametersStatus -> ScalingParametersStatus -> Bool
Prelude.Eq, ReadPrec [ScalingParametersStatus]
ReadPrec ScalingParametersStatus
Int -> ReadS ScalingParametersStatus
ReadS [ScalingParametersStatus]
(Int -> ReadS ScalingParametersStatus)
-> ReadS [ScalingParametersStatus]
-> ReadPrec ScalingParametersStatus
-> ReadPrec [ScalingParametersStatus]
-> Read ScalingParametersStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScalingParametersStatus]
$creadListPrec :: ReadPrec [ScalingParametersStatus]
readPrec :: ReadPrec ScalingParametersStatus
$creadPrec :: ReadPrec ScalingParametersStatus
readList :: ReadS [ScalingParametersStatus]
$creadList :: ReadS [ScalingParametersStatus]
readsPrec :: Int -> ReadS ScalingParametersStatus
$creadsPrec :: Int -> ReadS ScalingParametersStatus
Prelude.Read, Int -> ScalingParametersStatus -> ShowS
[ScalingParametersStatus] -> ShowS
ScalingParametersStatus -> String
(Int -> ScalingParametersStatus -> ShowS)
-> (ScalingParametersStatus -> String)
-> ([ScalingParametersStatus] -> ShowS)
-> Show ScalingParametersStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScalingParametersStatus] -> ShowS
$cshowList :: [ScalingParametersStatus] -> ShowS
show :: ScalingParametersStatus -> String
$cshow :: ScalingParametersStatus -> String
showsPrec :: Int -> ScalingParametersStatus -> ShowS
$cshowsPrec :: Int -> ScalingParametersStatus -> ShowS
Prelude.Show, (forall x.
 ScalingParametersStatus -> Rep ScalingParametersStatus x)
-> (forall x.
    Rep ScalingParametersStatus x -> ScalingParametersStatus)
-> Generic ScalingParametersStatus
forall x. Rep ScalingParametersStatus x -> ScalingParametersStatus
forall x. ScalingParametersStatus -> Rep ScalingParametersStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScalingParametersStatus x -> ScalingParametersStatus
$cfrom :: forall x. ScalingParametersStatus -> Rep ScalingParametersStatus x
Prelude.Generic)

-- |
-- Create a value of 'ScalingParametersStatus' 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:
--
-- 'options', 'scalingParametersStatus_options' - Undocumented member.
--
-- 'status', 'scalingParametersStatus_status' - Undocumented member.
newScalingParametersStatus ::
  -- | 'options'
  ScalingParameters ->
  -- | 'status'
  OptionStatus ->
  ScalingParametersStatus
newScalingParametersStatus :: ScalingParameters -> OptionStatus -> ScalingParametersStatus
newScalingParametersStatus ScalingParameters
pOptions_ OptionStatus
pStatus_ =
  ScalingParametersStatus' :: ScalingParameters -> OptionStatus -> ScalingParametersStatus
ScalingParametersStatus'
    { $sel:options:ScalingParametersStatus' :: ScalingParameters
options = ScalingParameters
pOptions_,
      $sel:status:ScalingParametersStatus' :: OptionStatus
status = OptionStatus
pStatus_
    }

-- | Undocumented member.
scalingParametersStatus_options :: Lens.Lens' ScalingParametersStatus ScalingParameters
scalingParametersStatus_options :: (ScalingParameters -> f ScalingParameters)
-> ScalingParametersStatus -> f ScalingParametersStatus
scalingParametersStatus_options = (ScalingParametersStatus -> ScalingParameters)
-> (ScalingParametersStatus
    -> ScalingParameters -> ScalingParametersStatus)
-> Lens
     ScalingParametersStatus
     ScalingParametersStatus
     ScalingParameters
     ScalingParameters
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingParametersStatus' {ScalingParameters
options :: ScalingParameters
$sel:options:ScalingParametersStatus' :: ScalingParametersStatus -> ScalingParameters
options} -> ScalingParameters
options) (\s :: ScalingParametersStatus
s@ScalingParametersStatus' {} ScalingParameters
a -> ScalingParametersStatus
s {$sel:options:ScalingParametersStatus' :: ScalingParameters
options = ScalingParameters
a} :: ScalingParametersStatus)

-- | Undocumented member.
scalingParametersStatus_status :: Lens.Lens' ScalingParametersStatus OptionStatus
scalingParametersStatus_status :: (OptionStatus -> f OptionStatus)
-> ScalingParametersStatus -> f ScalingParametersStatus
scalingParametersStatus_status = (ScalingParametersStatus -> OptionStatus)
-> (ScalingParametersStatus
    -> OptionStatus -> ScalingParametersStatus)
-> Lens
     ScalingParametersStatus
     ScalingParametersStatus
     OptionStatus
     OptionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingParametersStatus' {OptionStatus
status :: OptionStatus
$sel:status:ScalingParametersStatus' :: ScalingParametersStatus -> OptionStatus
status} -> OptionStatus
status) (\s :: ScalingParametersStatus
s@ScalingParametersStatus' {} OptionStatus
a -> ScalingParametersStatus
s {$sel:status:ScalingParametersStatus' :: OptionStatus
status = OptionStatus
a} :: ScalingParametersStatus)

instance Core.FromXML ScalingParametersStatus where
  parseXML :: [Node] -> Either String ScalingParametersStatus
parseXML [Node]
x =
    ScalingParameters -> OptionStatus -> ScalingParametersStatus
ScalingParametersStatus'
      (ScalingParameters -> OptionStatus -> ScalingParametersStatus)
-> Either String ScalingParameters
-> Either String (OptionStatus -> ScalingParametersStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String ScalingParameters
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Options")
      Either String (OptionStatus -> ScalingParametersStatus)
-> Either String OptionStatus
-> Either String ScalingParametersStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String OptionStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Status")

instance Prelude.Hashable ScalingParametersStatus

instance Prelude.NFData ScalingParametersStatus