{-# 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.DirectoryService.Types.Trust
-- 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.DirectoryService.Types.Trust where

import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.Types.SelectiveAuth
import Amazonka.DirectoryService.Types.TrustDirection
import Amazonka.DirectoryService.Types.TrustState
import Amazonka.DirectoryService.Types.TrustType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a trust relationship between an Managed Microsoft AD directory
-- and an external domain.
--
-- /See:/ 'newTrust' smart constructor.
data Trust = Trust'
  { -- | The Directory ID of the Amazon Web Services directory involved in the
    -- trust relationship.
    Trust -> Maybe Text
directoryId :: Prelude.Maybe Prelude.Text,
    -- | The trust relationship state.
    Trust -> Maybe TrustState
trustState :: Prelude.Maybe TrustState,
    -- | The date and time that the trust relationship was last updated.
    Trust -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    -- | The trust relationship direction.
    Trust -> Maybe TrustDirection
trustDirection :: Prelude.Maybe TrustDirection,
    -- | The date and time that the TrustState was last updated.
    Trust -> Maybe POSIX
stateLastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    -- | The trust relationship type. @Forest@ is the default.
    Trust -> Maybe TrustType
trustType :: Prelude.Maybe TrustType,
    -- | The reason for the TrustState.
    Trust -> Maybe Text
trustStateReason :: Prelude.Maybe Prelude.Text,
    -- | Current state of selective authentication for the trust.
    Trust -> Maybe SelectiveAuth
selectiveAuth :: Prelude.Maybe SelectiveAuth,
    -- | The Fully Qualified Domain Name (FQDN) of the external domain involved
    -- in the trust relationship.
    Trust -> Maybe Text
remoteDomainName :: Prelude.Maybe Prelude.Text,
    -- | The unique ID of the trust relationship.
    Trust -> Maybe Text
trustId :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the trust relationship was created.
    Trust -> Maybe POSIX
createdDateTime :: Prelude.Maybe Core.POSIX
  }
  deriving (Trust -> Trust -> Bool
(Trust -> Trust -> Bool) -> (Trust -> Trust -> Bool) -> Eq Trust
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Trust -> Trust -> Bool
$c/= :: Trust -> Trust -> Bool
== :: Trust -> Trust -> Bool
$c== :: Trust -> Trust -> Bool
Prelude.Eq, ReadPrec [Trust]
ReadPrec Trust
Int -> ReadS Trust
ReadS [Trust]
(Int -> ReadS Trust)
-> ReadS [Trust]
-> ReadPrec Trust
-> ReadPrec [Trust]
-> Read Trust
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Trust]
$creadListPrec :: ReadPrec [Trust]
readPrec :: ReadPrec Trust
$creadPrec :: ReadPrec Trust
readList :: ReadS [Trust]
$creadList :: ReadS [Trust]
readsPrec :: Int -> ReadS Trust
$creadsPrec :: Int -> ReadS Trust
Prelude.Read, Int -> Trust -> ShowS
[Trust] -> ShowS
Trust -> String
(Int -> Trust -> ShowS)
-> (Trust -> String) -> ([Trust] -> ShowS) -> Show Trust
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Trust] -> ShowS
$cshowList :: [Trust] -> ShowS
show :: Trust -> String
$cshow :: Trust -> String
showsPrec :: Int -> Trust -> ShowS
$cshowsPrec :: Int -> Trust -> ShowS
Prelude.Show, (forall x. Trust -> Rep Trust x)
-> (forall x. Rep Trust x -> Trust) -> Generic Trust
forall x. Rep Trust x -> Trust
forall x. Trust -> Rep Trust x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Trust x -> Trust
$cfrom :: forall x. Trust -> Rep Trust x
Prelude.Generic)

-- |
-- Create a value of 'Trust' 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:
--
-- 'directoryId', 'trust_directoryId' - The Directory ID of the Amazon Web Services directory involved in the
-- trust relationship.
--
-- 'trustState', 'trust_trustState' - The trust relationship state.
--
-- 'lastUpdatedDateTime', 'trust_lastUpdatedDateTime' - The date and time that the trust relationship was last updated.
--
-- 'trustDirection', 'trust_trustDirection' - The trust relationship direction.
--
-- 'stateLastUpdatedDateTime', 'trust_stateLastUpdatedDateTime' - The date and time that the TrustState was last updated.
--
-- 'trustType', 'trust_trustType' - The trust relationship type. @Forest@ is the default.
--
-- 'trustStateReason', 'trust_trustStateReason' - The reason for the TrustState.
--
-- 'selectiveAuth', 'trust_selectiveAuth' - Current state of selective authentication for the trust.
--
-- 'remoteDomainName', 'trust_remoteDomainName' - The Fully Qualified Domain Name (FQDN) of the external domain involved
-- in the trust relationship.
--
-- 'trustId', 'trust_trustId' - The unique ID of the trust relationship.
--
-- 'createdDateTime', 'trust_createdDateTime' - The date and time that the trust relationship was created.
newTrust ::
  Trust
newTrust :: Trust
newTrust =
  Trust' :: Maybe Text
-> Maybe TrustState
-> Maybe POSIX
-> Maybe TrustDirection
-> Maybe POSIX
-> Maybe TrustType
-> Maybe Text
-> Maybe SelectiveAuth
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Trust
Trust'
    { $sel:directoryId:Trust' :: Maybe Text
directoryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:trustState:Trust' :: Maybe TrustState
trustState = Maybe TrustState
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:Trust' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:trustDirection:Trust' :: Maybe TrustDirection
trustDirection = Maybe TrustDirection
forall a. Maybe a
Prelude.Nothing,
      $sel:stateLastUpdatedDateTime:Trust' :: Maybe POSIX
stateLastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:trustType:Trust' :: Maybe TrustType
trustType = Maybe TrustType
forall a. Maybe a
Prelude.Nothing,
      $sel:trustStateReason:Trust' :: Maybe Text
trustStateReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:selectiveAuth:Trust' :: Maybe SelectiveAuth
selectiveAuth = Maybe SelectiveAuth
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteDomainName:Trust' :: Maybe Text
remoteDomainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:trustId:Trust' :: Maybe Text
trustId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDateTime:Trust' :: Maybe POSIX
createdDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The Directory ID of the Amazon Web Services directory involved in the
-- trust relationship.
trust_directoryId :: Lens.Lens' Trust (Prelude.Maybe Prelude.Text)
trust_directoryId :: (Maybe Text -> f (Maybe Text)) -> Trust -> f Trust
trust_directoryId = (Trust -> Maybe Text)
-> (Trust -> Maybe Text -> Trust)
-> Lens Trust Trust (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe Text
directoryId :: Maybe Text
$sel:directoryId:Trust' :: Trust -> Maybe Text
directoryId} -> Maybe Text
directoryId) (\s :: Trust
s@Trust' {} Maybe Text
a -> Trust
s {$sel:directoryId:Trust' :: Maybe Text
directoryId = Maybe Text
a} :: Trust)

-- | The trust relationship state.
trust_trustState :: Lens.Lens' Trust (Prelude.Maybe TrustState)
trust_trustState :: (Maybe TrustState -> f (Maybe TrustState)) -> Trust -> f Trust
trust_trustState = (Trust -> Maybe TrustState)
-> (Trust -> Maybe TrustState -> Trust)
-> Lens Trust Trust (Maybe TrustState) (Maybe TrustState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe TrustState
trustState :: Maybe TrustState
$sel:trustState:Trust' :: Trust -> Maybe TrustState
trustState} -> Maybe TrustState
trustState) (\s :: Trust
s@Trust' {} Maybe TrustState
a -> Trust
s {$sel:trustState:Trust' :: Maybe TrustState
trustState = Maybe TrustState
a} :: Trust)

-- | The date and time that the trust relationship was last updated.
trust_lastUpdatedDateTime :: Lens.Lens' Trust (Prelude.Maybe Prelude.UTCTime)
trust_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Trust -> f Trust
trust_lastUpdatedDateTime = (Trust -> Maybe POSIX)
-> (Trust -> Maybe POSIX -> Trust)
-> Lens Trust Trust (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:Trust' :: Trust -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: Trust
s@Trust' {} Maybe POSIX
a -> Trust
s {$sel:lastUpdatedDateTime:Trust' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: Trust) ((Maybe POSIX -> f (Maybe POSIX)) -> Trust -> f Trust)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Trust
-> f Trust
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The trust relationship direction.
trust_trustDirection :: Lens.Lens' Trust (Prelude.Maybe TrustDirection)
trust_trustDirection :: (Maybe TrustDirection -> f (Maybe TrustDirection))
-> Trust -> f Trust
trust_trustDirection = (Trust -> Maybe TrustDirection)
-> (Trust -> Maybe TrustDirection -> Trust)
-> Lens Trust Trust (Maybe TrustDirection) (Maybe TrustDirection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe TrustDirection
trustDirection :: Maybe TrustDirection
$sel:trustDirection:Trust' :: Trust -> Maybe TrustDirection
trustDirection} -> Maybe TrustDirection
trustDirection) (\s :: Trust
s@Trust' {} Maybe TrustDirection
a -> Trust
s {$sel:trustDirection:Trust' :: Maybe TrustDirection
trustDirection = Maybe TrustDirection
a} :: Trust)

-- | The date and time that the TrustState was last updated.
trust_stateLastUpdatedDateTime :: Lens.Lens' Trust (Prelude.Maybe Prelude.UTCTime)
trust_stateLastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Trust -> f Trust
trust_stateLastUpdatedDateTime = (Trust -> Maybe POSIX)
-> (Trust -> Maybe POSIX -> Trust)
-> Lens Trust Trust (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe POSIX
stateLastUpdatedDateTime :: Maybe POSIX
$sel:stateLastUpdatedDateTime:Trust' :: Trust -> Maybe POSIX
stateLastUpdatedDateTime} -> Maybe POSIX
stateLastUpdatedDateTime) (\s :: Trust
s@Trust' {} Maybe POSIX
a -> Trust
s {$sel:stateLastUpdatedDateTime:Trust' :: Maybe POSIX
stateLastUpdatedDateTime = Maybe POSIX
a} :: Trust) ((Maybe POSIX -> f (Maybe POSIX)) -> Trust -> f Trust)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Trust
-> f Trust
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The trust relationship type. @Forest@ is the default.
trust_trustType :: Lens.Lens' Trust (Prelude.Maybe TrustType)
trust_trustType :: (Maybe TrustType -> f (Maybe TrustType)) -> Trust -> f Trust
trust_trustType = (Trust -> Maybe TrustType)
-> (Trust -> Maybe TrustType -> Trust)
-> Lens Trust Trust (Maybe TrustType) (Maybe TrustType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe TrustType
trustType :: Maybe TrustType
$sel:trustType:Trust' :: Trust -> Maybe TrustType
trustType} -> Maybe TrustType
trustType) (\s :: Trust
s@Trust' {} Maybe TrustType
a -> Trust
s {$sel:trustType:Trust' :: Maybe TrustType
trustType = Maybe TrustType
a} :: Trust)

-- | The reason for the TrustState.
trust_trustStateReason :: Lens.Lens' Trust (Prelude.Maybe Prelude.Text)
trust_trustStateReason :: (Maybe Text -> f (Maybe Text)) -> Trust -> f Trust
trust_trustStateReason = (Trust -> Maybe Text)
-> (Trust -> Maybe Text -> Trust)
-> Lens Trust Trust (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe Text
trustStateReason :: Maybe Text
$sel:trustStateReason:Trust' :: Trust -> Maybe Text
trustStateReason} -> Maybe Text
trustStateReason) (\s :: Trust
s@Trust' {} Maybe Text
a -> Trust
s {$sel:trustStateReason:Trust' :: Maybe Text
trustStateReason = Maybe Text
a} :: Trust)

-- | Current state of selective authentication for the trust.
trust_selectiveAuth :: Lens.Lens' Trust (Prelude.Maybe SelectiveAuth)
trust_selectiveAuth :: (Maybe SelectiveAuth -> f (Maybe SelectiveAuth))
-> Trust -> f Trust
trust_selectiveAuth = (Trust -> Maybe SelectiveAuth)
-> (Trust -> Maybe SelectiveAuth -> Trust)
-> Lens Trust Trust (Maybe SelectiveAuth) (Maybe SelectiveAuth)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe SelectiveAuth
selectiveAuth :: Maybe SelectiveAuth
$sel:selectiveAuth:Trust' :: Trust -> Maybe SelectiveAuth
selectiveAuth} -> Maybe SelectiveAuth
selectiveAuth) (\s :: Trust
s@Trust' {} Maybe SelectiveAuth
a -> Trust
s {$sel:selectiveAuth:Trust' :: Maybe SelectiveAuth
selectiveAuth = Maybe SelectiveAuth
a} :: Trust)

-- | The Fully Qualified Domain Name (FQDN) of the external domain involved
-- in the trust relationship.
trust_remoteDomainName :: Lens.Lens' Trust (Prelude.Maybe Prelude.Text)
trust_remoteDomainName :: (Maybe Text -> f (Maybe Text)) -> Trust -> f Trust
trust_remoteDomainName = (Trust -> Maybe Text)
-> (Trust -> Maybe Text -> Trust)
-> Lens Trust Trust (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe Text
remoteDomainName :: Maybe Text
$sel:remoteDomainName:Trust' :: Trust -> Maybe Text
remoteDomainName} -> Maybe Text
remoteDomainName) (\s :: Trust
s@Trust' {} Maybe Text
a -> Trust
s {$sel:remoteDomainName:Trust' :: Maybe Text
remoteDomainName = Maybe Text
a} :: Trust)

-- | The unique ID of the trust relationship.
trust_trustId :: Lens.Lens' Trust (Prelude.Maybe Prelude.Text)
trust_trustId :: (Maybe Text -> f (Maybe Text)) -> Trust -> f Trust
trust_trustId = (Trust -> Maybe Text)
-> (Trust -> Maybe Text -> Trust)
-> Lens Trust Trust (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe Text
trustId :: Maybe Text
$sel:trustId:Trust' :: Trust -> Maybe Text
trustId} -> Maybe Text
trustId) (\s :: Trust
s@Trust' {} Maybe Text
a -> Trust
s {$sel:trustId:Trust' :: Maybe Text
trustId = Maybe Text
a} :: Trust)

-- | The date and time that the trust relationship was created.
trust_createdDateTime :: Lens.Lens' Trust (Prelude.Maybe Prelude.UTCTime)
trust_createdDateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Trust -> f Trust
trust_createdDateTime = (Trust -> Maybe POSIX)
-> (Trust -> Maybe POSIX -> Trust)
-> Lens Trust Trust (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trust' {Maybe POSIX
createdDateTime :: Maybe POSIX
$sel:createdDateTime:Trust' :: Trust -> Maybe POSIX
createdDateTime} -> Maybe POSIX
createdDateTime) (\s :: Trust
s@Trust' {} Maybe POSIX
a -> Trust
s {$sel:createdDateTime:Trust' :: Maybe POSIX
createdDateTime = Maybe POSIX
a} :: Trust) ((Maybe POSIX -> f (Maybe POSIX)) -> Trust -> f Trust)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Trust
-> f Trust
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON Trust where
  parseJSON :: Value -> Parser Trust
parseJSON =
    String -> (Object -> Parser Trust) -> Value -> Parser Trust
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Trust"
      ( \Object
x ->
          Maybe Text
-> Maybe TrustState
-> Maybe POSIX
-> Maybe TrustDirection
-> Maybe POSIX
-> Maybe TrustType
-> Maybe Text
-> Maybe SelectiveAuth
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Trust
Trust'
            (Maybe Text
 -> Maybe TrustState
 -> Maybe POSIX
 -> Maybe TrustDirection
 -> Maybe POSIX
 -> Maybe TrustType
 -> Maybe Text
 -> Maybe SelectiveAuth
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Trust)
-> Parser (Maybe Text)
-> Parser
     (Maybe TrustState
      -> Maybe POSIX
      -> Maybe TrustDirection
      -> Maybe POSIX
      -> Maybe TrustType
      -> Maybe Text
      -> Maybe SelectiveAuth
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Trust)
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
"DirectoryId")
            Parser
  (Maybe TrustState
   -> Maybe POSIX
   -> Maybe TrustDirection
   -> Maybe POSIX
   -> Maybe TrustType
   -> Maybe Text
   -> Maybe SelectiveAuth
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Trust)
-> Parser (Maybe TrustState)
-> Parser
     (Maybe POSIX
      -> Maybe TrustDirection
      -> Maybe POSIX
      -> Maybe TrustType
      -> Maybe Text
      -> Maybe SelectiveAuth
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Trust)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrustState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrustState")
            Parser
  (Maybe POSIX
   -> Maybe TrustDirection
   -> Maybe POSIX
   -> Maybe TrustType
   -> Maybe Text
   -> Maybe SelectiveAuth
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Trust)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe TrustDirection
      -> Maybe POSIX
      -> Maybe TrustType
      -> Maybe Text
      -> Maybe SelectiveAuth
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Trust)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedDateTime")
            Parser
  (Maybe TrustDirection
   -> Maybe POSIX
   -> Maybe TrustType
   -> Maybe Text
   -> Maybe SelectiveAuth
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Trust)
-> Parser (Maybe TrustDirection)
-> Parser
     (Maybe POSIX
      -> Maybe TrustType
      -> Maybe Text
      -> Maybe SelectiveAuth
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Trust)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrustDirection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrustDirection")
            Parser
  (Maybe POSIX
   -> Maybe TrustType
   -> Maybe Text
   -> Maybe SelectiveAuth
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Trust)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe TrustType
      -> Maybe Text
      -> Maybe SelectiveAuth
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Trust)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StateLastUpdatedDateTime")
            Parser
  (Maybe TrustType
   -> Maybe Text
   -> Maybe SelectiveAuth
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Trust)
-> Parser (Maybe TrustType)
-> Parser
     (Maybe Text
      -> Maybe SelectiveAuth
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Trust)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrustType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrustType")
            Parser
  (Maybe Text
   -> Maybe SelectiveAuth
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Trust)
-> Parser (Maybe Text)
-> Parser
     (Maybe SelectiveAuth
      -> Maybe Text -> Maybe Text -> Maybe POSIX -> Trust)
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
"TrustStateReason")
            Parser
  (Maybe SelectiveAuth
   -> Maybe Text -> Maybe Text -> Maybe POSIX -> Trust)
-> Parser (Maybe SelectiveAuth)
-> Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> Trust)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SelectiveAuth)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SelectiveAuth")
            Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> Trust)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> Trust)
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
"RemoteDomainName")
            Parser (Maybe Text -> Maybe POSIX -> Trust)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> Trust)
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
"TrustId")
            Parser (Maybe POSIX -> Trust)
-> Parser (Maybe POSIX) -> Parser Trust
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedDateTime")
      )

instance Prelude.Hashable Trust

instance Prelude.NFData Trust