{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.EKS.Types.ConnectorConfigRequest where
import qualified Amazonka.Core as Core
import Amazonka.EKS.Types.ConnectorConfigProvider
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConnectorConfigRequest = ConnectorConfigRequest'
{
ConnectorConfigRequest -> Text
roleArn :: Prelude.Text,
ConnectorConfigRequest -> ConnectorConfigProvider
provider :: ConnectorConfigProvider
}
deriving (ConnectorConfigRequest -> ConnectorConfigRequest -> Bool
(ConnectorConfigRequest -> ConnectorConfigRequest -> Bool)
-> (ConnectorConfigRequest -> ConnectorConfigRequest -> Bool)
-> Eq ConnectorConfigRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectorConfigRequest -> ConnectorConfigRequest -> Bool
$c/= :: ConnectorConfigRequest -> ConnectorConfigRequest -> Bool
== :: ConnectorConfigRequest -> ConnectorConfigRequest -> Bool
$c== :: ConnectorConfigRequest -> ConnectorConfigRequest -> Bool
Prelude.Eq, ReadPrec [ConnectorConfigRequest]
ReadPrec ConnectorConfigRequest
Int -> ReadS ConnectorConfigRequest
ReadS [ConnectorConfigRequest]
(Int -> ReadS ConnectorConfigRequest)
-> ReadS [ConnectorConfigRequest]
-> ReadPrec ConnectorConfigRequest
-> ReadPrec [ConnectorConfigRequest]
-> Read ConnectorConfigRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectorConfigRequest]
$creadListPrec :: ReadPrec [ConnectorConfigRequest]
readPrec :: ReadPrec ConnectorConfigRequest
$creadPrec :: ReadPrec ConnectorConfigRequest
readList :: ReadS [ConnectorConfigRequest]
$creadList :: ReadS [ConnectorConfigRequest]
readsPrec :: Int -> ReadS ConnectorConfigRequest
$creadsPrec :: Int -> ReadS ConnectorConfigRequest
Prelude.Read, Int -> ConnectorConfigRequest -> ShowS
[ConnectorConfigRequest] -> ShowS
ConnectorConfigRequest -> String
(Int -> ConnectorConfigRequest -> ShowS)
-> (ConnectorConfigRequest -> String)
-> ([ConnectorConfigRequest] -> ShowS)
-> Show ConnectorConfigRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectorConfigRequest] -> ShowS
$cshowList :: [ConnectorConfigRequest] -> ShowS
show :: ConnectorConfigRequest -> String
$cshow :: ConnectorConfigRequest -> String
showsPrec :: Int -> ConnectorConfigRequest -> ShowS
$cshowsPrec :: Int -> ConnectorConfigRequest -> ShowS
Prelude.Show, (forall x. ConnectorConfigRequest -> Rep ConnectorConfigRequest x)
-> (forall x.
Rep ConnectorConfigRequest x -> ConnectorConfigRequest)
-> Generic ConnectorConfigRequest
forall x. Rep ConnectorConfigRequest x -> ConnectorConfigRequest
forall x. ConnectorConfigRequest -> Rep ConnectorConfigRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectorConfigRequest x -> ConnectorConfigRequest
$cfrom :: forall x. ConnectorConfigRequest -> Rep ConnectorConfigRequest x
Prelude.Generic)
newConnectorConfigRequest ::
Prelude.Text ->
ConnectorConfigProvider ->
ConnectorConfigRequest
newConnectorConfigRequest :: Text -> ConnectorConfigProvider -> ConnectorConfigRequest
newConnectorConfigRequest Text
pRoleArn_ ConnectorConfigProvider
pProvider_ =
ConnectorConfigRequest' :: Text -> ConnectorConfigProvider -> ConnectorConfigRequest
ConnectorConfigRequest'
{ $sel:roleArn:ConnectorConfigRequest' :: Text
roleArn = Text
pRoleArn_,
$sel:provider:ConnectorConfigRequest' :: ConnectorConfigProvider
provider = ConnectorConfigProvider
pProvider_
}
connectorConfigRequest_roleArn :: Lens.Lens' ConnectorConfigRequest Prelude.Text
connectorConfigRequest_roleArn :: (Text -> f Text)
-> ConnectorConfigRequest -> f ConnectorConfigRequest
connectorConfigRequest_roleArn = (ConnectorConfigRequest -> Text)
-> (ConnectorConfigRequest -> Text -> ConnectorConfigRequest)
-> Lens ConnectorConfigRequest ConnectorConfigRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorConfigRequest' {Text
roleArn :: Text
$sel:roleArn:ConnectorConfigRequest' :: ConnectorConfigRequest -> Text
roleArn} -> Text
roleArn) (\s :: ConnectorConfigRequest
s@ConnectorConfigRequest' {} Text
a -> ConnectorConfigRequest
s {$sel:roleArn:ConnectorConfigRequest' :: Text
roleArn = Text
a} :: ConnectorConfigRequest)
connectorConfigRequest_provider :: Lens.Lens' ConnectorConfigRequest ConnectorConfigProvider
connectorConfigRequest_provider :: (ConnectorConfigProvider -> f ConnectorConfigProvider)
-> ConnectorConfigRequest -> f ConnectorConfigRequest
connectorConfigRequest_provider = (ConnectorConfigRequest -> ConnectorConfigProvider)
-> (ConnectorConfigRequest
-> ConnectorConfigProvider -> ConnectorConfigRequest)
-> Lens
ConnectorConfigRequest
ConnectorConfigRequest
ConnectorConfigProvider
ConnectorConfigProvider
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectorConfigRequest' {ConnectorConfigProvider
provider :: ConnectorConfigProvider
$sel:provider:ConnectorConfigRequest' :: ConnectorConfigRequest -> ConnectorConfigProvider
provider} -> ConnectorConfigProvider
provider) (\s :: ConnectorConfigRequest
s@ConnectorConfigRequest' {} ConnectorConfigProvider
a -> ConnectorConfigRequest
s {$sel:provider:ConnectorConfigRequest' :: ConnectorConfigProvider
provider = ConnectorConfigProvider
a} :: ConnectorConfigRequest)
instance Prelude.Hashable ConnectorConfigRequest
instance Prelude.NFData ConnectorConfigRequest
instance Core.ToJSON ConnectorConfigRequest where
toJSON :: ConnectorConfigRequest -> Value
toJSON ConnectorConfigRequest' {Text
ConnectorConfigProvider
provider :: ConnectorConfigProvider
roleArn :: Text
$sel:provider:ConnectorConfigRequest' :: ConnectorConfigRequest -> ConnectorConfigProvider
$sel:roleArn:ConnectorConfigRequest' :: ConnectorConfigRequest -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"roleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"provider" Text -> ConnectorConfigProvider -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ConnectorConfigProvider
provider)
]
)