{-# 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.SMS.Types.Connector
-- 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.SMS.Types.Connector where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SMS.Types.ConnectorCapability
import Amazonka.SMS.Types.ConnectorStatus
import Amazonka.SMS.Types.VmManagerType

-- | Represents a connector.
--
-- /See:/ 'newConnector' smart constructor.
data Connector = Connector'
  { -- | The status of the connector.
    Connector -> Maybe ConnectorStatus
status :: Prelude.Maybe ConnectorStatus,
    -- | The name of the VM manager.
    Connector -> Maybe Text
vmManagerName :: Prelude.Maybe Prelude.Text,
    -- | The IP address of the connector.
    Connector -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
    -- | The ID of the VM manager.
    Connector -> Maybe Text
vmManagerId :: Prelude.Maybe Prelude.Text,
    -- | The VM management product.
    Connector -> Maybe VmManagerType
vmManagerType :: Prelude.Maybe VmManagerType,
    -- | The ID of the connector.
    Connector -> Maybe Text
connectorId :: Prelude.Maybe Prelude.Text,
    -- | The time the connector was associated.
    Connector -> Maybe POSIX
associatedOn :: Prelude.Maybe Core.POSIX,
    -- | The MAC address of the connector.
    Connector -> Maybe Text
macAddress :: Prelude.Maybe Prelude.Text,
    -- | The connector version.
    Connector -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The capabilities of the connector.
    Connector -> Maybe [ConnectorCapability]
capabilityList :: Prelude.Maybe [ConnectorCapability]
  }
  deriving (Connector -> Connector -> Bool
(Connector -> Connector -> Bool)
-> (Connector -> Connector -> Bool) -> Eq Connector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Connector -> Connector -> Bool
$c/= :: Connector -> Connector -> Bool
== :: Connector -> Connector -> Bool
$c== :: Connector -> Connector -> Bool
Prelude.Eq, ReadPrec [Connector]
ReadPrec Connector
Int -> ReadS Connector
ReadS [Connector]
(Int -> ReadS Connector)
-> ReadS [Connector]
-> ReadPrec Connector
-> ReadPrec [Connector]
-> Read Connector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Connector]
$creadListPrec :: ReadPrec [Connector]
readPrec :: ReadPrec Connector
$creadPrec :: ReadPrec Connector
readList :: ReadS [Connector]
$creadList :: ReadS [Connector]
readsPrec :: Int -> ReadS Connector
$creadsPrec :: Int -> ReadS Connector
Prelude.Read, Int -> Connector -> ShowS
[Connector] -> ShowS
Connector -> String
(Int -> Connector -> ShowS)
-> (Connector -> String)
-> ([Connector] -> ShowS)
-> Show Connector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Connector] -> ShowS
$cshowList :: [Connector] -> ShowS
show :: Connector -> String
$cshow :: Connector -> String
showsPrec :: Int -> Connector -> ShowS
$cshowsPrec :: Int -> Connector -> ShowS
Prelude.Show, (forall x. Connector -> Rep Connector x)
-> (forall x. Rep Connector x -> Connector) -> Generic Connector
forall x. Rep Connector x -> Connector
forall x. Connector -> Rep Connector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Connector x -> Connector
$cfrom :: forall x. Connector -> Rep Connector x
Prelude.Generic)

-- |
-- Create a value of 'Connector' 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:
--
-- 'status', 'connector_status' - The status of the connector.
--
-- 'vmManagerName', 'connector_vmManagerName' - The name of the VM manager.
--
-- 'ipAddress', 'connector_ipAddress' - The IP address of the connector.
--
-- 'vmManagerId', 'connector_vmManagerId' - The ID of the VM manager.
--
-- 'vmManagerType', 'connector_vmManagerType' - The VM management product.
--
-- 'connectorId', 'connector_connectorId' - The ID of the connector.
--
-- 'associatedOn', 'connector_associatedOn' - The time the connector was associated.
--
-- 'macAddress', 'connector_macAddress' - The MAC address of the connector.
--
-- 'version', 'connector_version' - The connector version.
--
-- 'capabilityList', 'connector_capabilityList' - The capabilities of the connector.
newConnector ::
  Connector
newConnector :: Connector
newConnector =
  Connector' :: Maybe ConnectorStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe VmManagerType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ConnectorCapability]
-> Connector
Connector'
    { $sel:status:Connector' :: Maybe ConnectorStatus
status = Maybe ConnectorStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:vmManagerName:Connector' :: Maybe Text
vmManagerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ipAddress:Connector' :: Maybe Text
ipAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vmManagerId:Connector' :: Maybe Text
vmManagerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vmManagerType:Connector' :: Maybe VmManagerType
vmManagerType = Maybe VmManagerType
forall a. Maybe a
Prelude.Nothing,
      $sel:connectorId:Connector' :: Maybe Text
connectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associatedOn:Connector' :: Maybe POSIX
associatedOn = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:macAddress:Connector' :: Maybe Text
macAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:Connector' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilityList:Connector' :: Maybe [ConnectorCapability]
capabilityList = Maybe [ConnectorCapability]
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the connector.
connector_status :: Lens.Lens' Connector (Prelude.Maybe ConnectorStatus)
connector_status :: (Maybe ConnectorStatus -> f (Maybe ConnectorStatus))
-> Connector -> f Connector
connector_status = (Connector -> Maybe ConnectorStatus)
-> (Connector -> Maybe ConnectorStatus -> Connector)
-> Lens
     Connector Connector (Maybe ConnectorStatus) (Maybe ConnectorStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe ConnectorStatus
status :: Maybe ConnectorStatus
$sel:status:Connector' :: Connector -> Maybe ConnectorStatus
status} -> Maybe ConnectorStatus
status) (\s :: Connector
s@Connector' {} Maybe ConnectorStatus
a -> Connector
s {$sel:status:Connector' :: Maybe ConnectorStatus
status = Maybe ConnectorStatus
a} :: Connector)

-- | The name of the VM manager.
connector_vmManagerName :: Lens.Lens' Connector (Prelude.Maybe Prelude.Text)
connector_vmManagerName :: (Maybe Text -> f (Maybe Text)) -> Connector -> f Connector
connector_vmManagerName = (Connector -> Maybe Text)
-> (Connector -> Maybe Text -> Connector)
-> Lens Connector Connector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe Text
vmManagerName :: Maybe Text
$sel:vmManagerName:Connector' :: Connector -> Maybe Text
vmManagerName} -> Maybe Text
vmManagerName) (\s :: Connector
s@Connector' {} Maybe Text
a -> Connector
s {$sel:vmManagerName:Connector' :: Maybe Text
vmManagerName = Maybe Text
a} :: Connector)

-- | The IP address of the connector.
connector_ipAddress :: Lens.Lens' Connector (Prelude.Maybe Prelude.Text)
connector_ipAddress :: (Maybe Text -> f (Maybe Text)) -> Connector -> f Connector
connector_ipAddress = (Connector -> Maybe Text)
-> (Connector -> Maybe Text -> Connector)
-> Lens Connector Connector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:Connector' :: Connector -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: Connector
s@Connector' {} Maybe Text
a -> Connector
s {$sel:ipAddress:Connector' :: Maybe Text
ipAddress = Maybe Text
a} :: Connector)

-- | The ID of the VM manager.
connector_vmManagerId :: Lens.Lens' Connector (Prelude.Maybe Prelude.Text)
connector_vmManagerId :: (Maybe Text -> f (Maybe Text)) -> Connector -> f Connector
connector_vmManagerId = (Connector -> Maybe Text)
-> (Connector -> Maybe Text -> Connector)
-> Lens Connector Connector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe Text
vmManagerId :: Maybe Text
$sel:vmManagerId:Connector' :: Connector -> Maybe Text
vmManagerId} -> Maybe Text
vmManagerId) (\s :: Connector
s@Connector' {} Maybe Text
a -> Connector
s {$sel:vmManagerId:Connector' :: Maybe Text
vmManagerId = Maybe Text
a} :: Connector)

-- | The VM management product.
connector_vmManagerType :: Lens.Lens' Connector (Prelude.Maybe VmManagerType)
connector_vmManagerType :: (Maybe VmManagerType -> f (Maybe VmManagerType))
-> Connector -> f Connector
connector_vmManagerType = (Connector -> Maybe VmManagerType)
-> (Connector -> Maybe VmManagerType -> Connector)
-> Lens
     Connector Connector (Maybe VmManagerType) (Maybe VmManagerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe VmManagerType
vmManagerType :: Maybe VmManagerType
$sel:vmManagerType:Connector' :: Connector -> Maybe VmManagerType
vmManagerType} -> Maybe VmManagerType
vmManagerType) (\s :: Connector
s@Connector' {} Maybe VmManagerType
a -> Connector
s {$sel:vmManagerType:Connector' :: Maybe VmManagerType
vmManagerType = Maybe VmManagerType
a} :: Connector)

-- | The ID of the connector.
connector_connectorId :: Lens.Lens' Connector (Prelude.Maybe Prelude.Text)
connector_connectorId :: (Maybe Text -> f (Maybe Text)) -> Connector -> f Connector
connector_connectorId = (Connector -> Maybe Text)
-> (Connector -> Maybe Text -> Connector)
-> Lens Connector Connector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe Text
connectorId :: Maybe Text
$sel:connectorId:Connector' :: Connector -> Maybe Text
connectorId} -> Maybe Text
connectorId) (\s :: Connector
s@Connector' {} Maybe Text
a -> Connector
s {$sel:connectorId:Connector' :: Maybe Text
connectorId = Maybe Text
a} :: Connector)

-- | The time the connector was associated.
connector_associatedOn :: Lens.Lens' Connector (Prelude.Maybe Prelude.UTCTime)
connector_associatedOn :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Connector -> f Connector
connector_associatedOn = (Connector -> Maybe POSIX)
-> (Connector -> Maybe POSIX -> Connector)
-> Lens Connector Connector (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe POSIX
associatedOn :: Maybe POSIX
$sel:associatedOn:Connector' :: Connector -> Maybe POSIX
associatedOn} -> Maybe POSIX
associatedOn) (\s :: Connector
s@Connector' {} Maybe POSIX
a -> Connector
s {$sel:associatedOn:Connector' :: Maybe POSIX
associatedOn = Maybe POSIX
a} :: Connector) ((Maybe POSIX -> f (Maybe POSIX)) -> Connector -> f Connector)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Connector
-> f Connector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The MAC address of the connector.
connector_macAddress :: Lens.Lens' Connector (Prelude.Maybe Prelude.Text)
connector_macAddress :: (Maybe Text -> f (Maybe Text)) -> Connector -> f Connector
connector_macAddress = (Connector -> Maybe Text)
-> (Connector -> Maybe Text -> Connector)
-> Lens Connector Connector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe Text
macAddress :: Maybe Text
$sel:macAddress:Connector' :: Connector -> Maybe Text
macAddress} -> Maybe Text
macAddress) (\s :: Connector
s@Connector' {} Maybe Text
a -> Connector
s {$sel:macAddress:Connector' :: Maybe Text
macAddress = Maybe Text
a} :: Connector)

-- | The connector version.
connector_version :: Lens.Lens' Connector (Prelude.Maybe Prelude.Text)
connector_version :: (Maybe Text -> f (Maybe Text)) -> Connector -> f Connector
connector_version = (Connector -> Maybe Text)
-> (Connector -> Maybe Text -> Connector)
-> Lens Connector Connector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe Text
version :: Maybe Text
$sel:version:Connector' :: Connector -> Maybe Text
version} -> Maybe Text
version) (\s :: Connector
s@Connector' {} Maybe Text
a -> Connector
s {$sel:version:Connector' :: Maybe Text
version = Maybe Text
a} :: Connector)

-- | The capabilities of the connector.
connector_capabilityList :: Lens.Lens' Connector (Prelude.Maybe [ConnectorCapability])
connector_capabilityList :: (Maybe [ConnectorCapability] -> f (Maybe [ConnectorCapability]))
-> Connector -> f Connector
connector_capabilityList = (Connector -> Maybe [ConnectorCapability])
-> (Connector -> Maybe [ConnectorCapability] -> Connector)
-> Lens
     Connector
     Connector
     (Maybe [ConnectorCapability])
     (Maybe [ConnectorCapability])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Connector' {Maybe [ConnectorCapability]
capabilityList :: Maybe [ConnectorCapability]
$sel:capabilityList:Connector' :: Connector -> Maybe [ConnectorCapability]
capabilityList} -> Maybe [ConnectorCapability]
capabilityList) (\s :: Connector
s@Connector' {} Maybe [ConnectorCapability]
a -> Connector
s {$sel:capabilityList:Connector' :: Maybe [ConnectorCapability]
capabilityList = Maybe [ConnectorCapability]
a} :: Connector) ((Maybe [ConnectorCapability] -> f (Maybe [ConnectorCapability]))
 -> Connector -> f Connector)
-> ((Maybe [ConnectorCapability]
     -> f (Maybe [ConnectorCapability]))
    -> Maybe [ConnectorCapability] -> f (Maybe [ConnectorCapability]))
-> (Maybe [ConnectorCapability] -> f (Maybe [ConnectorCapability]))
-> Connector
-> f Connector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConnectorCapability]
  [ConnectorCapability]
  [ConnectorCapability]
  [ConnectorCapability]
-> Iso
     (Maybe [ConnectorCapability])
     (Maybe [ConnectorCapability])
     (Maybe [ConnectorCapability])
     (Maybe [ConnectorCapability])
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
  [ConnectorCapability]
  [ConnectorCapability]
  [ConnectorCapability]
  [ConnectorCapability]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON Connector where
  parseJSON :: Value -> Parser Connector
parseJSON =
    String -> (Object -> Parser Connector) -> Value -> Parser Connector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Connector"
      ( \Object
x ->
          Maybe ConnectorStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe VmManagerType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [ConnectorCapability]
-> Connector
Connector'
            (Maybe ConnectorStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe VmManagerType
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe [ConnectorCapability]
 -> Connector)
-> Parser (Maybe ConnectorStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe VmManagerType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ConnectorCapability]
      -> Connector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ConnectorStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe VmManagerType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ConnectorCapability]
   -> Connector)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe VmManagerType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ConnectorCapability]
      -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vmManagerName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe VmManagerType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ConnectorCapability]
   -> Connector)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe VmManagerType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ConnectorCapability]
      -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipAddress")
            Parser
  (Maybe Text
   -> Maybe VmManagerType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ConnectorCapability]
   -> Connector)
-> Parser (Maybe Text)
-> Parser
     (Maybe VmManagerType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ConnectorCapability]
      -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vmManagerId")
            Parser
  (Maybe VmManagerType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ConnectorCapability]
   -> Connector)
-> Parser (Maybe VmManagerType)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ConnectorCapability]
      -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VmManagerType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vmManagerType")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ConnectorCapability]
   -> Connector)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ConnectorCapability]
      -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"connectorId")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ConnectorCapability]
   -> Connector)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe [ConnectorCapability] -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"associatedOn")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe [ConnectorCapability] -> Connector)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [ConnectorCapability] -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"macAddress")
            Parser (Maybe Text -> Maybe [ConnectorCapability] -> Connector)
-> Parser (Maybe Text)
-> Parser (Maybe [ConnectorCapability] -> Connector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
            Parser (Maybe [ConnectorCapability] -> Connector)
-> Parser (Maybe [ConnectorCapability]) -> Parser Connector
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ConnectorCapability]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"capabilityList"
                            Parser (Maybe (Maybe [ConnectorCapability]))
-> Maybe [ConnectorCapability]
-> Parser (Maybe [ConnectorCapability])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ConnectorCapability]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable Connector

instance Prelude.NFData Connector