{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IAM.GetSAMLProvider
-- 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)
--
-- Returns the SAML provider metadocument that was uploaded when the IAM
-- SAML provider resource object was created or updated.
--
-- This operation requires
-- <https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4>.
module Amazonka.IAM.GetSAMLProvider
  ( -- * Creating a Request
    GetSAMLProvider (..),
    newGetSAMLProvider,

    -- * Request Lenses
    getSAMLProvider_sAMLProviderArn,

    -- * Destructuring the Response
    GetSAMLProviderResponse (..),
    newGetSAMLProviderResponse,

    -- * Response Lenses
    getSAMLProviderResponse_createDate,
    getSAMLProviderResponse_validUntil,
    getSAMLProviderResponse_tags,
    getSAMLProviderResponse_sAMLMetadataDocument,
    getSAMLProviderResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IAM.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetSAMLProvider' smart constructor.
data GetSAMLProvider = GetSAMLProvider'
  { -- | The Amazon Resource Name (ARN) of the SAML provider resource object in
    -- IAM to get information about.
    --
    -- For more information about ARNs, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /Amazon Web Services General Reference/.
    GetSAMLProvider -> Text
sAMLProviderArn :: Prelude.Text
  }
  deriving (GetSAMLProvider -> GetSAMLProvider -> Bool
(GetSAMLProvider -> GetSAMLProvider -> Bool)
-> (GetSAMLProvider -> GetSAMLProvider -> Bool)
-> Eq GetSAMLProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSAMLProvider -> GetSAMLProvider -> Bool
$c/= :: GetSAMLProvider -> GetSAMLProvider -> Bool
== :: GetSAMLProvider -> GetSAMLProvider -> Bool
$c== :: GetSAMLProvider -> GetSAMLProvider -> Bool
Prelude.Eq, ReadPrec [GetSAMLProvider]
ReadPrec GetSAMLProvider
Int -> ReadS GetSAMLProvider
ReadS [GetSAMLProvider]
(Int -> ReadS GetSAMLProvider)
-> ReadS [GetSAMLProvider]
-> ReadPrec GetSAMLProvider
-> ReadPrec [GetSAMLProvider]
-> Read GetSAMLProvider
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSAMLProvider]
$creadListPrec :: ReadPrec [GetSAMLProvider]
readPrec :: ReadPrec GetSAMLProvider
$creadPrec :: ReadPrec GetSAMLProvider
readList :: ReadS [GetSAMLProvider]
$creadList :: ReadS [GetSAMLProvider]
readsPrec :: Int -> ReadS GetSAMLProvider
$creadsPrec :: Int -> ReadS GetSAMLProvider
Prelude.Read, Int -> GetSAMLProvider -> ShowS
[GetSAMLProvider] -> ShowS
GetSAMLProvider -> String
(Int -> GetSAMLProvider -> ShowS)
-> (GetSAMLProvider -> String)
-> ([GetSAMLProvider] -> ShowS)
-> Show GetSAMLProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSAMLProvider] -> ShowS
$cshowList :: [GetSAMLProvider] -> ShowS
show :: GetSAMLProvider -> String
$cshow :: GetSAMLProvider -> String
showsPrec :: Int -> GetSAMLProvider -> ShowS
$cshowsPrec :: Int -> GetSAMLProvider -> ShowS
Prelude.Show, (forall x. GetSAMLProvider -> Rep GetSAMLProvider x)
-> (forall x. Rep GetSAMLProvider x -> GetSAMLProvider)
-> Generic GetSAMLProvider
forall x. Rep GetSAMLProvider x -> GetSAMLProvider
forall x. GetSAMLProvider -> Rep GetSAMLProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSAMLProvider x -> GetSAMLProvider
$cfrom :: forall x. GetSAMLProvider -> Rep GetSAMLProvider x
Prelude.Generic)

-- |
-- Create a value of 'GetSAMLProvider' 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:
--
-- 'sAMLProviderArn', 'getSAMLProvider_sAMLProviderArn' - The Amazon Resource Name (ARN) of the SAML provider resource object in
-- IAM to get information about.
--
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /Amazon Web Services General Reference/.
newGetSAMLProvider ::
  -- | 'sAMLProviderArn'
  Prelude.Text ->
  GetSAMLProvider
newGetSAMLProvider :: Text -> GetSAMLProvider
newGetSAMLProvider Text
pSAMLProviderArn_ =
  GetSAMLProvider' :: Text -> GetSAMLProvider
GetSAMLProvider'
    { $sel:sAMLProviderArn:GetSAMLProvider' :: Text
sAMLProviderArn =
        Text
pSAMLProviderArn_
    }

-- | The Amazon Resource Name (ARN) of the SAML provider resource object in
-- IAM to get information about.
--
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /Amazon Web Services General Reference/.
getSAMLProvider_sAMLProviderArn :: Lens.Lens' GetSAMLProvider Prelude.Text
getSAMLProvider_sAMLProviderArn :: (Text -> f Text) -> GetSAMLProvider -> f GetSAMLProvider
getSAMLProvider_sAMLProviderArn = (GetSAMLProvider -> Text)
-> (GetSAMLProvider -> Text -> GetSAMLProvider)
-> Lens GetSAMLProvider GetSAMLProvider Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSAMLProvider' {Text
sAMLProviderArn :: Text
$sel:sAMLProviderArn:GetSAMLProvider' :: GetSAMLProvider -> Text
sAMLProviderArn} -> Text
sAMLProviderArn) (\s :: GetSAMLProvider
s@GetSAMLProvider' {} Text
a -> GetSAMLProvider
s {$sel:sAMLProviderArn:GetSAMLProvider' :: Text
sAMLProviderArn = Text
a} :: GetSAMLProvider)

instance Core.AWSRequest GetSAMLProvider where
  type
    AWSResponse GetSAMLProvider =
      GetSAMLProviderResponse
  request :: GetSAMLProvider -> Request GetSAMLProvider
request = Service -> GetSAMLProvider -> Request GetSAMLProvider
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy GetSAMLProvider
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetSAMLProvider)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse GetSAMLProvider))
-> Logger
-> Service
-> Proxy GetSAMLProvider
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetSAMLProvider)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"GetSAMLProviderResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ISO8601
-> Maybe ISO8601
-> Maybe [Tag]
-> Maybe Text
-> Int
-> GetSAMLProviderResponse
GetSAMLProviderResponse'
            (Maybe ISO8601
 -> Maybe ISO8601
 -> Maybe [Tag]
 -> Maybe Text
 -> Int
 -> GetSAMLProviderResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe ISO8601
      -> Maybe [Tag] -> Maybe Text -> Int -> GetSAMLProviderResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CreateDate")
            Either
  String
  (Maybe ISO8601
   -> Maybe [Tag] -> Maybe Text -> Int -> GetSAMLProviderResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe [Tag] -> Maybe Text -> Int -> GetSAMLProviderResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ValidUntil")
            Either
  String
  (Maybe [Tag] -> Maybe Text -> Int -> GetSAMLProviderResponse)
-> Either String (Maybe [Tag])
-> Either String (Maybe Text -> Int -> GetSAMLProviderResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Tags" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Tag]))
-> Either String (Maybe [Tag])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Tag])
-> [Node] -> Either String (Maybe [Tag])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Maybe Text -> Int -> GetSAMLProviderResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetSAMLProviderResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SAMLMetadataDocument")
            Either String (Int -> GetSAMLProviderResponse)
-> Either String Int -> Either String GetSAMLProviderResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetSAMLProvider

instance Prelude.NFData GetSAMLProvider

instance Core.ToHeaders GetSAMLProvider where
  toHeaders :: GetSAMLProvider -> ResponseHeaders
toHeaders = ResponseHeaders -> GetSAMLProvider -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath GetSAMLProvider where
  toPath :: GetSAMLProvider -> ByteString
toPath = ByteString -> GetSAMLProvider -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetSAMLProvider where
  toQuery :: GetSAMLProvider -> QueryString
toQuery GetSAMLProvider' {Text
sAMLProviderArn :: Text
$sel:sAMLProviderArn:GetSAMLProvider' :: GetSAMLProvider -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"GetSAMLProvider" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"SAMLProviderArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sAMLProviderArn
      ]

-- | Contains the response to a successful GetSAMLProvider request.
--
-- /See:/ 'newGetSAMLProviderResponse' smart constructor.
data GetSAMLProviderResponse = GetSAMLProviderResponse'
  { -- | The date and time when the SAML provider was created.
    GetSAMLProviderResponse -> Maybe ISO8601
createDate :: Prelude.Maybe Core.ISO8601,
    -- | The expiration date and time for the SAML provider.
    GetSAMLProviderResponse -> Maybe ISO8601
validUntil :: Prelude.Maybe Core.ISO8601,
    -- | A list of tags that are attached to the specified IAM SAML provider. The
    -- returned list of tags is sorted by tag key. For more information about
    -- tagging, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
    -- in the /IAM User Guide/.
    GetSAMLProviderResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The XML metadata document that includes information about an identity
    -- provider.
    GetSAMLProviderResponse -> Maybe Text
sAMLMetadataDocument :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetSAMLProviderResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetSAMLProviderResponse -> GetSAMLProviderResponse -> Bool
(GetSAMLProviderResponse -> GetSAMLProviderResponse -> Bool)
-> (GetSAMLProviderResponse -> GetSAMLProviderResponse -> Bool)
-> Eq GetSAMLProviderResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSAMLProviderResponse -> GetSAMLProviderResponse -> Bool
$c/= :: GetSAMLProviderResponse -> GetSAMLProviderResponse -> Bool
== :: GetSAMLProviderResponse -> GetSAMLProviderResponse -> Bool
$c== :: GetSAMLProviderResponse -> GetSAMLProviderResponse -> Bool
Prelude.Eq, ReadPrec [GetSAMLProviderResponse]
ReadPrec GetSAMLProviderResponse
Int -> ReadS GetSAMLProviderResponse
ReadS [GetSAMLProviderResponse]
(Int -> ReadS GetSAMLProviderResponse)
-> ReadS [GetSAMLProviderResponse]
-> ReadPrec GetSAMLProviderResponse
-> ReadPrec [GetSAMLProviderResponse]
-> Read GetSAMLProviderResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSAMLProviderResponse]
$creadListPrec :: ReadPrec [GetSAMLProviderResponse]
readPrec :: ReadPrec GetSAMLProviderResponse
$creadPrec :: ReadPrec GetSAMLProviderResponse
readList :: ReadS [GetSAMLProviderResponse]
$creadList :: ReadS [GetSAMLProviderResponse]
readsPrec :: Int -> ReadS GetSAMLProviderResponse
$creadsPrec :: Int -> ReadS GetSAMLProviderResponse
Prelude.Read, Int -> GetSAMLProviderResponse -> ShowS
[GetSAMLProviderResponse] -> ShowS
GetSAMLProviderResponse -> String
(Int -> GetSAMLProviderResponse -> ShowS)
-> (GetSAMLProviderResponse -> String)
-> ([GetSAMLProviderResponse] -> ShowS)
-> Show GetSAMLProviderResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSAMLProviderResponse] -> ShowS
$cshowList :: [GetSAMLProviderResponse] -> ShowS
show :: GetSAMLProviderResponse -> String
$cshow :: GetSAMLProviderResponse -> String
showsPrec :: Int -> GetSAMLProviderResponse -> ShowS
$cshowsPrec :: Int -> GetSAMLProviderResponse -> ShowS
Prelude.Show, (forall x.
 GetSAMLProviderResponse -> Rep GetSAMLProviderResponse x)
-> (forall x.
    Rep GetSAMLProviderResponse x -> GetSAMLProviderResponse)
-> Generic GetSAMLProviderResponse
forall x. Rep GetSAMLProviderResponse x -> GetSAMLProviderResponse
forall x. GetSAMLProviderResponse -> Rep GetSAMLProviderResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSAMLProviderResponse x -> GetSAMLProviderResponse
$cfrom :: forall x. GetSAMLProviderResponse -> Rep GetSAMLProviderResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetSAMLProviderResponse' 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:
--
-- 'createDate', 'getSAMLProviderResponse_createDate' - The date and time when the SAML provider was created.
--
-- 'validUntil', 'getSAMLProviderResponse_validUntil' - The expiration date and time for the SAML provider.
--
-- 'tags', 'getSAMLProviderResponse_tags' - A list of tags that are attached to the specified IAM SAML provider. The
-- returned list of tags is sorted by tag key. For more information about
-- tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
--
-- 'sAMLMetadataDocument', 'getSAMLProviderResponse_sAMLMetadataDocument' - The XML metadata document that includes information about an identity
-- provider.
--
-- 'httpStatus', 'getSAMLProviderResponse_httpStatus' - The response's http status code.
newGetSAMLProviderResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetSAMLProviderResponse
newGetSAMLProviderResponse :: Int -> GetSAMLProviderResponse
newGetSAMLProviderResponse Int
pHttpStatus_ =
  GetSAMLProviderResponse' :: Maybe ISO8601
-> Maybe ISO8601
-> Maybe [Tag]
-> Maybe Text
-> Int
-> GetSAMLProviderResponse
GetSAMLProviderResponse'
    { $sel:createDate:GetSAMLProviderResponse' :: Maybe ISO8601
createDate =
        Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:validUntil:GetSAMLProviderResponse' :: Maybe ISO8601
validUntil = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetSAMLProviderResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:sAMLMetadataDocument:GetSAMLProviderResponse' :: Maybe Text
sAMLMetadataDocument = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetSAMLProviderResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time when the SAML provider was created.
getSAMLProviderResponse_createDate :: Lens.Lens' GetSAMLProviderResponse (Prelude.Maybe Prelude.UTCTime)
getSAMLProviderResponse_createDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetSAMLProviderResponse -> f GetSAMLProviderResponse
getSAMLProviderResponse_createDate = (GetSAMLProviderResponse -> Maybe ISO8601)
-> (GetSAMLProviderResponse
    -> Maybe ISO8601 -> GetSAMLProviderResponse)
-> Lens
     GetSAMLProviderResponse
     GetSAMLProviderResponse
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSAMLProviderResponse' {Maybe ISO8601
createDate :: Maybe ISO8601
$sel:createDate:GetSAMLProviderResponse' :: GetSAMLProviderResponse -> Maybe ISO8601
createDate} -> Maybe ISO8601
createDate) (\s :: GetSAMLProviderResponse
s@GetSAMLProviderResponse' {} Maybe ISO8601
a -> GetSAMLProviderResponse
s {$sel:createDate:GetSAMLProviderResponse' :: Maybe ISO8601
createDate = Maybe ISO8601
a} :: GetSAMLProviderResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> GetSAMLProviderResponse -> f GetSAMLProviderResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetSAMLProviderResponse
-> f GetSAMLProviderResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The expiration date and time for the SAML provider.
getSAMLProviderResponse_validUntil :: Lens.Lens' GetSAMLProviderResponse (Prelude.Maybe Prelude.UTCTime)
getSAMLProviderResponse_validUntil :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetSAMLProviderResponse -> f GetSAMLProviderResponse
getSAMLProviderResponse_validUntil = (GetSAMLProviderResponse -> Maybe ISO8601)
-> (GetSAMLProviderResponse
    -> Maybe ISO8601 -> GetSAMLProviderResponse)
-> Lens
     GetSAMLProviderResponse
     GetSAMLProviderResponse
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSAMLProviderResponse' {Maybe ISO8601
validUntil :: Maybe ISO8601
$sel:validUntil:GetSAMLProviderResponse' :: GetSAMLProviderResponse -> Maybe ISO8601
validUntil} -> Maybe ISO8601
validUntil) (\s :: GetSAMLProviderResponse
s@GetSAMLProviderResponse' {} Maybe ISO8601
a -> GetSAMLProviderResponse
s {$sel:validUntil:GetSAMLProviderResponse' :: Maybe ISO8601
validUntil = Maybe ISO8601
a} :: GetSAMLProviderResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> GetSAMLProviderResponse -> f GetSAMLProviderResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetSAMLProviderResponse
-> f GetSAMLProviderResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A list of tags that are attached to the specified IAM SAML provider. The
-- returned list of tags is sorted by tag key. For more information about
-- tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
getSAMLProviderResponse_tags :: Lens.Lens' GetSAMLProviderResponse (Prelude.Maybe [Tag])
getSAMLProviderResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> GetSAMLProviderResponse -> f GetSAMLProviderResponse
getSAMLProviderResponse_tags = (GetSAMLProviderResponse -> Maybe [Tag])
-> (GetSAMLProviderResponse
    -> Maybe [Tag] -> GetSAMLProviderResponse)
-> Lens
     GetSAMLProviderResponse
     GetSAMLProviderResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSAMLProviderResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:GetSAMLProviderResponse' :: GetSAMLProviderResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: GetSAMLProviderResponse
s@GetSAMLProviderResponse' {} Maybe [Tag]
a -> GetSAMLProviderResponse
s {$sel:tags:GetSAMLProviderResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: GetSAMLProviderResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> GetSAMLProviderResponse -> f GetSAMLProviderResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> GetSAMLProviderResponse
-> f GetSAMLProviderResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The XML metadata document that includes information about an identity
-- provider.
getSAMLProviderResponse_sAMLMetadataDocument :: Lens.Lens' GetSAMLProviderResponse (Prelude.Maybe Prelude.Text)
getSAMLProviderResponse_sAMLMetadataDocument :: (Maybe Text -> f (Maybe Text))
-> GetSAMLProviderResponse -> f GetSAMLProviderResponse
getSAMLProviderResponse_sAMLMetadataDocument = (GetSAMLProviderResponse -> Maybe Text)
-> (GetSAMLProviderResponse
    -> Maybe Text -> GetSAMLProviderResponse)
-> Lens
     GetSAMLProviderResponse
     GetSAMLProviderResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSAMLProviderResponse' {Maybe Text
sAMLMetadataDocument :: Maybe Text
$sel:sAMLMetadataDocument:GetSAMLProviderResponse' :: GetSAMLProviderResponse -> Maybe Text
sAMLMetadataDocument} -> Maybe Text
sAMLMetadataDocument) (\s :: GetSAMLProviderResponse
s@GetSAMLProviderResponse' {} Maybe Text
a -> GetSAMLProviderResponse
s {$sel:sAMLMetadataDocument:GetSAMLProviderResponse' :: Maybe Text
sAMLMetadataDocument = Maybe Text
a} :: GetSAMLProviderResponse)

-- | The response's http status code.
getSAMLProviderResponse_httpStatus :: Lens.Lens' GetSAMLProviderResponse Prelude.Int
getSAMLProviderResponse_httpStatus :: (Int -> f Int)
-> GetSAMLProviderResponse -> f GetSAMLProviderResponse
getSAMLProviderResponse_httpStatus = (GetSAMLProviderResponse -> Int)
-> (GetSAMLProviderResponse -> Int -> GetSAMLProviderResponse)
-> Lens GetSAMLProviderResponse GetSAMLProviderResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSAMLProviderResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetSAMLProviderResponse' :: GetSAMLProviderResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetSAMLProviderResponse
s@GetSAMLProviderResponse' {} Int
a -> GetSAMLProviderResponse
s {$sel:httpStatus:GetSAMLProviderResponse' :: Int
httpStatus = Int
a} :: GetSAMLProviderResponse)

instance Prelude.NFData GetSAMLProviderResponse