{-# 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.VPCDerivedInfoStatus
-- 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.VPCDerivedInfoStatus where

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

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

-- |
-- Create a value of 'VPCDerivedInfoStatus' 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', 'vPCDerivedInfoStatus_options' - Specifies the VPC options for the specified Elasticsearch domain.
--
-- 'status', 'vPCDerivedInfoStatus_status' - Specifies the status of the VPC options for the specified Elasticsearch
-- domain.
newVPCDerivedInfoStatus ::
  -- | 'options'
  VPCDerivedInfo ->
  -- | 'status'
  OptionStatus ->
  VPCDerivedInfoStatus
newVPCDerivedInfoStatus :: VPCDerivedInfo -> OptionStatus -> VPCDerivedInfoStatus
newVPCDerivedInfoStatus VPCDerivedInfo
pOptions_ OptionStatus
pStatus_ =
  VPCDerivedInfoStatus' :: VPCDerivedInfo -> OptionStatus -> VPCDerivedInfoStatus
VPCDerivedInfoStatus'
    { $sel:options:VPCDerivedInfoStatus' :: VPCDerivedInfo
options = VPCDerivedInfo
pOptions_,
      $sel:status:VPCDerivedInfoStatus' :: OptionStatus
status = OptionStatus
pStatus_
    }

-- | Specifies the VPC options for the specified Elasticsearch domain.
vPCDerivedInfoStatus_options :: Lens.Lens' VPCDerivedInfoStatus VPCDerivedInfo
vPCDerivedInfoStatus_options :: (VPCDerivedInfo -> f VPCDerivedInfo)
-> VPCDerivedInfoStatus -> f VPCDerivedInfoStatus
vPCDerivedInfoStatus_options = (VPCDerivedInfoStatus -> VPCDerivedInfo)
-> (VPCDerivedInfoStatus -> VPCDerivedInfo -> VPCDerivedInfoStatus)
-> Lens
     VPCDerivedInfoStatus
     VPCDerivedInfoStatus
     VPCDerivedInfo
     VPCDerivedInfo
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPCDerivedInfoStatus' {VPCDerivedInfo
options :: VPCDerivedInfo
$sel:options:VPCDerivedInfoStatus' :: VPCDerivedInfoStatus -> VPCDerivedInfo
options} -> VPCDerivedInfo
options) (\s :: VPCDerivedInfoStatus
s@VPCDerivedInfoStatus' {} VPCDerivedInfo
a -> VPCDerivedInfoStatus
s {$sel:options:VPCDerivedInfoStatus' :: VPCDerivedInfo
options = VPCDerivedInfo
a} :: VPCDerivedInfoStatus)

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

instance Core.FromJSON VPCDerivedInfoStatus where
  parseJSON :: Value -> Parser VPCDerivedInfoStatus
parseJSON =
    String
-> (Object -> Parser VPCDerivedInfoStatus)
-> Value
-> Parser VPCDerivedInfoStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VPCDerivedInfoStatus"
      ( \Object
x ->
          VPCDerivedInfo -> OptionStatus -> VPCDerivedInfoStatus
VPCDerivedInfoStatus'
            (VPCDerivedInfo -> OptionStatus -> VPCDerivedInfoStatus)
-> Parser VPCDerivedInfo
-> Parser (OptionStatus -> VPCDerivedInfoStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser VPCDerivedInfo
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Options")
            Parser (OptionStatus -> VPCDerivedInfoStatus)
-> Parser OptionStatus -> Parser VPCDerivedInfoStatus
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 VPCDerivedInfoStatus

instance Prelude.NFData VPCDerivedInfoStatus