{-# 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.VpcConfigResponse
-- 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.EKS.Types.VpcConfigResponse where

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

-- | An object representing an Amazon EKS cluster VPC configuration response.
--
-- /See:/ 'newVpcConfigResponse' smart constructor.
data VpcConfigResponse = VpcConfigResponse'
  { -- | The security groups associated with the cross-account elastic network
    -- interfaces that are used to allow communication between your nodes and
    -- the Kubernetes control plane.
    VpcConfigResponse -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | This parameter indicates whether the Amazon EKS private API server
    -- endpoint is enabled. If the Amazon EKS private API server endpoint is
    -- enabled, Kubernetes API requests that originate from within your
    -- cluster\'s VPC use the private VPC endpoint instead of traversing the
    -- internet. If this value is disabled and you have nodes or Fargate pods
    -- in the cluster, then ensure that @publicAccessCidrs@ includes the
    -- necessary CIDR blocks for communication with the nodes or Fargate pods.
    -- For more information, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html Amazon EKS cluster endpoint access control>
    -- in the //Amazon EKS User Guide// .
    VpcConfigResponse -> Maybe Bool
endpointPrivateAccess :: Prelude.Maybe Prelude.Bool,
    -- | The CIDR blocks that are allowed access to your cluster\'s public
    -- Kubernetes API server endpoint. Communication to the endpoint from
    -- addresses outside of the listed CIDR blocks is denied. The default value
    -- is @0.0.0.0\/0@. If you\'ve disabled private endpoint access and you
    -- have nodes or Fargate pods in the cluster, then ensure that the
    -- necessary CIDR blocks are listed. For more information, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html Amazon EKS cluster endpoint access control>
    -- in the //Amazon EKS User Guide// .
    VpcConfigResponse -> Maybe [Text]
publicAccessCidrs :: Prelude.Maybe [Prelude.Text],
    -- | The subnets associated with your cluster.
    VpcConfigResponse -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The VPC associated with your cluster.
    VpcConfigResponse -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | The cluster security group that was created by Amazon EKS for the
    -- cluster. Managed node groups use this security group for
    -- control-plane-to-data-plane communication.
    VpcConfigResponse -> Maybe Text
clusterSecurityGroupId :: Prelude.Maybe Prelude.Text,
    -- | This parameter indicates whether the Amazon EKS public API server
    -- endpoint is enabled. If the Amazon EKS public API server endpoint is
    -- disabled, your cluster\'s Kubernetes API server can only receive
    -- requests that originate from within the cluster VPC.
    VpcConfigResponse -> Maybe Bool
endpointPublicAccess :: Prelude.Maybe Prelude.Bool
  }
  deriving (VpcConfigResponse -> VpcConfigResponse -> Bool
(VpcConfigResponse -> VpcConfigResponse -> Bool)
-> (VpcConfigResponse -> VpcConfigResponse -> Bool)
-> Eq VpcConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcConfigResponse -> VpcConfigResponse -> Bool
$c/= :: VpcConfigResponse -> VpcConfigResponse -> Bool
== :: VpcConfigResponse -> VpcConfigResponse -> Bool
$c== :: VpcConfigResponse -> VpcConfigResponse -> Bool
Prelude.Eq, ReadPrec [VpcConfigResponse]
ReadPrec VpcConfigResponse
Int -> ReadS VpcConfigResponse
ReadS [VpcConfigResponse]
(Int -> ReadS VpcConfigResponse)
-> ReadS [VpcConfigResponse]
-> ReadPrec VpcConfigResponse
-> ReadPrec [VpcConfigResponse]
-> Read VpcConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcConfigResponse]
$creadListPrec :: ReadPrec [VpcConfigResponse]
readPrec :: ReadPrec VpcConfigResponse
$creadPrec :: ReadPrec VpcConfigResponse
readList :: ReadS [VpcConfigResponse]
$creadList :: ReadS [VpcConfigResponse]
readsPrec :: Int -> ReadS VpcConfigResponse
$creadsPrec :: Int -> ReadS VpcConfigResponse
Prelude.Read, Int -> VpcConfigResponse -> ShowS
[VpcConfigResponse] -> ShowS
VpcConfigResponse -> String
(Int -> VpcConfigResponse -> ShowS)
-> (VpcConfigResponse -> String)
-> ([VpcConfigResponse] -> ShowS)
-> Show VpcConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcConfigResponse] -> ShowS
$cshowList :: [VpcConfigResponse] -> ShowS
show :: VpcConfigResponse -> String
$cshow :: VpcConfigResponse -> String
showsPrec :: Int -> VpcConfigResponse -> ShowS
$cshowsPrec :: Int -> VpcConfigResponse -> ShowS
Prelude.Show, (forall x. VpcConfigResponse -> Rep VpcConfigResponse x)
-> (forall x. Rep VpcConfigResponse x -> VpcConfigResponse)
-> Generic VpcConfigResponse
forall x. Rep VpcConfigResponse x -> VpcConfigResponse
forall x. VpcConfigResponse -> Rep VpcConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcConfigResponse x -> VpcConfigResponse
$cfrom :: forall x. VpcConfigResponse -> Rep VpcConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'VpcConfigResponse' 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:
--
-- 'securityGroupIds', 'vpcConfigResponse_securityGroupIds' - The security groups associated with the cross-account elastic network
-- interfaces that are used to allow communication between your nodes and
-- the Kubernetes control plane.
--
-- 'endpointPrivateAccess', 'vpcConfigResponse_endpointPrivateAccess' - This parameter indicates whether the Amazon EKS private API server
-- endpoint is enabled. If the Amazon EKS private API server endpoint is
-- enabled, Kubernetes API requests that originate from within your
-- cluster\'s VPC use the private VPC endpoint instead of traversing the
-- internet. If this value is disabled and you have nodes or Fargate pods
-- in the cluster, then ensure that @publicAccessCidrs@ includes the
-- necessary CIDR blocks for communication with the nodes or Fargate pods.
-- For more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html Amazon EKS cluster endpoint access control>
-- in the //Amazon EKS User Guide// .
--
-- 'publicAccessCidrs', 'vpcConfigResponse_publicAccessCidrs' - The CIDR blocks that are allowed access to your cluster\'s public
-- Kubernetes API server endpoint. Communication to the endpoint from
-- addresses outside of the listed CIDR blocks is denied. The default value
-- is @0.0.0.0\/0@. If you\'ve disabled private endpoint access and you
-- have nodes or Fargate pods in the cluster, then ensure that the
-- necessary CIDR blocks are listed. For more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html Amazon EKS cluster endpoint access control>
-- in the //Amazon EKS User Guide// .
--
-- 'subnetIds', 'vpcConfigResponse_subnetIds' - The subnets associated with your cluster.
--
-- 'vpcId', 'vpcConfigResponse_vpcId' - The VPC associated with your cluster.
--
-- 'clusterSecurityGroupId', 'vpcConfigResponse_clusterSecurityGroupId' - The cluster security group that was created by Amazon EKS for the
-- cluster. Managed node groups use this security group for
-- control-plane-to-data-plane communication.
--
-- 'endpointPublicAccess', 'vpcConfigResponse_endpointPublicAccess' - This parameter indicates whether the Amazon EKS public API server
-- endpoint is enabled. If the Amazon EKS public API server endpoint is
-- disabled, your cluster\'s Kubernetes API server can only receive
-- requests that originate from within the cluster VPC.
newVpcConfigResponse ::
  VpcConfigResponse
newVpcConfigResponse :: VpcConfigResponse
newVpcConfigResponse =
  VpcConfigResponse' :: Maybe [Text]
-> Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> VpcConfigResponse
VpcConfigResponse'
    { $sel:securityGroupIds:VpcConfigResponse' :: Maybe [Text]
securityGroupIds =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointPrivateAccess:VpcConfigResponse' :: Maybe Bool
endpointPrivateAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:publicAccessCidrs:VpcConfigResponse' :: Maybe [Text]
publicAccessCidrs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:VpcConfigResponse' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:VpcConfigResponse' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterSecurityGroupId:VpcConfigResponse' :: Maybe Text
clusterSecurityGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointPublicAccess:VpcConfigResponse' :: Maybe Bool
endpointPublicAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The security groups associated with the cross-account elastic network
-- interfaces that are used to allow communication between your nodes and
-- the Kubernetes control plane.
vpcConfigResponse_securityGroupIds :: Lens.Lens' VpcConfigResponse (Prelude.Maybe [Prelude.Text])
vpcConfigResponse_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigResponse -> f VpcConfigResponse
vpcConfigResponse_securityGroupIds = (VpcConfigResponse -> Maybe [Text])
-> (VpcConfigResponse -> Maybe [Text] -> VpcConfigResponse)
-> Lens
     VpcConfigResponse VpcConfigResponse (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigResponse' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:VpcConfigResponse' :: VpcConfigResponse -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: VpcConfigResponse
s@VpcConfigResponse' {} Maybe [Text]
a -> VpcConfigResponse
s {$sel:securityGroupIds:VpcConfigResponse' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: VpcConfigResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> VpcConfigResponse -> f VpcConfigResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigResponse
-> f VpcConfigResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | This parameter indicates whether the Amazon EKS private API server
-- endpoint is enabled. If the Amazon EKS private API server endpoint is
-- enabled, Kubernetes API requests that originate from within your
-- cluster\'s VPC use the private VPC endpoint instead of traversing the
-- internet. If this value is disabled and you have nodes or Fargate pods
-- in the cluster, then ensure that @publicAccessCidrs@ includes the
-- necessary CIDR blocks for communication with the nodes or Fargate pods.
-- For more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html Amazon EKS cluster endpoint access control>
-- in the //Amazon EKS User Guide// .
vpcConfigResponse_endpointPrivateAccess :: Lens.Lens' VpcConfigResponse (Prelude.Maybe Prelude.Bool)
vpcConfigResponse_endpointPrivateAccess :: (Maybe Bool -> f (Maybe Bool))
-> VpcConfigResponse -> f VpcConfigResponse
vpcConfigResponse_endpointPrivateAccess = (VpcConfigResponse -> Maybe Bool)
-> (VpcConfigResponse -> Maybe Bool -> VpcConfigResponse)
-> Lens
     VpcConfigResponse VpcConfigResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigResponse' {Maybe Bool
endpointPrivateAccess :: Maybe Bool
$sel:endpointPrivateAccess:VpcConfigResponse' :: VpcConfigResponse -> Maybe Bool
endpointPrivateAccess} -> Maybe Bool
endpointPrivateAccess) (\s :: VpcConfigResponse
s@VpcConfigResponse' {} Maybe Bool
a -> VpcConfigResponse
s {$sel:endpointPrivateAccess:VpcConfigResponse' :: Maybe Bool
endpointPrivateAccess = Maybe Bool
a} :: VpcConfigResponse)

-- | The CIDR blocks that are allowed access to your cluster\'s public
-- Kubernetes API server endpoint. Communication to the endpoint from
-- addresses outside of the listed CIDR blocks is denied. The default value
-- is @0.0.0.0\/0@. If you\'ve disabled private endpoint access and you
-- have nodes or Fargate pods in the cluster, then ensure that the
-- necessary CIDR blocks are listed. For more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html Amazon EKS cluster endpoint access control>
-- in the //Amazon EKS User Guide// .
vpcConfigResponse_publicAccessCidrs :: Lens.Lens' VpcConfigResponse (Prelude.Maybe [Prelude.Text])
vpcConfigResponse_publicAccessCidrs :: (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigResponse -> f VpcConfigResponse
vpcConfigResponse_publicAccessCidrs = (VpcConfigResponse -> Maybe [Text])
-> (VpcConfigResponse -> Maybe [Text] -> VpcConfigResponse)
-> Lens
     VpcConfigResponse VpcConfigResponse (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigResponse' {Maybe [Text]
publicAccessCidrs :: Maybe [Text]
$sel:publicAccessCidrs:VpcConfigResponse' :: VpcConfigResponse -> Maybe [Text]
publicAccessCidrs} -> Maybe [Text]
publicAccessCidrs) (\s :: VpcConfigResponse
s@VpcConfigResponse' {} Maybe [Text]
a -> VpcConfigResponse
s {$sel:publicAccessCidrs:VpcConfigResponse' :: Maybe [Text]
publicAccessCidrs = Maybe [Text]
a} :: VpcConfigResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> VpcConfigResponse -> f VpcConfigResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigResponse
-> f VpcConfigResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The subnets associated with your cluster.
vpcConfigResponse_subnetIds :: Lens.Lens' VpcConfigResponse (Prelude.Maybe [Prelude.Text])
vpcConfigResponse_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigResponse -> f VpcConfigResponse
vpcConfigResponse_subnetIds = (VpcConfigResponse -> Maybe [Text])
-> (VpcConfigResponse -> Maybe [Text] -> VpcConfigResponse)
-> Lens
     VpcConfigResponse VpcConfigResponse (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigResponse' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:VpcConfigResponse' :: VpcConfigResponse -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: VpcConfigResponse
s@VpcConfigResponse' {} Maybe [Text]
a -> VpcConfigResponse
s {$sel:subnetIds:VpcConfigResponse' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: VpcConfigResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> VpcConfigResponse -> f VpcConfigResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigResponse
-> f VpcConfigResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The VPC associated with your cluster.
vpcConfigResponse_vpcId :: Lens.Lens' VpcConfigResponse (Prelude.Maybe Prelude.Text)
vpcConfigResponse_vpcId :: (Maybe Text -> f (Maybe Text))
-> VpcConfigResponse -> f VpcConfigResponse
vpcConfigResponse_vpcId = (VpcConfigResponse -> Maybe Text)
-> (VpcConfigResponse -> Maybe Text -> VpcConfigResponse)
-> Lens
     VpcConfigResponse VpcConfigResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigResponse' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:VpcConfigResponse' :: VpcConfigResponse -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: VpcConfigResponse
s@VpcConfigResponse' {} Maybe Text
a -> VpcConfigResponse
s {$sel:vpcId:VpcConfigResponse' :: Maybe Text
vpcId = Maybe Text
a} :: VpcConfigResponse)

-- | The cluster security group that was created by Amazon EKS for the
-- cluster. Managed node groups use this security group for
-- control-plane-to-data-plane communication.
vpcConfigResponse_clusterSecurityGroupId :: Lens.Lens' VpcConfigResponse (Prelude.Maybe Prelude.Text)
vpcConfigResponse_clusterSecurityGroupId :: (Maybe Text -> f (Maybe Text))
-> VpcConfigResponse -> f VpcConfigResponse
vpcConfigResponse_clusterSecurityGroupId = (VpcConfigResponse -> Maybe Text)
-> (VpcConfigResponse -> Maybe Text -> VpcConfigResponse)
-> Lens
     VpcConfigResponse VpcConfigResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigResponse' {Maybe Text
clusterSecurityGroupId :: Maybe Text
$sel:clusterSecurityGroupId:VpcConfigResponse' :: VpcConfigResponse -> Maybe Text
clusterSecurityGroupId} -> Maybe Text
clusterSecurityGroupId) (\s :: VpcConfigResponse
s@VpcConfigResponse' {} Maybe Text
a -> VpcConfigResponse
s {$sel:clusterSecurityGroupId:VpcConfigResponse' :: Maybe Text
clusterSecurityGroupId = Maybe Text
a} :: VpcConfigResponse)

-- | This parameter indicates whether the Amazon EKS public API server
-- endpoint is enabled. If the Amazon EKS public API server endpoint is
-- disabled, your cluster\'s Kubernetes API server can only receive
-- requests that originate from within the cluster VPC.
vpcConfigResponse_endpointPublicAccess :: Lens.Lens' VpcConfigResponse (Prelude.Maybe Prelude.Bool)
vpcConfigResponse_endpointPublicAccess :: (Maybe Bool -> f (Maybe Bool))
-> VpcConfigResponse -> f VpcConfigResponse
vpcConfigResponse_endpointPublicAccess = (VpcConfigResponse -> Maybe Bool)
-> (VpcConfigResponse -> Maybe Bool -> VpcConfigResponse)
-> Lens
     VpcConfigResponse VpcConfigResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigResponse' {Maybe Bool
endpointPublicAccess :: Maybe Bool
$sel:endpointPublicAccess:VpcConfigResponse' :: VpcConfigResponse -> Maybe Bool
endpointPublicAccess} -> Maybe Bool
endpointPublicAccess) (\s :: VpcConfigResponse
s@VpcConfigResponse' {} Maybe Bool
a -> VpcConfigResponse
s {$sel:endpointPublicAccess:VpcConfigResponse' :: Maybe Bool
endpointPublicAccess = Maybe Bool
a} :: VpcConfigResponse)

instance Core.FromJSON VpcConfigResponse where
  parseJSON :: Value -> Parser VpcConfigResponse
parseJSON =
    String
-> (Object -> Parser VpcConfigResponse)
-> Value
-> Parser VpcConfigResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VpcConfigResponse"
      ( \Object
x ->
          Maybe [Text]
-> Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> VpcConfigResponse
VpcConfigResponse'
            (Maybe [Text]
 -> Maybe Bool
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> VpcConfigResponse)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> VpcConfigResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"securityGroupIds"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Bool
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> VpcConfigResponse)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> VpcConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"endpointPrivateAccess")
            Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> VpcConfigResponse)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe Text -> Maybe Text -> Maybe Bool -> VpcConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"publicAccessCidrs"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [Text]
   -> Maybe Text -> Maybe Text -> Maybe Bool -> VpcConfigResponse)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Bool -> VpcConfigResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"subnetIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text -> Maybe Text -> Maybe Bool -> VpcConfigResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Bool -> VpcConfigResponse)
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
"vpcId")
            Parser (Maybe Text -> Maybe Bool -> VpcConfigResponse)
-> Parser (Maybe Text) -> Parser (Maybe Bool -> VpcConfigResponse)
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
"clusterSecurityGroupId")
            Parser (Maybe Bool -> VpcConfigResponse)
-> Parser (Maybe Bool) -> Parser VpcConfigResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"endpointPublicAccess")
      )

instance Prelude.Hashable VpcConfigResponse

instance Prelude.NFData VpcConfigResponse