{-# 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.EC2.Types.ServiceConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.ServiceConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.PayerResponsibility
import Amazonka.EC2.Types.PrivateDnsNameConfiguration
import Amazonka.EC2.Types.ServiceConnectivityType
import Amazonka.EC2.Types.ServiceState
import Amazonka.EC2.Types.ServiceTypeDetail
import Amazonka.EC2.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describes a service configuration for a VPC endpoint service.
--
-- /See:/ 'newServiceConfiguration' smart constructor.
data ServiceConfiguration = ServiceConfiguration'
  { -- | Indicates whether requests from other Amazon Web Services accounts to
    -- create an endpoint to the service must first be accepted.
    ServiceConfiguration -> Maybe Bool
acceptanceRequired :: Prelude.Maybe Prelude.Bool,
    -- | The Availability Zones in which the service is available.
    ServiceConfiguration -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | The DNS names for the service.
    ServiceConfiguration -> Maybe [Text]
baseEndpointDnsNames :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the
    -- service.
    ServiceConfiguration -> Maybe [Text]
gatewayLoadBalancerArns :: Prelude.Maybe [Prelude.Text],
    -- | Indicates whether the service manages its VPC endpoints. Management of
    -- the service VPC endpoints using the VPC endpoint API is restricted.
    ServiceConfiguration -> Maybe Bool
managesVpcEndpoints :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Names (ARNs) of the Network Load Balancers for the
    -- service.
    ServiceConfiguration -> Maybe [Text]
networkLoadBalancerArns :: Prelude.Maybe [Prelude.Text],
    -- | The payer responsibility.
    ServiceConfiguration -> Maybe PayerResponsibility
payerResponsibility :: Prelude.Maybe PayerResponsibility,
    -- | The private DNS name for the service.
    ServiceConfiguration -> Maybe Text
privateDnsName :: Prelude.Maybe Prelude.Text,
    -- | Information about the endpoint service private DNS name configuration.
    ServiceConfiguration -> Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration :: Prelude.Maybe PrivateDnsNameConfiguration,
    -- | The ID of the service.
    ServiceConfiguration -> Maybe Text
serviceId :: Prelude.Maybe Prelude.Text,
    -- | The name of the service.
    ServiceConfiguration -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
    -- | The service state.
    ServiceConfiguration -> Maybe ServiceState
serviceState :: Prelude.Maybe ServiceState,
    -- | The type of service.
    ServiceConfiguration -> Maybe [ServiceTypeDetail]
serviceType :: Prelude.Maybe [ServiceTypeDetail],
    -- | The supported IP address types.
    ServiceConfiguration -> Maybe [ServiceConnectivityType]
supportedIpAddressTypes :: Prelude.Maybe [ServiceConnectivityType],
    -- | Any tags assigned to the service.
    ServiceConfiguration -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (ServiceConfiguration -> ServiceConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceConfiguration -> ServiceConfiguration -> Bool
$c/= :: ServiceConfiguration -> ServiceConfiguration -> Bool
== :: ServiceConfiguration -> ServiceConfiguration -> Bool
$c== :: ServiceConfiguration -> ServiceConfiguration -> Bool
Prelude.Eq, ReadPrec [ServiceConfiguration]
ReadPrec ServiceConfiguration
Int -> ReadS ServiceConfiguration
ReadS [ServiceConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceConfiguration]
$creadListPrec :: ReadPrec [ServiceConfiguration]
readPrec :: ReadPrec ServiceConfiguration
$creadPrec :: ReadPrec ServiceConfiguration
readList :: ReadS [ServiceConfiguration]
$creadList :: ReadS [ServiceConfiguration]
readsPrec :: Int -> ReadS ServiceConfiguration
$creadsPrec :: Int -> ReadS ServiceConfiguration
Prelude.Read, Int -> ServiceConfiguration -> ShowS
[ServiceConfiguration] -> ShowS
ServiceConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceConfiguration] -> ShowS
$cshowList :: [ServiceConfiguration] -> ShowS
show :: ServiceConfiguration -> String
$cshow :: ServiceConfiguration -> String
showsPrec :: Int -> ServiceConfiguration -> ShowS
$cshowsPrec :: Int -> ServiceConfiguration -> ShowS
Prelude.Show, forall x. Rep ServiceConfiguration x -> ServiceConfiguration
forall x. ServiceConfiguration -> Rep ServiceConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceConfiguration x -> ServiceConfiguration
$cfrom :: forall x. ServiceConfiguration -> Rep ServiceConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'ServiceConfiguration' 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:
--
-- 'acceptanceRequired', 'serviceConfiguration_acceptanceRequired' - Indicates whether requests from other Amazon Web Services accounts to
-- create an endpoint to the service must first be accepted.
--
-- 'availabilityZones', 'serviceConfiguration_availabilityZones' - The Availability Zones in which the service is available.
--
-- 'baseEndpointDnsNames', 'serviceConfiguration_baseEndpointDnsNames' - The DNS names for the service.
--
-- 'gatewayLoadBalancerArns', 'serviceConfiguration_gatewayLoadBalancerArns' - The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the
-- service.
--
-- 'managesVpcEndpoints', 'serviceConfiguration_managesVpcEndpoints' - Indicates whether the service manages its VPC endpoints. Management of
-- the service VPC endpoints using the VPC endpoint API is restricted.
--
-- 'networkLoadBalancerArns', 'serviceConfiguration_networkLoadBalancerArns' - The Amazon Resource Names (ARNs) of the Network Load Balancers for the
-- service.
--
-- 'payerResponsibility', 'serviceConfiguration_payerResponsibility' - The payer responsibility.
--
-- 'privateDnsName', 'serviceConfiguration_privateDnsName' - The private DNS name for the service.
--
-- 'privateDnsNameConfiguration', 'serviceConfiguration_privateDnsNameConfiguration' - Information about the endpoint service private DNS name configuration.
--
-- 'serviceId', 'serviceConfiguration_serviceId' - The ID of the service.
--
-- 'serviceName', 'serviceConfiguration_serviceName' - The name of the service.
--
-- 'serviceState', 'serviceConfiguration_serviceState' - The service state.
--
-- 'serviceType', 'serviceConfiguration_serviceType' - The type of service.
--
-- 'supportedIpAddressTypes', 'serviceConfiguration_supportedIpAddressTypes' - The supported IP address types.
--
-- 'tags', 'serviceConfiguration_tags' - Any tags assigned to the service.
newServiceConfiguration ::
  ServiceConfiguration
newServiceConfiguration :: ServiceConfiguration
newServiceConfiguration =
  ServiceConfiguration'
    { $sel:acceptanceRequired:ServiceConfiguration' :: Maybe Bool
acceptanceRequired =
        forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:ServiceConfiguration' :: Maybe [Text]
availabilityZones = forall a. Maybe a
Prelude.Nothing,
      $sel:baseEndpointDnsNames:ServiceConfiguration' :: Maybe [Text]
baseEndpointDnsNames = forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayLoadBalancerArns:ServiceConfiguration' :: Maybe [Text]
gatewayLoadBalancerArns = forall a. Maybe a
Prelude.Nothing,
      $sel:managesVpcEndpoints:ServiceConfiguration' :: Maybe Bool
managesVpcEndpoints = forall a. Maybe a
Prelude.Nothing,
      $sel:networkLoadBalancerArns:ServiceConfiguration' :: Maybe [Text]
networkLoadBalancerArns = forall a. Maybe a
Prelude.Nothing,
      $sel:payerResponsibility:ServiceConfiguration' :: Maybe PayerResponsibility
payerResponsibility = forall a. Maybe a
Prelude.Nothing,
      $sel:privateDnsName:ServiceConfiguration' :: Maybe Text
privateDnsName = forall a. Maybe a
Prelude.Nothing,
      $sel:privateDnsNameConfiguration:ServiceConfiguration' :: Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceId:ServiceConfiguration' :: Maybe Text
serviceId = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceName:ServiceConfiguration' :: Maybe Text
serviceName = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceState:ServiceConfiguration' :: Maybe ServiceState
serviceState = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceType:ServiceConfiguration' :: Maybe [ServiceTypeDetail]
serviceType = forall a. Maybe a
Prelude.Nothing,
      $sel:supportedIpAddressTypes:ServiceConfiguration' :: Maybe [ServiceConnectivityType]
supportedIpAddressTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ServiceConfiguration' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The Availability Zones in which the service is available.
serviceConfiguration_availabilityZones :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [Prelude.Text])
serviceConfiguration_availabilityZones :: Lens' ServiceConfiguration (Maybe [Text])
serviceConfiguration_availabilityZones = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe [Text]
a -> ServiceConfiguration
s {$sel:availabilityZones:ServiceConfiguration' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: ServiceConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The DNS names for the service.
serviceConfiguration_baseEndpointDnsNames :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [Prelude.Text])
serviceConfiguration_baseEndpointDnsNames :: Lens' ServiceConfiguration (Maybe [Text])
serviceConfiguration_baseEndpointDnsNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe [Text]
baseEndpointDnsNames :: Maybe [Text]
$sel:baseEndpointDnsNames:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
baseEndpointDnsNames} -> Maybe [Text]
baseEndpointDnsNames) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe [Text]
a -> ServiceConfiguration
s {$sel:baseEndpointDnsNames:ServiceConfiguration' :: Maybe [Text]
baseEndpointDnsNames = Maybe [Text]
a} :: ServiceConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the
-- service.
serviceConfiguration_gatewayLoadBalancerArns :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [Prelude.Text])
serviceConfiguration_gatewayLoadBalancerArns :: Lens' ServiceConfiguration (Maybe [Text])
serviceConfiguration_gatewayLoadBalancerArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe [Text]
gatewayLoadBalancerArns :: Maybe [Text]
$sel:gatewayLoadBalancerArns:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
gatewayLoadBalancerArns} -> Maybe [Text]
gatewayLoadBalancerArns) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe [Text]
a -> ServiceConfiguration
s {$sel:gatewayLoadBalancerArns:ServiceConfiguration' :: Maybe [Text]
gatewayLoadBalancerArns = Maybe [Text]
a} :: ServiceConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Indicates whether the service manages its VPC endpoints. Management of
-- the service VPC endpoints using the VPC endpoint API is restricted.
serviceConfiguration_managesVpcEndpoints :: Lens.Lens' ServiceConfiguration (Prelude.Maybe Prelude.Bool)
serviceConfiguration_managesVpcEndpoints :: Lens' ServiceConfiguration (Maybe Bool)
serviceConfiguration_managesVpcEndpoints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe Bool
managesVpcEndpoints :: Maybe Bool
$sel:managesVpcEndpoints:ServiceConfiguration' :: ServiceConfiguration -> Maybe Bool
managesVpcEndpoints} -> Maybe Bool
managesVpcEndpoints) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe Bool
a -> ServiceConfiguration
s {$sel:managesVpcEndpoints:ServiceConfiguration' :: Maybe Bool
managesVpcEndpoints = Maybe Bool
a} :: ServiceConfiguration)

-- | The Amazon Resource Names (ARNs) of the Network Load Balancers for the
-- service.
serviceConfiguration_networkLoadBalancerArns :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [Prelude.Text])
serviceConfiguration_networkLoadBalancerArns :: Lens' ServiceConfiguration (Maybe [Text])
serviceConfiguration_networkLoadBalancerArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe [Text]
networkLoadBalancerArns :: Maybe [Text]
$sel:networkLoadBalancerArns:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
networkLoadBalancerArns} -> Maybe [Text]
networkLoadBalancerArns) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe [Text]
a -> ServiceConfiguration
s {$sel:networkLoadBalancerArns:ServiceConfiguration' :: Maybe [Text]
networkLoadBalancerArns = Maybe [Text]
a} :: ServiceConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The payer responsibility.
serviceConfiguration_payerResponsibility :: Lens.Lens' ServiceConfiguration (Prelude.Maybe PayerResponsibility)
serviceConfiguration_payerResponsibility :: Lens' ServiceConfiguration (Maybe PayerResponsibility)
serviceConfiguration_payerResponsibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe PayerResponsibility
payerResponsibility :: Maybe PayerResponsibility
$sel:payerResponsibility:ServiceConfiguration' :: ServiceConfiguration -> Maybe PayerResponsibility
payerResponsibility} -> Maybe PayerResponsibility
payerResponsibility) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe PayerResponsibility
a -> ServiceConfiguration
s {$sel:payerResponsibility:ServiceConfiguration' :: Maybe PayerResponsibility
payerResponsibility = Maybe PayerResponsibility
a} :: ServiceConfiguration)

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

-- | Information about the endpoint service private DNS name configuration.
serviceConfiguration_privateDnsNameConfiguration :: Lens.Lens' ServiceConfiguration (Prelude.Maybe PrivateDnsNameConfiguration)
serviceConfiguration_privateDnsNameConfiguration :: Lens' ServiceConfiguration (Maybe PrivateDnsNameConfiguration)
serviceConfiguration_privateDnsNameConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration :: Maybe PrivateDnsNameConfiguration
$sel:privateDnsNameConfiguration:ServiceConfiguration' :: ServiceConfiguration -> Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration} -> Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe PrivateDnsNameConfiguration
a -> ServiceConfiguration
s {$sel:privateDnsNameConfiguration:ServiceConfiguration' :: Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration = Maybe PrivateDnsNameConfiguration
a} :: ServiceConfiguration)

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

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

-- | The service state.
serviceConfiguration_serviceState :: Lens.Lens' ServiceConfiguration (Prelude.Maybe ServiceState)
serviceConfiguration_serviceState :: Lens' ServiceConfiguration (Maybe ServiceState)
serviceConfiguration_serviceState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe ServiceState
serviceState :: Maybe ServiceState
$sel:serviceState:ServiceConfiguration' :: ServiceConfiguration -> Maybe ServiceState
serviceState} -> Maybe ServiceState
serviceState) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe ServiceState
a -> ServiceConfiguration
s {$sel:serviceState:ServiceConfiguration' :: Maybe ServiceState
serviceState = Maybe ServiceState
a} :: ServiceConfiguration)

-- | The type of service.
serviceConfiguration_serviceType :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [ServiceTypeDetail])
serviceConfiguration_serviceType :: Lens' ServiceConfiguration (Maybe [ServiceTypeDetail])
serviceConfiguration_serviceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe [ServiceTypeDetail]
serviceType :: Maybe [ServiceTypeDetail]
$sel:serviceType:ServiceConfiguration' :: ServiceConfiguration -> Maybe [ServiceTypeDetail]
serviceType} -> Maybe [ServiceTypeDetail]
serviceType) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe [ServiceTypeDetail]
a -> ServiceConfiguration
s {$sel:serviceType:ServiceConfiguration' :: Maybe [ServiceTypeDetail]
serviceType = Maybe [ServiceTypeDetail]
a} :: ServiceConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The supported IP address types.
serviceConfiguration_supportedIpAddressTypes :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [ServiceConnectivityType])
serviceConfiguration_supportedIpAddressTypes :: Lens' ServiceConfiguration (Maybe [ServiceConnectivityType])
serviceConfiguration_supportedIpAddressTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe [ServiceConnectivityType]
supportedIpAddressTypes :: Maybe [ServiceConnectivityType]
$sel:supportedIpAddressTypes:ServiceConfiguration' :: ServiceConfiguration -> Maybe [ServiceConnectivityType]
supportedIpAddressTypes} -> Maybe [ServiceConnectivityType]
supportedIpAddressTypes) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe [ServiceConnectivityType]
a -> ServiceConfiguration
s {$sel:supportedIpAddressTypes:ServiceConfiguration' :: Maybe [ServiceConnectivityType]
supportedIpAddressTypes = Maybe [ServiceConnectivityType]
a} :: ServiceConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Any tags assigned to the service.
serviceConfiguration_tags :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [Tag])
serviceConfiguration_tags :: Lens' ServiceConfiguration (Maybe [Tag])
serviceConfiguration_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceConfiguration' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ServiceConfiguration
s@ServiceConfiguration' {} Maybe [Tag]
a -> ServiceConfiguration
s {$sel:tags:ServiceConfiguration' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ServiceConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromXML ServiceConfiguration where
  parseXML :: [Node] -> Either String ServiceConfiguration
parseXML [Node]
x =
    Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe [Text]
-> Maybe PayerResponsibility
-> Maybe Text
-> Maybe PrivateDnsNameConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe ServiceState
-> Maybe [ServiceTypeDetail]
-> Maybe [ServiceConnectivityType]
-> Maybe [Tag]
-> ServiceConfiguration
ServiceConfiguration'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"acceptanceRequired")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"availabilityZoneSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"baseEndpointDnsNameSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"gatewayLoadBalancerArnSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"managesVpcEndpoints")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"networkLoadBalancerArnSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"payerResponsibility")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"privateDnsName")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"privateDnsNameConfiguration")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"serviceId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"serviceName")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"serviceState")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"serviceType"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"supportedIpAddressTypeSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"tagSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )

instance Prelude.Hashable ServiceConfiguration where
  hashWithSalt :: Int -> ServiceConfiguration -> Int
hashWithSalt Int
_salt ServiceConfiguration' {Maybe Bool
Maybe [Text]
Maybe [ServiceConnectivityType]
Maybe [ServiceTypeDetail]
Maybe [Tag]
Maybe Text
Maybe PayerResponsibility
Maybe PrivateDnsNameConfiguration
Maybe ServiceState
tags :: Maybe [Tag]
supportedIpAddressTypes :: Maybe [ServiceConnectivityType]
serviceType :: Maybe [ServiceTypeDetail]
serviceState :: Maybe ServiceState
serviceName :: Maybe Text
serviceId :: Maybe Text
privateDnsNameConfiguration :: Maybe PrivateDnsNameConfiguration
privateDnsName :: Maybe Text
payerResponsibility :: Maybe PayerResponsibility
networkLoadBalancerArns :: Maybe [Text]
managesVpcEndpoints :: Maybe Bool
gatewayLoadBalancerArns :: Maybe [Text]
baseEndpointDnsNames :: Maybe [Text]
availabilityZones :: Maybe [Text]
acceptanceRequired :: Maybe Bool
$sel:tags:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Tag]
$sel:supportedIpAddressTypes:ServiceConfiguration' :: ServiceConfiguration -> Maybe [ServiceConnectivityType]
$sel:serviceType:ServiceConfiguration' :: ServiceConfiguration -> Maybe [ServiceTypeDetail]
$sel:serviceState:ServiceConfiguration' :: ServiceConfiguration -> Maybe ServiceState
$sel:serviceName:ServiceConfiguration' :: ServiceConfiguration -> Maybe Text
$sel:serviceId:ServiceConfiguration' :: ServiceConfiguration -> Maybe Text
$sel:privateDnsNameConfiguration:ServiceConfiguration' :: ServiceConfiguration -> Maybe PrivateDnsNameConfiguration
$sel:privateDnsName:ServiceConfiguration' :: ServiceConfiguration -> Maybe Text
$sel:payerResponsibility:ServiceConfiguration' :: ServiceConfiguration -> Maybe PayerResponsibility
$sel:networkLoadBalancerArns:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:managesVpcEndpoints:ServiceConfiguration' :: ServiceConfiguration -> Maybe Bool
$sel:gatewayLoadBalancerArns:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:baseEndpointDnsNames:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:availabilityZones:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:acceptanceRequired:ServiceConfiguration' :: ServiceConfiguration -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
acceptanceRequired
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
availabilityZones
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
baseEndpointDnsNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
gatewayLoadBalancerArns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
managesVpcEndpoints
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
networkLoadBalancerArns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PayerResponsibility
payerResponsibility
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
privateDnsName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceState
serviceState
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ServiceTypeDetail]
serviceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ServiceConnectivityType]
supportedIpAddressTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags

instance Prelude.NFData ServiceConfiguration where
  rnf :: ServiceConfiguration -> ()
rnf ServiceConfiguration' {Maybe Bool
Maybe [Text]
Maybe [ServiceConnectivityType]
Maybe [ServiceTypeDetail]
Maybe [Tag]
Maybe Text
Maybe PayerResponsibility
Maybe PrivateDnsNameConfiguration
Maybe ServiceState
tags :: Maybe [Tag]
supportedIpAddressTypes :: Maybe [ServiceConnectivityType]
serviceType :: Maybe [ServiceTypeDetail]
serviceState :: Maybe ServiceState
serviceName :: Maybe Text
serviceId :: Maybe Text
privateDnsNameConfiguration :: Maybe PrivateDnsNameConfiguration
privateDnsName :: Maybe Text
payerResponsibility :: Maybe PayerResponsibility
networkLoadBalancerArns :: Maybe [Text]
managesVpcEndpoints :: Maybe Bool
gatewayLoadBalancerArns :: Maybe [Text]
baseEndpointDnsNames :: Maybe [Text]
availabilityZones :: Maybe [Text]
acceptanceRequired :: Maybe Bool
$sel:tags:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Tag]
$sel:supportedIpAddressTypes:ServiceConfiguration' :: ServiceConfiguration -> Maybe [ServiceConnectivityType]
$sel:serviceType:ServiceConfiguration' :: ServiceConfiguration -> Maybe [ServiceTypeDetail]
$sel:serviceState:ServiceConfiguration' :: ServiceConfiguration -> Maybe ServiceState
$sel:serviceName:ServiceConfiguration' :: ServiceConfiguration -> Maybe Text
$sel:serviceId:ServiceConfiguration' :: ServiceConfiguration -> Maybe Text
$sel:privateDnsNameConfiguration:ServiceConfiguration' :: ServiceConfiguration -> Maybe PrivateDnsNameConfiguration
$sel:privateDnsName:ServiceConfiguration' :: ServiceConfiguration -> Maybe Text
$sel:payerResponsibility:ServiceConfiguration' :: ServiceConfiguration -> Maybe PayerResponsibility
$sel:networkLoadBalancerArns:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:managesVpcEndpoints:ServiceConfiguration' :: ServiceConfiguration -> Maybe Bool
$sel:gatewayLoadBalancerArns:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:baseEndpointDnsNames:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:availabilityZones:ServiceConfiguration' :: ServiceConfiguration -> Maybe [Text]
$sel:acceptanceRequired:ServiceConfiguration' :: ServiceConfiguration -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
acceptanceRequired
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
availabilityZones
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
baseEndpointDnsNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
gatewayLoadBalancerArns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
managesVpcEndpoints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
networkLoadBalancerArns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PayerResponsibility
payerResponsibility
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
privateDnsName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PrivateDnsNameConfiguration
privateDnsNameConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceState
serviceState
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ServiceTypeDetail]
serviceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ServiceConnectivityType]
supportedIpAddressTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags