{-# 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.AmplifyBackend.Types.BackendAPIAppSyncAuthSettings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AmplifyBackend.Types.BackendAPIAppSyncAuthSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The authentication settings for accessing provisioned data models in
-- your Amplify project.
--
-- /See:/ 'newBackendAPIAppSyncAuthSettings' smart constructor.
data BackendAPIAppSyncAuthSettings = BackendAPIAppSyncAuthSettings'
  { -- | The Amazon Cognito user pool ID, if Amazon Cognito was used as an
    -- authentication setting to access your data models.
    BackendAPIAppSyncAuthSettings -> Maybe Text
cognitoUserPoolId :: Prelude.Maybe Prelude.Text,
    -- | The API key description for API_KEY, if it was used as an authentication
    -- mechanism to access your data models.
    BackendAPIAppSyncAuthSettings -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The API key expiration time for API_KEY, if it was used as an
    -- authentication mechanism to access your data models.
    BackendAPIAppSyncAuthSettings -> Maybe Double
expirationTime :: Prelude.Maybe Prelude.Double,
    -- | The expiry time for the OpenID authentication mechanism.
    BackendAPIAppSyncAuthSettings -> Maybe Text
openIDAuthTTL :: Prelude.Maybe Prelude.Text,
    -- | The clientID for openID, if openID was used as an authentication setting
    -- to access your data models.
    BackendAPIAppSyncAuthSettings -> Maybe Text
openIDClientId :: Prelude.Maybe Prelude.Text,
    -- | The expiry time for the OpenID authentication mechanism.
    BackendAPIAppSyncAuthSettings -> Maybe Text
openIDIatTTL :: Prelude.Maybe Prelude.Text,
    -- | The openID issuer URL, if openID was used as an authentication setting
    -- to access your data models.
    BackendAPIAppSyncAuthSettings -> Maybe Text
openIDIssueURL :: Prelude.Maybe Prelude.Text,
    -- | The OpenID provider name, if OpenID was used as an authentication
    -- mechanism to access your data models.
    BackendAPIAppSyncAuthSettings -> Maybe Text
openIDProviderName :: Prelude.Maybe Prelude.Text
  }
  deriving (BackendAPIAppSyncAuthSettings
-> BackendAPIAppSyncAuthSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BackendAPIAppSyncAuthSettings
-> BackendAPIAppSyncAuthSettings -> Bool
$c/= :: BackendAPIAppSyncAuthSettings
-> BackendAPIAppSyncAuthSettings -> Bool
== :: BackendAPIAppSyncAuthSettings
-> BackendAPIAppSyncAuthSettings -> Bool
$c== :: BackendAPIAppSyncAuthSettings
-> BackendAPIAppSyncAuthSettings -> Bool
Prelude.Eq, ReadPrec [BackendAPIAppSyncAuthSettings]
ReadPrec BackendAPIAppSyncAuthSettings
Int -> ReadS BackendAPIAppSyncAuthSettings
ReadS [BackendAPIAppSyncAuthSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BackendAPIAppSyncAuthSettings]
$creadListPrec :: ReadPrec [BackendAPIAppSyncAuthSettings]
readPrec :: ReadPrec BackendAPIAppSyncAuthSettings
$creadPrec :: ReadPrec BackendAPIAppSyncAuthSettings
readList :: ReadS [BackendAPIAppSyncAuthSettings]
$creadList :: ReadS [BackendAPIAppSyncAuthSettings]
readsPrec :: Int -> ReadS BackendAPIAppSyncAuthSettings
$creadsPrec :: Int -> ReadS BackendAPIAppSyncAuthSettings
Prelude.Read, Int -> BackendAPIAppSyncAuthSettings -> ShowS
[BackendAPIAppSyncAuthSettings] -> ShowS
BackendAPIAppSyncAuthSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BackendAPIAppSyncAuthSettings] -> ShowS
$cshowList :: [BackendAPIAppSyncAuthSettings] -> ShowS
show :: BackendAPIAppSyncAuthSettings -> String
$cshow :: BackendAPIAppSyncAuthSettings -> String
showsPrec :: Int -> BackendAPIAppSyncAuthSettings -> ShowS
$cshowsPrec :: Int -> BackendAPIAppSyncAuthSettings -> ShowS
Prelude.Show, forall x.
Rep BackendAPIAppSyncAuthSettings x
-> BackendAPIAppSyncAuthSettings
forall x.
BackendAPIAppSyncAuthSettings
-> Rep BackendAPIAppSyncAuthSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BackendAPIAppSyncAuthSettings x
-> BackendAPIAppSyncAuthSettings
$cfrom :: forall x.
BackendAPIAppSyncAuthSettings
-> Rep BackendAPIAppSyncAuthSettings x
Prelude.Generic)

-- |
-- Create a value of 'BackendAPIAppSyncAuthSettings' 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:
--
-- 'cognitoUserPoolId', 'backendAPIAppSyncAuthSettings_cognitoUserPoolId' - The Amazon Cognito user pool ID, if Amazon Cognito was used as an
-- authentication setting to access your data models.
--
-- 'description', 'backendAPIAppSyncAuthSettings_description' - The API key description for API_KEY, if it was used as an authentication
-- mechanism to access your data models.
--
-- 'expirationTime', 'backendAPIAppSyncAuthSettings_expirationTime' - The API key expiration time for API_KEY, if it was used as an
-- authentication mechanism to access your data models.
--
-- 'openIDAuthTTL', 'backendAPIAppSyncAuthSettings_openIDAuthTTL' - The expiry time for the OpenID authentication mechanism.
--
-- 'openIDClientId', 'backendAPIAppSyncAuthSettings_openIDClientId' - The clientID for openID, if openID was used as an authentication setting
-- to access your data models.
--
-- 'openIDIatTTL', 'backendAPIAppSyncAuthSettings_openIDIatTTL' - The expiry time for the OpenID authentication mechanism.
--
-- 'openIDIssueURL', 'backendAPIAppSyncAuthSettings_openIDIssueURL' - The openID issuer URL, if openID was used as an authentication setting
-- to access your data models.
--
-- 'openIDProviderName', 'backendAPIAppSyncAuthSettings_openIDProviderName' - The OpenID provider name, if OpenID was used as an authentication
-- mechanism to access your data models.
newBackendAPIAppSyncAuthSettings ::
  BackendAPIAppSyncAuthSettings
newBackendAPIAppSyncAuthSettings :: BackendAPIAppSyncAuthSettings
newBackendAPIAppSyncAuthSettings =
  BackendAPIAppSyncAuthSettings'
    { $sel:cognitoUserPoolId:BackendAPIAppSyncAuthSettings' :: Maybe Text
cognitoUserPoolId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:description:BackendAPIAppSyncAuthSettings' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:expirationTime:BackendAPIAppSyncAuthSettings' :: Maybe Double
expirationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:openIDAuthTTL:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDAuthTTL = forall a. Maybe a
Prelude.Nothing,
      $sel:openIDClientId:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDClientId = forall a. Maybe a
Prelude.Nothing,
      $sel:openIDIatTTL:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDIatTTL = forall a. Maybe a
Prelude.Nothing,
      $sel:openIDIssueURL:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDIssueURL = forall a. Maybe a
Prelude.Nothing,
      $sel:openIDProviderName:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDProviderName = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Cognito user pool ID, if Amazon Cognito was used as an
-- authentication setting to access your data models.
backendAPIAppSyncAuthSettings_cognitoUserPoolId :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Text)
backendAPIAppSyncAuthSettings_cognitoUserPoolId :: Lens' BackendAPIAppSyncAuthSettings (Maybe Text)
backendAPIAppSyncAuthSettings_cognitoUserPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Text
cognitoUserPoolId :: Maybe Text
$sel:cognitoUserPoolId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
cognitoUserPoolId} -> Maybe Text
cognitoUserPoolId) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Text
a -> BackendAPIAppSyncAuthSettings
s {$sel:cognitoUserPoolId:BackendAPIAppSyncAuthSettings' :: Maybe Text
cognitoUserPoolId = Maybe Text
a} :: BackendAPIAppSyncAuthSettings)

-- | The API key description for API_KEY, if it was used as an authentication
-- mechanism to access your data models.
backendAPIAppSyncAuthSettings_description :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Text)
backendAPIAppSyncAuthSettings_description :: Lens' BackendAPIAppSyncAuthSettings (Maybe Text)
backendAPIAppSyncAuthSettings_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Text
description :: Maybe Text
$sel:description:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
description} -> Maybe Text
description) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Text
a -> BackendAPIAppSyncAuthSettings
s {$sel:description:BackendAPIAppSyncAuthSettings' :: Maybe Text
description = Maybe Text
a} :: BackendAPIAppSyncAuthSettings)

-- | The API key expiration time for API_KEY, if it was used as an
-- authentication mechanism to access your data models.
backendAPIAppSyncAuthSettings_expirationTime :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Double)
backendAPIAppSyncAuthSettings_expirationTime :: Lens' BackendAPIAppSyncAuthSettings (Maybe Double)
backendAPIAppSyncAuthSettings_expirationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Double
expirationTime :: Maybe Double
$sel:expirationTime:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Double
expirationTime} -> Maybe Double
expirationTime) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Double
a -> BackendAPIAppSyncAuthSettings
s {$sel:expirationTime:BackendAPIAppSyncAuthSettings' :: Maybe Double
expirationTime = Maybe Double
a} :: BackendAPIAppSyncAuthSettings)

-- | The expiry time for the OpenID authentication mechanism.
backendAPIAppSyncAuthSettings_openIDAuthTTL :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Text)
backendAPIAppSyncAuthSettings_openIDAuthTTL :: Lens' BackendAPIAppSyncAuthSettings (Maybe Text)
backendAPIAppSyncAuthSettings_openIDAuthTTL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Text
openIDAuthTTL :: Maybe Text
$sel:openIDAuthTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
openIDAuthTTL} -> Maybe Text
openIDAuthTTL) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Text
a -> BackendAPIAppSyncAuthSettings
s {$sel:openIDAuthTTL:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDAuthTTL = Maybe Text
a} :: BackendAPIAppSyncAuthSettings)

-- | The clientID for openID, if openID was used as an authentication setting
-- to access your data models.
backendAPIAppSyncAuthSettings_openIDClientId :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Text)
backendAPIAppSyncAuthSettings_openIDClientId :: Lens' BackendAPIAppSyncAuthSettings (Maybe Text)
backendAPIAppSyncAuthSettings_openIDClientId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Text
openIDClientId :: Maybe Text
$sel:openIDClientId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
openIDClientId} -> Maybe Text
openIDClientId) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Text
a -> BackendAPIAppSyncAuthSettings
s {$sel:openIDClientId:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDClientId = Maybe Text
a} :: BackendAPIAppSyncAuthSettings)

-- | The expiry time for the OpenID authentication mechanism.
backendAPIAppSyncAuthSettings_openIDIatTTL :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Text)
backendAPIAppSyncAuthSettings_openIDIatTTL :: Lens' BackendAPIAppSyncAuthSettings (Maybe Text)
backendAPIAppSyncAuthSettings_openIDIatTTL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Text
openIDIatTTL :: Maybe Text
$sel:openIDIatTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
openIDIatTTL} -> Maybe Text
openIDIatTTL) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Text
a -> BackendAPIAppSyncAuthSettings
s {$sel:openIDIatTTL:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDIatTTL = Maybe Text
a} :: BackendAPIAppSyncAuthSettings)

-- | The openID issuer URL, if openID was used as an authentication setting
-- to access your data models.
backendAPIAppSyncAuthSettings_openIDIssueURL :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Text)
backendAPIAppSyncAuthSettings_openIDIssueURL :: Lens' BackendAPIAppSyncAuthSettings (Maybe Text)
backendAPIAppSyncAuthSettings_openIDIssueURL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Text
openIDIssueURL :: Maybe Text
$sel:openIDIssueURL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
openIDIssueURL} -> Maybe Text
openIDIssueURL) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Text
a -> BackendAPIAppSyncAuthSettings
s {$sel:openIDIssueURL:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDIssueURL = Maybe Text
a} :: BackendAPIAppSyncAuthSettings)

-- | The OpenID provider name, if OpenID was used as an authentication
-- mechanism to access your data models.
backendAPIAppSyncAuthSettings_openIDProviderName :: Lens.Lens' BackendAPIAppSyncAuthSettings (Prelude.Maybe Prelude.Text)
backendAPIAppSyncAuthSettings_openIDProviderName :: Lens' BackendAPIAppSyncAuthSettings (Maybe Text)
backendAPIAppSyncAuthSettings_openIDProviderName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BackendAPIAppSyncAuthSettings' {Maybe Text
openIDProviderName :: Maybe Text
$sel:openIDProviderName:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
openIDProviderName} -> Maybe Text
openIDProviderName) (\s :: BackendAPIAppSyncAuthSettings
s@BackendAPIAppSyncAuthSettings' {} Maybe Text
a -> BackendAPIAppSyncAuthSettings
s {$sel:openIDProviderName:BackendAPIAppSyncAuthSettings' :: Maybe Text
openIDProviderName = Maybe Text
a} :: BackendAPIAppSyncAuthSettings)

instance Data.FromJSON BackendAPIAppSyncAuthSettings where
  parseJSON :: Value -> Parser BackendAPIAppSyncAuthSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BackendAPIAppSyncAuthSettings"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BackendAPIAppSyncAuthSettings
BackendAPIAppSyncAuthSettings'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cognitoUserPoolId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"expirationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"openIDAuthTTL")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"openIDClientId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"openIDIatTTL")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"openIDIssueURL")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"openIDProviderName")
      )

instance
  Prelude.Hashable
    BackendAPIAppSyncAuthSettings
  where
  hashWithSalt :: Int -> BackendAPIAppSyncAuthSettings -> Int
hashWithSalt Int
_salt BackendAPIAppSyncAuthSettings' {Maybe Double
Maybe Text
openIDProviderName :: Maybe Text
openIDIssueURL :: Maybe Text
openIDIatTTL :: Maybe Text
openIDClientId :: Maybe Text
openIDAuthTTL :: Maybe Text
expirationTime :: Maybe Double
description :: Maybe Text
cognitoUserPoolId :: Maybe Text
$sel:openIDProviderName:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDIssueURL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDIatTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDClientId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDAuthTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:expirationTime:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Double
$sel:description:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:cognitoUserPoolId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cognitoUserPoolId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
expirationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
openIDAuthTTL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
openIDClientId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
openIDIatTTL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
openIDIssueURL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
openIDProviderName

instance Prelude.NFData BackendAPIAppSyncAuthSettings where
  rnf :: BackendAPIAppSyncAuthSettings -> ()
rnf BackendAPIAppSyncAuthSettings' {Maybe Double
Maybe Text
openIDProviderName :: Maybe Text
openIDIssueURL :: Maybe Text
openIDIatTTL :: Maybe Text
openIDClientId :: Maybe Text
openIDAuthTTL :: Maybe Text
expirationTime :: Maybe Double
description :: Maybe Text
cognitoUserPoolId :: Maybe Text
$sel:openIDProviderName:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDIssueURL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDIatTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDClientId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDAuthTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:expirationTime:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Double
$sel:description:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:cognitoUserPoolId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cognitoUserPoolId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
expirationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
openIDAuthTTL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
openIDClientId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
openIDIatTTL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
openIDIssueURL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
openIDProviderName

instance Data.ToJSON BackendAPIAppSyncAuthSettings where
  toJSON :: BackendAPIAppSyncAuthSettings -> Value
toJSON BackendAPIAppSyncAuthSettings' {Maybe Double
Maybe Text
openIDProviderName :: Maybe Text
openIDIssueURL :: Maybe Text
openIDIatTTL :: Maybe Text
openIDClientId :: Maybe Text
openIDAuthTTL :: Maybe Text
expirationTime :: Maybe Double
description :: Maybe Text
cognitoUserPoolId :: Maybe Text
$sel:openIDProviderName:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDIssueURL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDIatTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDClientId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:openIDAuthTTL:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:expirationTime:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Double
$sel:description:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
$sel:cognitoUserPoolId:BackendAPIAppSyncAuthSettings' :: BackendAPIAppSyncAuthSettings -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"cognitoUserPoolId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cognitoUserPoolId,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"expirationTime" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
expirationTime,
            (Key
"openIDAuthTTL" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
openIDAuthTTL,
            (Key
"openIDClientId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
openIDClientId,
            (Key
"openIDIatTTL" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
openIDIatTTL,
            (Key
"openIDIssueURL" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
openIDIssueURL,
            (Key
"openIDProviderName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
openIDProviderName
          ]
      )