{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EKS.Types.ControlPlanePlacementResponse
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EKS.Types.ControlPlanePlacementResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The placement configuration for all the control plane instances of your
-- local Amazon EKS cluster on an Amazon Web Services Outpost. For more
-- information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html Capacity considerations>
-- in the /Amazon EKS User Guide/.
--
-- /See:/ 'newControlPlanePlacementResponse' smart constructor.
data ControlPlanePlacementResponse = ControlPlanePlacementResponse'
  { -- | The name of the placement group for the Kubernetes control plane
    -- instances.
    ControlPlanePlacementResponse -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text
  }
  deriving (ControlPlanePlacementResponse
-> ControlPlanePlacementResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ControlPlanePlacementResponse
-> ControlPlanePlacementResponse -> Bool
$c/= :: ControlPlanePlacementResponse
-> ControlPlanePlacementResponse -> Bool
== :: ControlPlanePlacementResponse
-> ControlPlanePlacementResponse -> Bool
$c== :: ControlPlanePlacementResponse
-> ControlPlanePlacementResponse -> Bool
Prelude.Eq, ReadPrec [ControlPlanePlacementResponse]
ReadPrec ControlPlanePlacementResponse
Int -> ReadS ControlPlanePlacementResponse
ReadS [ControlPlanePlacementResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ControlPlanePlacementResponse]
$creadListPrec :: ReadPrec [ControlPlanePlacementResponse]
readPrec :: ReadPrec ControlPlanePlacementResponse
$creadPrec :: ReadPrec ControlPlanePlacementResponse
readList :: ReadS [ControlPlanePlacementResponse]
$creadList :: ReadS [ControlPlanePlacementResponse]
readsPrec :: Int -> ReadS ControlPlanePlacementResponse
$creadsPrec :: Int -> ReadS ControlPlanePlacementResponse
Prelude.Read, Int -> ControlPlanePlacementResponse -> ShowS
[ControlPlanePlacementResponse] -> ShowS
ControlPlanePlacementResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ControlPlanePlacementResponse] -> ShowS
$cshowList :: [ControlPlanePlacementResponse] -> ShowS
show :: ControlPlanePlacementResponse -> String
$cshow :: ControlPlanePlacementResponse -> String
showsPrec :: Int -> ControlPlanePlacementResponse -> ShowS
$cshowsPrec :: Int -> ControlPlanePlacementResponse -> ShowS
Prelude.Show, forall x.
Rep ControlPlanePlacementResponse x
-> ControlPlanePlacementResponse
forall x.
ControlPlanePlacementResponse
-> Rep ControlPlanePlacementResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ControlPlanePlacementResponse x
-> ControlPlanePlacementResponse
$cfrom :: forall x.
ControlPlanePlacementResponse
-> Rep ControlPlanePlacementResponse x
Prelude.Generic)

-- |
-- Create a value of 'ControlPlanePlacementResponse' 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:
--
-- 'groupName', 'controlPlanePlacementResponse_groupName' - The name of the placement group for the Kubernetes control plane
-- instances.
newControlPlanePlacementResponse ::
  ControlPlanePlacementResponse
newControlPlanePlacementResponse :: ControlPlanePlacementResponse
newControlPlanePlacementResponse =
  ControlPlanePlacementResponse'
    { $sel:groupName:ControlPlanePlacementResponse' :: Maybe Text
groupName =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the placement group for the Kubernetes control plane
-- instances.
controlPlanePlacementResponse_groupName :: Lens.Lens' ControlPlanePlacementResponse (Prelude.Maybe Prelude.Text)
controlPlanePlacementResponse_groupName :: Lens' ControlPlanePlacementResponse (Maybe Text)
controlPlanePlacementResponse_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlPlanePlacementResponse' {Maybe Text
groupName :: Maybe Text
$sel:groupName:ControlPlanePlacementResponse' :: ControlPlanePlacementResponse -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: ControlPlanePlacementResponse
s@ControlPlanePlacementResponse' {} Maybe Text
a -> ControlPlanePlacementResponse
s {$sel:groupName:ControlPlanePlacementResponse' :: Maybe Text
groupName = Maybe Text
a} :: ControlPlanePlacementResponse)

instance Data.FromJSON ControlPlanePlacementResponse where
  parseJSON :: Value -> Parser ControlPlanePlacementResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ControlPlanePlacementResponse"
      ( \Object
x ->
          Maybe Text -> ControlPlanePlacementResponse
ControlPlanePlacementResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"groupName")
      )

instance
  Prelude.Hashable
    ControlPlanePlacementResponse
  where
  hashWithSalt :: Int -> ControlPlanePlacementResponse -> Int
hashWithSalt Int
_salt ControlPlanePlacementResponse' {Maybe Text
groupName :: Maybe Text
$sel:groupName:ControlPlanePlacementResponse' :: ControlPlanePlacementResponse -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName

instance Prelude.NFData ControlPlanePlacementResponse where
  rnf :: ControlPlanePlacementResponse -> ()
rnf ControlPlanePlacementResponse' {Maybe Text
groupName :: Maybe Text
$sel:groupName:ControlPlanePlacementResponse' :: ControlPlanePlacementResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupName