{-# 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.DirectConnect.Types.Lag
-- 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.DirectConnect.Types.Lag where

import qualified Amazonka.Core as Core
import Amazonka.DirectConnect.Types.Connection
import Amazonka.DirectConnect.Types.HasLogicalRedundancy
import Amazonka.DirectConnect.Types.LagState
import Amazonka.DirectConnect.Types.MacSecKey
import Amazonka.DirectConnect.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about a link aggregation group (LAG).
--
-- /See:/ 'newLag' smart constructor.
data Lag = Lag'
  { -- | The ID of the LAG.
    Lag -> Maybe Text
lagId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the LAG supports MAC Security (MACsec).
    Lag -> Maybe Bool
macSecCapable :: Prelude.Maybe Prelude.Bool,
    -- | The individual bandwidth of the physical connections bundled by the LAG.
    -- The possible values are 1Gbps and 10Gbps.
    Lag -> Maybe Text
connectionsBandwidth :: Prelude.Maybe Prelude.Text,
    -- | The minimum number of physical dedicated connections that must be
    -- operational for the LAG itself to be operational.
    Lag -> Maybe Int
minimumLinks :: Prelude.Maybe Prelude.Int,
    -- | The name of the LAG.
    Lag -> Maybe Text
lagName :: Prelude.Maybe Prelude.Text,
    -- | The location of the LAG.
    Lag -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | The connections bundled by the LAG.
    Lag -> Maybe [Connection]
connections :: Prelude.Maybe [Connection],
    -- | The Direct Connect endpoint that hosts the LAG.
    Lag -> Maybe Text
awsDevice :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the LAG supports a secondary BGP peer in the same
    -- address family (IPv4\/IPv6).
    Lag -> Maybe HasLogicalRedundancy
hasLogicalRedundancy :: Prelude.Maybe HasLogicalRedundancy,
    -- | The Direct Connect endpoint that terminates the logical connection. This
    -- device might be different than the device that terminates the physical
    -- connection.
    Lag -> Maybe Text
awsLogicalDeviceId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the LAG can host other connections.
    Lag -> Maybe Bool
allowsHostedConnections :: Prelude.Maybe Prelude.Bool,
    -- | The LAG MAC Security (MACsec) encryption mode.
    --
    -- The valid values are @no_encrypt@, @should_encrypt@, and @must_encrypt@.
    Lag -> Maybe Text
encryptionMode :: Prelude.Maybe Prelude.Text,
    -- | The number of physical dedicated connections bundled by the LAG, up to a
    -- maximum of 10.
    Lag -> Maybe Int
numberOfConnections :: Prelude.Maybe Prelude.Int,
    -- | Indicates whether jumbo frames (9001 MTU) are supported.
    Lag -> Maybe Bool
jumboFrameCapable :: Prelude.Maybe Prelude.Bool,
    -- | The state of the LAG. The following are the possible values:
    --
    -- -   @requested@: The initial state of a LAG. The LAG stays in the
    --     requested state until the Letter of Authorization (LOA) is
    --     available.
    --
    -- -   @pending@: The LAG has been approved and is being initialized.
    --
    -- -   @available@: The network link is established and the LAG is ready
    --     for use.
    --
    -- -   @down@: The network link is down.
    --
    -- -   @deleting@: The LAG is being deleted.
    --
    -- -   @deleted@: The LAG is deleted.
    --
    -- -   @unknown@: The state of the LAG is not available.
    Lag -> Maybe LagState
lagState :: Prelude.Maybe LagState,
    -- | The ID of the Amazon Web Services account that owns the LAG.
    Lag -> Maybe Text
ownerAccount :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services Region where the connection is located.
    Lag -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | The MAC Security (MACsec) security keys associated with the LAG.
    Lag -> Maybe [MacSecKey]
macSecKeys :: Prelude.Maybe [MacSecKey],
    -- | The name of the service provider associated with the LAG.
    Lag -> Maybe Text
providerName :: Prelude.Maybe Prelude.Text,
    -- | The Direct Connect endpoint that hosts the LAG.
    Lag -> Maybe Text
awsDeviceV2 :: Prelude.Maybe Prelude.Text,
    -- | The tags associated with the LAG.
    Lag -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag)
  }
  deriving (Lag -> Lag -> Bool
(Lag -> Lag -> Bool) -> (Lag -> Lag -> Bool) -> Eq Lag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Lag -> Lag -> Bool
$c/= :: Lag -> Lag -> Bool
== :: Lag -> Lag -> Bool
$c== :: Lag -> Lag -> Bool
Prelude.Eq, ReadPrec [Lag]
ReadPrec Lag
Int -> ReadS Lag
ReadS [Lag]
(Int -> ReadS Lag)
-> ReadS [Lag] -> ReadPrec Lag -> ReadPrec [Lag] -> Read Lag
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Lag]
$creadListPrec :: ReadPrec [Lag]
readPrec :: ReadPrec Lag
$creadPrec :: ReadPrec Lag
readList :: ReadS [Lag]
$creadList :: ReadS [Lag]
readsPrec :: Int -> ReadS Lag
$creadsPrec :: Int -> ReadS Lag
Prelude.Read, Int -> Lag -> ShowS
[Lag] -> ShowS
Lag -> String
(Int -> Lag -> ShowS)
-> (Lag -> String) -> ([Lag] -> ShowS) -> Show Lag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Lag] -> ShowS
$cshowList :: [Lag] -> ShowS
show :: Lag -> String
$cshow :: Lag -> String
showsPrec :: Int -> Lag -> ShowS
$cshowsPrec :: Int -> Lag -> ShowS
Prelude.Show, (forall x. Lag -> Rep Lag x)
-> (forall x. Rep Lag x -> Lag) -> Generic Lag
forall x. Rep Lag x -> Lag
forall x. Lag -> Rep Lag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Lag x -> Lag
$cfrom :: forall x. Lag -> Rep Lag x
Prelude.Generic)

-- |
-- Create a value of 'Lag' 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:
--
-- 'lagId', 'lag_lagId' - The ID of the LAG.
--
-- 'macSecCapable', 'lag_macSecCapable' - Indicates whether the LAG supports MAC Security (MACsec).
--
-- 'connectionsBandwidth', 'lag_connectionsBandwidth' - The individual bandwidth of the physical connections bundled by the LAG.
-- The possible values are 1Gbps and 10Gbps.
--
-- 'minimumLinks', 'lag_minimumLinks' - The minimum number of physical dedicated connections that must be
-- operational for the LAG itself to be operational.
--
-- 'lagName', 'lag_lagName' - The name of the LAG.
--
-- 'location', 'lag_location' - The location of the LAG.
--
-- 'connections', 'lag_connections' - The connections bundled by the LAG.
--
-- 'awsDevice', 'lag_awsDevice' - The Direct Connect endpoint that hosts the LAG.
--
-- 'hasLogicalRedundancy', 'lag_hasLogicalRedundancy' - Indicates whether the LAG supports a secondary BGP peer in the same
-- address family (IPv4\/IPv6).
--
-- 'awsLogicalDeviceId', 'lag_awsLogicalDeviceId' - The Direct Connect endpoint that terminates the logical connection. This
-- device might be different than the device that terminates the physical
-- connection.
--
-- 'allowsHostedConnections', 'lag_allowsHostedConnections' - Indicates whether the LAG can host other connections.
--
-- 'encryptionMode', 'lag_encryptionMode' - The LAG MAC Security (MACsec) encryption mode.
--
-- The valid values are @no_encrypt@, @should_encrypt@, and @must_encrypt@.
--
-- 'numberOfConnections', 'lag_numberOfConnections' - The number of physical dedicated connections bundled by the LAG, up to a
-- maximum of 10.
--
-- 'jumboFrameCapable', 'lag_jumboFrameCapable' - Indicates whether jumbo frames (9001 MTU) are supported.
--
-- 'lagState', 'lag_lagState' - The state of the LAG. The following are the possible values:
--
-- -   @requested@: The initial state of a LAG. The LAG stays in the
--     requested state until the Letter of Authorization (LOA) is
--     available.
--
-- -   @pending@: The LAG has been approved and is being initialized.
--
-- -   @available@: The network link is established and the LAG is ready
--     for use.
--
-- -   @down@: The network link is down.
--
-- -   @deleting@: The LAG is being deleted.
--
-- -   @deleted@: The LAG is deleted.
--
-- -   @unknown@: The state of the LAG is not available.
--
-- 'ownerAccount', 'lag_ownerAccount' - The ID of the Amazon Web Services account that owns the LAG.
--
-- 'region', 'lag_region' - The Amazon Web Services Region where the connection is located.
--
-- 'macSecKeys', 'lag_macSecKeys' - The MAC Security (MACsec) security keys associated with the LAG.
--
-- 'providerName', 'lag_providerName' - The name of the service provider associated with the LAG.
--
-- 'awsDeviceV2', 'lag_awsDeviceV2' - The Direct Connect endpoint that hosts the LAG.
--
-- 'tags', 'lag_tags' - The tags associated with the LAG.
newLag ::
  Lag
newLag :: Lag
newLag =
  Lag' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Connection]
-> Maybe Text
-> Maybe HasLogicalRedundancy
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe LagState
-> Maybe Text
-> Maybe Text
-> Maybe [MacSecKey]
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Lag
Lag'
    { $sel:lagId:Lag' :: Maybe Text
lagId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:macSecCapable:Lag' :: Maybe Bool
macSecCapable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionsBandwidth:Lag' :: Maybe Text
connectionsBandwidth = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:minimumLinks:Lag' :: Maybe Int
minimumLinks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:lagName:Lag' :: Maybe Text
lagName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:location:Lag' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connections:Lag' :: Maybe [Connection]
connections = Maybe [Connection]
forall a. Maybe a
Prelude.Nothing,
      $sel:awsDevice:Lag' :: Maybe Text
awsDevice = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hasLogicalRedundancy:Lag' :: Maybe HasLogicalRedundancy
hasLogicalRedundancy = Maybe HasLogicalRedundancy
forall a. Maybe a
Prelude.Nothing,
      $sel:awsLogicalDeviceId:Lag' :: Maybe Text
awsLogicalDeviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:allowsHostedConnections:Lag' :: Maybe Bool
allowsHostedConnections = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionMode:Lag' :: Maybe Text
encryptionMode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfConnections:Lag' :: Maybe Int
numberOfConnections = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:jumboFrameCapable:Lag' :: Maybe Bool
jumboFrameCapable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:lagState:Lag' :: Maybe LagState
lagState = Maybe LagState
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccount:Lag' :: Maybe Text
ownerAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:Lag' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:macSecKeys:Lag' :: Maybe [MacSecKey]
macSecKeys = Maybe [MacSecKey]
forall a. Maybe a
Prelude.Nothing,
      $sel:providerName:Lag' :: Maybe Text
providerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsDeviceV2:Lag' :: Maybe Text
awsDeviceV2 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Lag' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the LAG.
lag_lagId :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_lagId :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_lagId = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
lagId :: Maybe Text
$sel:lagId:Lag' :: Lag -> Maybe Text
lagId} -> Maybe Text
lagId) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:lagId:Lag' :: Maybe Text
lagId = Maybe Text
a} :: Lag)

-- | Indicates whether the LAG supports MAC Security (MACsec).
lag_macSecCapable :: Lens.Lens' Lag (Prelude.Maybe Prelude.Bool)
lag_macSecCapable :: (Maybe Bool -> f (Maybe Bool)) -> Lag -> f Lag
lag_macSecCapable = (Lag -> Maybe Bool)
-> (Lag -> Maybe Bool -> Lag)
-> Lens Lag Lag (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Bool
macSecCapable :: Maybe Bool
$sel:macSecCapable:Lag' :: Lag -> Maybe Bool
macSecCapable} -> Maybe Bool
macSecCapable) (\s :: Lag
s@Lag' {} Maybe Bool
a -> Lag
s {$sel:macSecCapable:Lag' :: Maybe Bool
macSecCapable = Maybe Bool
a} :: Lag)

-- | The individual bandwidth of the physical connections bundled by the LAG.
-- The possible values are 1Gbps and 10Gbps.
lag_connectionsBandwidth :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_connectionsBandwidth :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_connectionsBandwidth = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
connectionsBandwidth :: Maybe Text
$sel:connectionsBandwidth:Lag' :: Lag -> Maybe Text
connectionsBandwidth} -> Maybe Text
connectionsBandwidth) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:connectionsBandwidth:Lag' :: Maybe Text
connectionsBandwidth = Maybe Text
a} :: Lag)

-- | The minimum number of physical dedicated connections that must be
-- operational for the LAG itself to be operational.
lag_minimumLinks :: Lens.Lens' Lag (Prelude.Maybe Prelude.Int)
lag_minimumLinks :: (Maybe Int -> f (Maybe Int)) -> Lag -> f Lag
lag_minimumLinks = (Lag -> Maybe Int)
-> (Lag -> Maybe Int -> Lag)
-> Lens Lag Lag (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Int
minimumLinks :: Maybe Int
$sel:minimumLinks:Lag' :: Lag -> Maybe Int
minimumLinks} -> Maybe Int
minimumLinks) (\s :: Lag
s@Lag' {} Maybe Int
a -> Lag
s {$sel:minimumLinks:Lag' :: Maybe Int
minimumLinks = Maybe Int
a} :: Lag)

-- | The name of the LAG.
lag_lagName :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_lagName :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_lagName = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
lagName :: Maybe Text
$sel:lagName:Lag' :: Lag -> Maybe Text
lagName} -> Maybe Text
lagName) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:lagName:Lag' :: Maybe Text
lagName = Maybe Text
a} :: Lag)

-- | The location of the LAG.
lag_location :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_location :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_location = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
location :: Maybe Text
$sel:location:Lag' :: Lag -> Maybe Text
location} -> Maybe Text
location) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:location:Lag' :: Maybe Text
location = Maybe Text
a} :: Lag)

-- | The connections bundled by the LAG.
lag_connections :: Lens.Lens' Lag (Prelude.Maybe [Connection])
lag_connections :: (Maybe [Connection] -> f (Maybe [Connection])) -> Lag -> f Lag
lag_connections = (Lag -> Maybe [Connection])
-> (Lag -> Maybe [Connection] -> Lag)
-> Lens Lag Lag (Maybe [Connection]) (Maybe [Connection])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe [Connection]
connections :: Maybe [Connection]
$sel:connections:Lag' :: Lag -> Maybe [Connection]
connections} -> Maybe [Connection]
connections) (\s :: Lag
s@Lag' {} Maybe [Connection]
a -> Lag
s {$sel:connections:Lag' :: Maybe [Connection]
connections = Maybe [Connection]
a} :: Lag) ((Maybe [Connection] -> f (Maybe [Connection])) -> Lag -> f Lag)
-> ((Maybe [Connection] -> f (Maybe [Connection]))
    -> Maybe [Connection] -> f (Maybe [Connection]))
-> (Maybe [Connection] -> f (Maybe [Connection]))
-> Lag
-> f Lag
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Connection] [Connection] [Connection] [Connection]
-> Iso
     (Maybe [Connection])
     (Maybe [Connection])
     (Maybe [Connection])
     (Maybe [Connection])
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 [Connection] [Connection] [Connection] [Connection]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Direct Connect endpoint that hosts the LAG.
lag_awsDevice :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_awsDevice :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_awsDevice = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
awsDevice :: Maybe Text
$sel:awsDevice:Lag' :: Lag -> Maybe Text
awsDevice} -> Maybe Text
awsDevice) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:awsDevice:Lag' :: Maybe Text
awsDevice = Maybe Text
a} :: Lag)

-- | Indicates whether the LAG supports a secondary BGP peer in the same
-- address family (IPv4\/IPv6).
lag_hasLogicalRedundancy :: Lens.Lens' Lag (Prelude.Maybe HasLogicalRedundancy)
lag_hasLogicalRedundancy :: (Maybe HasLogicalRedundancy -> f (Maybe HasLogicalRedundancy))
-> Lag -> f Lag
lag_hasLogicalRedundancy = (Lag -> Maybe HasLogicalRedundancy)
-> (Lag -> Maybe HasLogicalRedundancy -> Lag)
-> Lens
     Lag Lag (Maybe HasLogicalRedundancy) (Maybe HasLogicalRedundancy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe HasLogicalRedundancy
hasLogicalRedundancy :: Maybe HasLogicalRedundancy
$sel:hasLogicalRedundancy:Lag' :: Lag -> Maybe HasLogicalRedundancy
hasLogicalRedundancy} -> Maybe HasLogicalRedundancy
hasLogicalRedundancy) (\s :: Lag
s@Lag' {} Maybe HasLogicalRedundancy
a -> Lag
s {$sel:hasLogicalRedundancy:Lag' :: Maybe HasLogicalRedundancy
hasLogicalRedundancy = Maybe HasLogicalRedundancy
a} :: Lag)

-- | The Direct Connect endpoint that terminates the logical connection. This
-- device might be different than the device that terminates the physical
-- connection.
lag_awsLogicalDeviceId :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_awsLogicalDeviceId :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_awsLogicalDeviceId = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
awsLogicalDeviceId :: Maybe Text
$sel:awsLogicalDeviceId:Lag' :: Lag -> Maybe Text
awsLogicalDeviceId} -> Maybe Text
awsLogicalDeviceId) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:awsLogicalDeviceId:Lag' :: Maybe Text
awsLogicalDeviceId = Maybe Text
a} :: Lag)

-- | Indicates whether the LAG can host other connections.
lag_allowsHostedConnections :: Lens.Lens' Lag (Prelude.Maybe Prelude.Bool)
lag_allowsHostedConnections :: (Maybe Bool -> f (Maybe Bool)) -> Lag -> f Lag
lag_allowsHostedConnections = (Lag -> Maybe Bool)
-> (Lag -> Maybe Bool -> Lag)
-> Lens Lag Lag (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Bool
allowsHostedConnections :: Maybe Bool
$sel:allowsHostedConnections:Lag' :: Lag -> Maybe Bool
allowsHostedConnections} -> Maybe Bool
allowsHostedConnections) (\s :: Lag
s@Lag' {} Maybe Bool
a -> Lag
s {$sel:allowsHostedConnections:Lag' :: Maybe Bool
allowsHostedConnections = Maybe Bool
a} :: Lag)

-- | The LAG MAC Security (MACsec) encryption mode.
--
-- The valid values are @no_encrypt@, @should_encrypt@, and @must_encrypt@.
lag_encryptionMode :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_encryptionMode :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_encryptionMode = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
encryptionMode :: Maybe Text
$sel:encryptionMode:Lag' :: Lag -> Maybe Text
encryptionMode} -> Maybe Text
encryptionMode) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:encryptionMode:Lag' :: Maybe Text
encryptionMode = Maybe Text
a} :: Lag)

-- | The number of physical dedicated connections bundled by the LAG, up to a
-- maximum of 10.
lag_numberOfConnections :: Lens.Lens' Lag (Prelude.Maybe Prelude.Int)
lag_numberOfConnections :: (Maybe Int -> f (Maybe Int)) -> Lag -> f Lag
lag_numberOfConnections = (Lag -> Maybe Int)
-> (Lag -> Maybe Int -> Lag)
-> Lens Lag Lag (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Int
numberOfConnections :: Maybe Int
$sel:numberOfConnections:Lag' :: Lag -> Maybe Int
numberOfConnections} -> Maybe Int
numberOfConnections) (\s :: Lag
s@Lag' {} Maybe Int
a -> Lag
s {$sel:numberOfConnections:Lag' :: Maybe Int
numberOfConnections = Maybe Int
a} :: Lag)

-- | Indicates whether jumbo frames (9001 MTU) are supported.
lag_jumboFrameCapable :: Lens.Lens' Lag (Prelude.Maybe Prelude.Bool)
lag_jumboFrameCapable :: (Maybe Bool -> f (Maybe Bool)) -> Lag -> f Lag
lag_jumboFrameCapable = (Lag -> Maybe Bool)
-> (Lag -> Maybe Bool -> Lag)
-> Lens Lag Lag (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Bool
jumboFrameCapable :: Maybe Bool
$sel:jumboFrameCapable:Lag' :: Lag -> Maybe Bool
jumboFrameCapable} -> Maybe Bool
jumboFrameCapable) (\s :: Lag
s@Lag' {} Maybe Bool
a -> Lag
s {$sel:jumboFrameCapable:Lag' :: Maybe Bool
jumboFrameCapable = Maybe Bool
a} :: Lag)

-- | The state of the LAG. The following are the possible values:
--
-- -   @requested@: The initial state of a LAG. The LAG stays in the
--     requested state until the Letter of Authorization (LOA) is
--     available.
--
-- -   @pending@: The LAG has been approved and is being initialized.
--
-- -   @available@: The network link is established and the LAG is ready
--     for use.
--
-- -   @down@: The network link is down.
--
-- -   @deleting@: The LAG is being deleted.
--
-- -   @deleted@: The LAG is deleted.
--
-- -   @unknown@: The state of the LAG is not available.
lag_lagState :: Lens.Lens' Lag (Prelude.Maybe LagState)
lag_lagState :: (Maybe LagState -> f (Maybe LagState)) -> Lag -> f Lag
lag_lagState = (Lag -> Maybe LagState)
-> (Lag -> Maybe LagState -> Lag)
-> Lens Lag Lag (Maybe LagState) (Maybe LagState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe LagState
lagState :: Maybe LagState
$sel:lagState:Lag' :: Lag -> Maybe LagState
lagState} -> Maybe LagState
lagState) (\s :: Lag
s@Lag' {} Maybe LagState
a -> Lag
s {$sel:lagState:Lag' :: Maybe LagState
lagState = Maybe LagState
a} :: Lag)

-- | The ID of the Amazon Web Services account that owns the LAG.
lag_ownerAccount :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_ownerAccount :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_ownerAccount = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
ownerAccount :: Maybe Text
$sel:ownerAccount:Lag' :: Lag -> Maybe Text
ownerAccount} -> Maybe Text
ownerAccount) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:ownerAccount:Lag' :: Maybe Text
ownerAccount = Maybe Text
a} :: Lag)

-- | The Amazon Web Services Region where the connection is located.
lag_region :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_region :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_region = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
region :: Maybe Text
$sel:region:Lag' :: Lag -> Maybe Text
region} -> Maybe Text
region) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:region:Lag' :: Maybe Text
region = Maybe Text
a} :: Lag)

-- | The MAC Security (MACsec) security keys associated with the LAG.
lag_macSecKeys :: Lens.Lens' Lag (Prelude.Maybe [MacSecKey])
lag_macSecKeys :: (Maybe [MacSecKey] -> f (Maybe [MacSecKey])) -> Lag -> f Lag
lag_macSecKeys = (Lag -> Maybe [MacSecKey])
-> (Lag -> Maybe [MacSecKey] -> Lag)
-> Lens Lag Lag (Maybe [MacSecKey]) (Maybe [MacSecKey])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe [MacSecKey]
macSecKeys :: Maybe [MacSecKey]
$sel:macSecKeys:Lag' :: Lag -> Maybe [MacSecKey]
macSecKeys} -> Maybe [MacSecKey]
macSecKeys) (\s :: Lag
s@Lag' {} Maybe [MacSecKey]
a -> Lag
s {$sel:macSecKeys:Lag' :: Maybe [MacSecKey]
macSecKeys = Maybe [MacSecKey]
a} :: Lag) ((Maybe [MacSecKey] -> f (Maybe [MacSecKey])) -> Lag -> f Lag)
-> ((Maybe [MacSecKey] -> f (Maybe [MacSecKey]))
    -> Maybe [MacSecKey] -> f (Maybe [MacSecKey]))
-> (Maybe [MacSecKey] -> f (Maybe [MacSecKey]))
-> Lag
-> f Lag
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MacSecKey] [MacSecKey] [MacSecKey] [MacSecKey]
-> Iso
     (Maybe [MacSecKey])
     (Maybe [MacSecKey])
     (Maybe [MacSecKey])
     (Maybe [MacSecKey])
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 [MacSecKey] [MacSecKey] [MacSecKey] [MacSecKey]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the service provider associated with the LAG.
lag_providerName :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_providerName :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_providerName = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
providerName :: Maybe Text
$sel:providerName:Lag' :: Lag -> Maybe Text
providerName} -> Maybe Text
providerName) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:providerName:Lag' :: Maybe Text
providerName = Maybe Text
a} :: Lag)

-- | The Direct Connect endpoint that hosts the LAG.
lag_awsDeviceV2 :: Lens.Lens' Lag (Prelude.Maybe Prelude.Text)
lag_awsDeviceV2 :: (Maybe Text -> f (Maybe Text)) -> Lag -> f Lag
lag_awsDeviceV2 = (Lag -> Maybe Text)
-> (Lag -> Maybe Text -> Lag)
-> Lens Lag Lag (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe Text
awsDeviceV2 :: Maybe Text
$sel:awsDeviceV2:Lag' :: Lag -> Maybe Text
awsDeviceV2} -> Maybe Text
awsDeviceV2) (\s :: Lag
s@Lag' {} Maybe Text
a -> Lag
s {$sel:awsDeviceV2:Lag' :: Maybe Text
awsDeviceV2 = Maybe Text
a} :: Lag)

-- | The tags associated with the LAG.
lag_tags :: Lens.Lens' Lag (Prelude.Maybe (Prelude.NonEmpty Tag))
lag_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag))) -> Lag -> f Lag
lag_tags = (Lag -> Maybe (NonEmpty Tag))
-> (Lag -> Maybe (NonEmpty Tag) -> Lag)
-> Lens Lag Lag (Maybe (NonEmpty Tag)) (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Lag' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:Lag' :: Lag -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: Lag
s@Lag' {} Maybe (NonEmpty Tag)
a -> Lag
s {$sel:tags:Lag' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: Lag) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> Lag -> f Lag)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> Lag
-> f Lag
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
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 (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON Lag where
  parseJSON :: Value -> Parser Lag
parseJSON =
    String -> (Object -> Parser Lag) -> Value -> Parser Lag
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Lag"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Connection]
-> Maybe Text
-> Maybe HasLogicalRedundancy
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe LagState
-> Maybe Text
-> Maybe Text
-> Maybe [MacSecKey]
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Lag
Lag'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Connection]
 -> Maybe Text
 -> Maybe HasLogicalRedundancy
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe Bool
 -> Maybe LagState
 -> Maybe Text
 -> Maybe Text
 -> Maybe [MacSecKey]
 -> Maybe Text
 -> Maybe Text
 -> Maybe (NonEmpty Tag)
 -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Connection]
      -> Maybe Text
      -> Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Functor 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
"lagId")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Connection]
   -> Maybe Text
   -> Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Connection]
      -> Maybe Text
      -> Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"macSecCapable")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Connection]
   -> Maybe Text
   -> Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Connection]
      -> Maybe Text
      -> Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
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
"connectionsBandwidth")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Connection]
   -> Maybe Text
   -> Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Connection]
      -> Maybe Text
      -> Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minimumLinks")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Connection]
   -> Maybe Text
   -> Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Connection]
      -> Maybe Text
      -> Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
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
"lagName")
            Parser
  (Maybe Text
   -> Maybe [Connection]
   -> Maybe Text
   -> Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Connection]
      -> Maybe Text
      -> Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
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
"location")
            Parser
  (Maybe [Connection]
   -> Maybe Text
   -> Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe [Connection])
-> Parser
     (Maybe Text
      -> Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Connection]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"connections" Parser (Maybe (Maybe [Connection]))
-> Maybe [Connection] -> Parser (Maybe [Connection])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Connection]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe HasLogicalRedundancy
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
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
"awsDevice")
            Parser
  (Maybe HasLogicalRedundancy
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe HasLogicalRedundancy)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HasLogicalRedundancy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hasLogicalRedundancy")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
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
"awsLogicalDeviceId")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"allowsHostedConnections")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
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
"encryptionMode")
            Parser
  (Maybe Int
   -> Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool
      -> Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfConnections")
            Parser
  (Maybe Bool
   -> Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Bool)
-> Parser
     (Maybe LagState
      -> Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jumboFrameCapable")
            Parser
  (Maybe LagState
   -> Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe LagState)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LagState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lagState")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [MacSecKey]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Lag)
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
"ownerAccount")
            Parser
  (Maybe Text
   -> Maybe [MacSecKey]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Lag)
-> Parser (Maybe Text)
-> Parser
     (Maybe [MacSecKey]
      -> Maybe Text -> Maybe Text -> Maybe (NonEmpty Tag) -> Lag)
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
"region")
            Parser
  (Maybe [MacSecKey]
   -> Maybe Text -> Maybe Text -> Maybe (NonEmpty Tag) -> Lag)
-> Parser (Maybe [MacSecKey])
-> Parser (Maybe Text -> Maybe Text -> Maybe (NonEmpty Tag) -> Lag)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [MacSecKey]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"macSecKeys" Parser (Maybe (Maybe [MacSecKey]))
-> Maybe [MacSecKey] -> Parser (Maybe [MacSecKey])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [MacSecKey]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Maybe Text -> Maybe (NonEmpty Tag) -> Lag)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe (NonEmpty Tag) -> Lag)
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
"providerName")
            Parser (Maybe Text -> Maybe (NonEmpty Tag) -> Lag)
-> Parser (Maybe Text) -> Parser (Maybe (NonEmpty Tag) -> Lag)
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
"awsDeviceV2")
            Parser (Maybe (NonEmpty Tag) -> Lag)
-> Parser (Maybe (NonEmpty Tag)) -> Parser Lag
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Tag))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags")
      )

instance Prelude.Hashable Lag

instance Prelude.NFData Lag