{-# 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.ElastiCache.Types.CacheNode
-- 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.ElastiCache.Types.CacheNode where

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.Endpoint
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents an individual cache node within a cluster. Each cache node
-- runs its own instance of the cluster\'s protocol-compliant caching
-- software - either Memcached or Redis.
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
--
-- /See:/ 'newCacheNode' smart constructor.
data CacheNode = CacheNode'
  { -- | The ID of the primary node to which this read replica node is
    -- synchronized. If this field is empty, this node is not associated with a
    -- primary cluster.
    CacheNode -> Maybe Text
sourceCacheNodeId :: Prelude.Maybe Prelude.Text,
    -- | The status of the parameter group applied to this cache node.
    CacheNode -> Maybe Text
parameterGroupStatus :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the cache node was created.
    CacheNode -> Maybe ISO8601
cacheNodeCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | The Availability Zone where this node was created and now resides.
    CacheNode -> Maybe Text
customerAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The cache node identifier. A node ID is a numeric identifier (0001,
    -- 0002, etc.). The combination of cluster ID and node ID uniquely
    -- identifies every cache node used in a customer\'s Amazon account.
    CacheNode -> Maybe Text
cacheNodeId :: Prelude.Maybe Prelude.Text,
    -- | The customer outpost ARN of the cache node.
    CacheNode -> Maybe Text
customerOutpostArn :: Prelude.Maybe Prelude.Text,
    -- | The current state of this cache node, one of the following values:
    -- @available@, @creating@, @rebooting@, or @deleting@.
    CacheNode -> Maybe Text
cacheNodeStatus :: Prelude.Maybe Prelude.Text,
    -- | The hostname for connecting to this cache node.
    CacheNode -> Maybe Endpoint
endpoint :: Prelude.Maybe Endpoint
  }
  deriving (CacheNode -> CacheNode -> Bool
(CacheNode -> CacheNode -> Bool)
-> (CacheNode -> CacheNode -> Bool) -> Eq CacheNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheNode -> CacheNode -> Bool
$c/= :: CacheNode -> CacheNode -> Bool
== :: CacheNode -> CacheNode -> Bool
$c== :: CacheNode -> CacheNode -> Bool
Prelude.Eq, ReadPrec [CacheNode]
ReadPrec CacheNode
Int -> ReadS CacheNode
ReadS [CacheNode]
(Int -> ReadS CacheNode)
-> ReadS [CacheNode]
-> ReadPrec CacheNode
-> ReadPrec [CacheNode]
-> Read CacheNode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheNode]
$creadListPrec :: ReadPrec [CacheNode]
readPrec :: ReadPrec CacheNode
$creadPrec :: ReadPrec CacheNode
readList :: ReadS [CacheNode]
$creadList :: ReadS [CacheNode]
readsPrec :: Int -> ReadS CacheNode
$creadsPrec :: Int -> ReadS CacheNode
Prelude.Read, Int -> CacheNode -> ShowS
[CacheNode] -> ShowS
CacheNode -> String
(Int -> CacheNode -> ShowS)
-> (CacheNode -> String)
-> ([CacheNode] -> ShowS)
-> Show CacheNode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheNode] -> ShowS
$cshowList :: [CacheNode] -> ShowS
show :: CacheNode -> String
$cshow :: CacheNode -> String
showsPrec :: Int -> CacheNode -> ShowS
$cshowsPrec :: Int -> CacheNode -> ShowS
Prelude.Show, (forall x. CacheNode -> Rep CacheNode x)
-> (forall x. Rep CacheNode x -> CacheNode) -> Generic CacheNode
forall x. Rep CacheNode x -> CacheNode
forall x. CacheNode -> Rep CacheNode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CacheNode x -> CacheNode
$cfrom :: forall x. CacheNode -> Rep CacheNode x
Prelude.Generic)

-- |
-- Create a value of 'CacheNode' 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:
--
-- 'sourceCacheNodeId', 'cacheNode_sourceCacheNodeId' - The ID of the primary node to which this read replica node is
-- synchronized. If this field is empty, this node is not associated with a
-- primary cluster.
--
-- 'parameterGroupStatus', 'cacheNode_parameterGroupStatus' - The status of the parameter group applied to this cache node.
--
-- 'cacheNodeCreateTime', 'cacheNode_cacheNodeCreateTime' - The date and time when the cache node was created.
--
-- 'customerAvailabilityZone', 'cacheNode_customerAvailabilityZone' - The Availability Zone where this node was created and now resides.
--
-- 'cacheNodeId', 'cacheNode_cacheNodeId' - The cache node identifier. A node ID is a numeric identifier (0001,
-- 0002, etc.). The combination of cluster ID and node ID uniquely
-- identifies every cache node used in a customer\'s Amazon account.
--
-- 'customerOutpostArn', 'cacheNode_customerOutpostArn' - The customer outpost ARN of the cache node.
--
-- 'cacheNodeStatus', 'cacheNode_cacheNodeStatus' - The current state of this cache node, one of the following values:
-- @available@, @creating@, @rebooting@, or @deleting@.
--
-- 'endpoint', 'cacheNode_endpoint' - The hostname for connecting to this cache node.
newCacheNode ::
  CacheNode
newCacheNode :: CacheNode
newCacheNode =
  CacheNode' :: Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> CacheNode
CacheNode'
    { $sel:sourceCacheNodeId:CacheNode' :: Maybe Text
sourceCacheNodeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupStatus:CacheNode' :: Maybe Text
parameterGroupStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeCreateTime:CacheNode' :: Maybe ISO8601
cacheNodeCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:customerAvailabilityZone:CacheNode' :: Maybe Text
customerAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeId:CacheNode' :: Maybe Text
cacheNodeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customerOutpostArn:CacheNode' :: Maybe Text
customerOutpostArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeStatus:CacheNode' :: Maybe Text
cacheNodeStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:CacheNode' :: Maybe Endpoint
endpoint = Maybe Endpoint
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the primary node to which this read replica node is
-- synchronized. If this field is empty, this node is not associated with a
-- primary cluster.
cacheNode_sourceCacheNodeId :: Lens.Lens' CacheNode (Prelude.Maybe Prelude.Text)
cacheNode_sourceCacheNodeId :: (Maybe Text -> f (Maybe Text)) -> CacheNode -> f CacheNode
cacheNode_sourceCacheNodeId = (CacheNode -> Maybe Text)
-> (CacheNode -> Maybe Text -> CacheNode)
-> Lens CacheNode CacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe Text
sourceCacheNodeId :: Maybe Text
$sel:sourceCacheNodeId:CacheNode' :: CacheNode -> Maybe Text
sourceCacheNodeId} -> Maybe Text
sourceCacheNodeId) (\s :: CacheNode
s@CacheNode' {} Maybe Text
a -> CacheNode
s {$sel:sourceCacheNodeId:CacheNode' :: Maybe Text
sourceCacheNodeId = Maybe Text
a} :: CacheNode)

-- | The status of the parameter group applied to this cache node.
cacheNode_parameterGroupStatus :: Lens.Lens' CacheNode (Prelude.Maybe Prelude.Text)
cacheNode_parameterGroupStatus :: (Maybe Text -> f (Maybe Text)) -> CacheNode -> f CacheNode
cacheNode_parameterGroupStatus = (CacheNode -> Maybe Text)
-> (CacheNode -> Maybe Text -> CacheNode)
-> Lens CacheNode CacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe Text
parameterGroupStatus :: Maybe Text
$sel:parameterGroupStatus:CacheNode' :: CacheNode -> Maybe Text
parameterGroupStatus} -> Maybe Text
parameterGroupStatus) (\s :: CacheNode
s@CacheNode' {} Maybe Text
a -> CacheNode
s {$sel:parameterGroupStatus:CacheNode' :: Maybe Text
parameterGroupStatus = Maybe Text
a} :: CacheNode)

-- | The date and time when the cache node was created.
cacheNode_cacheNodeCreateTime :: Lens.Lens' CacheNode (Prelude.Maybe Prelude.UTCTime)
cacheNode_cacheNodeCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> CacheNode -> f CacheNode
cacheNode_cacheNodeCreateTime = (CacheNode -> Maybe ISO8601)
-> (CacheNode -> Maybe ISO8601 -> CacheNode)
-> Lens CacheNode CacheNode (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe ISO8601
cacheNodeCreateTime :: Maybe ISO8601
$sel:cacheNodeCreateTime:CacheNode' :: CacheNode -> Maybe ISO8601
cacheNodeCreateTime} -> Maybe ISO8601
cacheNodeCreateTime) (\s :: CacheNode
s@CacheNode' {} Maybe ISO8601
a -> CacheNode
s {$sel:cacheNodeCreateTime:CacheNode' :: Maybe ISO8601
cacheNodeCreateTime = Maybe ISO8601
a} :: CacheNode) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> CacheNode -> f CacheNode)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheNode
-> f CacheNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Availability Zone where this node was created and now resides.
cacheNode_customerAvailabilityZone :: Lens.Lens' CacheNode (Prelude.Maybe Prelude.Text)
cacheNode_customerAvailabilityZone :: (Maybe Text -> f (Maybe Text)) -> CacheNode -> f CacheNode
cacheNode_customerAvailabilityZone = (CacheNode -> Maybe Text)
-> (CacheNode -> Maybe Text -> CacheNode)
-> Lens CacheNode CacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe Text
customerAvailabilityZone :: Maybe Text
$sel:customerAvailabilityZone:CacheNode' :: CacheNode -> Maybe Text
customerAvailabilityZone} -> Maybe Text
customerAvailabilityZone) (\s :: CacheNode
s@CacheNode' {} Maybe Text
a -> CacheNode
s {$sel:customerAvailabilityZone:CacheNode' :: Maybe Text
customerAvailabilityZone = Maybe Text
a} :: CacheNode)

-- | The cache node identifier. A node ID is a numeric identifier (0001,
-- 0002, etc.). The combination of cluster ID and node ID uniquely
-- identifies every cache node used in a customer\'s Amazon account.
cacheNode_cacheNodeId :: Lens.Lens' CacheNode (Prelude.Maybe Prelude.Text)
cacheNode_cacheNodeId :: (Maybe Text -> f (Maybe Text)) -> CacheNode -> f CacheNode
cacheNode_cacheNodeId = (CacheNode -> Maybe Text)
-> (CacheNode -> Maybe Text -> CacheNode)
-> Lens CacheNode CacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe Text
cacheNodeId :: Maybe Text
$sel:cacheNodeId:CacheNode' :: CacheNode -> Maybe Text
cacheNodeId} -> Maybe Text
cacheNodeId) (\s :: CacheNode
s@CacheNode' {} Maybe Text
a -> CacheNode
s {$sel:cacheNodeId:CacheNode' :: Maybe Text
cacheNodeId = Maybe Text
a} :: CacheNode)

-- | The customer outpost ARN of the cache node.
cacheNode_customerOutpostArn :: Lens.Lens' CacheNode (Prelude.Maybe Prelude.Text)
cacheNode_customerOutpostArn :: (Maybe Text -> f (Maybe Text)) -> CacheNode -> f CacheNode
cacheNode_customerOutpostArn = (CacheNode -> Maybe Text)
-> (CacheNode -> Maybe Text -> CacheNode)
-> Lens CacheNode CacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe Text
customerOutpostArn :: Maybe Text
$sel:customerOutpostArn:CacheNode' :: CacheNode -> Maybe Text
customerOutpostArn} -> Maybe Text
customerOutpostArn) (\s :: CacheNode
s@CacheNode' {} Maybe Text
a -> CacheNode
s {$sel:customerOutpostArn:CacheNode' :: Maybe Text
customerOutpostArn = Maybe Text
a} :: CacheNode)

-- | The current state of this cache node, one of the following values:
-- @available@, @creating@, @rebooting@, or @deleting@.
cacheNode_cacheNodeStatus :: Lens.Lens' CacheNode (Prelude.Maybe Prelude.Text)
cacheNode_cacheNodeStatus :: (Maybe Text -> f (Maybe Text)) -> CacheNode -> f CacheNode
cacheNode_cacheNodeStatus = (CacheNode -> Maybe Text)
-> (CacheNode -> Maybe Text -> CacheNode)
-> Lens CacheNode CacheNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe Text
cacheNodeStatus :: Maybe Text
$sel:cacheNodeStatus:CacheNode' :: CacheNode -> Maybe Text
cacheNodeStatus} -> Maybe Text
cacheNodeStatus) (\s :: CacheNode
s@CacheNode' {} Maybe Text
a -> CacheNode
s {$sel:cacheNodeStatus:CacheNode' :: Maybe Text
cacheNodeStatus = Maybe Text
a} :: CacheNode)

-- | The hostname for connecting to this cache node.
cacheNode_endpoint :: Lens.Lens' CacheNode (Prelude.Maybe Endpoint)
cacheNode_endpoint :: (Maybe Endpoint -> f (Maybe Endpoint)) -> CacheNode -> f CacheNode
cacheNode_endpoint = (CacheNode -> Maybe Endpoint)
-> (CacheNode -> Maybe Endpoint -> CacheNode)
-> Lens CacheNode CacheNode (Maybe Endpoint) (Maybe Endpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheNode' {Maybe Endpoint
endpoint :: Maybe Endpoint
$sel:endpoint:CacheNode' :: CacheNode -> Maybe Endpoint
endpoint} -> Maybe Endpoint
endpoint) (\s :: CacheNode
s@CacheNode' {} Maybe Endpoint
a -> CacheNode
s {$sel:endpoint:CacheNode' :: Maybe Endpoint
endpoint = Maybe Endpoint
a} :: CacheNode)

instance Core.FromXML CacheNode where
  parseXML :: [Node] -> Either String CacheNode
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> CacheNode
CacheNode'
      (Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Endpoint
 -> CacheNode)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> CacheNode)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SourceCacheNodeId")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> CacheNode)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> CacheNode)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ParameterGroupStatus")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> CacheNode)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> CacheNode)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheNodeCreateTime")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> CacheNode)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Endpoint -> CacheNode)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomerAvailabilityZone")
      Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Endpoint -> CacheNode)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Maybe Endpoint -> CacheNode)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheNodeId")
      Either
  String (Maybe Text -> Maybe Text -> Maybe Endpoint -> CacheNode)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Endpoint -> CacheNode)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomerOutpostArn")
      Either String (Maybe Text -> Maybe Endpoint -> CacheNode)
-> Either String (Maybe Text)
-> Either String (Maybe Endpoint -> CacheNode)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheNodeStatus")
      Either String (Maybe Endpoint -> CacheNode)
-> Either String (Maybe Endpoint) -> Either String CacheNode
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Endpoint)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Endpoint")

instance Prelude.Hashable CacheNode

instance Prelude.NFData CacheNode