{-# 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.SecurityHub.Types.AwsEksClusterDetails
-- 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)
module Amazonka.SecurityHub.Types.AwsEksClusterDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEksClusterLoggingDetails
import Amazonka.SecurityHub.Types.AwsEksClusterResourcesVpcConfigDetails

-- | Provides details about an Amazon EKS cluster.
--
-- /See:/ 'newAwsEksClusterDetails' smart constructor.
data AwsEksClusterDetails = AwsEksClusterDetails'
  { -- | The ARN of the cluster.
    AwsEksClusterDetails -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The certificate authority data for the cluster.
    AwsEksClusterDetails -> Maybe Text
certificateAuthorityData :: Prelude.Maybe Prelude.Text,
    -- | The name of the cluster.
    AwsEksClusterDetails -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon EKS server version for the cluster.
    AwsEksClusterDetails -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The logging configuration for the cluster.
    AwsEksClusterDetails -> Maybe AwsEksClusterLoggingDetails
logging :: Prelude.Maybe AwsEksClusterLoggingDetails,
    -- | The endpoint for the Amazon EKS API server.
    AwsEksClusterDetails -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
    -- | The VPC configuration used by the cluster control plane.
    AwsEksClusterDetails
-> Maybe AwsEksClusterResourcesVpcConfigDetails
resourcesVpcConfig :: Prelude.Maybe AwsEksClusterResourcesVpcConfigDetails,
    -- | The status of the cluster.
    AwsEksClusterDetails -> Maybe Text
clusterStatus :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the IAM role that provides permissions for the Amazon EKS
    -- control plane to make calls to Amazon Web Services API operations on
    -- your behalf.
    AwsEksClusterDetails -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsEksClusterDetails -> AwsEksClusterDetails -> Bool
(AwsEksClusterDetails -> AwsEksClusterDetails -> Bool)
-> (AwsEksClusterDetails -> AwsEksClusterDetails -> Bool)
-> Eq AwsEksClusterDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEksClusterDetails -> AwsEksClusterDetails -> Bool
$c/= :: AwsEksClusterDetails -> AwsEksClusterDetails -> Bool
== :: AwsEksClusterDetails -> AwsEksClusterDetails -> Bool
$c== :: AwsEksClusterDetails -> AwsEksClusterDetails -> Bool
Prelude.Eq, ReadPrec [AwsEksClusterDetails]
ReadPrec AwsEksClusterDetails
Int -> ReadS AwsEksClusterDetails
ReadS [AwsEksClusterDetails]
(Int -> ReadS AwsEksClusterDetails)
-> ReadS [AwsEksClusterDetails]
-> ReadPrec AwsEksClusterDetails
-> ReadPrec [AwsEksClusterDetails]
-> Read AwsEksClusterDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEksClusterDetails]
$creadListPrec :: ReadPrec [AwsEksClusterDetails]
readPrec :: ReadPrec AwsEksClusterDetails
$creadPrec :: ReadPrec AwsEksClusterDetails
readList :: ReadS [AwsEksClusterDetails]
$creadList :: ReadS [AwsEksClusterDetails]
readsPrec :: Int -> ReadS AwsEksClusterDetails
$creadsPrec :: Int -> ReadS AwsEksClusterDetails
Prelude.Read, Int -> AwsEksClusterDetails -> ShowS
[AwsEksClusterDetails] -> ShowS
AwsEksClusterDetails -> String
(Int -> AwsEksClusterDetails -> ShowS)
-> (AwsEksClusterDetails -> String)
-> ([AwsEksClusterDetails] -> ShowS)
-> Show AwsEksClusterDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEksClusterDetails] -> ShowS
$cshowList :: [AwsEksClusterDetails] -> ShowS
show :: AwsEksClusterDetails -> String
$cshow :: AwsEksClusterDetails -> String
showsPrec :: Int -> AwsEksClusterDetails -> ShowS
$cshowsPrec :: Int -> AwsEksClusterDetails -> ShowS
Prelude.Show, (forall x. AwsEksClusterDetails -> Rep AwsEksClusterDetails x)
-> (forall x. Rep AwsEksClusterDetails x -> AwsEksClusterDetails)
-> Generic AwsEksClusterDetails
forall x. Rep AwsEksClusterDetails x -> AwsEksClusterDetails
forall x. AwsEksClusterDetails -> Rep AwsEksClusterDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AwsEksClusterDetails x -> AwsEksClusterDetails
$cfrom :: forall x. AwsEksClusterDetails -> Rep AwsEksClusterDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEksClusterDetails' 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:
--
-- 'arn', 'awsEksClusterDetails_arn' - The ARN of the cluster.
--
-- 'certificateAuthorityData', 'awsEksClusterDetails_certificateAuthorityData' - The certificate authority data for the cluster.
--
-- 'name', 'awsEksClusterDetails_name' - The name of the cluster.
--
-- 'version', 'awsEksClusterDetails_version' - The Amazon EKS server version for the cluster.
--
-- 'logging', 'awsEksClusterDetails_logging' - The logging configuration for the cluster.
--
-- 'endpoint', 'awsEksClusterDetails_endpoint' - The endpoint for the Amazon EKS API server.
--
-- 'resourcesVpcConfig', 'awsEksClusterDetails_resourcesVpcConfig' - The VPC configuration used by the cluster control plane.
--
-- 'clusterStatus', 'awsEksClusterDetails_clusterStatus' - The status of the cluster.
--
-- 'roleArn', 'awsEksClusterDetails_roleArn' - The ARN of the IAM role that provides permissions for the Amazon EKS
-- control plane to make calls to Amazon Web Services API operations on
-- your behalf.
newAwsEksClusterDetails ::
  AwsEksClusterDetails
newAwsEksClusterDetails :: AwsEksClusterDetails
newAwsEksClusterDetails =
  AwsEksClusterDetails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsEksClusterLoggingDetails
-> Maybe Text
-> Maybe AwsEksClusterResourcesVpcConfigDetails
-> Maybe Text
-> Maybe Text
-> AwsEksClusterDetails
AwsEksClusterDetails'
    { $sel:arn:AwsEksClusterDetails' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateAuthorityData:AwsEksClusterDetails' :: Maybe Text
certificateAuthorityData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:AwsEksClusterDetails' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:AwsEksClusterDetails' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logging:AwsEksClusterDetails' :: Maybe AwsEksClusterLoggingDetails
logging = Maybe AwsEksClusterLoggingDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:AwsEksClusterDetails' :: Maybe Text
endpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourcesVpcConfig:AwsEksClusterDetails' :: Maybe AwsEksClusterResourcesVpcConfigDetails
resourcesVpcConfig = Maybe AwsEksClusterResourcesVpcConfigDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterStatus:AwsEksClusterDetails' :: Maybe Text
clusterStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:AwsEksClusterDetails' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the cluster.
awsEksClusterDetails_arn :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe Prelude.Text)
awsEksClusterDetails_arn :: (Maybe Text -> f (Maybe Text))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_arn = (AwsEksClusterDetails -> Maybe Text)
-> (AwsEksClusterDetails -> Maybe Text -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails AwsEksClusterDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe Text
arn :: Maybe Text
$sel:arn:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
arn} -> Maybe Text
arn) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe Text
a -> AwsEksClusterDetails
s {$sel:arn:AwsEksClusterDetails' :: Maybe Text
arn = Maybe Text
a} :: AwsEksClusterDetails)

-- | The certificate authority data for the cluster.
awsEksClusterDetails_certificateAuthorityData :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe Prelude.Text)
awsEksClusterDetails_certificateAuthorityData :: (Maybe Text -> f (Maybe Text))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_certificateAuthorityData = (AwsEksClusterDetails -> Maybe Text)
-> (AwsEksClusterDetails -> Maybe Text -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails AwsEksClusterDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe Text
certificateAuthorityData :: Maybe Text
$sel:certificateAuthorityData:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
certificateAuthorityData} -> Maybe Text
certificateAuthorityData) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe Text
a -> AwsEksClusterDetails
s {$sel:certificateAuthorityData:AwsEksClusterDetails' :: Maybe Text
certificateAuthorityData = Maybe Text
a} :: AwsEksClusterDetails)

-- | The name of the cluster.
awsEksClusterDetails_name :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe Prelude.Text)
awsEksClusterDetails_name :: (Maybe Text -> f (Maybe Text))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_name = (AwsEksClusterDetails -> Maybe Text)
-> (AwsEksClusterDetails -> Maybe Text -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails AwsEksClusterDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe Text
name :: Maybe Text
$sel:name:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
name} -> Maybe Text
name) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe Text
a -> AwsEksClusterDetails
s {$sel:name:AwsEksClusterDetails' :: Maybe Text
name = Maybe Text
a} :: AwsEksClusterDetails)

-- | The Amazon EKS server version for the cluster.
awsEksClusterDetails_version :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe Prelude.Text)
awsEksClusterDetails_version :: (Maybe Text -> f (Maybe Text))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_version = (AwsEksClusterDetails -> Maybe Text)
-> (AwsEksClusterDetails -> Maybe Text -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails AwsEksClusterDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe Text
version :: Maybe Text
$sel:version:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
version} -> Maybe Text
version) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe Text
a -> AwsEksClusterDetails
s {$sel:version:AwsEksClusterDetails' :: Maybe Text
version = Maybe Text
a} :: AwsEksClusterDetails)

-- | The logging configuration for the cluster.
awsEksClusterDetails_logging :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe AwsEksClusterLoggingDetails)
awsEksClusterDetails_logging :: (Maybe AwsEksClusterLoggingDetails
 -> f (Maybe AwsEksClusterLoggingDetails))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_logging = (AwsEksClusterDetails -> Maybe AwsEksClusterLoggingDetails)
-> (AwsEksClusterDetails
    -> Maybe AwsEksClusterLoggingDetails -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails
     AwsEksClusterDetails
     (Maybe AwsEksClusterLoggingDetails)
     (Maybe AwsEksClusterLoggingDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe AwsEksClusterLoggingDetails
logging :: Maybe AwsEksClusterLoggingDetails
$sel:logging:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe AwsEksClusterLoggingDetails
logging} -> Maybe AwsEksClusterLoggingDetails
logging) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe AwsEksClusterLoggingDetails
a -> AwsEksClusterDetails
s {$sel:logging:AwsEksClusterDetails' :: Maybe AwsEksClusterLoggingDetails
logging = Maybe AwsEksClusterLoggingDetails
a} :: AwsEksClusterDetails)

-- | The endpoint for the Amazon EKS API server.
awsEksClusterDetails_endpoint :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe Prelude.Text)
awsEksClusterDetails_endpoint :: (Maybe Text -> f (Maybe Text))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_endpoint = (AwsEksClusterDetails -> Maybe Text)
-> (AwsEksClusterDetails -> Maybe Text -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails AwsEksClusterDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe Text
a -> AwsEksClusterDetails
s {$sel:endpoint:AwsEksClusterDetails' :: Maybe Text
endpoint = Maybe Text
a} :: AwsEksClusterDetails)

-- | The VPC configuration used by the cluster control plane.
awsEksClusterDetails_resourcesVpcConfig :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe AwsEksClusterResourcesVpcConfigDetails)
awsEksClusterDetails_resourcesVpcConfig :: (Maybe AwsEksClusterResourcesVpcConfigDetails
 -> f (Maybe AwsEksClusterResourcesVpcConfigDetails))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_resourcesVpcConfig = (AwsEksClusterDetails
 -> Maybe AwsEksClusterResourcesVpcConfigDetails)
-> (AwsEksClusterDetails
    -> Maybe AwsEksClusterResourcesVpcConfigDetails
    -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails
     AwsEksClusterDetails
     (Maybe AwsEksClusterResourcesVpcConfigDetails)
     (Maybe AwsEksClusterResourcesVpcConfigDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe AwsEksClusterResourcesVpcConfigDetails
resourcesVpcConfig :: Maybe AwsEksClusterResourcesVpcConfigDetails
$sel:resourcesVpcConfig:AwsEksClusterDetails' :: AwsEksClusterDetails
-> Maybe AwsEksClusterResourcesVpcConfigDetails
resourcesVpcConfig} -> Maybe AwsEksClusterResourcesVpcConfigDetails
resourcesVpcConfig) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe AwsEksClusterResourcesVpcConfigDetails
a -> AwsEksClusterDetails
s {$sel:resourcesVpcConfig:AwsEksClusterDetails' :: Maybe AwsEksClusterResourcesVpcConfigDetails
resourcesVpcConfig = Maybe AwsEksClusterResourcesVpcConfigDetails
a} :: AwsEksClusterDetails)

-- | The status of the cluster.
awsEksClusterDetails_clusterStatus :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe Prelude.Text)
awsEksClusterDetails_clusterStatus :: (Maybe Text -> f (Maybe Text))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_clusterStatus = (AwsEksClusterDetails -> Maybe Text)
-> (AwsEksClusterDetails -> Maybe Text -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails AwsEksClusterDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe Text
clusterStatus :: Maybe Text
$sel:clusterStatus:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
clusterStatus} -> Maybe Text
clusterStatus) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe Text
a -> AwsEksClusterDetails
s {$sel:clusterStatus:AwsEksClusterDetails' :: Maybe Text
clusterStatus = Maybe Text
a} :: AwsEksClusterDetails)

-- | The ARN of the IAM role that provides permissions for the Amazon EKS
-- control plane to make calls to Amazon Web Services API operations on
-- your behalf.
awsEksClusterDetails_roleArn :: Lens.Lens' AwsEksClusterDetails (Prelude.Maybe Prelude.Text)
awsEksClusterDetails_roleArn :: (Maybe Text -> f (Maybe Text))
-> AwsEksClusterDetails -> f AwsEksClusterDetails
awsEksClusterDetails_roleArn = (AwsEksClusterDetails -> Maybe Text)
-> (AwsEksClusterDetails -> Maybe Text -> AwsEksClusterDetails)
-> Lens
     AwsEksClusterDetails AwsEksClusterDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterDetails' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: AwsEksClusterDetails
s@AwsEksClusterDetails' {} Maybe Text
a -> AwsEksClusterDetails
s {$sel:roleArn:AwsEksClusterDetails' :: Maybe Text
roleArn = Maybe Text
a} :: AwsEksClusterDetails)

instance Core.FromJSON AwsEksClusterDetails where
  parseJSON :: Value -> Parser AwsEksClusterDetails
parseJSON =
    String
-> (Object -> Parser AwsEksClusterDetails)
-> Value
-> Parser AwsEksClusterDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEksClusterDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsEksClusterLoggingDetails
-> Maybe Text
-> Maybe AwsEksClusterResourcesVpcConfigDetails
-> Maybe Text
-> Maybe Text
-> AwsEksClusterDetails
AwsEksClusterDetails'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe AwsEksClusterLoggingDetails
 -> Maybe Text
 -> Maybe AwsEksClusterResourcesVpcConfigDetails
 -> Maybe Text
 -> Maybe Text
 -> AwsEksClusterDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AwsEksClusterLoggingDetails
      -> Maybe Text
      -> Maybe AwsEksClusterResourcesVpcConfigDetails
      -> Maybe Text
      -> Maybe Text
      -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AwsEksClusterLoggingDetails
   -> Maybe Text
   -> Maybe AwsEksClusterResourcesVpcConfigDetails
   -> Maybe Text
   -> Maybe Text
   -> AwsEksClusterDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AwsEksClusterLoggingDetails
      -> Maybe Text
      -> Maybe AwsEksClusterResourcesVpcConfigDetails
      -> Maybe Text
      -> Maybe Text
      -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateAuthorityData")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AwsEksClusterLoggingDetails
   -> Maybe Text
   -> Maybe AwsEksClusterResourcesVpcConfigDetails
   -> Maybe Text
   -> Maybe Text
   -> AwsEksClusterDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AwsEksClusterLoggingDetails
      -> Maybe Text
      -> Maybe AwsEksClusterResourcesVpcConfigDetails
      -> Maybe Text
      -> Maybe Text
      -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Text
   -> Maybe AwsEksClusterLoggingDetails
   -> Maybe Text
   -> Maybe AwsEksClusterResourcesVpcConfigDetails
   -> Maybe Text
   -> Maybe Text
   -> AwsEksClusterDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe AwsEksClusterLoggingDetails
      -> Maybe Text
      -> Maybe AwsEksClusterResourcesVpcConfigDetails
      -> Maybe Text
      -> Maybe Text
      -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
            Parser
  (Maybe AwsEksClusterLoggingDetails
   -> Maybe Text
   -> Maybe AwsEksClusterResourcesVpcConfigDetails
   -> Maybe Text
   -> Maybe Text
   -> AwsEksClusterDetails)
-> Parser (Maybe AwsEksClusterLoggingDetails)
-> Parser
     (Maybe Text
      -> Maybe AwsEksClusterResourcesVpcConfigDetails
      -> Maybe Text
      -> Maybe Text
      -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsEksClusterLoggingDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Logging")
            Parser
  (Maybe Text
   -> Maybe AwsEksClusterResourcesVpcConfigDetails
   -> Maybe Text
   -> Maybe Text
   -> AwsEksClusterDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe AwsEksClusterResourcesVpcConfigDetails
      -> Maybe Text -> Maybe Text -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Endpoint")
            Parser
  (Maybe AwsEksClusterResourcesVpcConfigDetails
   -> Maybe Text -> Maybe Text -> AwsEksClusterDetails)
-> Parser (Maybe AwsEksClusterResourcesVpcConfigDetails)
-> Parser (Maybe Text -> Maybe Text -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AwsEksClusterResourcesVpcConfigDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourcesVpcConfig")
            Parser (Maybe Text -> Maybe Text -> AwsEksClusterDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsEksClusterDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClusterStatus")
            Parser (Maybe Text -> AwsEksClusterDetails)
-> Parser (Maybe Text) -> Parser AwsEksClusterDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoleArn")
      )

instance Prelude.Hashable AwsEksClusterDetails

instance Prelude.NFData AwsEksClusterDetails

instance Core.ToJSON AwsEksClusterDetails where
  toJSON :: AwsEksClusterDetails -> Value
toJSON AwsEksClusterDetails' {Maybe Text
Maybe AwsEksClusterLoggingDetails
Maybe AwsEksClusterResourcesVpcConfigDetails
roleArn :: Maybe Text
clusterStatus :: Maybe Text
resourcesVpcConfig :: Maybe AwsEksClusterResourcesVpcConfigDetails
endpoint :: Maybe Text
logging :: Maybe AwsEksClusterLoggingDetails
version :: Maybe Text
name :: Maybe Text
certificateAuthorityData :: Maybe Text
arn :: Maybe Text
$sel:roleArn:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
$sel:clusterStatus:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
$sel:resourcesVpcConfig:AwsEksClusterDetails' :: AwsEksClusterDetails
-> Maybe AwsEksClusterResourcesVpcConfigDetails
$sel:endpoint:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
$sel:logging:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe AwsEksClusterLoggingDetails
$sel:version:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
$sel:name:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
$sel:certificateAuthorityData:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
$sel:arn:AwsEksClusterDetails' :: AwsEksClusterDetails -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Arn" 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
arn,
            (Text
"CertificateAuthorityData" 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
certificateAuthorityData,
            (Text
"Name" 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
name,
            (Text
"Version" 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
version,
            (Text
"Logging" Text -> AwsEksClusterLoggingDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsEksClusterLoggingDetails -> Pair)
-> Maybe AwsEksClusterLoggingDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsEksClusterLoggingDetails
logging,
            (Text
"Endpoint" 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
endpoint,
            (Text
"ResourcesVpcConfig" Text -> AwsEksClusterResourcesVpcConfigDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsEksClusterResourcesVpcConfigDetails -> Pair)
-> Maybe AwsEksClusterResourcesVpcConfigDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsEksClusterResourcesVpcConfigDetails
resourcesVpcConfig,
            (Text
"ClusterStatus" 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
clusterStatus,
            (Text
"RoleArn" 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
roleArn
          ]
      )