{-# 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.GetOpenIDConnectProvider
-- 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 information about the specified OpenID Connect (OIDC) provider
-- resource object in IAM.
module Amazonka.IAM.GetOpenIDConnectProvider
  ( -- * Creating a Request
    GetOpenIDConnectProvider (..),
    newGetOpenIDConnectProvider,

    -- * Request Lenses
    getOpenIDConnectProvider_openIDConnectProviderArn,

    -- * Destructuring the Response
    GetOpenIDConnectProviderResponse (..),
    newGetOpenIDConnectProviderResponse,

    -- * Response Lenses
    getOpenIDConnectProviderResponse_createDate,
    getOpenIDConnectProviderResponse_url,
    getOpenIDConnectProviderResponse_thumbprintList,
    getOpenIDConnectProviderResponse_clientIDList,
    getOpenIDConnectProviderResponse_tags,
    getOpenIDConnectProviderResponse_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:/ 'newGetOpenIDConnectProvider' smart constructor.
data GetOpenIDConnectProvider = GetOpenIDConnectProvider'
  { -- | The Amazon Resource Name (ARN) of the OIDC provider resource object in
    -- IAM to get information for. You can get a list of OIDC provider resource
    -- ARNs by using the ListOpenIDConnectProviders operation.
    --
    -- 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/.
    GetOpenIDConnectProvider -> Text
openIDConnectProviderArn :: Prelude.Text
  }
  deriving (GetOpenIDConnectProvider -> GetOpenIDConnectProvider -> Bool
(GetOpenIDConnectProvider -> GetOpenIDConnectProvider -> Bool)
-> (GetOpenIDConnectProvider -> GetOpenIDConnectProvider -> Bool)
-> Eq GetOpenIDConnectProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpenIDConnectProvider -> GetOpenIDConnectProvider -> Bool
$c/= :: GetOpenIDConnectProvider -> GetOpenIDConnectProvider -> Bool
== :: GetOpenIDConnectProvider -> GetOpenIDConnectProvider -> Bool
$c== :: GetOpenIDConnectProvider -> GetOpenIDConnectProvider -> Bool
Prelude.Eq, ReadPrec [GetOpenIDConnectProvider]
ReadPrec GetOpenIDConnectProvider
Int -> ReadS GetOpenIDConnectProvider
ReadS [GetOpenIDConnectProvider]
(Int -> ReadS GetOpenIDConnectProvider)
-> ReadS [GetOpenIDConnectProvider]
-> ReadPrec GetOpenIDConnectProvider
-> ReadPrec [GetOpenIDConnectProvider]
-> Read GetOpenIDConnectProvider
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpenIDConnectProvider]
$creadListPrec :: ReadPrec [GetOpenIDConnectProvider]
readPrec :: ReadPrec GetOpenIDConnectProvider
$creadPrec :: ReadPrec GetOpenIDConnectProvider
readList :: ReadS [GetOpenIDConnectProvider]
$creadList :: ReadS [GetOpenIDConnectProvider]
readsPrec :: Int -> ReadS GetOpenIDConnectProvider
$creadsPrec :: Int -> ReadS GetOpenIDConnectProvider
Prelude.Read, Int -> GetOpenIDConnectProvider -> ShowS
[GetOpenIDConnectProvider] -> ShowS
GetOpenIDConnectProvider -> String
(Int -> GetOpenIDConnectProvider -> ShowS)
-> (GetOpenIDConnectProvider -> String)
-> ([GetOpenIDConnectProvider] -> ShowS)
-> Show GetOpenIDConnectProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpenIDConnectProvider] -> ShowS
$cshowList :: [GetOpenIDConnectProvider] -> ShowS
show :: GetOpenIDConnectProvider -> String
$cshow :: GetOpenIDConnectProvider -> String
showsPrec :: Int -> GetOpenIDConnectProvider -> ShowS
$cshowsPrec :: Int -> GetOpenIDConnectProvider -> ShowS
Prelude.Show, (forall x.
 GetOpenIDConnectProvider -> Rep GetOpenIDConnectProvider x)
-> (forall x.
    Rep GetOpenIDConnectProvider x -> GetOpenIDConnectProvider)
-> Generic GetOpenIDConnectProvider
forall x.
Rep GetOpenIDConnectProvider x -> GetOpenIDConnectProvider
forall x.
GetOpenIDConnectProvider -> Rep GetOpenIDConnectProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOpenIDConnectProvider x -> GetOpenIDConnectProvider
$cfrom :: forall x.
GetOpenIDConnectProvider -> Rep GetOpenIDConnectProvider x
Prelude.Generic)

-- |
-- Create a value of 'GetOpenIDConnectProvider' 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:
--
-- 'openIDConnectProviderArn', 'getOpenIDConnectProvider_openIDConnectProviderArn' - The Amazon Resource Name (ARN) of the OIDC provider resource object in
-- IAM to get information for. You can get a list of OIDC provider resource
-- ARNs by using the ListOpenIDConnectProviders operation.
--
-- 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/.
newGetOpenIDConnectProvider ::
  -- | 'openIDConnectProviderArn'
  Prelude.Text ->
  GetOpenIDConnectProvider
newGetOpenIDConnectProvider :: Text -> GetOpenIDConnectProvider
newGetOpenIDConnectProvider
  Text
pOpenIDConnectProviderArn_ =
    GetOpenIDConnectProvider' :: Text -> GetOpenIDConnectProvider
GetOpenIDConnectProvider'
      { $sel:openIDConnectProviderArn:GetOpenIDConnectProvider' :: Text
openIDConnectProviderArn =
          Text
pOpenIDConnectProviderArn_
      }

-- | The Amazon Resource Name (ARN) of the OIDC provider resource object in
-- IAM to get information for. You can get a list of OIDC provider resource
-- ARNs by using the ListOpenIDConnectProviders operation.
--
-- 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/.
getOpenIDConnectProvider_openIDConnectProviderArn :: Lens.Lens' GetOpenIDConnectProvider Prelude.Text
getOpenIDConnectProvider_openIDConnectProviderArn :: (Text -> f Text)
-> GetOpenIDConnectProvider -> f GetOpenIDConnectProvider
getOpenIDConnectProvider_openIDConnectProviderArn = (GetOpenIDConnectProvider -> Text)
-> (GetOpenIDConnectProvider -> Text -> GetOpenIDConnectProvider)
-> Lens GetOpenIDConnectProvider GetOpenIDConnectProvider Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIDConnectProvider' {Text
openIDConnectProviderArn :: Text
$sel:openIDConnectProviderArn:GetOpenIDConnectProvider' :: GetOpenIDConnectProvider -> Text
openIDConnectProviderArn} -> Text
openIDConnectProviderArn) (\s :: GetOpenIDConnectProvider
s@GetOpenIDConnectProvider' {} Text
a -> GetOpenIDConnectProvider
s {$sel:openIDConnectProviderArn:GetOpenIDConnectProvider' :: Text
openIDConnectProviderArn = Text
a} :: GetOpenIDConnectProvider)

instance Core.AWSRequest GetOpenIDConnectProvider where
  type
    AWSResponse GetOpenIDConnectProvider =
      GetOpenIDConnectProviderResponse
  request :: GetOpenIDConnectProvider -> Request GetOpenIDConnectProvider
request = Service
-> GetOpenIDConnectProvider -> Request GetOpenIDConnectProvider
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy GetOpenIDConnectProvider
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetOpenIDConnectProvider)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse GetOpenIDConnectProvider))
-> Logger
-> Service
-> Proxy GetOpenIDConnectProvider
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetOpenIDConnectProvider)))
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
"GetOpenIDConnectProviderResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ISO8601
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Tag]
-> Int
-> GetOpenIDConnectProviderResponse
GetOpenIDConnectProviderResponse'
            (Maybe ISO8601
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Tag]
 -> Int
 -> GetOpenIDConnectProviderResponse)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Tag]
      -> Int
      -> GetOpenIDConnectProviderResponse)
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 Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Tag]
   -> Int
   -> GetOpenIDConnectProviderResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Tag]
      -> Int
      -> GetOpenIDConnectProviderResponse)
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
"Url")
            Either
  String
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Tag]
   -> Int
   -> GetOpenIDConnectProviderResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe [Text]
      -> Maybe [Tag] -> Int -> GetOpenIDConnectProviderResponse)
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
"ThumbprintList" 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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe [Text]
   -> Maybe [Tag] -> Int -> GetOpenIDConnectProviderResponse)
-> Either String (Maybe [Text])
-> Either
     String (Maybe [Tag] -> Int -> GetOpenIDConnectProviderResponse)
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
"ClientIDList" 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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String (Maybe [Tag] -> Int -> GetOpenIDConnectProviderResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> GetOpenIDConnectProviderResponse)
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 (Int -> GetOpenIDConnectProviderResponse)
-> Either String Int
-> Either String GetOpenIDConnectProviderResponse
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 GetOpenIDConnectProvider

instance Prelude.NFData GetOpenIDConnectProvider

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

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

instance Core.ToQuery GetOpenIDConnectProvider where
  toQuery :: GetOpenIDConnectProvider -> QueryString
toQuery GetOpenIDConnectProvider' {Text
openIDConnectProviderArn :: Text
$sel:openIDConnectProviderArn:GetOpenIDConnectProvider' :: GetOpenIDConnectProvider -> 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
"GetOpenIDConnectProvider" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"OpenIDConnectProviderArn"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
openIDConnectProviderArn
      ]

-- | Contains the response to a successful GetOpenIDConnectProvider request.
--
-- /See:/ 'newGetOpenIDConnectProviderResponse' smart constructor.
data GetOpenIDConnectProviderResponse = GetOpenIDConnectProviderResponse'
  { -- | The date and time when the IAM OIDC provider resource object was created
    -- in the Amazon Web Services account.
    GetOpenIDConnectProviderResponse -> Maybe ISO8601
createDate :: Prelude.Maybe Core.ISO8601,
    -- | The URL that the IAM OIDC provider resource object is associated with.
    -- For more information, see CreateOpenIDConnectProvider.
    GetOpenIDConnectProviderResponse -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | A list of certificate thumbprints that are associated with the specified
    -- IAM OIDC provider resource object. For more information, see
    -- CreateOpenIDConnectProvider.
    GetOpenIDConnectProviderResponse -> Maybe [Text]
thumbprintList :: Prelude.Maybe [Prelude.Text],
    -- | A list of client IDs (also known as audiences) that are associated with
    -- the specified IAM OIDC provider resource object. For more information,
    -- see CreateOpenIDConnectProvider.
    GetOpenIDConnectProviderResponse -> Maybe [Text]
clientIDList :: Prelude.Maybe [Prelude.Text],
    -- | A list of tags that are attached to the specified IAM OIDC 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/.
    GetOpenIDConnectProviderResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    GetOpenIDConnectProviderResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetOpenIDConnectProviderResponse
-> GetOpenIDConnectProviderResponse -> Bool
(GetOpenIDConnectProviderResponse
 -> GetOpenIDConnectProviderResponse -> Bool)
-> (GetOpenIDConnectProviderResponse
    -> GetOpenIDConnectProviderResponse -> Bool)
-> Eq GetOpenIDConnectProviderResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpenIDConnectProviderResponse
-> GetOpenIDConnectProviderResponse -> Bool
$c/= :: GetOpenIDConnectProviderResponse
-> GetOpenIDConnectProviderResponse -> Bool
== :: GetOpenIDConnectProviderResponse
-> GetOpenIDConnectProviderResponse -> Bool
$c== :: GetOpenIDConnectProviderResponse
-> GetOpenIDConnectProviderResponse -> Bool
Prelude.Eq, ReadPrec [GetOpenIDConnectProviderResponse]
ReadPrec GetOpenIDConnectProviderResponse
Int -> ReadS GetOpenIDConnectProviderResponse
ReadS [GetOpenIDConnectProviderResponse]
(Int -> ReadS GetOpenIDConnectProviderResponse)
-> ReadS [GetOpenIDConnectProviderResponse]
-> ReadPrec GetOpenIDConnectProviderResponse
-> ReadPrec [GetOpenIDConnectProviderResponse]
-> Read GetOpenIDConnectProviderResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpenIDConnectProviderResponse]
$creadListPrec :: ReadPrec [GetOpenIDConnectProviderResponse]
readPrec :: ReadPrec GetOpenIDConnectProviderResponse
$creadPrec :: ReadPrec GetOpenIDConnectProviderResponse
readList :: ReadS [GetOpenIDConnectProviderResponse]
$creadList :: ReadS [GetOpenIDConnectProviderResponse]
readsPrec :: Int -> ReadS GetOpenIDConnectProviderResponse
$creadsPrec :: Int -> ReadS GetOpenIDConnectProviderResponse
Prelude.Read, Int -> GetOpenIDConnectProviderResponse -> ShowS
[GetOpenIDConnectProviderResponse] -> ShowS
GetOpenIDConnectProviderResponse -> String
(Int -> GetOpenIDConnectProviderResponse -> ShowS)
-> (GetOpenIDConnectProviderResponse -> String)
-> ([GetOpenIDConnectProviderResponse] -> ShowS)
-> Show GetOpenIDConnectProviderResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpenIDConnectProviderResponse] -> ShowS
$cshowList :: [GetOpenIDConnectProviderResponse] -> ShowS
show :: GetOpenIDConnectProviderResponse -> String
$cshow :: GetOpenIDConnectProviderResponse -> String
showsPrec :: Int -> GetOpenIDConnectProviderResponse -> ShowS
$cshowsPrec :: Int -> GetOpenIDConnectProviderResponse -> ShowS
Prelude.Show, (forall x.
 GetOpenIDConnectProviderResponse
 -> Rep GetOpenIDConnectProviderResponse x)
-> (forall x.
    Rep GetOpenIDConnectProviderResponse x
    -> GetOpenIDConnectProviderResponse)
-> Generic GetOpenIDConnectProviderResponse
forall x.
Rep GetOpenIDConnectProviderResponse x
-> GetOpenIDConnectProviderResponse
forall x.
GetOpenIDConnectProviderResponse
-> Rep GetOpenIDConnectProviderResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOpenIDConnectProviderResponse x
-> GetOpenIDConnectProviderResponse
$cfrom :: forall x.
GetOpenIDConnectProviderResponse
-> Rep GetOpenIDConnectProviderResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetOpenIDConnectProviderResponse' 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', 'getOpenIDConnectProviderResponse_createDate' - The date and time when the IAM OIDC provider resource object was created
-- in the Amazon Web Services account.
--
-- 'url', 'getOpenIDConnectProviderResponse_url' - The URL that the IAM OIDC provider resource object is associated with.
-- For more information, see CreateOpenIDConnectProvider.
--
-- 'thumbprintList', 'getOpenIDConnectProviderResponse_thumbprintList' - A list of certificate thumbprints that are associated with the specified
-- IAM OIDC provider resource object. For more information, see
-- CreateOpenIDConnectProvider.
--
-- 'clientIDList', 'getOpenIDConnectProviderResponse_clientIDList' - A list of client IDs (also known as audiences) that are associated with
-- the specified IAM OIDC provider resource object. For more information,
-- see CreateOpenIDConnectProvider.
--
-- 'tags', 'getOpenIDConnectProviderResponse_tags' - A list of tags that are attached to the specified IAM OIDC 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/.
--
-- 'httpStatus', 'getOpenIDConnectProviderResponse_httpStatus' - The response's http status code.
newGetOpenIDConnectProviderResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetOpenIDConnectProviderResponse
newGetOpenIDConnectProviderResponse :: Int -> GetOpenIDConnectProviderResponse
newGetOpenIDConnectProviderResponse Int
pHttpStatus_ =
  GetOpenIDConnectProviderResponse' :: Maybe ISO8601
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Tag]
-> Int
-> GetOpenIDConnectProviderResponse
GetOpenIDConnectProviderResponse'
    { $sel:createDate:GetOpenIDConnectProviderResponse' :: Maybe ISO8601
createDate =
        Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:url:GetOpenIDConnectProviderResponse' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:thumbprintList:GetOpenIDConnectProviderResponse' :: Maybe [Text]
thumbprintList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:clientIDList:GetOpenIDConnectProviderResponse' :: Maybe [Text]
clientIDList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetOpenIDConnectProviderResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetOpenIDConnectProviderResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time when the IAM OIDC provider resource object was created
-- in the Amazon Web Services account.
getOpenIDConnectProviderResponse_createDate :: Lens.Lens' GetOpenIDConnectProviderResponse (Prelude.Maybe Prelude.UTCTime)
getOpenIDConnectProviderResponse_createDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
getOpenIDConnectProviderResponse_createDate = (GetOpenIDConnectProviderResponse -> Maybe ISO8601)
-> (GetOpenIDConnectProviderResponse
    -> Maybe ISO8601 -> GetOpenIDConnectProviderResponse)
-> Lens
     GetOpenIDConnectProviderResponse
     GetOpenIDConnectProviderResponse
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIDConnectProviderResponse' {Maybe ISO8601
createDate :: Maybe ISO8601
$sel:createDate:GetOpenIDConnectProviderResponse' :: GetOpenIDConnectProviderResponse -> Maybe ISO8601
createDate} -> Maybe ISO8601
createDate) (\s :: GetOpenIDConnectProviderResponse
s@GetOpenIDConnectProviderResponse' {} Maybe ISO8601
a -> GetOpenIDConnectProviderResponse
s {$sel:createDate:GetOpenIDConnectProviderResponse' :: Maybe ISO8601
createDate = Maybe ISO8601
a} :: GetOpenIDConnectProviderResponse) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> GetOpenIDConnectProviderResponse
 -> f GetOpenIDConnectProviderResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
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 URL that the IAM OIDC provider resource object is associated with.
-- For more information, see CreateOpenIDConnectProvider.
getOpenIDConnectProviderResponse_url :: Lens.Lens' GetOpenIDConnectProviderResponse (Prelude.Maybe Prelude.Text)
getOpenIDConnectProviderResponse_url :: (Maybe Text -> f (Maybe Text))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
getOpenIDConnectProviderResponse_url = (GetOpenIDConnectProviderResponse -> Maybe Text)
-> (GetOpenIDConnectProviderResponse
    -> Maybe Text -> GetOpenIDConnectProviderResponse)
-> Lens
     GetOpenIDConnectProviderResponse
     GetOpenIDConnectProviderResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIDConnectProviderResponse' {Maybe Text
url :: Maybe Text
$sel:url:GetOpenIDConnectProviderResponse' :: GetOpenIDConnectProviderResponse -> Maybe Text
url} -> Maybe Text
url) (\s :: GetOpenIDConnectProviderResponse
s@GetOpenIDConnectProviderResponse' {} Maybe Text
a -> GetOpenIDConnectProviderResponse
s {$sel:url:GetOpenIDConnectProviderResponse' :: Maybe Text
url = Maybe Text
a} :: GetOpenIDConnectProviderResponse)

-- | A list of certificate thumbprints that are associated with the specified
-- IAM OIDC provider resource object. For more information, see
-- CreateOpenIDConnectProvider.
getOpenIDConnectProviderResponse_thumbprintList :: Lens.Lens' GetOpenIDConnectProviderResponse (Prelude.Maybe [Prelude.Text])
getOpenIDConnectProviderResponse_thumbprintList :: (Maybe [Text] -> f (Maybe [Text]))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
getOpenIDConnectProviderResponse_thumbprintList = (GetOpenIDConnectProviderResponse -> Maybe [Text])
-> (GetOpenIDConnectProviderResponse
    -> Maybe [Text] -> GetOpenIDConnectProviderResponse)
-> Lens
     GetOpenIDConnectProviderResponse
     GetOpenIDConnectProviderResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIDConnectProviderResponse' {Maybe [Text]
thumbprintList :: Maybe [Text]
$sel:thumbprintList:GetOpenIDConnectProviderResponse' :: GetOpenIDConnectProviderResponse -> Maybe [Text]
thumbprintList} -> Maybe [Text]
thumbprintList) (\s :: GetOpenIDConnectProviderResponse
s@GetOpenIDConnectProviderResponse' {} Maybe [Text]
a -> GetOpenIDConnectProviderResponse
s {$sel:thumbprintList:GetOpenIDConnectProviderResponse' :: Maybe [Text]
thumbprintList = Maybe [Text]
a} :: GetOpenIDConnectProviderResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetOpenIDConnectProviderResponse
 -> f GetOpenIDConnectProviderResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of client IDs (also known as audiences) that are associated with
-- the specified IAM OIDC provider resource object. For more information,
-- see CreateOpenIDConnectProvider.
getOpenIDConnectProviderResponse_clientIDList :: Lens.Lens' GetOpenIDConnectProviderResponse (Prelude.Maybe [Prelude.Text])
getOpenIDConnectProviderResponse_clientIDList :: (Maybe [Text] -> f (Maybe [Text]))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
getOpenIDConnectProviderResponse_clientIDList = (GetOpenIDConnectProviderResponse -> Maybe [Text])
-> (GetOpenIDConnectProviderResponse
    -> Maybe [Text] -> GetOpenIDConnectProviderResponse)
-> Lens
     GetOpenIDConnectProviderResponse
     GetOpenIDConnectProviderResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIDConnectProviderResponse' {Maybe [Text]
clientIDList :: Maybe [Text]
$sel:clientIDList:GetOpenIDConnectProviderResponse' :: GetOpenIDConnectProviderResponse -> Maybe [Text]
clientIDList} -> Maybe [Text]
clientIDList) (\s :: GetOpenIDConnectProviderResponse
s@GetOpenIDConnectProviderResponse' {} Maybe [Text]
a -> GetOpenIDConnectProviderResponse
s {$sel:clientIDList:GetOpenIDConnectProviderResponse' :: Maybe [Text]
clientIDList = Maybe [Text]
a} :: GetOpenIDConnectProviderResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetOpenIDConnectProviderResponse
 -> f GetOpenIDConnectProviderResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of tags that are attached to the specified IAM OIDC 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/.
getOpenIDConnectProviderResponse_tags :: Lens.Lens' GetOpenIDConnectProviderResponse (Prelude.Maybe [Tag])
getOpenIDConnectProviderResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
getOpenIDConnectProviderResponse_tags = (GetOpenIDConnectProviderResponse -> Maybe [Tag])
-> (GetOpenIDConnectProviderResponse
    -> Maybe [Tag] -> GetOpenIDConnectProviderResponse)
-> Lens
     GetOpenIDConnectProviderResponse
     GetOpenIDConnectProviderResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIDConnectProviderResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:GetOpenIDConnectProviderResponse' :: GetOpenIDConnectProviderResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: GetOpenIDConnectProviderResponse
s@GetOpenIDConnectProviderResponse' {} Maybe [Tag]
a -> GetOpenIDConnectProviderResponse
s {$sel:tags:GetOpenIDConnectProviderResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: GetOpenIDConnectProviderResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> GetOpenIDConnectProviderResponse
 -> f GetOpenIDConnectProviderResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
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 response's http status code.
getOpenIDConnectProviderResponse_httpStatus :: Lens.Lens' GetOpenIDConnectProviderResponse Prelude.Int
getOpenIDConnectProviderResponse_httpStatus :: (Int -> f Int)
-> GetOpenIDConnectProviderResponse
-> f GetOpenIDConnectProviderResponse
getOpenIDConnectProviderResponse_httpStatus = (GetOpenIDConnectProviderResponse -> Int)
-> (GetOpenIDConnectProviderResponse
    -> Int -> GetOpenIDConnectProviderResponse)
-> Lens
     GetOpenIDConnectProviderResponse
     GetOpenIDConnectProviderResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIDConnectProviderResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetOpenIDConnectProviderResponse' :: GetOpenIDConnectProviderResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetOpenIDConnectProviderResponse
s@GetOpenIDConnectProviderResponse' {} Int
a -> GetOpenIDConnectProviderResponse
s {$sel:httpStatus:GetOpenIDConnectProviderResponse' :: Int
httpStatus = Int
a} :: GetOpenIDConnectProviderResponse)

instance
  Prelude.NFData
    GetOpenIDConnectProviderResponse