{-# 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.Proton.Types.EnvironmentAccountConnectionSummary
-- 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.Proton.Types.EnvironmentAccountConnectionSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types.EnvironmentAccountConnectionStatus

-- | A summary of the environment account connection detail data.
--
-- /See:/ 'newEnvironmentAccountConnectionSummary' smart constructor.
data EnvironmentAccountConnectionSummary = EnvironmentAccountConnectionSummary'
  { -- | The Amazon Resource Name (ARN) of the environment account connection.
    EnvironmentAccountConnectionSummary -> Text
arn :: Prelude.Text,
    -- | The ID of the environment account that\'s connected to the environment
    -- account connection.
    EnvironmentAccountConnectionSummary -> Text
environmentAccountId :: Prelude.Text,
    -- | The name of the environment that\'s associated with the environment
    -- account connection.
    EnvironmentAccountConnectionSummary -> Text
environmentName :: Prelude.Text,
    -- | The ID of the environment account connection.
    EnvironmentAccountConnectionSummary -> Text
id :: Prelude.Text,
    -- | The time when the environment account connection was last modified.
    EnvironmentAccountConnectionSummary -> POSIX
lastModifiedAt :: Core.POSIX,
    -- | The ID of the management account that\'s connected to the environment
    -- account connection.
    EnvironmentAccountConnectionSummary -> Text
managementAccountId :: Prelude.Text,
    -- | The time when the environment account connection request was made.
    EnvironmentAccountConnectionSummary -> POSIX
requestedAt :: Core.POSIX,
    -- | The IAM service role that\'s associated with the environment account
    -- connection.
    EnvironmentAccountConnectionSummary -> Text
roleArn :: Prelude.Text,
    -- | The status of the environment account connection.
    EnvironmentAccountConnectionSummary
-> EnvironmentAccountConnectionStatus
status :: EnvironmentAccountConnectionStatus
  }
  deriving (EnvironmentAccountConnectionSummary
-> EnvironmentAccountConnectionSummary -> Bool
(EnvironmentAccountConnectionSummary
 -> EnvironmentAccountConnectionSummary -> Bool)
-> (EnvironmentAccountConnectionSummary
    -> EnvironmentAccountConnectionSummary -> Bool)
-> Eq EnvironmentAccountConnectionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnvironmentAccountConnectionSummary
-> EnvironmentAccountConnectionSummary -> Bool
$c/= :: EnvironmentAccountConnectionSummary
-> EnvironmentAccountConnectionSummary -> Bool
== :: EnvironmentAccountConnectionSummary
-> EnvironmentAccountConnectionSummary -> Bool
$c== :: EnvironmentAccountConnectionSummary
-> EnvironmentAccountConnectionSummary -> Bool
Prelude.Eq, ReadPrec [EnvironmentAccountConnectionSummary]
ReadPrec EnvironmentAccountConnectionSummary
Int -> ReadS EnvironmentAccountConnectionSummary
ReadS [EnvironmentAccountConnectionSummary]
(Int -> ReadS EnvironmentAccountConnectionSummary)
-> ReadS [EnvironmentAccountConnectionSummary]
-> ReadPrec EnvironmentAccountConnectionSummary
-> ReadPrec [EnvironmentAccountConnectionSummary]
-> Read EnvironmentAccountConnectionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnvironmentAccountConnectionSummary]
$creadListPrec :: ReadPrec [EnvironmentAccountConnectionSummary]
readPrec :: ReadPrec EnvironmentAccountConnectionSummary
$creadPrec :: ReadPrec EnvironmentAccountConnectionSummary
readList :: ReadS [EnvironmentAccountConnectionSummary]
$creadList :: ReadS [EnvironmentAccountConnectionSummary]
readsPrec :: Int -> ReadS EnvironmentAccountConnectionSummary
$creadsPrec :: Int -> ReadS EnvironmentAccountConnectionSummary
Prelude.Read, Int -> EnvironmentAccountConnectionSummary -> ShowS
[EnvironmentAccountConnectionSummary] -> ShowS
EnvironmentAccountConnectionSummary -> String
(Int -> EnvironmentAccountConnectionSummary -> ShowS)
-> (EnvironmentAccountConnectionSummary -> String)
-> ([EnvironmentAccountConnectionSummary] -> ShowS)
-> Show EnvironmentAccountConnectionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnvironmentAccountConnectionSummary] -> ShowS
$cshowList :: [EnvironmentAccountConnectionSummary] -> ShowS
show :: EnvironmentAccountConnectionSummary -> String
$cshow :: EnvironmentAccountConnectionSummary -> String
showsPrec :: Int -> EnvironmentAccountConnectionSummary -> ShowS
$cshowsPrec :: Int -> EnvironmentAccountConnectionSummary -> ShowS
Prelude.Show, (forall x.
 EnvironmentAccountConnectionSummary
 -> Rep EnvironmentAccountConnectionSummary x)
-> (forall x.
    Rep EnvironmentAccountConnectionSummary x
    -> EnvironmentAccountConnectionSummary)
-> Generic EnvironmentAccountConnectionSummary
forall x.
Rep EnvironmentAccountConnectionSummary x
-> EnvironmentAccountConnectionSummary
forall x.
EnvironmentAccountConnectionSummary
-> Rep EnvironmentAccountConnectionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnvironmentAccountConnectionSummary x
-> EnvironmentAccountConnectionSummary
$cfrom :: forall x.
EnvironmentAccountConnectionSummary
-> Rep EnvironmentAccountConnectionSummary x
Prelude.Generic)

-- |
-- Create a value of 'EnvironmentAccountConnectionSummary' 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:
--
-- 'arn', 'environmentAccountConnectionSummary_arn' - The Amazon Resource Name (ARN) of the environment account connection.
--
-- 'environmentAccountId', 'environmentAccountConnectionSummary_environmentAccountId' - The ID of the environment account that\'s connected to the environment
-- account connection.
--
-- 'environmentName', 'environmentAccountConnectionSummary_environmentName' - The name of the environment that\'s associated with the environment
-- account connection.
--
-- 'id', 'environmentAccountConnectionSummary_id' - The ID of the environment account connection.
--
-- 'lastModifiedAt', 'environmentAccountConnectionSummary_lastModifiedAt' - The time when the environment account connection was last modified.
--
-- 'managementAccountId', 'environmentAccountConnectionSummary_managementAccountId' - The ID of the management account that\'s connected to the environment
-- account connection.
--
-- 'requestedAt', 'environmentAccountConnectionSummary_requestedAt' - The time when the environment account connection request was made.
--
-- 'roleArn', 'environmentAccountConnectionSummary_roleArn' - The IAM service role that\'s associated with the environment account
-- connection.
--
-- 'status', 'environmentAccountConnectionSummary_status' - The status of the environment account connection.
newEnvironmentAccountConnectionSummary ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'environmentAccountId'
  Prelude.Text ->
  -- | 'environmentName'
  Prelude.Text ->
  -- | 'id'
  Prelude.Text ->
  -- | 'lastModifiedAt'
  Prelude.UTCTime ->
  -- | 'managementAccountId'
  Prelude.Text ->
  -- | 'requestedAt'
  Prelude.UTCTime ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'status'
  EnvironmentAccountConnectionStatus ->
  EnvironmentAccountConnectionSummary
newEnvironmentAccountConnectionSummary :: Text
-> Text
-> Text
-> Text
-> UTCTime
-> Text
-> UTCTime
-> Text
-> EnvironmentAccountConnectionStatus
-> EnvironmentAccountConnectionSummary
newEnvironmentAccountConnectionSummary
  Text
pArn_
  Text
pEnvironmentAccountId_
  Text
pEnvironmentName_
  Text
pId_
  UTCTime
pLastModifiedAt_
  Text
pManagementAccountId_
  UTCTime
pRequestedAt_
  Text
pRoleArn_
  EnvironmentAccountConnectionStatus
pStatus_ =
    EnvironmentAccountConnectionSummary' :: Text
-> Text
-> Text
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> EnvironmentAccountConnectionStatus
-> EnvironmentAccountConnectionSummary
EnvironmentAccountConnectionSummary'
      { $sel:arn:EnvironmentAccountConnectionSummary' :: Text
arn = Text
pArn_,
        $sel:environmentAccountId:EnvironmentAccountConnectionSummary' :: Text
environmentAccountId =
          Text
pEnvironmentAccountId_,
        $sel:environmentName:EnvironmentAccountConnectionSummary' :: Text
environmentName = Text
pEnvironmentName_,
        $sel:id:EnvironmentAccountConnectionSummary' :: Text
id = Text
pId_,
        $sel:lastModifiedAt:EnvironmentAccountConnectionSummary' :: POSIX
lastModifiedAt =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedAt_,
        $sel:managementAccountId:EnvironmentAccountConnectionSummary' :: Text
managementAccountId =
          Text
pManagementAccountId_,
        $sel:requestedAt:EnvironmentAccountConnectionSummary' :: POSIX
requestedAt =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pRequestedAt_,
        $sel:roleArn:EnvironmentAccountConnectionSummary' :: Text
roleArn = Text
pRoleArn_,
        $sel:status:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionStatus
status = EnvironmentAccountConnectionStatus
pStatus_
      }

-- | The Amazon Resource Name (ARN) of the environment account connection.
environmentAccountConnectionSummary_arn :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.Text
environmentAccountConnectionSummary_arn :: (Text -> f Text)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_arn = (EnvironmentAccountConnectionSummary -> Text)
-> (EnvironmentAccountConnectionSummary
    -> Text -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {Text
arn :: Text
$sel:arn:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> Text
arn} -> Text
arn) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} Text
a -> EnvironmentAccountConnectionSummary
s {$sel:arn:EnvironmentAccountConnectionSummary' :: Text
arn = Text
a} :: EnvironmentAccountConnectionSummary)

-- | The ID of the environment account that\'s connected to the environment
-- account connection.
environmentAccountConnectionSummary_environmentAccountId :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.Text
environmentAccountConnectionSummary_environmentAccountId :: (Text -> f Text)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_environmentAccountId = (EnvironmentAccountConnectionSummary -> Text)
-> (EnvironmentAccountConnectionSummary
    -> Text -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {Text
environmentAccountId :: Text
$sel:environmentAccountId:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> Text
environmentAccountId} -> Text
environmentAccountId) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} Text
a -> EnvironmentAccountConnectionSummary
s {$sel:environmentAccountId:EnvironmentAccountConnectionSummary' :: Text
environmentAccountId = Text
a} :: EnvironmentAccountConnectionSummary)

-- | The name of the environment that\'s associated with the environment
-- account connection.
environmentAccountConnectionSummary_environmentName :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.Text
environmentAccountConnectionSummary_environmentName :: (Text -> f Text)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_environmentName = (EnvironmentAccountConnectionSummary -> Text)
-> (EnvironmentAccountConnectionSummary
    -> Text -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {Text
environmentName :: Text
$sel:environmentName:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> Text
environmentName} -> Text
environmentName) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} Text
a -> EnvironmentAccountConnectionSummary
s {$sel:environmentName:EnvironmentAccountConnectionSummary' :: Text
environmentName = Text
a} :: EnvironmentAccountConnectionSummary)

-- | The ID of the environment account connection.
environmentAccountConnectionSummary_id :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.Text
environmentAccountConnectionSummary_id :: (Text -> f Text)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_id = (EnvironmentAccountConnectionSummary -> Text)
-> (EnvironmentAccountConnectionSummary
    -> Text -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {Text
id :: Text
$sel:id:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> Text
id} -> Text
id) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} Text
a -> EnvironmentAccountConnectionSummary
s {$sel:id:EnvironmentAccountConnectionSummary' :: Text
id = Text
a} :: EnvironmentAccountConnectionSummary)

-- | The time when the environment account connection was last modified.
environmentAccountConnectionSummary_lastModifiedAt :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.UTCTime
environmentAccountConnectionSummary_lastModifiedAt :: (UTCTime -> f UTCTime)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_lastModifiedAt = (EnvironmentAccountConnectionSummary -> POSIX)
-> (EnvironmentAccountConnectionSummary
    -> POSIX -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {POSIX
lastModifiedAt :: POSIX
$sel:lastModifiedAt:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> POSIX
lastModifiedAt} -> POSIX
lastModifiedAt) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} POSIX
a -> EnvironmentAccountConnectionSummary
s {$sel:lastModifiedAt:EnvironmentAccountConnectionSummary' :: POSIX
lastModifiedAt = POSIX
a} :: EnvironmentAccountConnectionSummary) ((POSIX -> f POSIX)
 -> EnvironmentAccountConnectionSummary
 -> f EnvironmentAccountConnectionSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ID of the management account that\'s connected to the environment
-- account connection.
environmentAccountConnectionSummary_managementAccountId :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.Text
environmentAccountConnectionSummary_managementAccountId :: (Text -> f Text)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_managementAccountId = (EnvironmentAccountConnectionSummary -> Text)
-> (EnvironmentAccountConnectionSummary
    -> Text -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {Text
managementAccountId :: Text
$sel:managementAccountId:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> Text
managementAccountId} -> Text
managementAccountId) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} Text
a -> EnvironmentAccountConnectionSummary
s {$sel:managementAccountId:EnvironmentAccountConnectionSummary' :: Text
managementAccountId = Text
a} :: EnvironmentAccountConnectionSummary)

-- | The time when the environment account connection request was made.
environmentAccountConnectionSummary_requestedAt :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.UTCTime
environmentAccountConnectionSummary_requestedAt :: (UTCTime -> f UTCTime)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_requestedAt = (EnvironmentAccountConnectionSummary -> POSIX)
-> (EnvironmentAccountConnectionSummary
    -> POSIX -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {POSIX
requestedAt :: POSIX
$sel:requestedAt:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> POSIX
requestedAt} -> POSIX
requestedAt) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} POSIX
a -> EnvironmentAccountConnectionSummary
s {$sel:requestedAt:EnvironmentAccountConnectionSummary' :: POSIX
requestedAt = POSIX
a} :: EnvironmentAccountConnectionSummary) ((POSIX -> f POSIX)
 -> EnvironmentAccountConnectionSummary
 -> f EnvironmentAccountConnectionSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The IAM service role that\'s associated with the environment account
-- connection.
environmentAccountConnectionSummary_roleArn :: Lens.Lens' EnvironmentAccountConnectionSummary Prelude.Text
environmentAccountConnectionSummary_roleArn :: (Text -> f Text)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_roleArn = (EnvironmentAccountConnectionSummary -> Text)
-> (EnvironmentAccountConnectionSummary
    -> Text -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {Text
roleArn :: Text
$sel:roleArn:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary -> Text
roleArn} -> Text
roleArn) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} Text
a -> EnvironmentAccountConnectionSummary
s {$sel:roleArn:EnvironmentAccountConnectionSummary' :: Text
roleArn = Text
a} :: EnvironmentAccountConnectionSummary)

-- | The status of the environment account connection.
environmentAccountConnectionSummary_status :: Lens.Lens' EnvironmentAccountConnectionSummary EnvironmentAccountConnectionStatus
environmentAccountConnectionSummary_status :: (EnvironmentAccountConnectionStatus
 -> f EnvironmentAccountConnectionStatus)
-> EnvironmentAccountConnectionSummary
-> f EnvironmentAccountConnectionSummary
environmentAccountConnectionSummary_status = (EnvironmentAccountConnectionSummary
 -> EnvironmentAccountConnectionStatus)
-> (EnvironmentAccountConnectionSummary
    -> EnvironmentAccountConnectionStatus
    -> EnvironmentAccountConnectionSummary)
-> Lens
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionSummary
     EnvironmentAccountConnectionStatus
     EnvironmentAccountConnectionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnectionSummary' {EnvironmentAccountConnectionStatus
status :: EnvironmentAccountConnectionStatus
$sel:status:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionSummary
-> EnvironmentAccountConnectionStatus
status} -> EnvironmentAccountConnectionStatus
status) (\s :: EnvironmentAccountConnectionSummary
s@EnvironmentAccountConnectionSummary' {} EnvironmentAccountConnectionStatus
a -> EnvironmentAccountConnectionSummary
s {$sel:status:EnvironmentAccountConnectionSummary' :: EnvironmentAccountConnectionStatus
status = EnvironmentAccountConnectionStatus
a} :: EnvironmentAccountConnectionSummary)

instance
  Core.FromJSON
    EnvironmentAccountConnectionSummary
  where
  parseJSON :: Value -> Parser EnvironmentAccountConnectionSummary
parseJSON =
    String
-> (Object -> Parser EnvironmentAccountConnectionSummary)
-> Value
-> Parser EnvironmentAccountConnectionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EnvironmentAccountConnectionSummary"
      ( \Object
x ->
          Text
-> Text
-> Text
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> EnvironmentAccountConnectionStatus
-> EnvironmentAccountConnectionSummary
EnvironmentAccountConnectionSummary'
            (Text
 -> Text
 -> Text
 -> Text
 -> POSIX
 -> Text
 -> POSIX
 -> Text
 -> EnvironmentAccountConnectionStatus
 -> EnvironmentAccountConnectionSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"arn")
            Parser
  (Text
   -> Text
   -> Text
   -> POSIX
   -> Text
   -> POSIX
   -> Text
   -> EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"environmentAccountId")
            Parser
  (Text
   -> Text
   -> POSIX
   -> Text
   -> POSIX
   -> Text
   -> EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser Text
-> Parser
     (Text
      -> POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"environmentName")
            Parser
  (Text
   -> POSIX
   -> Text
   -> POSIX
   -> Text
   -> EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser Text
-> Parser
     (POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"id")
            Parser
  (POSIX
   -> Text
   -> POSIX
   -> Text
   -> EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser POSIX
-> Parser
     (Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"lastModifiedAt")
            Parser
  (Text
   -> POSIX
   -> Text
   -> EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser Text
-> Parser
     (POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"managementAccountId")
            Parser
  (POSIX
   -> Text
   -> EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser POSIX
-> Parser
     (Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"requestedAt")
            Parser
  (Text
   -> EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser Text
-> Parser
     (EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"roleArn")
            Parser
  (EnvironmentAccountConnectionStatus
   -> EnvironmentAccountConnectionSummary)
-> Parser EnvironmentAccountConnectionStatus
-> Parser EnvironmentAccountConnectionSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser EnvironmentAccountConnectionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
      )

instance
  Prelude.Hashable
    EnvironmentAccountConnectionSummary

instance
  Prelude.NFData
    EnvironmentAccountConnectionSummary