{-# 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.Redshift.Types.EndpointAccess
-- 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.Redshift.Types.EndpointAccess where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
import Amazonka.Redshift.Types.VpcEndpoint
import Amazonka.Redshift.Types.VpcSecurityGroupMembership

-- | Describes a Redshift-managed VPC endpoint.
--
-- /See:/ 'newEndpointAccess' smart constructor.
data EndpointAccess = EndpointAccess'
  { -- | The name of the endpoint.
    EndpointAccess -> Maybe Text
endpointName :: Prelude.Maybe Prelude.Text,
    -- | The time (UTC) that the endpoint was created.
    EndpointAccess -> Maybe ISO8601
endpointCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | The subnet group name where Amazon Redshift chooses to deploy the
    -- endpoint.
    EndpointAccess -> Maybe Text
subnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The DNS address of the endpoint.
    EndpointAccess -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
    -- | The cluster identifier of the cluster associated with the endpoint.
    EndpointAccess -> Maybe Text
clusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The status of the endpoint.
    EndpointAccess -> Maybe Text
endpointStatus :: Prelude.Maybe Prelude.Text,
    -- | The security groups associated with the endpoint.
    EndpointAccess -> Maybe [VpcSecurityGroupMembership]
vpcSecurityGroups :: Prelude.Maybe [VpcSecurityGroupMembership],
    -- | The Amazon Web Services account ID of the owner of the cluster.
    EndpointAccess -> Maybe Text
resourceOwner :: Prelude.Maybe Prelude.Text,
    EndpointAccess -> Maybe VpcEndpoint
vpcEndpoint :: Prelude.Maybe VpcEndpoint,
    -- | The port number on which the cluster accepts incoming connections.
    EndpointAccess -> Maybe Int
port :: Prelude.Maybe Prelude.Int
  }
  deriving (EndpointAccess -> EndpointAccess -> Bool
(EndpointAccess -> EndpointAccess -> Bool)
-> (EndpointAccess -> EndpointAccess -> Bool) -> Eq EndpointAccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointAccess -> EndpointAccess -> Bool
$c/= :: EndpointAccess -> EndpointAccess -> Bool
== :: EndpointAccess -> EndpointAccess -> Bool
$c== :: EndpointAccess -> EndpointAccess -> Bool
Prelude.Eq, ReadPrec [EndpointAccess]
ReadPrec EndpointAccess
Int -> ReadS EndpointAccess
ReadS [EndpointAccess]
(Int -> ReadS EndpointAccess)
-> ReadS [EndpointAccess]
-> ReadPrec EndpointAccess
-> ReadPrec [EndpointAccess]
-> Read EndpointAccess
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointAccess]
$creadListPrec :: ReadPrec [EndpointAccess]
readPrec :: ReadPrec EndpointAccess
$creadPrec :: ReadPrec EndpointAccess
readList :: ReadS [EndpointAccess]
$creadList :: ReadS [EndpointAccess]
readsPrec :: Int -> ReadS EndpointAccess
$creadsPrec :: Int -> ReadS EndpointAccess
Prelude.Read, Int -> EndpointAccess -> ShowS
[EndpointAccess] -> ShowS
EndpointAccess -> String
(Int -> EndpointAccess -> ShowS)
-> (EndpointAccess -> String)
-> ([EndpointAccess] -> ShowS)
-> Show EndpointAccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointAccess] -> ShowS
$cshowList :: [EndpointAccess] -> ShowS
show :: EndpointAccess -> String
$cshow :: EndpointAccess -> String
showsPrec :: Int -> EndpointAccess -> ShowS
$cshowsPrec :: Int -> EndpointAccess -> ShowS
Prelude.Show, (forall x. EndpointAccess -> Rep EndpointAccess x)
-> (forall x. Rep EndpointAccess x -> EndpointAccess)
-> Generic EndpointAccess
forall x. Rep EndpointAccess x -> EndpointAccess
forall x. EndpointAccess -> Rep EndpointAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointAccess x -> EndpointAccess
$cfrom :: forall x. EndpointAccess -> Rep EndpointAccess x
Prelude.Generic)

-- |
-- Create a value of 'EndpointAccess' 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:
--
-- 'endpointName', 'endpointAccess_endpointName' - The name of the endpoint.
--
-- 'endpointCreateTime', 'endpointAccess_endpointCreateTime' - The time (UTC) that the endpoint was created.
--
-- 'subnetGroupName', 'endpointAccess_subnetGroupName' - The subnet group name where Amazon Redshift chooses to deploy the
-- endpoint.
--
-- 'address', 'endpointAccess_address' - The DNS address of the endpoint.
--
-- 'clusterIdentifier', 'endpointAccess_clusterIdentifier' - The cluster identifier of the cluster associated with the endpoint.
--
-- 'endpointStatus', 'endpointAccess_endpointStatus' - The status of the endpoint.
--
-- 'vpcSecurityGroups', 'endpointAccess_vpcSecurityGroups' - The security groups associated with the endpoint.
--
-- 'resourceOwner', 'endpointAccess_resourceOwner' - The Amazon Web Services account ID of the owner of the cluster.
--
-- 'vpcEndpoint', 'endpointAccess_vpcEndpoint' - Undocumented member.
--
-- 'port', 'endpointAccess_port' - The port number on which the cluster accepts incoming connections.
newEndpointAccess ::
  EndpointAccess
newEndpointAccess :: EndpointAccess
newEndpointAccess =
  EndpointAccess' :: Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [VpcSecurityGroupMembership]
-> Maybe Text
-> Maybe VpcEndpoint
-> Maybe Int
-> EndpointAccess
EndpointAccess'
    { $sel:endpointName:EndpointAccess' :: Maybe Text
endpointName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointCreateTime:EndpointAccess' :: Maybe ISO8601
endpointCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetGroupName:EndpointAccess' :: Maybe Text
subnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:address:EndpointAccess' :: Maybe Text
address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterIdentifier:EndpointAccess' :: Maybe Text
clusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointStatus:EndpointAccess' :: Maybe Text
endpointStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSecurityGroups:EndpointAccess' :: Maybe [VpcSecurityGroupMembership]
vpcSecurityGroups = Maybe [VpcSecurityGroupMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceOwner:EndpointAccess' :: Maybe Text
resourceOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcEndpoint:EndpointAccess' :: Maybe VpcEndpoint
vpcEndpoint = Maybe VpcEndpoint
forall a. Maybe a
Prelude.Nothing,
      $sel:port:EndpointAccess' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the endpoint.
endpointAccess_endpointName :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)
endpointAccess_endpointName :: (Maybe Text -> f (Maybe Text))
-> EndpointAccess -> f EndpointAccess
endpointAccess_endpointName = (EndpointAccess -> Maybe Text)
-> (EndpointAccess -> Maybe Text -> EndpointAccess)
-> Lens EndpointAccess EndpointAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe Text
endpointName :: Maybe Text
$sel:endpointName:EndpointAccess' :: EndpointAccess -> Maybe Text
endpointName} -> Maybe Text
endpointName) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe Text
a -> EndpointAccess
s {$sel:endpointName:EndpointAccess' :: Maybe Text
endpointName = Maybe Text
a} :: EndpointAccess)

-- | The time (UTC) that the endpoint was created.
endpointAccess_endpointCreateTime :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.UTCTime)
endpointAccess_endpointCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EndpointAccess -> f EndpointAccess
endpointAccess_endpointCreateTime = (EndpointAccess -> Maybe ISO8601)
-> (EndpointAccess -> Maybe ISO8601 -> EndpointAccess)
-> Lens
     EndpointAccess EndpointAccess (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe ISO8601
endpointCreateTime :: Maybe ISO8601
$sel:endpointCreateTime:EndpointAccess' :: EndpointAccess -> Maybe ISO8601
endpointCreateTime} -> Maybe ISO8601
endpointCreateTime) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe ISO8601
a -> EndpointAccess
s {$sel:endpointCreateTime:EndpointAccess' :: Maybe ISO8601
endpointCreateTime = Maybe ISO8601
a} :: EndpointAccess) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> EndpointAccess -> f EndpointAccess)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EndpointAccess
-> f EndpointAccess
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 subnet group name where Amazon Redshift chooses to deploy the
-- endpoint.
endpointAccess_subnetGroupName :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)
endpointAccess_subnetGroupName :: (Maybe Text -> f (Maybe Text))
-> EndpointAccess -> f EndpointAccess
endpointAccess_subnetGroupName = (EndpointAccess -> Maybe Text)
-> (EndpointAccess -> Maybe Text -> EndpointAccess)
-> Lens EndpointAccess EndpointAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe Text
subnetGroupName :: Maybe Text
$sel:subnetGroupName:EndpointAccess' :: EndpointAccess -> Maybe Text
subnetGroupName} -> Maybe Text
subnetGroupName) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe Text
a -> EndpointAccess
s {$sel:subnetGroupName:EndpointAccess' :: Maybe Text
subnetGroupName = Maybe Text
a} :: EndpointAccess)

-- | The DNS address of the endpoint.
endpointAccess_address :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)
endpointAccess_address :: (Maybe Text -> f (Maybe Text))
-> EndpointAccess -> f EndpointAccess
endpointAccess_address = (EndpointAccess -> Maybe Text)
-> (EndpointAccess -> Maybe Text -> EndpointAccess)
-> Lens EndpointAccess EndpointAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe Text
address :: Maybe Text
$sel:address:EndpointAccess' :: EndpointAccess -> Maybe Text
address} -> Maybe Text
address) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe Text
a -> EndpointAccess
s {$sel:address:EndpointAccess' :: Maybe Text
address = Maybe Text
a} :: EndpointAccess)

-- | The cluster identifier of the cluster associated with the endpoint.
endpointAccess_clusterIdentifier :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)
endpointAccess_clusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> EndpointAccess -> f EndpointAccess
endpointAccess_clusterIdentifier = (EndpointAccess -> Maybe Text)
-> (EndpointAccess -> Maybe Text -> EndpointAccess)
-> Lens EndpointAccess EndpointAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe Text
clusterIdentifier :: Maybe Text
$sel:clusterIdentifier:EndpointAccess' :: EndpointAccess -> Maybe Text
clusterIdentifier} -> Maybe Text
clusterIdentifier) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe Text
a -> EndpointAccess
s {$sel:clusterIdentifier:EndpointAccess' :: Maybe Text
clusterIdentifier = Maybe Text
a} :: EndpointAccess)

-- | The status of the endpoint.
endpointAccess_endpointStatus :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)
endpointAccess_endpointStatus :: (Maybe Text -> f (Maybe Text))
-> EndpointAccess -> f EndpointAccess
endpointAccess_endpointStatus = (EndpointAccess -> Maybe Text)
-> (EndpointAccess -> Maybe Text -> EndpointAccess)
-> Lens EndpointAccess EndpointAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe Text
endpointStatus :: Maybe Text
$sel:endpointStatus:EndpointAccess' :: EndpointAccess -> Maybe Text
endpointStatus} -> Maybe Text
endpointStatus) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe Text
a -> EndpointAccess
s {$sel:endpointStatus:EndpointAccess' :: Maybe Text
endpointStatus = Maybe Text
a} :: EndpointAccess)

-- | The security groups associated with the endpoint.
endpointAccess_vpcSecurityGroups :: Lens.Lens' EndpointAccess (Prelude.Maybe [VpcSecurityGroupMembership])
endpointAccess_vpcSecurityGroups :: (Maybe [VpcSecurityGroupMembership]
 -> f (Maybe [VpcSecurityGroupMembership]))
-> EndpointAccess -> f EndpointAccess
endpointAccess_vpcSecurityGroups = (EndpointAccess -> Maybe [VpcSecurityGroupMembership])
-> (EndpointAccess
    -> Maybe [VpcSecurityGroupMembership] -> EndpointAccess)
-> Lens
     EndpointAccess
     EndpointAccess
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe [VpcSecurityGroupMembership]
vpcSecurityGroups :: Maybe [VpcSecurityGroupMembership]
$sel:vpcSecurityGroups:EndpointAccess' :: EndpointAccess -> Maybe [VpcSecurityGroupMembership]
vpcSecurityGroups} -> Maybe [VpcSecurityGroupMembership]
vpcSecurityGroups) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe [VpcSecurityGroupMembership]
a -> EndpointAccess
s {$sel:vpcSecurityGroups:EndpointAccess' :: Maybe [VpcSecurityGroupMembership]
vpcSecurityGroups = Maybe [VpcSecurityGroupMembership]
a} :: EndpointAccess) ((Maybe [VpcSecurityGroupMembership]
  -> f (Maybe [VpcSecurityGroupMembership]))
 -> EndpointAccess -> f EndpointAccess)
-> ((Maybe [VpcSecurityGroupMembership]
     -> f (Maybe [VpcSecurityGroupMembership]))
    -> Maybe [VpcSecurityGroupMembership]
    -> f (Maybe [VpcSecurityGroupMembership]))
-> (Maybe [VpcSecurityGroupMembership]
    -> f (Maybe [VpcSecurityGroupMembership]))
-> EndpointAccess
-> f EndpointAccess
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
-> Iso
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
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
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Web Services account ID of the owner of the cluster.
endpointAccess_resourceOwner :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)
endpointAccess_resourceOwner :: (Maybe Text -> f (Maybe Text))
-> EndpointAccess -> f EndpointAccess
endpointAccess_resourceOwner = (EndpointAccess -> Maybe Text)
-> (EndpointAccess -> Maybe Text -> EndpointAccess)
-> Lens EndpointAccess EndpointAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe Text
resourceOwner :: Maybe Text
$sel:resourceOwner:EndpointAccess' :: EndpointAccess -> Maybe Text
resourceOwner} -> Maybe Text
resourceOwner) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe Text
a -> EndpointAccess
s {$sel:resourceOwner:EndpointAccess' :: Maybe Text
resourceOwner = Maybe Text
a} :: EndpointAccess)

-- | Undocumented member.
endpointAccess_vpcEndpoint :: Lens.Lens' EndpointAccess (Prelude.Maybe VpcEndpoint)
endpointAccess_vpcEndpoint :: (Maybe VpcEndpoint -> f (Maybe VpcEndpoint))
-> EndpointAccess -> f EndpointAccess
endpointAccess_vpcEndpoint = (EndpointAccess -> Maybe VpcEndpoint)
-> (EndpointAccess -> Maybe VpcEndpoint -> EndpointAccess)
-> Lens
     EndpointAccess
     EndpointAccess
     (Maybe VpcEndpoint)
     (Maybe VpcEndpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe VpcEndpoint
vpcEndpoint :: Maybe VpcEndpoint
$sel:vpcEndpoint:EndpointAccess' :: EndpointAccess -> Maybe VpcEndpoint
vpcEndpoint} -> Maybe VpcEndpoint
vpcEndpoint) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe VpcEndpoint
a -> EndpointAccess
s {$sel:vpcEndpoint:EndpointAccess' :: Maybe VpcEndpoint
vpcEndpoint = Maybe VpcEndpoint
a} :: EndpointAccess)

-- | The port number on which the cluster accepts incoming connections.
endpointAccess_port :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Int)
endpointAccess_port :: (Maybe Int -> f (Maybe Int)) -> EndpointAccess -> f EndpointAccess
endpointAccess_port = (EndpointAccess -> Maybe Int)
-> (EndpointAccess -> Maybe Int -> EndpointAccess)
-> Lens EndpointAccess EndpointAccess (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointAccess' {Maybe Int
port :: Maybe Int
$sel:port:EndpointAccess' :: EndpointAccess -> Maybe Int
port} -> Maybe Int
port) (\s :: EndpointAccess
s@EndpointAccess' {} Maybe Int
a -> EndpointAccess
s {$sel:port:EndpointAccess' :: Maybe Int
port = Maybe Int
a} :: EndpointAccess)

instance Core.FromXML EndpointAccess where
  parseXML :: [Node] -> Either String EndpointAccess
parseXML [Node]
x =
    Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [VpcSecurityGroupMembership]
-> Maybe Text
-> Maybe VpcEndpoint
-> Maybe Int
-> EndpointAccess
EndpointAccess'
      (Maybe Text
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [VpcSecurityGroupMembership]
 -> Maybe Text
 -> Maybe VpcEndpoint
 -> Maybe Int
 -> EndpointAccess)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe Text
      -> Maybe VpcEndpoint
      -> Maybe Int
      -> EndpointAccess)
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
"EndpointName")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe Text
   -> Maybe VpcEndpoint
   -> Maybe Int
   -> EndpointAccess)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe Text
      -> Maybe VpcEndpoint
      -> Maybe Int
      -> EndpointAccess)
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
"EndpointCreateTime")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe Text
   -> Maybe VpcEndpoint
   -> Maybe Int
   -> EndpointAccess)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe Text
      -> Maybe VpcEndpoint
      -> Maybe Int
      -> EndpointAccess)
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
"SubnetGroupName")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe Text
   -> Maybe VpcEndpoint
   -> Maybe Int
   -> EndpointAccess)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe Text
      -> Maybe VpcEndpoint
      -> Maybe Int
      -> EndpointAccess)
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
"Address")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe Text
   -> Maybe VpcEndpoint
   -> Maybe Int
   -> EndpointAccess)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe Text
      -> Maybe VpcEndpoint
      -> Maybe Int
      -> EndpointAccess)
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
"ClusterIdentifier")
      Either
  String
  (Maybe Text
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe Text
   -> Maybe VpcEndpoint
   -> Maybe Int
   -> EndpointAccess)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [VpcSecurityGroupMembership]
      -> Maybe Text -> Maybe VpcEndpoint -> Maybe Int -> EndpointAccess)
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
"EndpointStatus")
      Either
  String
  (Maybe [VpcSecurityGroupMembership]
   -> Maybe Text -> Maybe VpcEndpoint -> Maybe Int -> EndpointAccess)
-> Either String (Maybe [VpcSecurityGroupMembership])
-> Either
     String
     (Maybe Text -> Maybe VpcEndpoint -> Maybe Int -> EndpointAccess)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpcSecurityGroups"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [VpcSecurityGroupMembership]))
-> Either String (Maybe [VpcSecurityGroupMembership])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [VpcSecurityGroupMembership])
-> [Node] -> Either String (Maybe [VpcSecurityGroupMembership])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [VpcSecurityGroupMembership]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"VpcSecurityGroup")
                  )
      Either
  String
  (Maybe Text -> Maybe VpcEndpoint -> Maybe Int -> EndpointAccess)
-> Either String (Maybe Text)
-> Either String (Maybe VpcEndpoint -> Maybe Int -> EndpointAccess)
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
"ResourceOwner")
      Either String (Maybe VpcEndpoint -> Maybe Int -> EndpointAccess)
-> Either String (Maybe VpcEndpoint)
-> Either String (Maybe Int -> EndpointAccess)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe VpcEndpoint)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpcEndpoint")
      Either String (Maybe Int -> EndpointAccess)
-> Either String (Maybe Int) -> Either String EndpointAccess
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Port")

instance Prelude.Hashable EndpointAccess

instance Prelude.NFData EndpointAccess