{-# 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 #-}
module Amazonka.Redshift.Types.PartnerIntegrationInfo 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.PartnerIntegrationStatus
data PartnerIntegrationInfo = PartnerIntegrationInfo'
{
PartnerIntegrationInfo -> Maybe PartnerIntegrationStatus
status :: Prelude.Maybe PartnerIntegrationStatus,
PartnerIntegrationInfo -> Maybe ISO8601
createdAt :: Prelude.Maybe Core.ISO8601,
PartnerIntegrationInfo -> Maybe Text
partnerName :: Prelude.Maybe Prelude.Text,
PartnerIntegrationInfo -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
PartnerIntegrationInfo -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
PartnerIntegrationInfo -> Maybe ISO8601
updatedAt :: Prelude.Maybe Core.ISO8601
}
deriving (PartnerIntegrationInfo -> PartnerIntegrationInfo -> Bool
(PartnerIntegrationInfo -> PartnerIntegrationInfo -> Bool)
-> (PartnerIntegrationInfo -> PartnerIntegrationInfo -> Bool)
-> Eq PartnerIntegrationInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PartnerIntegrationInfo -> PartnerIntegrationInfo -> Bool
$c/= :: PartnerIntegrationInfo -> PartnerIntegrationInfo -> Bool
== :: PartnerIntegrationInfo -> PartnerIntegrationInfo -> Bool
$c== :: PartnerIntegrationInfo -> PartnerIntegrationInfo -> Bool
Prelude.Eq, ReadPrec [PartnerIntegrationInfo]
ReadPrec PartnerIntegrationInfo
Int -> ReadS PartnerIntegrationInfo
ReadS [PartnerIntegrationInfo]
(Int -> ReadS PartnerIntegrationInfo)
-> ReadS [PartnerIntegrationInfo]
-> ReadPrec PartnerIntegrationInfo
-> ReadPrec [PartnerIntegrationInfo]
-> Read PartnerIntegrationInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PartnerIntegrationInfo]
$creadListPrec :: ReadPrec [PartnerIntegrationInfo]
readPrec :: ReadPrec PartnerIntegrationInfo
$creadPrec :: ReadPrec PartnerIntegrationInfo
readList :: ReadS [PartnerIntegrationInfo]
$creadList :: ReadS [PartnerIntegrationInfo]
readsPrec :: Int -> ReadS PartnerIntegrationInfo
$creadsPrec :: Int -> ReadS PartnerIntegrationInfo
Prelude.Read, Int -> PartnerIntegrationInfo -> ShowS
[PartnerIntegrationInfo] -> ShowS
PartnerIntegrationInfo -> String
(Int -> PartnerIntegrationInfo -> ShowS)
-> (PartnerIntegrationInfo -> String)
-> ([PartnerIntegrationInfo] -> ShowS)
-> Show PartnerIntegrationInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PartnerIntegrationInfo] -> ShowS
$cshowList :: [PartnerIntegrationInfo] -> ShowS
show :: PartnerIntegrationInfo -> String
$cshow :: PartnerIntegrationInfo -> String
showsPrec :: Int -> PartnerIntegrationInfo -> ShowS
$cshowsPrec :: Int -> PartnerIntegrationInfo -> ShowS
Prelude.Show, (forall x. PartnerIntegrationInfo -> Rep PartnerIntegrationInfo x)
-> (forall x.
Rep PartnerIntegrationInfo x -> PartnerIntegrationInfo)
-> Generic PartnerIntegrationInfo
forall x. Rep PartnerIntegrationInfo x -> PartnerIntegrationInfo
forall x. PartnerIntegrationInfo -> Rep PartnerIntegrationInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PartnerIntegrationInfo x -> PartnerIntegrationInfo
$cfrom :: forall x. PartnerIntegrationInfo -> Rep PartnerIntegrationInfo x
Prelude.Generic)
newPartnerIntegrationInfo ::
PartnerIntegrationInfo
newPartnerIntegrationInfo :: PartnerIntegrationInfo
newPartnerIntegrationInfo =
PartnerIntegrationInfo' :: Maybe PartnerIntegrationStatus
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> PartnerIntegrationInfo
PartnerIntegrationInfo'
{ $sel:status:PartnerIntegrationInfo' :: Maybe PartnerIntegrationStatus
status = Maybe PartnerIntegrationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:PartnerIntegrationInfo' :: Maybe ISO8601
createdAt = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:partnerName:PartnerIntegrationInfo' :: Maybe Text
partnerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:PartnerIntegrationInfo' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:databaseName:PartnerIntegrationInfo' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:PartnerIntegrationInfo' :: Maybe ISO8601
updatedAt = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing
}
partnerIntegrationInfo_status :: Lens.Lens' PartnerIntegrationInfo (Prelude.Maybe PartnerIntegrationStatus)
partnerIntegrationInfo_status :: (Maybe PartnerIntegrationStatus
-> f (Maybe PartnerIntegrationStatus))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo
partnerIntegrationInfo_status = (PartnerIntegrationInfo -> Maybe PartnerIntegrationStatus)
-> (PartnerIntegrationInfo
-> Maybe PartnerIntegrationStatus -> PartnerIntegrationInfo)
-> Lens
PartnerIntegrationInfo
PartnerIntegrationInfo
(Maybe PartnerIntegrationStatus)
(Maybe PartnerIntegrationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PartnerIntegrationInfo' {Maybe PartnerIntegrationStatus
status :: Maybe PartnerIntegrationStatus
$sel:status:PartnerIntegrationInfo' :: PartnerIntegrationInfo -> Maybe PartnerIntegrationStatus
status} -> Maybe PartnerIntegrationStatus
status) (\s :: PartnerIntegrationInfo
s@PartnerIntegrationInfo' {} Maybe PartnerIntegrationStatus
a -> PartnerIntegrationInfo
s {$sel:status:PartnerIntegrationInfo' :: Maybe PartnerIntegrationStatus
status = Maybe PartnerIntegrationStatus
a} :: PartnerIntegrationInfo)
partnerIntegrationInfo_createdAt :: Lens.Lens' PartnerIntegrationInfo (Prelude.Maybe Prelude.UTCTime)
partnerIntegrationInfo_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo
partnerIntegrationInfo_createdAt = (PartnerIntegrationInfo -> Maybe ISO8601)
-> (PartnerIntegrationInfo
-> Maybe ISO8601 -> PartnerIntegrationInfo)
-> Lens
PartnerIntegrationInfo
PartnerIntegrationInfo
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PartnerIntegrationInfo' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:PartnerIntegrationInfo' :: PartnerIntegrationInfo -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: PartnerIntegrationInfo
s@PartnerIntegrationInfo' {} Maybe ISO8601
a -> PartnerIntegrationInfo
s {$sel:createdAt:PartnerIntegrationInfo' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: PartnerIntegrationInfo) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PartnerIntegrationInfo
-> f PartnerIntegrationInfo
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
partnerIntegrationInfo_partnerName :: Lens.Lens' PartnerIntegrationInfo (Prelude.Maybe Prelude.Text)
partnerIntegrationInfo_partnerName :: (Maybe Text -> f (Maybe Text))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo
partnerIntegrationInfo_partnerName = (PartnerIntegrationInfo -> Maybe Text)
-> (PartnerIntegrationInfo -> Maybe Text -> PartnerIntegrationInfo)
-> Lens
PartnerIntegrationInfo
PartnerIntegrationInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PartnerIntegrationInfo' {Maybe Text
partnerName :: Maybe Text
$sel:partnerName:PartnerIntegrationInfo' :: PartnerIntegrationInfo -> Maybe Text
partnerName} -> Maybe Text
partnerName) (\s :: PartnerIntegrationInfo
s@PartnerIntegrationInfo' {} Maybe Text
a -> PartnerIntegrationInfo
s {$sel:partnerName:PartnerIntegrationInfo' :: Maybe Text
partnerName = Maybe Text
a} :: PartnerIntegrationInfo)
partnerIntegrationInfo_statusMessage :: Lens.Lens' PartnerIntegrationInfo (Prelude.Maybe Prelude.Text)
partnerIntegrationInfo_statusMessage :: (Maybe Text -> f (Maybe Text))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo
partnerIntegrationInfo_statusMessage = (PartnerIntegrationInfo -> Maybe Text)
-> (PartnerIntegrationInfo -> Maybe Text -> PartnerIntegrationInfo)
-> Lens
PartnerIntegrationInfo
PartnerIntegrationInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PartnerIntegrationInfo' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:PartnerIntegrationInfo' :: PartnerIntegrationInfo -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: PartnerIntegrationInfo
s@PartnerIntegrationInfo' {} Maybe Text
a -> PartnerIntegrationInfo
s {$sel:statusMessage:PartnerIntegrationInfo' :: Maybe Text
statusMessage = Maybe Text
a} :: PartnerIntegrationInfo)
partnerIntegrationInfo_databaseName :: Lens.Lens' PartnerIntegrationInfo (Prelude.Maybe Prelude.Text)
partnerIntegrationInfo_databaseName :: (Maybe Text -> f (Maybe Text))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo
partnerIntegrationInfo_databaseName = (PartnerIntegrationInfo -> Maybe Text)
-> (PartnerIntegrationInfo -> Maybe Text -> PartnerIntegrationInfo)
-> Lens
PartnerIntegrationInfo
PartnerIntegrationInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PartnerIntegrationInfo' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:PartnerIntegrationInfo' :: PartnerIntegrationInfo -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: PartnerIntegrationInfo
s@PartnerIntegrationInfo' {} Maybe Text
a -> PartnerIntegrationInfo
s {$sel:databaseName:PartnerIntegrationInfo' :: Maybe Text
databaseName = Maybe Text
a} :: PartnerIntegrationInfo)
partnerIntegrationInfo_updatedAt :: Lens.Lens' PartnerIntegrationInfo (Prelude.Maybe Prelude.UTCTime)
partnerIntegrationInfo_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo
partnerIntegrationInfo_updatedAt = (PartnerIntegrationInfo -> Maybe ISO8601)
-> (PartnerIntegrationInfo
-> Maybe ISO8601 -> PartnerIntegrationInfo)
-> Lens
PartnerIntegrationInfo
PartnerIntegrationInfo
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PartnerIntegrationInfo' {Maybe ISO8601
updatedAt :: Maybe ISO8601
$sel:updatedAt:PartnerIntegrationInfo' :: PartnerIntegrationInfo -> Maybe ISO8601
updatedAt} -> Maybe ISO8601
updatedAt) (\s :: PartnerIntegrationInfo
s@PartnerIntegrationInfo' {} Maybe ISO8601
a -> PartnerIntegrationInfo
s {$sel:updatedAt:PartnerIntegrationInfo' :: Maybe ISO8601
updatedAt = Maybe ISO8601
a} :: PartnerIntegrationInfo) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> PartnerIntegrationInfo -> f PartnerIntegrationInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PartnerIntegrationInfo
-> f PartnerIntegrationInfo
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
instance Core.FromXML PartnerIntegrationInfo where
parseXML :: [Node] -> Either String PartnerIntegrationInfo
parseXML [Node]
x =
Maybe PartnerIntegrationStatus
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> PartnerIntegrationInfo
PartnerIntegrationInfo'
(Maybe PartnerIntegrationStatus
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> PartnerIntegrationInfo)
-> Either String (Maybe PartnerIntegrationStatus)
-> Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> PartnerIntegrationInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe PartnerIntegrationStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
Either
String
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> PartnerIntegrationInfo)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> PartnerIntegrationInfo)
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
"CreatedAt")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> PartnerIntegrationInfo)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe ISO8601 -> PartnerIntegrationInfo)
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
"PartnerName")
Either
String
(Maybe Text
-> Maybe Text -> Maybe ISO8601 -> PartnerIntegrationInfo)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe ISO8601 -> PartnerIntegrationInfo)
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
"StatusMessage")
Either
String (Maybe Text -> Maybe ISO8601 -> PartnerIntegrationInfo)
-> Either String (Maybe Text)
-> Either String (Maybe ISO8601 -> PartnerIntegrationInfo)
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
"DatabaseName")
Either String (Maybe ISO8601 -> PartnerIntegrationInfo)
-> Either String (Maybe ISO8601)
-> Either String PartnerIntegrationInfo
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
"UpdatedAt")
instance Prelude.Hashable PartnerIntegrationInfo
instance Prelude.NFData PartnerIntegrationInfo