{-# 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.ElasticSearch.Types.NodeToNodeEncryptionOptionsStatus
-- 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.ElasticSearch.Types.NodeToNodeEncryptionOptionsStatus where

import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.NodeToNodeEncryptionOptions
import Amazonka.ElasticSearch.Types.OptionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Status of the node-to-node encryption options for the specified
-- Elasticsearch domain.
--
-- /See:/ 'newNodeToNodeEncryptionOptionsStatus' smart constructor.
data NodeToNodeEncryptionOptionsStatus = NodeToNodeEncryptionOptionsStatus'
  { -- | Specifies the node-to-node encryption options for the specified
    -- Elasticsearch domain.
    NodeToNodeEncryptionOptionsStatus -> NodeToNodeEncryptionOptions
options :: NodeToNodeEncryptionOptions,
    -- | Specifies the status of the node-to-node encryption options for the
    -- specified Elasticsearch domain.
    NodeToNodeEncryptionOptionsStatus -> OptionStatus
status :: OptionStatus
  }
  deriving (NodeToNodeEncryptionOptionsStatus
-> NodeToNodeEncryptionOptionsStatus -> Bool
(NodeToNodeEncryptionOptionsStatus
 -> NodeToNodeEncryptionOptionsStatus -> Bool)
-> (NodeToNodeEncryptionOptionsStatus
    -> NodeToNodeEncryptionOptionsStatus -> Bool)
-> Eq NodeToNodeEncryptionOptionsStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeToNodeEncryptionOptionsStatus
-> NodeToNodeEncryptionOptionsStatus -> Bool
$c/= :: NodeToNodeEncryptionOptionsStatus
-> NodeToNodeEncryptionOptionsStatus -> Bool
== :: NodeToNodeEncryptionOptionsStatus
-> NodeToNodeEncryptionOptionsStatus -> Bool
$c== :: NodeToNodeEncryptionOptionsStatus
-> NodeToNodeEncryptionOptionsStatus -> Bool
Prelude.Eq, ReadPrec [NodeToNodeEncryptionOptionsStatus]
ReadPrec NodeToNodeEncryptionOptionsStatus
Int -> ReadS NodeToNodeEncryptionOptionsStatus
ReadS [NodeToNodeEncryptionOptionsStatus]
(Int -> ReadS NodeToNodeEncryptionOptionsStatus)
-> ReadS [NodeToNodeEncryptionOptionsStatus]
-> ReadPrec NodeToNodeEncryptionOptionsStatus
-> ReadPrec [NodeToNodeEncryptionOptionsStatus]
-> Read NodeToNodeEncryptionOptionsStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeToNodeEncryptionOptionsStatus]
$creadListPrec :: ReadPrec [NodeToNodeEncryptionOptionsStatus]
readPrec :: ReadPrec NodeToNodeEncryptionOptionsStatus
$creadPrec :: ReadPrec NodeToNodeEncryptionOptionsStatus
readList :: ReadS [NodeToNodeEncryptionOptionsStatus]
$creadList :: ReadS [NodeToNodeEncryptionOptionsStatus]
readsPrec :: Int -> ReadS NodeToNodeEncryptionOptionsStatus
$creadsPrec :: Int -> ReadS NodeToNodeEncryptionOptionsStatus
Prelude.Read, Int -> NodeToNodeEncryptionOptionsStatus -> ShowS
[NodeToNodeEncryptionOptionsStatus] -> ShowS
NodeToNodeEncryptionOptionsStatus -> String
(Int -> NodeToNodeEncryptionOptionsStatus -> ShowS)
-> (NodeToNodeEncryptionOptionsStatus -> String)
-> ([NodeToNodeEncryptionOptionsStatus] -> ShowS)
-> Show NodeToNodeEncryptionOptionsStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeToNodeEncryptionOptionsStatus] -> ShowS
$cshowList :: [NodeToNodeEncryptionOptionsStatus] -> ShowS
show :: NodeToNodeEncryptionOptionsStatus -> String
$cshow :: NodeToNodeEncryptionOptionsStatus -> String
showsPrec :: Int -> NodeToNodeEncryptionOptionsStatus -> ShowS
$cshowsPrec :: Int -> NodeToNodeEncryptionOptionsStatus -> ShowS
Prelude.Show, (forall x.
 NodeToNodeEncryptionOptionsStatus
 -> Rep NodeToNodeEncryptionOptionsStatus x)
-> (forall x.
    Rep NodeToNodeEncryptionOptionsStatus x
    -> NodeToNodeEncryptionOptionsStatus)
-> Generic NodeToNodeEncryptionOptionsStatus
forall x.
Rep NodeToNodeEncryptionOptionsStatus x
-> NodeToNodeEncryptionOptionsStatus
forall x.
NodeToNodeEncryptionOptionsStatus
-> Rep NodeToNodeEncryptionOptionsStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NodeToNodeEncryptionOptionsStatus x
-> NodeToNodeEncryptionOptionsStatus
$cfrom :: forall x.
NodeToNodeEncryptionOptionsStatus
-> Rep NodeToNodeEncryptionOptionsStatus x
Prelude.Generic)

-- |
-- Create a value of 'NodeToNodeEncryptionOptionsStatus' 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', 'nodeToNodeEncryptionOptionsStatus_options' - Specifies the node-to-node encryption options for the specified
-- Elasticsearch domain.
--
-- 'status', 'nodeToNodeEncryptionOptionsStatus_status' - Specifies the status of the node-to-node encryption options for the
-- specified Elasticsearch domain.
newNodeToNodeEncryptionOptionsStatus ::
  -- | 'options'
  NodeToNodeEncryptionOptions ->
  -- | 'status'
  OptionStatus ->
  NodeToNodeEncryptionOptionsStatus
newNodeToNodeEncryptionOptionsStatus :: NodeToNodeEncryptionOptions
-> OptionStatus -> NodeToNodeEncryptionOptionsStatus
newNodeToNodeEncryptionOptionsStatus
  NodeToNodeEncryptionOptions
pOptions_
  OptionStatus
pStatus_ =
    NodeToNodeEncryptionOptionsStatus' :: NodeToNodeEncryptionOptions
-> OptionStatus -> NodeToNodeEncryptionOptionsStatus
NodeToNodeEncryptionOptionsStatus'
      { $sel:options:NodeToNodeEncryptionOptionsStatus' :: NodeToNodeEncryptionOptions
options =
          NodeToNodeEncryptionOptions
pOptions_,
        $sel:status:NodeToNodeEncryptionOptionsStatus' :: OptionStatus
status = OptionStatus
pStatus_
      }

-- | Specifies the node-to-node encryption options for the specified
-- Elasticsearch domain.
nodeToNodeEncryptionOptionsStatus_options :: Lens.Lens' NodeToNodeEncryptionOptionsStatus NodeToNodeEncryptionOptions
nodeToNodeEncryptionOptionsStatus_options :: (NodeToNodeEncryptionOptions -> f NodeToNodeEncryptionOptions)
-> NodeToNodeEncryptionOptionsStatus
-> f NodeToNodeEncryptionOptionsStatus
nodeToNodeEncryptionOptionsStatus_options = (NodeToNodeEncryptionOptionsStatus -> NodeToNodeEncryptionOptions)
-> (NodeToNodeEncryptionOptionsStatus
    -> NodeToNodeEncryptionOptions
    -> NodeToNodeEncryptionOptionsStatus)
-> Lens
     NodeToNodeEncryptionOptionsStatus
     NodeToNodeEncryptionOptionsStatus
     NodeToNodeEncryptionOptions
     NodeToNodeEncryptionOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeToNodeEncryptionOptionsStatus' {NodeToNodeEncryptionOptions
options :: NodeToNodeEncryptionOptions
$sel:options:NodeToNodeEncryptionOptionsStatus' :: NodeToNodeEncryptionOptionsStatus -> NodeToNodeEncryptionOptions
options} -> NodeToNodeEncryptionOptions
options) (\s :: NodeToNodeEncryptionOptionsStatus
s@NodeToNodeEncryptionOptionsStatus' {} NodeToNodeEncryptionOptions
a -> NodeToNodeEncryptionOptionsStatus
s {$sel:options:NodeToNodeEncryptionOptionsStatus' :: NodeToNodeEncryptionOptions
options = NodeToNodeEncryptionOptions
a} :: NodeToNodeEncryptionOptionsStatus)

-- | Specifies the status of the node-to-node encryption options for the
-- specified Elasticsearch domain.
nodeToNodeEncryptionOptionsStatus_status :: Lens.Lens' NodeToNodeEncryptionOptionsStatus OptionStatus
nodeToNodeEncryptionOptionsStatus_status :: (OptionStatus -> f OptionStatus)
-> NodeToNodeEncryptionOptionsStatus
-> f NodeToNodeEncryptionOptionsStatus
nodeToNodeEncryptionOptionsStatus_status = (NodeToNodeEncryptionOptionsStatus -> OptionStatus)
-> (NodeToNodeEncryptionOptionsStatus
    -> OptionStatus -> NodeToNodeEncryptionOptionsStatus)
-> Lens
     NodeToNodeEncryptionOptionsStatus
     NodeToNodeEncryptionOptionsStatus
     OptionStatus
     OptionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeToNodeEncryptionOptionsStatus' {OptionStatus
status :: OptionStatus
$sel:status:NodeToNodeEncryptionOptionsStatus' :: NodeToNodeEncryptionOptionsStatus -> OptionStatus
status} -> OptionStatus
status) (\s :: NodeToNodeEncryptionOptionsStatus
s@NodeToNodeEncryptionOptionsStatus' {} OptionStatus
a -> NodeToNodeEncryptionOptionsStatus
s {$sel:status:NodeToNodeEncryptionOptionsStatus' :: OptionStatus
status = OptionStatus
a} :: NodeToNodeEncryptionOptionsStatus)

instance
  Core.FromJSON
    NodeToNodeEncryptionOptionsStatus
  where
  parseJSON :: Value -> Parser NodeToNodeEncryptionOptionsStatus
parseJSON =
    String
-> (Object -> Parser NodeToNodeEncryptionOptionsStatus)
-> Value
-> Parser NodeToNodeEncryptionOptionsStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NodeToNodeEncryptionOptionsStatus"
      ( \Object
x ->
          NodeToNodeEncryptionOptions
-> OptionStatus -> NodeToNodeEncryptionOptionsStatus
NodeToNodeEncryptionOptionsStatus'
            (NodeToNodeEncryptionOptions
 -> OptionStatus -> NodeToNodeEncryptionOptionsStatus)
-> Parser NodeToNodeEncryptionOptions
-> Parser (OptionStatus -> NodeToNodeEncryptionOptionsStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser NodeToNodeEncryptionOptions
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Options")
            Parser (OptionStatus -> NodeToNodeEncryptionOptionsStatus)
-> Parser OptionStatus -> Parser NodeToNodeEncryptionOptionsStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OptionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
      )

instance
  Prelude.Hashable
    NodeToNodeEncryptionOptionsStatus

instance
  Prelude.NFData
    NodeToNodeEncryptionOptionsStatus