{-# 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.EnvironmentAccountConnection
-- 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.EnvironmentAccountConnection where

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

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

-- |
-- Create a value of 'EnvironmentAccountConnection' 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', 'environmentAccountConnection_arn' - The Amazon Resource Name (ARN) of the environment account connection.
--
-- 'environmentAccountId', 'environmentAccountConnection_environmentAccountId' - The environment account that\'s connected to the environment account
-- connection.
--
-- 'environmentName', 'environmentAccountConnection_environmentName' - The name of the environment that\'s associated with the environment
-- account connection.
--
-- 'id', 'environmentAccountConnection_id' - The ID of the environment account connection.
--
-- 'lastModifiedAt', 'environmentAccountConnection_lastModifiedAt' - The time when the environment account connection was last modified.
--
-- 'managementAccountId', 'environmentAccountConnection_managementAccountId' - The ID of the management account that\'s connected to the environment
-- account connection.
--
-- 'requestedAt', 'environmentAccountConnection_requestedAt' - The time when the environment account connection request was made.
--
-- 'roleArn', 'environmentAccountConnection_roleArn' - The IAM service role that\'s associated with the environment account
-- connection.
--
-- 'status', 'environmentAccountConnection_status' - The status of the environment account connection.
newEnvironmentAccountConnection ::
  -- | '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 ->
  EnvironmentAccountConnection
newEnvironmentAccountConnection :: Text
-> Text
-> Text
-> Text
-> UTCTime
-> Text
-> UTCTime
-> Text
-> EnvironmentAccountConnectionStatus
-> EnvironmentAccountConnection
newEnvironmentAccountConnection
  Text
pArn_
  Text
pEnvironmentAccountId_
  Text
pEnvironmentName_
  Text
pId_
  UTCTime
pLastModifiedAt_
  Text
pManagementAccountId_
  UTCTime
pRequestedAt_
  Text
pRoleArn_
  EnvironmentAccountConnectionStatus
pStatus_ =
    EnvironmentAccountConnection' :: Text
-> Text
-> Text
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> EnvironmentAccountConnectionStatus
-> EnvironmentAccountConnection
EnvironmentAccountConnection'
      { $sel:arn:EnvironmentAccountConnection' :: Text
arn = Text
pArn_,
        $sel:environmentAccountId:EnvironmentAccountConnection' :: Text
environmentAccountId = Text
pEnvironmentAccountId_,
        $sel:environmentName:EnvironmentAccountConnection' :: Text
environmentName = Text
pEnvironmentName_,
        $sel:id:EnvironmentAccountConnection' :: Text
id = Text
pId_,
        $sel:lastModifiedAt:EnvironmentAccountConnection' :: 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:EnvironmentAccountConnection' :: Text
managementAccountId = Text
pManagementAccountId_,
        $sel:requestedAt:EnvironmentAccountConnection' :: 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:EnvironmentAccountConnection' :: Text
roleArn = Text
pRoleArn_,
        $sel:status:EnvironmentAccountConnection' :: EnvironmentAccountConnectionStatus
status = EnvironmentAccountConnectionStatus
pStatus_
      }

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

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

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

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

-- | The time when the environment account connection was last modified.
environmentAccountConnection_lastModifiedAt :: Lens.Lens' EnvironmentAccountConnection Prelude.UTCTime
environmentAccountConnection_lastModifiedAt :: (UTCTime -> f UTCTime)
-> EnvironmentAccountConnection -> f EnvironmentAccountConnection
environmentAccountConnection_lastModifiedAt = (EnvironmentAccountConnection -> POSIX)
-> (EnvironmentAccountConnection
    -> POSIX -> EnvironmentAccountConnection)
-> Lens
     EnvironmentAccountConnection
     EnvironmentAccountConnection
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnection' {POSIX
lastModifiedAt :: POSIX
$sel:lastModifiedAt:EnvironmentAccountConnection' :: EnvironmentAccountConnection -> POSIX
lastModifiedAt} -> POSIX
lastModifiedAt) (\s :: EnvironmentAccountConnection
s@EnvironmentAccountConnection' {} POSIX
a -> EnvironmentAccountConnection
s {$sel:lastModifiedAt:EnvironmentAccountConnection' :: POSIX
lastModifiedAt = POSIX
a} :: EnvironmentAccountConnection) ((POSIX -> f POSIX)
 -> EnvironmentAccountConnection -> f EnvironmentAccountConnection)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentAccountConnection
-> f EnvironmentAccountConnection
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.
environmentAccountConnection_managementAccountId :: Lens.Lens' EnvironmentAccountConnection Prelude.Text
environmentAccountConnection_managementAccountId :: (Text -> f Text)
-> EnvironmentAccountConnection -> f EnvironmentAccountConnection
environmentAccountConnection_managementAccountId = (EnvironmentAccountConnection -> Text)
-> (EnvironmentAccountConnection
    -> Text -> EnvironmentAccountConnection)
-> Lens
     EnvironmentAccountConnection EnvironmentAccountConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnection' {Text
managementAccountId :: Text
$sel:managementAccountId:EnvironmentAccountConnection' :: EnvironmentAccountConnection -> Text
managementAccountId} -> Text
managementAccountId) (\s :: EnvironmentAccountConnection
s@EnvironmentAccountConnection' {} Text
a -> EnvironmentAccountConnection
s {$sel:managementAccountId:EnvironmentAccountConnection' :: Text
managementAccountId = Text
a} :: EnvironmentAccountConnection)

-- | The time when the environment account connection request was made.
environmentAccountConnection_requestedAt :: Lens.Lens' EnvironmentAccountConnection Prelude.UTCTime
environmentAccountConnection_requestedAt :: (UTCTime -> f UTCTime)
-> EnvironmentAccountConnection -> f EnvironmentAccountConnection
environmentAccountConnection_requestedAt = (EnvironmentAccountConnection -> POSIX)
-> (EnvironmentAccountConnection
    -> POSIX -> EnvironmentAccountConnection)
-> Lens
     EnvironmentAccountConnection
     EnvironmentAccountConnection
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnection' {POSIX
requestedAt :: POSIX
$sel:requestedAt:EnvironmentAccountConnection' :: EnvironmentAccountConnection -> POSIX
requestedAt} -> POSIX
requestedAt) (\s :: EnvironmentAccountConnection
s@EnvironmentAccountConnection' {} POSIX
a -> EnvironmentAccountConnection
s {$sel:requestedAt:EnvironmentAccountConnection' :: POSIX
requestedAt = POSIX
a} :: EnvironmentAccountConnection) ((POSIX -> f POSIX)
 -> EnvironmentAccountConnection -> f EnvironmentAccountConnection)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentAccountConnection
-> f EnvironmentAccountConnection
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.
environmentAccountConnection_roleArn :: Lens.Lens' EnvironmentAccountConnection Prelude.Text
environmentAccountConnection_roleArn :: (Text -> f Text)
-> EnvironmentAccountConnection -> f EnvironmentAccountConnection
environmentAccountConnection_roleArn = (EnvironmentAccountConnection -> Text)
-> (EnvironmentAccountConnection
    -> Text -> EnvironmentAccountConnection)
-> Lens
     EnvironmentAccountConnection EnvironmentAccountConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentAccountConnection' {Text
roleArn :: Text
$sel:roleArn:EnvironmentAccountConnection' :: EnvironmentAccountConnection -> Text
roleArn} -> Text
roleArn) (\s :: EnvironmentAccountConnection
s@EnvironmentAccountConnection' {} Text
a -> EnvironmentAccountConnection
s {$sel:roleArn:EnvironmentAccountConnection' :: Text
roleArn = Text
a} :: EnvironmentAccountConnection)

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

instance Core.FromJSON EnvironmentAccountConnection where
  parseJSON :: Value -> Parser EnvironmentAccountConnection
parseJSON =
    String
-> (Object -> Parser EnvironmentAccountConnection)
-> Value
-> Parser EnvironmentAccountConnection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EnvironmentAccountConnection"
      ( \Object
x ->
          Text
-> Text
-> Text
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> EnvironmentAccountConnectionStatus
-> EnvironmentAccountConnection
EnvironmentAccountConnection'
            (Text
 -> Text
 -> Text
 -> Text
 -> POSIX
 -> Text
 -> POSIX
 -> Text
 -> EnvironmentAccountConnectionStatus
 -> EnvironmentAccountConnection)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser Text
-> Parser
     (Text
      -> POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser Text
-> Parser
     (POSIX
      -> Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser POSIX
-> Parser
     (Text
      -> POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser Text
-> Parser
     (POSIX
      -> Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser POSIX
-> Parser
     (Text
      -> EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser Text
-> Parser
     (EnvironmentAccountConnectionStatus
      -> EnvironmentAccountConnection)
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
   -> EnvironmentAccountConnection)
-> Parser EnvironmentAccountConnectionStatus
-> Parser EnvironmentAccountConnection
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
    EnvironmentAccountConnection

instance Prelude.NFData EnvironmentAccountConnection