{-# 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.AwsEc2VpcEndpointServiceDetails
-- 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.AwsEc2VpcEndpointServiceDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEc2VpcEndpointServiceServiceTypeDetails

-- | Contains details about the service configuration for a VPC endpoint
-- service.
--
-- /See:/ 'newAwsEc2VpcEndpointServiceDetails' smart constructor.
data AwsEc2VpcEndpointServiceDetails = AwsEc2VpcEndpointServiceDetails'
  { -- | The ARNs of the Network Load Balancers for the service.
    AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
networkLoadBalancerArns :: Prelude.Maybe [Prelude.Text],
    -- | The DNS names for the service.
    AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
baseEndpointDnsNames :: Prelude.Maybe [Prelude.Text],
    -- | The Availability Zones where the service is available.
    AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | The ARNs of the Gateway Load Balancers for the service.
    AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
gatewayLoadBalancerArns :: Prelude.Maybe [Prelude.Text],
    -- | Whether the service manages its VPC endpoints.
    AwsEc2VpcEndpointServiceDetails -> Maybe Bool
managesVpcEndpoints :: Prelude.Maybe Prelude.Bool,
    -- | The name of the service.
    AwsEc2VpcEndpointServiceDetails -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
    -- | The current state of the service.
    AwsEc2VpcEndpointServiceDetails -> Maybe Text
serviceState :: Prelude.Maybe Prelude.Text,
    -- | The types for the service.
    AwsEc2VpcEndpointServiceDetails
-> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceType :: Prelude.Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails],
    -- | Whether requests from other Amazon Web Services accounts to create an
    -- endpoint to the service must first be accepted.
    AwsEc2VpcEndpointServiceDetails -> Maybe Bool
acceptanceRequired :: Prelude.Maybe Prelude.Bool,
    -- | The identifier of the service.
    AwsEc2VpcEndpointServiceDetails -> Maybe Text
serviceId :: Prelude.Maybe Prelude.Text,
    -- | The private DNS name for the service.
    AwsEc2VpcEndpointServiceDetails -> Maybe Text
privateDnsName :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsEc2VpcEndpointServiceDetails
-> AwsEc2VpcEndpointServiceDetails -> Bool
(AwsEc2VpcEndpointServiceDetails
 -> AwsEc2VpcEndpointServiceDetails -> Bool)
-> (AwsEc2VpcEndpointServiceDetails
    -> AwsEc2VpcEndpointServiceDetails -> Bool)
-> Eq AwsEc2VpcEndpointServiceDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEc2VpcEndpointServiceDetails
-> AwsEc2VpcEndpointServiceDetails -> Bool
$c/= :: AwsEc2VpcEndpointServiceDetails
-> AwsEc2VpcEndpointServiceDetails -> Bool
== :: AwsEc2VpcEndpointServiceDetails
-> AwsEc2VpcEndpointServiceDetails -> Bool
$c== :: AwsEc2VpcEndpointServiceDetails
-> AwsEc2VpcEndpointServiceDetails -> Bool
Prelude.Eq, ReadPrec [AwsEc2VpcEndpointServiceDetails]
ReadPrec AwsEc2VpcEndpointServiceDetails
Int -> ReadS AwsEc2VpcEndpointServiceDetails
ReadS [AwsEc2VpcEndpointServiceDetails]
(Int -> ReadS AwsEc2VpcEndpointServiceDetails)
-> ReadS [AwsEc2VpcEndpointServiceDetails]
-> ReadPrec AwsEc2VpcEndpointServiceDetails
-> ReadPrec [AwsEc2VpcEndpointServiceDetails]
-> Read AwsEc2VpcEndpointServiceDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEc2VpcEndpointServiceDetails]
$creadListPrec :: ReadPrec [AwsEc2VpcEndpointServiceDetails]
readPrec :: ReadPrec AwsEc2VpcEndpointServiceDetails
$creadPrec :: ReadPrec AwsEc2VpcEndpointServiceDetails
readList :: ReadS [AwsEc2VpcEndpointServiceDetails]
$creadList :: ReadS [AwsEc2VpcEndpointServiceDetails]
readsPrec :: Int -> ReadS AwsEc2VpcEndpointServiceDetails
$creadsPrec :: Int -> ReadS AwsEc2VpcEndpointServiceDetails
Prelude.Read, Int -> AwsEc2VpcEndpointServiceDetails -> ShowS
[AwsEc2VpcEndpointServiceDetails] -> ShowS
AwsEc2VpcEndpointServiceDetails -> String
(Int -> AwsEc2VpcEndpointServiceDetails -> ShowS)
-> (AwsEc2VpcEndpointServiceDetails -> String)
-> ([AwsEc2VpcEndpointServiceDetails] -> ShowS)
-> Show AwsEc2VpcEndpointServiceDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEc2VpcEndpointServiceDetails] -> ShowS
$cshowList :: [AwsEc2VpcEndpointServiceDetails] -> ShowS
show :: AwsEc2VpcEndpointServiceDetails -> String
$cshow :: AwsEc2VpcEndpointServiceDetails -> String
showsPrec :: Int -> AwsEc2VpcEndpointServiceDetails -> ShowS
$cshowsPrec :: Int -> AwsEc2VpcEndpointServiceDetails -> ShowS
Prelude.Show, (forall x.
 AwsEc2VpcEndpointServiceDetails
 -> Rep AwsEc2VpcEndpointServiceDetails x)
-> (forall x.
    Rep AwsEc2VpcEndpointServiceDetails x
    -> AwsEc2VpcEndpointServiceDetails)
-> Generic AwsEc2VpcEndpointServiceDetails
forall x.
Rep AwsEc2VpcEndpointServiceDetails x
-> AwsEc2VpcEndpointServiceDetails
forall x.
AwsEc2VpcEndpointServiceDetails
-> Rep AwsEc2VpcEndpointServiceDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEc2VpcEndpointServiceDetails x
-> AwsEc2VpcEndpointServiceDetails
$cfrom :: forall x.
AwsEc2VpcEndpointServiceDetails
-> Rep AwsEc2VpcEndpointServiceDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEc2VpcEndpointServiceDetails' 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:
--
-- 'networkLoadBalancerArns', 'awsEc2VpcEndpointServiceDetails_networkLoadBalancerArns' - The ARNs of the Network Load Balancers for the service.
--
-- 'baseEndpointDnsNames', 'awsEc2VpcEndpointServiceDetails_baseEndpointDnsNames' - The DNS names for the service.
--
-- 'availabilityZones', 'awsEc2VpcEndpointServiceDetails_availabilityZones' - The Availability Zones where the service is available.
--
-- 'gatewayLoadBalancerArns', 'awsEc2VpcEndpointServiceDetails_gatewayLoadBalancerArns' - The ARNs of the Gateway Load Balancers for the service.
--
-- 'managesVpcEndpoints', 'awsEc2VpcEndpointServiceDetails_managesVpcEndpoints' - Whether the service manages its VPC endpoints.
--
-- 'serviceName', 'awsEc2VpcEndpointServiceDetails_serviceName' - The name of the service.
--
-- 'serviceState', 'awsEc2VpcEndpointServiceDetails_serviceState' - The current state of the service.
--
-- 'serviceType', 'awsEc2VpcEndpointServiceDetails_serviceType' - The types for the service.
--
-- 'acceptanceRequired', 'awsEc2VpcEndpointServiceDetails_acceptanceRequired' - Whether requests from other Amazon Web Services accounts to create an
-- endpoint to the service must first be accepted.
--
-- 'serviceId', 'awsEc2VpcEndpointServiceDetails_serviceId' - The identifier of the service.
--
-- 'privateDnsName', 'awsEc2VpcEndpointServiceDetails_privateDnsName' - The private DNS name for the service.
newAwsEc2VpcEndpointServiceDetails ::
  AwsEc2VpcEndpointServiceDetails
newAwsEc2VpcEndpointServiceDetails :: AwsEc2VpcEndpointServiceDetails
newAwsEc2VpcEndpointServiceDetails =
  AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> AwsEc2VpcEndpointServiceDetails
AwsEc2VpcEndpointServiceDetails'
    { $sel:networkLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
networkLoadBalancerArns =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:baseEndpointDnsNames:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
baseEndpointDnsNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
gatewayLoadBalancerArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:managesVpcEndpoints:AwsEc2VpcEndpointServiceDetails' :: Maybe Bool
managesVpcEndpoints = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceName:AwsEc2VpcEndpointServiceDetails' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceState:AwsEc2VpcEndpointServiceDetails' :: Maybe Text
serviceState = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceType:AwsEc2VpcEndpointServiceDetails' :: Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceType = Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptanceRequired:AwsEc2VpcEndpointServiceDetails' :: Maybe Bool
acceptanceRequired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceId:AwsEc2VpcEndpointServiceDetails' :: Maybe Text
serviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:privateDnsName:AwsEc2VpcEndpointServiceDetails' :: Maybe Text
privateDnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARNs of the Network Load Balancers for the service.
awsEc2VpcEndpointServiceDetails_networkLoadBalancerArns :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpcEndpointServiceDetails_networkLoadBalancerArns :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_networkLoadBalancerArns = (AwsEc2VpcEndpointServiceDetails -> Maybe [Text])
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe [Text] -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe [Text]
networkLoadBalancerArns :: Maybe [Text]
$sel:networkLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
networkLoadBalancerArns} -> Maybe [Text]
networkLoadBalancerArns) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe [Text]
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:networkLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
networkLoadBalancerArns = Maybe [Text]
a} :: AwsEc2VpcEndpointServiceDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpcEndpointServiceDetails
 -> f AwsEc2VpcEndpointServiceDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
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 DNS names for the service.
awsEc2VpcEndpointServiceDetails_baseEndpointDnsNames :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpcEndpointServiceDetails_baseEndpointDnsNames :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_baseEndpointDnsNames = (AwsEc2VpcEndpointServiceDetails -> Maybe [Text])
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe [Text] -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe [Text]
baseEndpointDnsNames :: Maybe [Text]
$sel:baseEndpointDnsNames:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
baseEndpointDnsNames} -> Maybe [Text]
baseEndpointDnsNames) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe [Text]
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:baseEndpointDnsNames:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
baseEndpointDnsNames = Maybe [Text]
a} :: AwsEc2VpcEndpointServiceDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpcEndpointServiceDetails
 -> f AwsEc2VpcEndpointServiceDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
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 Availability Zones where the service is available.
awsEc2VpcEndpointServiceDetails_availabilityZones :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpcEndpointServiceDetails_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_availabilityZones = (AwsEc2VpcEndpointServiceDetails -> Maybe [Text])
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe [Text] -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe [Text]
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:availabilityZones:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: AwsEc2VpcEndpointServiceDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpcEndpointServiceDetails
 -> f AwsEc2VpcEndpointServiceDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
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 ARNs of the Gateway Load Balancers for the service.
awsEc2VpcEndpointServiceDetails_gatewayLoadBalancerArns :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpcEndpointServiceDetails_gatewayLoadBalancerArns :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_gatewayLoadBalancerArns = (AwsEc2VpcEndpointServiceDetails -> Maybe [Text])
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe [Text] -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe [Text]
gatewayLoadBalancerArns :: Maybe [Text]
$sel:gatewayLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
gatewayLoadBalancerArns} -> Maybe [Text]
gatewayLoadBalancerArns) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe [Text]
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:gatewayLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: Maybe [Text]
gatewayLoadBalancerArns = Maybe [Text]
a} :: AwsEc2VpcEndpointServiceDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpcEndpointServiceDetails
 -> f AwsEc2VpcEndpointServiceDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
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

-- | Whether the service manages its VPC endpoints.
awsEc2VpcEndpointServiceDetails_managesVpcEndpoints :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe Prelude.Bool)
awsEc2VpcEndpointServiceDetails_managesVpcEndpoints :: (Maybe Bool -> f (Maybe Bool))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_managesVpcEndpoints = (AwsEc2VpcEndpointServiceDetails -> Maybe Bool)
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe Bool -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe Bool
managesVpcEndpoints :: Maybe Bool
$sel:managesVpcEndpoints:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Bool
managesVpcEndpoints} -> Maybe Bool
managesVpcEndpoints) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe Bool
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:managesVpcEndpoints:AwsEc2VpcEndpointServiceDetails' :: Maybe Bool
managesVpcEndpoints = Maybe Bool
a} :: AwsEc2VpcEndpointServiceDetails)

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

-- | The current state of the service.
awsEc2VpcEndpointServiceDetails_serviceState :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe Prelude.Text)
awsEc2VpcEndpointServiceDetails_serviceState :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_serviceState = (AwsEc2VpcEndpointServiceDetails -> Maybe Text)
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe Text -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe Text
serviceState :: Maybe Text
$sel:serviceState:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Text
serviceState} -> Maybe Text
serviceState) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe Text
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:serviceState:AwsEc2VpcEndpointServiceDetails' :: Maybe Text
serviceState = Maybe Text
a} :: AwsEc2VpcEndpointServiceDetails)

-- | The types for the service.
awsEc2VpcEndpointServiceDetails_serviceType :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
awsEc2VpcEndpointServiceDetails_serviceType :: (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
 -> f (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_serviceType = (AwsEc2VpcEndpointServiceDetails
 -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
    -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
     (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceType :: Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
$sel:serviceType:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails
-> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceType} -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceType) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:serviceType:AwsEc2VpcEndpointServiceDetails' :: Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceType = Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
a} :: AwsEc2VpcEndpointServiceDetails) ((Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
  -> f (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]))
 -> AwsEc2VpcEndpointServiceDetails
 -> f AwsEc2VpcEndpointServiceDetails)
-> ((Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
     -> f (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]))
    -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
    -> f (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]))
-> (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
    -> f (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
-> Iso
     (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
     (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
     (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
     (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
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
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
  [AwsEc2VpcEndpointServiceServiceTypeDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Whether requests from other Amazon Web Services accounts to create an
-- endpoint to the service must first be accepted.
awsEc2VpcEndpointServiceDetails_acceptanceRequired :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe Prelude.Bool)
awsEc2VpcEndpointServiceDetails_acceptanceRequired :: (Maybe Bool -> f (Maybe Bool))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_acceptanceRequired = (AwsEc2VpcEndpointServiceDetails -> Maybe Bool)
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe Bool -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe Bool
acceptanceRequired :: Maybe Bool
$sel:acceptanceRequired:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Bool
acceptanceRequired} -> Maybe Bool
acceptanceRequired) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe Bool
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:acceptanceRequired:AwsEc2VpcEndpointServiceDetails' :: Maybe Bool
acceptanceRequired = Maybe Bool
a} :: AwsEc2VpcEndpointServiceDetails)

-- | The identifier of the service.
awsEc2VpcEndpointServiceDetails_serviceId :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe Prelude.Text)
awsEc2VpcEndpointServiceDetails_serviceId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_serviceId = (AwsEc2VpcEndpointServiceDetails -> Maybe Text)
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe Text -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe Text
serviceId :: Maybe Text
$sel:serviceId:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Text
serviceId} -> Maybe Text
serviceId) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe Text
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:serviceId:AwsEc2VpcEndpointServiceDetails' :: Maybe Text
serviceId = Maybe Text
a} :: AwsEc2VpcEndpointServiceDetails)

-- | The private DNS name for the service.
awsEc2VpcEndpointServiceDetails_privateDnsName :: Lens.Lens' AwsEc2VpcEndpointServiceDetails (Prelude.Maybe Prelude.Text)
awsEc2VpcEndpointServiceDetails_privateDnsName :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpcEndpointServiceDetails
-> f AwsEc2VpcEndpointServiceDetails
awsEc2VpcEndpointServiceDetails_privateDnsName = (AwsEc2VpcEndpointServiceDetails -> Maybe Text)
-> (AwsEc2VpcEndpointServiceDetails
    -> Maybe Text -> AwsEc2VpcEndpointServiceDetails)
-> Lens
     AwsEc2VpcEndpointServiceDetails
     AwsEc2VpcEndpointServiceDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpcEndpointServiceDetails' {Maybe Text
privateDnsName :: Maybe Text
$sel:privateDnsName:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Text
privateDnsName} -> Maybe Text
privateDnsName) (\s :: AwsEc2VpcEndpointServiceDetails
s@AwsEc2VpcEndpointServiceDetails' {} Maybe Text
a -> AwsEc2VpcEndpointServiceDetails
s {$sel:privateDnsName:AwsEc2VpcEndpointServiceDetails' :: Maybe Text
privateDnsName = Maybe Text
a} :: AwsEc2VpcEndpointServiceDetails)

instance
  Core.FromJSON
    AwsEc2VpcEndpointServiceDetails
  where
  parseJSON :: Value -> Parser AwsEc2VpcEndpointServiceDetails
parseJSON =
    String
-> (Object -> Parser AwsEc2VpcEndpointServiceDetails)
-> Value
-> Parser AwsEc2VpcEndpointServiceDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEc2VpcEndpointServiceDetails"
      ( \Object
x ->
          Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> AwsEc2VpcEndpointServiceDetails
AwsEc2VpcEndpointServiceDetails'
            (Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsEc2VpcEndpointServiceDetails)
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
"NetworkLoadBalancerArns"
                            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
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsEc2VpcEndpointServiceDetails)
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
"BaseEndpointDnsNames"
                            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
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsEc2VpcEndpointServiceDetails)
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
"AvailabilityZones"
                            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 Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsEc2VpcEndpointServiceDetails)
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
"GatewayLoadBalancerArns"
                            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 [AwsEc2VpcEndpointServiceServiceTypeDetails]
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsEc2VpcEndpointServiceDetails)
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
"ManagesVpcEndpoints")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsEc2VpcEndpointServiceDetails)
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
"ServiceName")
            Parser
  (Maybe Text
   -> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> AwsEc2VpcEndpointServiceDetails)
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
"ServiceState")
            Parser
  (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
-> Parser
     (Maybe Bool
      -> Maybe Text -> Maybe Text -> AwsEc2VpcEndpointServiceDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceType" Parser (Maybe (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]))
-> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
-> Parser (Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Bool
   -> Maybe Text -> Maybe Text -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text -> Maybe Text -> AwsEc2VpcEndpointServiceDetails)
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
"AcceptanceRequired")
            Parser
  (Maybe Text -> Maybe Text -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsEc2VpcEndpointServiceDetails)
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
"ServiceId")
            Parser (Maybe Text -> AwsEc2VpcEndpointServiceDetails)
-> Parser (Maybe Text) -> Parser AwsEc2VpcEndpointServiceDetails
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
"PrivateDnsName")
      )

instance
  Prelude.Hashable
    AwsEc2VpcEndpointServiceDetails

instance
  Prelude.NFData
    AwsEc2VpcEndpointServiceDetails

instance Core.ToJSON AwsEc2VpcEndpointServiceDetails where
  toJSON :: AwsEc2VpcEndpointServiceDetails -> Value
toJSON AwsEc2VpcEndpointServiceDetails' {Maybe Bool
Maybe [Text]
Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
Maybe Text
privateDnsName :: Maybe Text
serviceId :: Maybe Text
acceptanceRequired :: Maybe Bool
serviceType :: Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceState :: Maybe Text
serviceName :: Maybe Text
managesVpcEndpoints :: Maybe Bool
gatewayLoadBalancerArns :: Maybe [Text]
availabilityZones :: Maybe [Text]
baseEndpointDnsNames :: Maybe [Text]
networkLoadBalancerArns :: Maybe [Text]
$sel:privateDnsName:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Text
$sel:serviceId:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Text
$sel:acceptanceRequired:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Bool
$sel:serviceType:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails
-> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
$sel:serviceState:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Text
$sel:serviceName:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Text
$sel:managesVpcEndpoints:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe Bool
$sel:gatewayLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
$sel:availabilityZones:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
$sel:baseEndpointDnsNames:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
$sel:networkLoadBalancerArns:AwsEc2VpcEndpointServiceDetails' :: AwsEc2VpcEndpointServiceDetails -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NetworkLoadBalancerArns" 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]
networkLoadBalancerArns,
            (Text
"BaseEndpointDnsNames" 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]
baseEndpointDnsNames,
            (Text
"AvailabilityZones" 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]
availabilityZones,
            (Text
"GatewayLoadBalancerArns" 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]
gatewayLoadBalancerArns,
            (Text
"ManagesVpcEndpoints" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
managesVpcEndpoints,
            (Text
"ServiceName" 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
serviceName,
            (Text
"ServiceState" 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
serviceState,
            (Text
"ServiceType" Text -> [AwsEc2VpcEndpointServiceServiceTypeDetails] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2VpcEndpointServiceServiceTypeDetails] -> Pair)
-> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2VpcEndpointServiceServiceTypeDetails]
serviceType,
            (Text
"AcceptanceRequired" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
acceptanceRequired,
            (Text
"ServiceId" 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
serviceId,
            (Text
"PrivateDnsName" 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
privateDnsName
          ]
      )