{-# 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.WorkLink.AssociateWebsiteAuthorizationProvider
-- 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)
--
-- Associates a website authorization provider with a specified fleet. This
-- is used to authorize users against associated websites in the company
-- network.
module Amazonka.WorkLink.AssociateWebsiteAuthorizationProvider
  ( -- * Creating a Request
    AssociateWebsiteAuthorizationProvider (..),
    newAssociateWebsiteAuthorizationProvider,

    -- * Request Lenses
    associateWebsiteAuthorizationProvider_domainName,
    associateWebsiteAuthorizationProvider_fleetArn,
    associateWebsiteAuthorizationProvider_authorizationProviderType,

    -- * Destructuring the Response
    AssociateWebsiteAuthorizationProviderResponse (..),
    newAssociateWebsiteAuthorizationProviderResponse,

    -- * Response Lenses
    associateWebsiteAuthorizationProviderResponse_authorizationProviderId,
    associateWebsiteAuthorizationProviderResponse_httpStatus,
  )
where

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

-- | /See:/ 'newAssociateWebsiteAuthorizationProvider' smart constructor.
data AssociateWebsiteAuthorizationProvider = AssociateWebsiteAuthorizationProvider'
  { -- | The domain name of the authorization provider. This applies only to
    -- SAML-based authorization providers.
    AssociateWebsiteAuthorizationProvider -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the fleet.
    AssociateWebsiteAuthorizationProvider -> Text
fleetArn :: Prelude.Text,
    -- | The authorization provider type.
    AssociateWebsiteAuthorizationProvider -> AuthorizationProviderType
authorizationProviderType :: AuthorizationProviderType
  }
  deriving (AssociateWebsiteAuthorizationProvider
-> AssociateWebsiteAuthorizationProvider -> Bool
(AssociateWebsiteAuthorizationProvider
 -> AssociateWebsiteAuthorizationProvider -> Bool)
-> (AssociateWebsiteAuthorizationProvider
    -> AssociateWebsiteAuthorizationProvider -> Bool)
-> Eq AssociateWebsiteAuthorizationProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateWebsiteAuthorizationProvider
-> AssociateWebsiteAuthorizationProvider -> Bool
$c/= :: AssociateWebsiteAuthorizationProvider
-> AssociateWebsiteAuthorizationProvider -> Bool
== :: AssociateWebsiteAuthorizationProvider
-> AssociateWebsiteAuthorizationProvider -> Bool
$c== :: AssociateWebsiteAuthorizationProvider
-> AssociateWebsiteAuthorizationProvider -> Bool
Prelude.Eq, ReadPrec [AssociateWebsiteAuthorizationProvider]
ReadPrec AssociateWebsiteAuthorizationProvider
Int -> ReadS AssociateWebsiteAuthorizationProvider
ReadS [AssociateWebsiteAuthorizationProvider]
(Int -> ReadS AssociateWebsiteAuthorizationProvider)
-> ReadS [AssociateWebsiteAuthorizationProvider]
-> ReadPrec AssociateWebsiteAuthorizationProvider
-> ReadPrec [AssociateWebsiteAuthorizationProvider]
-> Read AssociateWebsiteAuthorizationProvider
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateWebsiteAuthorizationProvider]
$creadListPrec :: ReadPrec [AssociateWebsiteAuthorizationProvider]
readPrec :: ReadPrec AssociateWebsiteAuthorizationProvider
$creadPrec :: ReadPrec AssociateWebsiteAuthorizationProvider
readList :: ReadS [AssociateWebsiteAuthorizationProvider]
$creadList :: ReadS [AssociateWebsiteAuthorizationProvider]
readsPrec :: Int -> ReadS AssociateWebsiteAuthorizationProvider
$creadsPrec :: Int -> ReadS AssociateWebsiteAuthorizationProvider
Prelude.Read, Int -> AssociateWebsiteAuthorizationProvider -> ShowS
[AssociateWebsiteAuthorizationProvider] -> ShowS
AssociateWebsiteAuthorizationProvider -> String
(Int -> AssociateWebsiteAuthorizationProvider -> ShowS)
-> (AssociateWebsiteAuthorizationProvider -> String)
-> ([AssociateWebsiteAuthorizationProvider] -> ShowS)
-> Show AssociateWebsiteAuthorizationProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateWebsiteAuthorizationProvider] -> ShowS
$cshowList :: [AssociateWebsiteAuthorizationProvider] -> ShowS
show :: AssociateWebsiteAuthorizationProvider -> String
$cshow :: AssociateWebsiteAuthorizationProvider -> String
showsPrec :: Int -> AssociateWebsiteAuthorizationProvider -> ShowS
$cshowsPrec :: Int -> AssociateWebsiteAuthorizationProvider -> ShowS
Prelude.Show, (forall x.
 AssociateWebsiteAuthorizationProvider
 -> Rep AssociateWebsiteAuthorizationProvider x)
-> (forall x.
    Rep AssociateWebsiteAuthorizationProvider x
    -> AssociateWebsiteAuthorizationProvider)
-> Generic AssociateWebsiteAuthorizationProvider
forall x.
Rep AssociateWebsiteAuthorizationProvider x
-> AssociateWebsiteAuthorizationProvider
forall x.
AssociateWebsiteAuthorizationProvider
-> Rep AssociateWebsiteAuthorizationProvider x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateWebsiteAuthorizationProvider x
-> AssociateWebsiteAuthorizationProvider
$cfrom :: forall x.
AssociateWebsiteAuthorizationProvider
-> Rep AssociateWebsiteAuthorizationProvider x
Prelude.Generic)

-- |
-- Create a value of 'AssociateWebsiteAuthorizationProvider' 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:
--
-- 'domainName', 'associateWebsiteAuthorizationProvider_domainName' - The domain name of the authorization provider. This applies only to
-- SAML-based authorization providers.
--
-- 'fleetArn', 'associateWebsiteAuthorizationProvider_fleetArn' - The ARN of the fleet.
--
-- 'authorizationProviderType', 'associateWebsiteAuthorizationProvider_authorizationProviderType' - The authorization provider type.
newAssociateWebsiteAuthorizationProvider ::
  -- | 'fleetArn'
  Prelude.Text ->
  -- | 'authorizationProviderType'
  AuthorizationProviderType ->
  AssociateWebsiteAuthorizationProvider
newAssociateWebsiteAuthorizationProvider :: Text
-> AuthorizationProviderType
-> AssociateWebsiteAuthorizationProvider
newAssociateWebsiteAuthorizationProvider
  Text
pFleetArn_
  AuthorizationProviderType
pAuthorizationProviderType_ =
    AssociateWebsiteAuthorizationProvider' :: Maybe Text
-> Text
-> AuthorizationProviderType
-> AssociateWebsiteAuthorizationProvider
AssociateWebsiteAuthorizationProvider'
      { $sel:domainName:AssociateWebsiteAuthorizationProvider' :: Maybe Text
domainName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fleetArn:AssociateWebsiteAuthorizationProvider' :: Text
fleetArn = Text
pFleetArn_,
        $sel:authorizationProviderType:AssociateWebsiteAuthorizationProvider' :: AuthorizationProviderType
authorizationProviderType =
          AuthorizationProviderType
pAuthorizationProviderType_
      }

-- | The domain name of the authorization provider. This applies only to
-- SAML-based authorization providers.
associateWebsiteAuthorizationProvider_domainName :: Lens.Lens' AssociateWebsiteAuthorizationProvider (Prelude.Maybe Prelude.Text)
associateWebsiteAuthorizationProvider_domainName :: (Maybe Text -> f (Maybe Text))
-> AssociateWebsiteAuthorizationProvider
-> f AssociateWebsiteAuthorizationProvider
associateWebsiteAuthorizationProvider_domainName = (AssociateWebsiteAuthorizationProvider -> Maybe Text)
-> (AssociateWebsiteAuthorizationProvider
    -> Maybe Text -> AssociateWebsiteAuthorizationProvider)
-> Lens
     AssociateWebsiteAuthorizationProvider
     AssociateWebsiteAuthorizationProvider
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateWebsiteAuthorizationProvider' {Maybe Text
domainName :: Maybe Text
$sel:domainName:AssociateWebsiteAuthorizationProvider' :: AssociateWebsiteAuthorizationProvider -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: AssociateWebsiteAuthorizationProvider
s@AssociateWebsiteAuthorizationProvider' {} Maybe Text
a -> AssociateWebsiteAuthorizationProvider
s {$sel:domainName:AssociateWebsiteAuthorizationProvider' :: Maybe Text
domainName = Maybe Text
a} :: AssociateWebsiteAuthorizationProvider)

-- | The ARN of the fleet.
associateWebsiteAuthorizationProvider_fleetArn :: Lens.Lens' AssociateWebsiteAuthorizationProvider Prelude.Text
associateWebsiteAuthorizationProvider_fleetArn :: (Text -> f Text)
-> AssociateWebsiteAuthorizationProvider
-> f AssociateWebsiteAuthorizationProvider
associateWebsiteAuthorizationProvider_fleetArn = (AssociateWebsiteAuthorizationProvider -> Text)
-> (AssociateWebsiteAuthorizationProvider
    -> Text -> AssociateWebsiteAuthorizationProvider)
-> Lens
     AssociateWebsiteAuthorizationProvider
     AssociateWebsiteAuthorizationProvider
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateWebsiteAuthorizationProvider' {Text
fleetArn :: Text
$sel:fleetArn:AssociateWebsiteAuthorizationProvider' :: AssociateWebsiteAuthorizationProvider -> Text
fleetArn} -> Text
fleetArn) (\s :: AssociateWebsiteAuthorizationProvider
s@AssociateWebsiteAuthorizationProvider' {} Text
a -> AssociateWebsiteAuthorizationProvider
s {$sel:fleetArn:AssociateWebsiteAuthorizationProvider' :: Text
fleetArn = Text
a} :: AssociateWebsiteAuthorizationProvider)

-- | The authorization provider type.
associateWebsiteAuthorizationProvider_authorizationProviderType :: Lens.Lens' AssociateWebsiteAuthorizationProvider AuthorizationProviderType
associateWebsiteAuthorizationProvider_authorizationProviderType :: (AuthorizationProviderType -> f AuthorizationProviderType)
-> AssociateWebsiteAuthorizationProvider
-> f AssociateWebsiteAuthorizationProvider
associateWebsiteAuthorizationProvider_authorizationProviderType = (AssociateWebsiteAuthorizationProvider
 -> AuthorizationProviderType)
-> (AssociateWebsiteAuthorizationProvider
    -> AuthorizationProviderType
    -> AssociateWebsiteAuthorizationProvider)
-> Lens
     AssociateWebsiteAuthorizationProvider
     AssociateWebsiteAuthorizationProvider
     AuthorizationProviderType
     AuthorizationProviderType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateWebsiteAuthorizationProvider' {AuthorizationProviderType
authorizationProviderType :: AuthorizationProviderType
$sel:authorizationProviderType:AssociateWebsiteAuthorizationProvider' :: AssociateWebsiteAuthorizationProvider -> AuthorizationProviderType
authorizationProviderType} -> AuthorizationProviderType
authorizationProviderType) (\s :: AssociateWebsiteAuthorizationProvider
s@AssociateWebsiteAuthorizationProvider' {} AuthorizationProviderType
a -> AssociateWebsiteAuthorizationProvider
s {$sel:authorizationProviderType:AssociateWebsiteAuthorizationProvider' :: AuthorizationProviderType
authorizationProviderType = AuthorizationProviderType
a} :: AssociateWebsiteAuthorizationProvider)

instance
  Core.AWSRequest
    AssociateWebsiteAuthorizationProvider
  where
  type
    AWSResponse
      AssociateWebsiteAuthorizationProvider =
      AssociateWebsiteAuthorizationProviderResponse
  request :: AssociateWebsiteAuthorizationProvider
-> Request AssociateWebsiteAuthorizationProvider
request = Service
-> AssociateWebsiteAuthorizationProvider
-> Request AssociateWebsiteAuthorizationProvider
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AssociateWebsiteAuthorizationProvider
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse AssociateWebsiteAuthorizationProvider)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse AssociateWebsiteAuthorizationProvider))
-> Logger
-> Service
-> Proxy AssociateWebsiteAuthorizationProvider
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse AssociateWebsiteAuthorizationProvider)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> AssociateWebsiteAuthorizationProviderResponse
AssociateWebsiteAuthorizationProviderResponse'
            (Maybe Text
 -> Int -> AssociateWebsiteAuthorizationProviderResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> AssociateWebsiteAuthorizationProviderResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AuthorizationProviderId")
              Either
  String (Int -> AssociateWebsiteAuthorizationProviderResponse)
-> Either String Int
-> Either String AssociateWebsiteAuthorizationProviderResponse
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
    AssociateWebsiteAuthorizationProvider

instance
  Prelude.NFData
    AssociateWebsiteAuthorizationProvider

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

instance
  Core.ToJSON
    AssociateWebsiteAuthorizationProvider
  where
  toJSON :: AssociateWebsiteAuthorizationProvider -> Value
toJSON AssociateWebsiteAuthorizationProvider' {Maybe Text
Text
AuthorizationProviderType
authorizationProviderType :: AuthorizationProviderType
fleetArn :: Text
domainName :: Maybe Text
$sel:authorizationProviderType:AssociateWebsiteAuthorizationProvider' :: AssociateWebsiteAuthorizationProvider -> AuthorizationProviderType
$sel:fleetArn:AssociateWebsiteAuthorizationProvider' :: AssociateWebsiteAuthorizationProvider -> Text
$sel:domainName:AssociateWebsiteAuthorizationProvider' :: AssociateWebsiteAuthorizationProvider -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
domainName,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FleetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"AuthorizationProviderType"
                  Text -> AuthorizationProviderType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AuthorizationProviderType
authorizationProviderType
              )
          ]
      )

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

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

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

-- |
-- Create a value of 'AssociateWebsiteAuthorizationProviderResponse' 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:
--
-- 'authorizationProviderId', 'associateWebsiteAuthorizationProviderResponse_authorizationProviderId' - A unique identifier for the authorization provider.
--
-- 'httpStatus', 'associateWebsiteAuthorizationProviderResponse_httpStatus' - The response's http status code.
newAssociateWebsiteAuthorizationProviderResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateWebsiteAuthorizationProviderResponse
newAssociateWebsiteAuthorizationProviderResponse :: Int -> AssociateWebsiteAuthorizationProviderResponse
newAssociateWebsiteAuthorizationProviderResponse
  Int
pHttpStatus_ =
    AssociateWebsiteAuthorizationProviderResponse' :: Maybe Text -> Int -> AssociateWebsiteAuthorizationProviderResponse
AssociateWebsiteAuthorizationProviderResponse'
      { $sel:authorizationProviderId:AssociateWebsiteAuthorizationProviderResponse' :: Maybe Text
authorizationProviderId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AssociateWebsiteAuthorizationProviderResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A unique identifier for the authorization provider.
associateWebsiteAuthorizationProviderResponse_authorizationProviderId :: Lens.Lens' AssociateWebsiteAuthorizationProviderResponse (Prelude.Maybe Prelude.Text)
associateWebsiteAuthorizationProviderResponse_authorizationProviderId :: (Maybe Text -> f (Maybe Text))
-> AssociateWebsiteAuthorizationProviderResponse
-> f AssociateWebsiteAuthorizationProviderResponse
associateWebsiteAuthorizationProviderResponse_authorizationProviderId = (AssociateWebsiteAuthorizationProviderResponse -> Maybe Text)
-> (AssociateWebsiteAuthorizationProviderResponse
    -> Maybe Text -> AssociateWebsiteAuthorizationProviderResponse)
-> Lens
     AssociateWebsiteAuthorizationProviderResponse
     AssociateWebsiteAuthorizationProviderResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateWebsiteAuthorizationProviderResponse' {Maybe Text
authorizationProviderId :: Maybe Text
$sel:authorizationProviderId:AssociateWebsiteAuthorizationProviderResponse' :: AssociateWebsiteAuthorizationProviderResponse -> Maybe Text
authorizationProviderId} -> Maybe Text
authorizationProviderId) (\s :: AssociateWebsiteAuthorizationProviderResponse
s@AssociateWebsiteAuthorizationProviderResponse' {} Maybe Text
a -> AssociateWebsiteAuthorizationProviderResponse
s {$sel:authorizationProviderId:AssociateWebsiteAuthorizationProviderResponse' :: Maybe Text
authorizationProviderId = Maybe Text
a} :: AssociateWebsiteAuthorizationProviderResponse)

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

instance
  Prelude.NFData
    AssociateWebsiteAuthorizationProviderResponse