{-# 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.OutpostConfigResponse
-- 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.OutpostConfigResponse 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.ControlPlanePlacementResponse
import qualified Amazonka.Prelude as Prelude

-- | An object representing the configuration of your local Amazon EKS
-- cluster on an Amazon Web Services Outpost. This API isn\'t available for
-- Amazon EKS clusters on the Amazon Web Services cloud.
--
-- /See:/ 'newOutpostConfigResponse' smart constructor.
data OutpostConfigResponse = OutpostConfigResponse'
  { -- | An object representing 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/.
    OutpostConfigResponse -> Maybe ControlPlanePlacementResponse
controlPlanePlacement :: Prelude.Maybe ControlPlanePlacementResponse,
    -- | The ARN of the Outpost that you specified for use with your local Amazon
    -- EKS cluster on Outposts.
    OutpostConfigResponse -> [Text]
outpostArns :: [Prelude.Text],
    -- | The Amazon EC2 instance type used for the control plane. The instance
    -- type is the same for all control plane instances.
    OutpostConfigResponse -> Text
controlPlaneInstanceType :: Prelude.Text
  }
  deriving (OutpostConfigResponse -> OutpostConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutpostConfigResponse -> OutpostConfigResponse -> Bool
$c/= :: OutpostConfigResponse -> OutpostConfigResponse -> Bool
== :: OutpostConfigResponse -> OutpostConfigResponse -> Bool
$c== :: OutpostConfigResponse -> OutpostConfigResponse -> Bool
Prelude.Eq, ReadPrec [OutpostConfigResponse]
ReadPrec OutpostConfigResponse
Int -> ReadS OutpostConfigResponse
ReadS [OutpostConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutpostConfigResponse]
$creadListPrec :: ReadPrec [OutpostConfigResponse]
readPrec :: ReadPrec OutpostConfigResponse
$creadPrec :: ReadPrec OutpostConfigResponse
readList :: ReadS [OutpostConfigResponse]
$creadList :: ReadS [OutpostConfigResponse]
readsPrec :: Int -> ReadS OutpostConfigResponse
$creadsPrec :: Int -> ReadS OutpostConfigResponse
Prelude.Read, Int -> OutpostConfigResponse -> ShowS
[OutpostConfigResponse] -> ShowS
OutpostConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutpostConfigResponse] -> ShowS
$cshowList :: [OutpostConfigResponse] -> ShowS
show :: OutpostConfigResponse -> String
$cshow :: OutpostConfigResponse -> String
showsPrec :: Int -> OutpostConfigResponse -> ShowS
$cshowsPrec :: Int -> OutpostConfigResponse -> ShowS
Prelude.Show, forall x. Rep OutpostConfigResponse x -> OutpostConfigResponse
forall x. OutpostConfigResponse -> Rep OutpostConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutpostConfigResponse x -> OutpostConfigResponse
$cfrom :: forall x. OutpostConfigResponse -> Rep OutpostConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'OutpostConfigResponse' 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:
--
-- 'controlPlanePlacement', 'outpostConfigResponse_controlPlanePlacement' - An object representing 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/.
--
-- 'outpostArns', 'outpostConfigResponse_outpostArns' - The ARN of the Outpost that you specified for use with your local Amazon
-- EKS cluster on Outposts.
--
-- 'controlPlaneInstanceType', 'outpostConfigResponse_controlPlaneInstanceType' - The Amazon EC2 instance type used for the control plane. The instance
-- type is the same for all control plane instances.
newOutpostConfigResponse ::
  -- | 'controlPlaneInstanceType'
  Prelude.Text ->
  OutpostConfigResponse
newOutpostConfigResponse :: Text -> OutpostConfigResponse
newOutpostConfigResponse Text
pControlPlaneInstanceType_ =
  OutpostConfigResponse'
    { $sel:controlPlanePlacement:OutpostConfigResponse' :: Maybe ControlPlanePlacementResponse
controlPlanePlacement =
        forall a. Maybe a
Prelude.Nothing,
      $sel:outpostArns:OutpostConfigResponse' :: [Text]
outpostArns = forall a. Monoid a => a
Prelude.mempty,
      $sel:controlPlaneInstanceType:OutpostConfigResponse' :: Text
controlPlaneInstanceType =
        Text
pControlPlaneInstanceType_
    }

-- | An object representing 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/.
outpostConfigResponse_controlPlanePlacement :: Lens.Lens' OutpostConfigResponse (Prelude.Maybe ControlPlanePlacementResponse)
outpostConfigResponse_controlPlanePlacement :: Lens' OutpostConfigResponse (Maybe ControlPlanePlacementResponse)
outpostConfigResponse_controlPlanePlacement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutpostConfigResponse' {Maybe ControlPlanePlacementResponse
controlPlanePlacement :: Maybe ControlPlanePlacementResponse
$sel:controlPlanePlacement:OutpostConfigResponse' :: OutpostConfigResponse -> Maybe ControlPlanePlacementResponse
controlPlanePlacement} -> Maybe ControlPlanePlacementResponse
controlPlanePlacement) (\s :: OutpostConfigResponse
s@OutpostConfigResponse' {} Maybe ControlPlanePlacementResponse
a -> OutpostConfigResponse
s {$sel:controlPlanePlacement:OutpostConfigResponse' :: Maybe ControlPlanePlacementResponse
controlPlanePlacement = Maybe ControlPlanePlacementResponse
a} :: OutpostConfigResponse)

-- | The ARN of the Outpost that you specified for use with your local Amazon
-- EKS cluster on Outposts.
outpostConfigResponse_outpostArns :: Lens.Lens' OutpostConfigResponse [Prelude.Text]
outpostConfigResponse_outpostArns :: Lens' OutpostConfigResponse [Text]
outpostConfigResponse_outpostArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutpostConfigResponse' {[Text]
outpostArns :: [Text]
$sel:outpostArns:OutpostConfigResponse' :: OutpostConfigResponse -> [Text]
outpostArns} -> [Text]
outpostArns) (\s :: OutpostConfigResponse
s@OutpostConfigResponse' {} [Text]
a -> OutpostConfigResponse
s {$sel:outpostArns:OutpostConfigResponse' :: [Text]
outpostArns = [Text]
a} :: OutpostConfigResponse) 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

-- | The Amazon EC2 instance type used for the control plane. The instance
-- type is the same for all control plane instances.
outpostConfigResponse_controlPlaneInstanceType :: Lens.Lens' OutpostConfigResponse Prelude.Text
outpostConfigResponse_controlPlaneInstanceType :: Lens' OutpostConfigResponse Text
outpostConfigResponse_controlPlaneInstanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutpostConfigResponse' {Text
controlPlaneInstanceType :: Text
$sel:controlPlaneInstanceType:OutpostConfigResponse' :: OutpostConfigResponse -> Text
controlPlaneInstanceType} -> Text
controlPlaneInstanceType) (\s :: OutpostConfigResponse
s@OutpostConfigResponse' {} Text
a -> OutpostConfigResponse
s {$sel:controlPlaneInstanceType:OutpostConfigResponse' :: Text
controlPlaneInstanceType = Text
a} :: OutpostConfigResponse)

instance Data.FromJSON OutpostConfigResponse where
  parseJSON :: Value -> Parser OutpostConfigResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"OutpostConfigResponse"
      ( \Object
x ->
          Maybe ControlPlanePlacementResponse
-> [Text] -> Text -> OutpostConfigResponse
OutpostConfigResponse'
            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
"controlPlanePlacement")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"outpostArns" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= 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 -> Parser a
Data..: Key
"controlPlaneInstanceType")
      )

instance Prelude.Hashable OutpostConfigResponse where
  hashWithSalt :: Int -> OutpostConfigResponse -> Int
hashWithSalt Int
_salt OutpostConfigResponse' {[Text]
Maybe ControlPlanePlacementResponse
Text
controlPlaneInstanceType :: Text
outpostArns :: [Text]
controlPlanePlacement :: Maybe ControlPlanePlacementResponse
$sel:controlPlaneInstanceType:OutpostConfigResponse' :: OutpostConfigResponse -> Text
$sel:outpostArns:OutpostConfigResponse' :: OutpostConfigResponse -> [Text]
$sel:controlPlanePlacement:OutpostConfigResponse' :: OutpostConfigResponse -> Maybe ControlPlanePlacementResponse
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ControlPlanePlacementResponse
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 OutpostConfigResponse where
  rnf :: OutpostConfigResponse -> ()
rnf OutpostConfigResponse' {[Text]
Maybe ControlPlanePlacementResponse
Text
controlPlaneInstanceType :: Text
outpostArns :: [Text]
controlPlanePlacement :: Maybe ControlPlanePlacementResponse
$sel:controlPlaneInstanceType:OutpostConfigResponse' :: OutpostConfigResponse -> Text
$sel:outpostArns:OutpostConfigResponse' :: OutpostConfigResponse -> [Text]
$sel:controlPlanePlacement:OutpostConfigResponse' :: OutpostConfigResponse -> Maybe ControlPlanePlacementResponse
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ControlPlanePlacementResponse
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