{-# 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.OutpostConfigRequest 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.ControlPlanePlacementRequest
import qualified Amazonka.Prelude as Prelude
data OutpostConfigRequest = OutpostConfigRequest'
{
OutpostConfigRequest -> Maybe ControlPlanePlacementRequest
controlPlanePlacement :: Prelude.Maybe ControlPlanePlacementRequest,
OutpostConfigRequest -> [Text]
outpostArns :: [Prelude.Text],
OutpostConfigRequest -> Text
controlPlaneInstanceType :: Prelude.Text
}
deriving (OutpostConfigRequest -> OutpostConfigRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutpostConfigRequest -> OutpostConfigRequest -> Bool
$c/= :: OutpostConfigRequest -> OutpostConfigRequest -> Bool
== :: OutpostConfigRequest -> OutpostConfigRequest -> Bool
$c== :: OutpostConfigRequest -> OutpostConfigRequest -> Bool
Prelude.Eq, ReadPrec [OutpostConfigRequest]
ReadPrec OutpostConfigRequest
Int -> ReadS OutpostConfigRequest
ReadS [OutpostConfigRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutpostConfigRequest]
$creadListPrec :: ReadPrec [OutpostConfigRequest]
readPrec :: ReadPrec OutpostConfigRequest
$creadPrec :: ReadPrec OutpostConfigRequest
readList :: ReadS [OutpostConfigRequest]
$creadList :: ReadS [OutpostConfigRequest]
readsPrec :: Int -> ReadS OutpostConfigRequest
$creadsPrec :: Int -> ReadS OutpostConfigRequest
Prelude.Read, Int -> OutpostConfigRequest -> ShowS
[OutpostConfigRequest] -> ShowS
OutpostConfigRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutpostConfigRequest] -> ShowS
$cshowList :: [OutpostConfigRequest] -> ShowS
show :: OutpostConfigRequest -> String
$cshow :: OutpostConfigRequest -> String
showsPrec :: Int -> OutpostConfigRequest -> ShowS
$cshowsPrec :: Int -> OutpostConfigRequest -> ShowS
Prelude.Show, forall x. Rep OutpostConfigRequest x -> OutpostConfigRequest
forall x. OutpostConfigRequest -> Rep OutpostConfigRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutpostConfigRequest x -> OutpostConfigRequest
$cfrom :: forall x. OutpostConfigRequest -> Rep OutpostConfigRequest x
Prelude.Generic)
newOutpostConfigRequest ::
Prelude.Text ->
OutpostConfigRequest
newOutpostConfigRequest :: Text -> OutpostConfigRequest
newOutpostConfigRequest Text
pControlPlaneInstanceType_ =
OutpostConfigRequest'
{ $sel:controlPlanePlacement:OutpostConfigRequest' :: Maybe ControlPlanePlacementRequest
controlPlanePlacement =
forall a. Maybe a
Prelude.Nothing,
$sel:outpostArns:OutpostConfigRequest' :: [Text]
outpostArns = forall a. Monoid a => a
Prelude.mempty,
$sel:controlPlaneInstanceType:OutpostConfigRequest' :: Text
controlPlaneInstanceType =
Text
pControlPlaneInstanceType_
}
outpostConfigRequest_controlPlanePlacement :: Lens.Lens' OutpostConfigRequest (Prelude.Maybe ControlPlanePlacementRequest)
outpostConfigRequest_controlPlanePlacement :: Lens' OutpostConfigRequest (Maybe ControlPlanePlacementRequest)
outpostConfigRequest_controlPlanePlacement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutpostConfigRequest' {Maybe ControlPlanePlacementRequest
controlPlanePlacement :: Maybe ControlPlanePlacementRequest
$sel:controlPlanePlacement:OutpostConfigRequest' :: OutpostConfigRequest -> Maybe ControlPlanePlacementRequest
controlPlanePlacement} -> Maybe ControlPlanePlacementRequest
controlPlanePlacement) (\s :: OutpostConfigRequest
s@OutpostConfigRequest' {} Maybe ControlPlanePlacementRequest
a -> OutpostConfigRequest
s {$sel:controlPlanePlacement:OutpostConfigRequest' :: Maybe ControlPlanePlacementRequest
controlPlanePlacement = Maybe ControlPlanePlacementRequest
a} :: OutpostConfigRequest)
outpostConfigRequest_outpostArns :: Lens.Lens' OutpostConfigRequest [Prelude.Text]
outpostConfigRequest_outpostArns :: Lens' OutpostConfigRequest [Text]
outpostConfigRequest_outpostArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutpostConfigRequest' {[Text]
outpostArns :: [Text]
$sel:outpostArns:OutpostConfigRequest' :: OutpostConfigRequest -> [Text]
outpostArns} -> [Text]
outpostArns) (\s :: OutpostConfigRequest
s@OutpostConfigRequest' {} [Text]
a -> OutpostConfigRequest
s {$sel:outpostArns:OutpostConfigRequest' :: [Text]
outpostArns = [Text]
a} :: OutpostConfigRequest) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
outpostConfigRequest_controlPlaneInstanceType :: Lens.Lens' OutpostConfigRequest Prelude.Text
outpostConfigRequest_controlPlaneInstanceType :: Lens' OutpostConfigRequest Text
outpostConfigRequest_controlPlaneInstanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutpostConfigRequest' {Text
controlPlaneInstanceType :: Text
$sel:controlPlaneInstanceType:OutpostConfigRequest' :: OutpostConfigRequest -> Text
controlPlaneInstanceType} -> Text
controlPlaneInstanceType) (\s :: OutpostConfigRequest
s@OutpostConfigRequest' {} Text
a -> OutpostConfigRequest
s {$sel:controlPlaneInstanceType:OutpostConfigRequest' :: Text
controlPlaneInstanceType = Text
a} :: OutpostConfigRequest)
instance Prelude.Hashable OutpostConfigRequest where
hashWithSalt :: Int -> OutpostConfigRequest -> Int
hashWithSalt Int
_salt OutpostConfigRequest' {[Text]
Maybe ControlPlanePlacementRequest
Text
controlPlaneInstanceType :: Text
outpostArns :: [Text]
controlPlanePlacement :: Maybe ControlPlanePlacementRequest
$sel:controlPlaneInstanceType:OutpostConfigRequest' :: OutpostConfigRequest -> Text
$sel:outpostArns:OutpostConfigRequest' :: OutpostConfigRequest -> [Text]
$sel:controlPlanePlacement:OutpostConfigRequest' :: OutpostConfigRequest -> Maybe ControlPlanePlacementRequest
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ControlPlanePlacementRequest
controlPlanePlacement
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
outpostArns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
controlPlaneInstanceType
instance Prelude.NFData OutpostConfigRequest where
rnf :: OutpostConfigRequest -> ()
rnf OutpostConfigRequest' {[Text]
Maybe ControlPlanePlacementRequest
Text
controlPlaneInstanceType :: Text
outpostArns :: [Text]
controlPlanePlacement :: Maybe ControlPlanePlacementRequest
$sel:controlPlaneInstanceType:OutpostConfigRequest' :: OutpostConfigRequest -> Text
$sel:outpostArns:OutpostConfigRequest' :: OutpostConfigRequest -> [Text]
$sel:controlPlanePlacement:OutpostConfigRequest' :: OutpostConfigRequest -> Maybe ControlPlanePlacementRequest
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ControlPlanePlacementRequest
controlPlanePlacement
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
outpostArns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
controlPlaneInstanceType
instance Data.ToJSON OutpostConfigRequest where
toJSON :: OutpostConfigRequest -> Value
toJSON OutpostConfigRequest' {[Text]
Maybe ControlPlanePlacementRequest
Text
controlPlaneInstanceType :: Text
outpostArns :: [Text]
controlPlanePlacement :: Maybe ControlPlanePlacementRequest
$sel:controlPlaneInstanceType:OutpostConfigRequest' :: OutpostConfigRequest -> Text
$sel:outpostArns:OutpostConfigRequest' :: OutpostConfigRequest -> [Text]
$sel:controlPlanePlacement:OutpostConfigRequest' :: OutpostConfigRequest -> Maybe ControlPlanePlacementRequest
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"controlPlanePlacement" 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 ControlPlanePlacementRequest
controlPlanePlacement,
forall a. a -> Maybe a
Prelude.Just (Key
"outpostArns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
outpostArns),
forall a. a -> Maybe a
Prelude.Just
( Key
"controlPlaneInstanceType"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
controlPlaneInstanceType
)
]
)