{-# 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.EKS.AssociateIdentityProviderConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Associate an identity provider configuration to a cluster.
--
-- If you want to authenticate identities using an identity provider, you
-- can create an identity provider configuration and associate it to your
-- cluster. After configuring authentication to your cluster you can create
-- Kubernetes @roles@ and @clusterroles@ to assign permissions to the
-- roles, and then bind the roles to the identities using Kubernetes
-- @rolebindings@ and @clusterrolebindings@. For more information see
-- <https://kubernetes.io/docs/reference/access-authn-authz/rbac/ Using RBAC Authorization>
-- in the Kubernetes documentation.
module Amazonka.EKS.AssociateIdentityProviderConfig
  ( -- * Creating a Request
    AssociateIdentityProviderConfig (..),
    newAssociateIdentityProviderConfig,

    -- * Request Lenses
    associateIdentityProviderConfig_clientRequestToken,
    associateIdentityProviderConfig_tags,
    associateIdentityProviderConfig_clusterName,
    associateIdentityProviderConfig_oidc,

    -- * Destructuring the Response
    AssociateIdentityProviderConfigResponse (..),
    newAssociateIdentityProviderConfigResponse,

    -- * Response Lenses
    associateIdentityProviderConfigResponse_tags,
    associateIdentityProviderConfigResponse_update,
    associateIdentityProviderConfigResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EKS.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newAssociateIdentityProviderConfig' smart constructor.
data AssociateIdentityProviderConfig = AssociateIdentityProviderConfig'
  { -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    AssociateIdentityProviderConfig -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The metadata to apply to the configuration to assist with categorization
    -- and organization. Each tag consists of a key and an optional value. You
    -- define both.
    AssociateIdentityProviderConfig -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the cluster to associate the configuration to.
    AssociateIdentityProviderConfig -> Text
clusterName :: Prelude.Text,
    -- | An object representing an OpenID Connect (OIDC) identity provider
    -- configuration.
    AssociateIdentityProviderConfig
-> OidcIdentityProviderConfigRequest
oidc :: OidcIdentityProviderConfigRequest
  }
  deriving (AssociateIdentityProviderConfig
-> AssociateIdentityProviderConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateIdentityProviderConfig
-> AssociateIdentityProviderConfig -> Bool
$c/= :: AssociateIdentityProviderConfig
-> AssociateIdentityProviderConfig -> Bool
== :: AssociateIdentityProviderConfig
-> AssociateIdentityProviderConfig -> Bool
$c== :: AssociateIdentityProviderConfig
-> AssociateIdentityProviderConfig -> Bool
Prelude.Eq, ReadPrec [AssociateIdentityProviderConfig]
ReadPrec AssociateIdentityProviderConfig
Int -> ReadS AssociateIdentityProviderConfig
ReadS [AssociateIdentityProviderConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateIdentityProviderConfig]
$creadListPrec :: ReadPrec [AssociateIdentityProviderConfig]
readPrec :: ReadPrec AssociateIdentityProviderConfig
$creadPrec :: ReadPrec AssociateIdentityProviderConfig
readList :: ReadS [AssociateIdentityProviderConfig]
$creadList :: ReadS [AssociateIdentityProviderConfig]
readsPrec :: Int -> ReadS AssociateIdentityProviderConfig
$creadsPrec :: Int -> ReadS AssociateIdentityProviderConfig
Prelude.Read, Int -> AssociateIdentityProviderConfig -> ShowS
[AssociateIdentityProviderConfig] -> ShowS
AssociateIdentityProviderConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateIdentityProviderConfig] -> ShowS
$cshowList :: [AssociateIdentityProviderConfig] -> ShowS
show :: AssociateIdentityProviderConfig -> String
$cshow :: AssociateIdentityProviderConfig -> String
showsPrec :: Int -> AssociateIdentityProviderConfig -> ShowS
$cshowsPrec :: Int -> AssociateIdentityProviderConfig -> ShowS
Prelude.Show, forall x.
Rep AssociateIdentityProviderConfig x
-> AssociateIdentityProviderConfig
forall x.
AssociateIdentityProviderConfig
-> Rep AssociateIdentityProviderConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateIdentityProviderConfig x
-> AssociateIdentityProviderConfig
$cfrom :: forall x.
AssociateIdentityProviderConfig
-> Rep AssociateIdentityProviderConfig x
Prelude.Generic)

-- |
-- Create a value of 'AssociateIdentityProviderConfig' 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:
--
-- 'clientRequestToken', 'associateIdentityProviderConfig_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'tags', 'associateIdentityProviderConfig_tags' - The metadata to apply to the configuration to assist with categorization
-- and organization. Each tag consists of a key and an optional value. You
-- define both.
--
-- 'clusterName', 'associateIdentityProviderConfig_clusterName' - The name of the cluster to associate the configuration to.
--
-- 'oidc', 'associateIdentityProviderConfig_oidc' - An object representing an OpenID Connect (OIDC) identity provider
-- configuration.
newAssociateIdentityProviderConfig ::
  -- | 'clusterName'
  Prelude.Text ->
  -- | 'oidc'
  OidcIdentityProviderConfigRequest ->
  AssociateIdentityProviderConfig
newAssociateIdentityProviderConfig :: Text
-> OidcIdentityProviderConfigRequest
-> AssociateIdentityProviderConfig
newAssociateIdentityProviderConfig
  Text
pClusterName_
  OidcIdentityProviderConfigRequest
pOidc_ =
    AssociateIdentityProviderConfig'
      { $sel:clientRequestToken:AssociateIdentityProviderConfig' :: Maybe Text
clientRequestToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tags:AssociateIdentityProviderConfig' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:clusterName:AssociateIdentityProviderConfig' :: Text
clusterName = Text
pClusterName_,
        $sel:oidc:AssociateIdentityProviderConfig' :: OidcIdentityProviderConfigRequest
oidc = OidcIdentityProviderConfigRequest
pOidc_
      }

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
associateIdentityProviderConfig_clientRequestToken :: Lens.Lens' AssociateIdentityProviderConfig (Prelude.Maybe Prelude.Text)
associateIdentityProviderConfig_clientRequestToken :: Lens' AssociateIdentityProviderConfig (Maybe Text)
associateIdentityProviderConfig_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateIdentityProviderConfig' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: AssociateIdentityProviderConfig
s@AssociateIdentityProviderConfig' {} Maybe Text
a -> AssociateIdentityProviderConfig
s {$sel:clientRequestToken:AssociateIdentityProviderConfig' :: Maybe Text
clientRequestToken = Maybe Text
a} :: AssociateIdentityProviderConfig)

-- | The metadata to apply to the configuration to assist with categorization
-- and organization. Each tag consists of a key and an optional value. You
-- define both.
associateIdentityProviderConfig_tags :: Lens.Lens' AssociateIdentityProviderConfig (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
associateIdentityProviderConfig_tags :: Lens' AssociateIdentityProviderConfig (Maybe (HashMap Text Text))
associateIdentityProviderConfig_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateIdentityProviderConfig' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AssociateIdentityProviderConfig
s@AssociateIdentityProviderConfig' {} Maybe (HashMap Text Text)
a -> AssociateIdentityProviderConfig
s {$sel:tags:AssociateIdentityProviderConfig' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AssociateIdentityProviderConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the cluster to associate the configuration to.
associateIdentityProviderConfig_clusterName :: Lens.Lens' AssociateIdentityProviderConfig Prelude.Text
associateIdentityProviderConfig_clusterName :: Lens' AssociateIdentityProviderConfig Text
associateIdentityProviderConfig_clusterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateIdentityProviderConfig' {Text
clusterName :: Text
$sel:clusterName:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Text
clusterName} -> Text
clusterName) (\s :: AssociateIdentityProviderConfig
s@AssociateIdentityProviderConfig' {} Text
a -> AssociateIdentityProviderConfig
s {$sel:clusterName:AssociateIdentityProviderConfig' :: Text
clusterName = Text
a} :: AssociateIdentityProviderConfig)

-- | An object representing an OpenID Connect (OIDC) identity provider
-- configuration.
associateIdentityProviderConfig_oidc :: Lens.Lens' AssociateIdentityProviderConfig OidcIdentityProviderConfigRequest
associateIdentityProviderConfig_oidc :: Lens'
  AssociateIdentityProviderConfig OidcIdentityProviderConfigRequest
associateIdentityProviderConfig_oidc = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateIdentityProviderConfig' {OidcIdentityProviderConfigRequest
oidc :: OidcIdentityProviderConfigRequest
$sel:oidc:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig
-> OidcIdentityProviderConfigRequest
oidc} -> OidcIdentityProviderConfigRequest
oidc) (\s :: AssociateIdentityProviderConfig
s@AssociateIdentityProviderConfig' {} OidcIdentityProviderConfigRequest
a -> AssociateIdentityProviderConfig
s {$sel:oidc:AssociateIdentityProviderConfig' :: OidcIdentityProviderConfigRequest
oidc = OidcIdentityProviderConfigRequest
a} :: AssociateIdentityProviderConfig)

instance
  Core.AWSRequest
    AssociateIdentityProviderConfig
  where
  type
    AWSResponse AssociateIdentityProviderConfig =
      AssociateIdentityProviderConfigResponse
  request :: (Service -> Service)
-> AssociateIdentityProviderConfig
-> Request AssociateIdentityProviderConfig
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy AssociateIdentityProviderConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AssociateIdentityProviderConfig)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe (HashMap Text Text)
-> Maybe Update -> Int -> AssociateIdentityProviderConfigResponse
AssociateIdentityProviderConfigResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"update")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    AssociateIdentityProviderConfig
  where
  hashWithSalt :: Int -> AssociateIdentityProviderConfig -> Int
hashWithSalt
    Int
_salt
    AssociateIdentityProviderConfig' {Maybe Text
Maybe (HashMap Text Text)
Text
OidcIdentityProviderConfigRequest
oidc :: OidcIdentityProviderConfigRequest
clusterName :: Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
$sel:oidc:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig
-> OidcIdentityProviderConfigRequest
$sel:clusterName:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Text
$sel:tags:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe (HashMap Text Text)
$sel:clientRequestToken:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OidcIdentityProviderConfigRequest
oidc

instance
  Prelude.NFData
    AssociateIdentityProviderConfig
  where
  rnf :: AssociateIdentityProviderConfig -> ()
rnf AssociateIdentityProviderConfig' {Maybe Text
Maybe (HashMap Text Text)
Text
OidcIdentityProviderConfigRequest
oidc :: OidcIdentityProviderConfigRequest
clusterName :: Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
$sel:oidc:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig
-> OidcIdentityProviderConfigRequest
$sel:clusterName:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Text
$sel:tags:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe (HashMap Text Text)
$sel:clientRequestToken:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clusterName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OidcIdentityProviderConfigRequest
oidc

instance
  Data.ToHeaders
    AssociateIdentityProviderConfig
  where
  toHeaders :: AssociateIdentityProviderConfig -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON AssociateIdentityProviderConfig where
  toJSON :: AssociateIdentityProviderConfig -> Value
toJSON AssociateIdentityProviderConfig' {Maybe Text
Maybe (HashMap Text Text)
Text
OidcIdentityProviderConfigRequest
oidc :: OidcIdentityProviderConfigRequest
clusterName :: Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
$sel:oidc:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig
-> OidcIdentityProviderConfigRequest
$sel:clusterName:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Text
$sel:tags:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe (HashMap Text Text)
$sel:clientRequestToken:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"clientRequestToken" 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
clientRequestToken,
            (Key
"tags" 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 (HashMap Text Text)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"oidc" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OidcIdentityProviderConfigRequest
oidc)
          ]
      )

instance Data.ToPath AssociateIdentityProviderConfig where
  toPath :: AssociateIdentityProviderConfig -> ByteString
toPath AssociateIdentityProviderConfig' {Maybe Text
Maybe (HashMap Text Text)
Text
OidcIdentityProviderConfigRequest
oidc :: OidcIdentityProviderConfigRequest
clusterName :: Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
$sel:oidc:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig
-> OidcIdentityProviderConfigRequest
$sel:clusterName:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Text
$sel:tags:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe (HashMap Text Text)
$sel:clientRequestToken:AssociateIdentityProviderConfig' :: AssociateIdentityProviderConfig -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/clusters/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
clusterName,
        ByteString
"/identity-provider-configs/associate"
      ]

instance Data.ToQuery AssociateIdentityProviderConfig where
  toQuery :: AssociateIdentityProviderConfig -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newAssociateIdentityProviderConfigResponse' smart constructor.
data AssociateIdentityProviderConfigResponse = AssociateIdentityProviderConfigResponse'
  { -- | The tags for the resource.
    AssociateIdentityProviderConfigResponse
-> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    AssociateIdentityProviderConfigResponse -> Maybe Update
update :: Prelude.Maybe Update,
    -- | The response's http status code.
    AssociateIdentityProviderConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateIdentityProviderConfigResponse
-> AssociateIdentityProviderConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateIdentityProviderConfigResponse
-> AssociateIdentityProviderConfigResponse -> Bool
$c/= :: AssociateIdentityProviderConfigResponse
-> AssociateIdentityProviderConfigResponse -> Bool
== :: AssociateIdentityProviderConfigResponse
-> AssociateIdentityProviderConfigResponse -> Bool
$c== :: AssociateIdentityProviderConfigResponse
-> AssociateIdentityProviderConfigResponse -> Bool
Prelude.Eq, ReadPrec [AssociateIdentityProviderConfigResponse]
ReadPrec AssociateIdentityProviderConfigResponse
Int -> ReadS AssociateIdentityProviderConfigResponse
ReadS [AssociateIdentityProviderConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateIdentityProviderConfigResponse]
$creadListPrec :: ReadPrec [AssociateIdentityProviderConfigResponse]
readPrec :: ReadPrec AssociateIdentityProviderConfigResponse
$creadPrec :: ReadPrec AssociateIdentityProviderConfigResponse
readList :: ReadS [AssociateIdentityProviderConfigResponse]
$creadList :: ReadS [AssociateIdentityProviderConfigResponse]
readsPrec :: Int -> ReadS AssociateIdentityProviderConfigResponse
$creadsPrec :: Int -> ReadS AssociateIdentityProviderConfigResponse
Prelude.Read, Int -> AssociateIdentityProviderConfigResponse -> ShowS
[AssociateIdentityProviderConfigResponse] -> ShowS
AssociateIdentityProviderConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateIdentityProviderConfigResponse] -> ShowS
$cshowList :: [AssociateIdentityProviderConfigResponse] -> ShowS
show :: AssociateIdentityProviderConfigResponse -> String
$cshow :: AssociateIdentityProviderConfigResponse -> String
showsPrec :: Int -> AssociateIdentityProviderConfigResponse -> ShowS
$cshowsPrec :: Int -> AssociateIdentityProviderConfigResponse -> ShowS
Prelude.Show, forall x.
Rep AssociateIdentityProviderConfigResponse x
-> AssociateIdentityProviderConfigResponse
forall x.
AssociateIdentityProviderConfigResponse
-> Rep AssociateIdentityProviderConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateIdentityProviderConfigResponse x
-> AssociateIdentityProviderConfigResponse
$cfrom :: forall x.
AssociateIdentityProviderConfigResponse
-> Rep AssociateIdentityProviderConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateIdentityProviderConfigResponse' 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:
--
-- 'tags', 'associateIdentityProviderConfigResponse_tags' - The tags for the resource.
--
-- 'update', 'associateIdentityProviderConfigResponse_update' - Undocumented member.
--
-- 'httpStatus', 'associateIdentityProviderConfigResponse_httpStatus' - The response's http status code.
newAssociateIdentityProviderConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateIdentityProviderConfigResponse
newAssociateIdentityProviderConfigResponse :: Int -> AssociateIdentityProviderConfigResponse
newAssociateIdentityProviderConfigResponse
  Int
pHttpStatus_ =
    AssociateIdentityProviderConfigResponse'
      { $sel:tags:AssociateIdentityProviderConfigResponse' :: Maybe (HashMap Text Text)
tags =
          forall a. Maybe a
Prelude.Nothing,
        $sel:update:AssociateIdentityProviderConfigResponse' :: Maybe Update
update = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AssociateIdentityProviderConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The tags for the resource.
associateIdentityProviderConfigResponse_tags :: Lens.Lens' AssociateIdentityProviderConfigResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
associateIdentityProviderConfigResponse_tags :: Lens'
  AssociateIdentityProviderConfigResponse (Maybe (HashMap Text Text))
associateIdentityProviderConfigResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateIdentityProviderConfigResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AssociateIdentityProviderConfigResponse' :: AssociateIdentityProviderConfigResponse
-> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AssociateIdentityProviderConfigResponse
s@AssociateIdentityProviderConfigResponse' {} Maybe (HashMap Text Text)
a -> AssociateIdentityProviderConfigResponse
s {$sel:tags:AssociateIdentityProviderConfigResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AssociateIdentityProviderConfigResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
associateIdentityProviderConfigResponse_update :: Lens.Lens' AssociateIdentityProviderConfigResponse (Prelude.Maybe Update)
associateIdentityProviderConfigResponse_update :: Lens' AssociateIdentityProviderConfigResponse (Maybe Update)
associateIdentityProviderConfigResponse_update = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateIdentityProviderConfigResponse' {Maybe Update
update :: Maybe Update
$sel:update:AssociateIdentityProviderConfigResponse' :: AssociateIdentityProviderConfigResponse -> Maybe Update
update} -> Maybe Update
update) (\s :: AssociateIdentityProviderConfigResponse
s@AssociateIdentityProviderConfigResponse' {} Maybe Update
a -> AssociateIdentityProviderConfigResponse
s {$sel:update:AssociateIdentityProviderConfigResponse' :: Maybe Update
update = Maybe Update
a} :: AssociateIdentityProviderConfigResponse)

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

instance
  Prelude.NFData
    AssociateIdentityProviderConfigResponse
  where
  rnf :: AssociateIdentityProviderConfigResponse -> ()
rnf AssociateIdentityProviderConfigResponse' {Int
Maybe (HashMap Text Text)
Maybe Update
httpStatus :: Int
update :: Maybe Update
tags :: Maybe (HashMap Text Text)
$sel:httpStatus:AssociateIdentityProviderConfigResponse' :: AssociateIdentityProviderConfigResponse -> Int
$sel:update:AssociateIdentityProviderConfigResponse' :: AssociateIdentityProviderConfigResponse -> Maybe Update
$sel:tags:AssociateIdentityProviderConfigResponse' :: AssociateIdentityProviderConfigResponse
-> Maybe (HashMap Text Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Update
update
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus