{-# 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.GlobalAccelerator.Types.CustomRoutingAccelerator
-- 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.GlobalAccelerator.Types.CustomRoutingAccelerator where

import qualified Amazonka.Core as Core
import Amazonka.GlobalAccelerator.Types.CustomRoutingAcceleratorStatus
import Amazonka.GlobalAccelerator.Types.IpAddressType
import Amazonka.GlobalAccelerator.Types.IpSet
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Attributes of a custom routing accelerator.
--
-- /See:/ 'newCustomRoutingAccelerator' smart constructor.
data CustomRoutingAccelerator = CustomRoutingAccelerator'
  { -- | Describes the deployment status of the accelerator.
    CustomRoutingAccelerator -> Maybe CustomRoutingAcceleratorStatus
status :: Prelude.Maybe CustomRoutingAcceleratorStatus,
    -- | The Amazon Resource Name (ARN) of the custom routing accelerator.
    CustomRoutingAccelerator -> Maybe Text
acceleratorArn :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the accelerator is enabled. The value is true or
    -- false. The default value is true.
    --
    -- If the value is set to true, the accelerator cannot be deleted. If set
    -- to false, accelerator can be deleted.
    CustomRoutingAccelerator -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | The date and time that the accelerator was created.
    CustomRoutingAccelerator -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The date and time that the accelerator was last modified.
    CustomRoutingAccelerator -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The value for the address type must be IPv4.
    CustomRoutingAccelerator -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
    -- | The name of the accelerator. The name must contain only alphanumeric
    -- characters or hyphens (-), and must not begin or end with a hyphen.
    CustomRoutingAccelerator -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The static IP addresses that Global Accelerator associates with the
    -- accelerator.
    CustomRoutingAccelerator -> Maybe [IpSet]
ipSets :: Prelude.Maybe [IpSet],
    -- | The Domain Name System (DNS) name that Global Accelerator creates that
    -- points to your accelerator\'s static IP addresses.
    --
    -- The naming convention for the DNS name is the following: A lowercase
    -- letter a, followed by a 16-bit random hex string, followed by
    -- .awsglobalaccelerator.com. For example:
    -- a1234567890abcdef.awsglobalaccelerator.com.
    --
    -- For more information about the default DNS name, see
    -- <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing Support for DNS Addressing in Global Accelerator>
    -- in the /AWS Global Accelerator Developer Guide/.
    CustomRoutingAccelerator -> Maybe Text
dnsName :: Prelude.Maybe Prelude.Text
  }
  deriving (CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool
(CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool)
-> (CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool)
-> Eq CustomRoutingAccelerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool
$c/= :: CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool
== :: CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool
$c== :: CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool
Prelude.Eq, ReadPrec [CustomRoutingAccelerator]
ReadPrec CustomRoutingAccelerator
Int -> ReadS CustomRoutingAccelerator
ReadS [CustomRoutingAccelerator]
(Int -> ReadS CustomRoutingAccelerator)
-> ReadS [CustomRoutingAccelerator]
-> ReadPrec CustomRoutingAccelerator
-> ReadPrec [CustomRoutingAccelerator]
-> Read CustomRoutingAccelerator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomRoutingAccelerator]
$creadListPrec :: ReadPrec [CustomRoutingAccelerator]
readPrec :: ReadPrec CustomRoutingAccelerator
$creadPrec :: ReadPrec CustomRoutingAccelerator
readList :: ReadS [CustomRoutingAccelerator]
$creadList :: ReadS [CustomRoutingAccelerator]
readsPrec :: Int -> ReadS CustomRoutingAccelerator
$creadsPrec :: Int -> ReadS CustomRoutingAccelerator
Prelude.Read, Int -> CustomRoutingAccelerator -> ShowS
[CustomRoutingAccelerator] -> ShowS
CustomRoutingAccelerator -> String
(Int -> CustomRoutingAccelerator -> ShowS)
-> (CustomRoutingAccelerator -> String)
-> ([CustomRoutingAccelerator] -> ShowS)
-> Show CustomRoutingAccelerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomRoutingAccelerator] -> ShowS
$cshowList :: [CustomRoutingAccelerator] -> ShowS
show :: CustomRoutingAccelerator -> String
$cshow :: CustomRoutingAccelerator -> String
showsPrec :: Int -> CustomRoutingAccelerator -> ShowS
$cshowsPrec :: Int -> CustomRoutingAccelerator -> ShowS
Prelude.Show, (forall x.
 CustomRoutingAccelerator -> Rep CustomRoutingAccelerator x)
-> (forall x.
    Rep CustomRoutingAccelerator x -> CustomRoutingAccelerator)
-> Generic CustomRoutingAccelerator
forall x.
Rep CustomRoutingAccelerator x -> CustomRoutingAccelerator
forall x.
CustomRoutingAccelerator -> Rep CustomRoutingAccelerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomRoutingAccelerator x -> CustomRoutingAccelerator
$cfrom :: forall x.
CustomRoutingAccelerator -> Rep CustomRoutingAccelerator x
Prelude.Generic)

-- |
-- Create a value of 'CustomRoutingAccelerator' 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:
--
-- 'status', 'customRoutingAccelerator_status' - Describes the deployment status of the accelerator.
--
-- 'acceleratorArn', 'customRoutingAccelerator_acceleratorArn' - The Amazon Resource Name (ARN) of the custom routing accelerator.
--
-- 'enabled', 'customRoutingAccelerator_enabled' - Indicates whether the accelerator is enabled. The value is true or
-- false. The default value is true.
--
-- If the value is set to true, the accelerator cannot be deleted. If set
-- to false, accelerator can be deleted.
--
-- 'createdTime', 'customRoutingAccelerator_createdTime' - The date and time that the accelerator was created.
--
-- 'lastModifiedTime', 'customRoutingAccelerator_lastModifiedTime' - The date and time that the accelerator was last modified.
--
-- 'ipAddressType', 'customRoutingAccelerator_ipAddressType' - The value for the address type must be IPv4.
--
-- 'name', 'customRoutingAccelerator_name' - The name of the accelerator. The name must contain only alphanumeric
-- characters or hyphens (-), and must not begin or end with a hyphen.
--
-- 'ipSets', 'customRoutingAccelerator_ipSets' - The static IP addresses that Global Accelerator associates with the
-- accelerator.
--
-- 'dnsName', 'customRoutingAccelerator_dnsName' - The Domain Name System (DNS) name that Global Accelerator creates that
-- points to your accelerator\'s static IP addresses.
--
-- The naming convention for the DNS name is the following: A lowercase
-- letter a, followed by a 16-bit random hex string, followed by
-- .awsglobalaccelerator.com. For example:
-- a1234567890abcdef.awsglobalaccelerator.com.
--
-- For more information about the default DNS name, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing Support for DNS Addressing in Global Accelerator>
-- in the /AWS Global Accelerator Developer Guide/.
newCustomRoutingAccelerator ::
  CustomRoutingAccelerator
newCustomRoutingAccelerator :: CustomRoutingAccelerator
newCustomRoutingAccelerator =
  CustomRoutingAccelerator' :: Maybe CustomRoutingAcceleratorStatus
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe POSIX
-> Maybe IpAddressType
-> Maybe Text
-> Maybe [IpSet]
-> Maybe Text
-> CustomRoutingAccelerator
CustomRoutingAccelerator'
    { $sel:status:CustomRoutingAccelerator' :: Maybe CustomRoutingAcceleratorStatus
status = Maybe CustomRoutingAcceleratorStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:acceleratorArn:CustomRoutingAccelerator' :: Maybe Text
acceleratorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:CustomRoutingAccelerator' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:CustomRoutingAccelerator' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:CustomRoutingAccelerator' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:ipAddressType:CustomRoutingAccelerator' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CustomRoutingAccelerator' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ipSets:CustomRoutingAccelerator' :: Maybe [IpSet]
ipSets = Maybe [IpSet]
forall a. Maybe a
Prelude.Nothing,
      $sel:dnsName:CustomRoutingAccelerator' :: Maybe Text
dnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Describes the deployment status of the accelerator.
customRoutingAccelerator_status :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe CustomRoutingAcceleratorStatus)
customRoutingAccelerator_status :: (Maybe CustomRoutingAcceleratorStatus
 -> f (Maybe CustomRoutingAcceleratorStatus))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_status = (CustomRoutingAccelerator -> Maybe CustomRoutingAcceleratorStatus)
-> (CustomRoutingAccelerator
    -> Maybe CustomRoutingAcceleratorStatus
    -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe CustomRoutingAcceleratorStatus)
     (Maybe CustomRoutingAcceleratorStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe CustomRoutingAcceleratorStatus
status :: Maybe CustomRoutingAcceleratorStatus
$sel:status:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe CustomRoutingAcceleratorStatus
status} -> Maybe CustomRoutingAcceleratorStatus
status) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe CustomRoutingAcceleratorStatus
a -> CustomRoutingAccelerator
s {$sel:status:CustomRoutingAccelerator' :: Maybe CustomRoutingAcceleratorStatus
status = Maybe CustomRoutingAcceleratorStatus
a} :: CustomRoutingAccelerator)

-- | The Amazon Resource Name (ARN) of the custom routing accelerator.
customRoutingAccelerator_acceleratorArn :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.Text)
customRoutingAccelerator_acceleratorArn :: (Maybe Text -> f (Maybe Text))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_acceleratorArn = (CustomRoutingAccelerator -> Maybe Text)
-> (CustomRoutingAccelerator
    -> Maybe Text -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe Text
acceleratorArn :: Maybe Text
$sel:acceleratorArn:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
acceleratorArn} -> Maybe Text
acceleratorArn) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe Text
a -> CustomRoutingAccelerator
s {$sel:acceleratorArn:CustomRoutingAccelerator' :: Maybe Text
acceleratorArn = Maybe Text
a} :: CustomRoutingAccelerator)

-- | Indicates whether the accelerator is enabled. The value is true or
-- false. The default value is true.
--
-- If the value is set to true, the accelerator cannot be deleted. If set
-- to false, accelerator can be deleted.
customRoutingAccelerator_enabled :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.Bool)
customRoutingAccelerator_enabled :: (Maybe Bool -> f (Maybe Bool))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_enabled = (CustomRoutingAccelerator -> Maybe Bool)
-> (CustomRoutingAccelerator
    -> Maybe Bool -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe Bool
a -> CustomRoutingAccelerator
s {$sel:enabled:CustomRoutingAccelerator' :: Maybe Bool
enabled = Maybe Bool
a} :: CustomRoutingAccelerator)

-- | The date and time that the accelerator was created.
customRoutingAccelerator_createdTime :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.UTCTime)
customRoutingAccelerator_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_createdTime = (CustomRoutingAccelerator -> Maybe POSIX)
-> (CustomRoutingAccelerator
    -> Maybe POSIX -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe POSIX
a -> CustomRoutingAccelerator
s {$sel:createdTime:CustomRoutingAccelerator' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: CustomRoutingAccelerator) ((Maybe POSIX -> f (Maybe POSIX))
 -> CustomRoutingAccelerator -> f CustomRoutingAccelerator)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CustomRoutingAccelerator
-> f CustomRoutingAccelerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The date and time that the accelerator was last modified.
customRoutingAccelerator_lastModifiedTime :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.UTCTime)
customRoutingAccelerator_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_lastModifiedTime = (CustomRoutingAccelerator -> Maybe POSIX)
-> (CustomRoutingAccelerator
    -> Maybe POSIX -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe POSIX
a -> CustomRoutingAccelerator
s {$sel:lastModifiedTime:CustomRoutingAccelerator' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: CustomRoutingAccelerator) ((Maybe POSIX -> f (Maybe POSIX))
 -> CustomRoutingAccelerator -> f CustomRoutingAccelerator)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CustomRoutingAccelerator
-> f CustomRoutingAccelerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The value for the address type must be IPv4.
customRoutingAccelerator_ipAddressType :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe IpAddressType)
customRoutingAccelerator_ipAddressType :: (Maybe IpAddressType -> f (Maybe IpAddressType))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_ipAddressType = (CustomRoutingAccelerator -> Maybe IpAddressType)
-> (CustomRoutingAccelerator
    -> Maybe IpAddressType -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe IpAddressType)
     (Maybe IpAddressType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe IpAddressType
a -> CustomRoutingAccelerator
s {$sel:ipAddressType:CustomRoutingAccelerator' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: CustomRoutingAccelerator)

-- | The name of the accelerator. The name must contain only alphanumeric
-- characters or hyphens (-), and must not begin or end with a hyphen.
customRoutingAccelerator_name :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.Text)
customRoutingAccelerator_name :: (Maybe Text -> f (Maybe Text))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_name = (CustomRoutingAccelerator -> Maybe Text)
-> (CustomRoutingAccelerator
    -> Maybe Text -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe Text
name :: Maybe Text
$sel:name:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
name} -> Maybe Text
name) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe Text
a -> CustomRoutingAccelerator
s {$sel:name:CustomRoutingAccelerator' :: Maybe Text
name = Maybe Text
a} :: CustomRoutingAccelerator)

-- | The static IP addresses that Global Accelerator associates with the
-- accelerator.
customRoutingAccelerator_ipSets :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe [IpSet])
customRoutingAccelerator_ipSets :: (Maybe [IpSet] -> f (Maybe [IpSet]))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_ipSets = (CustomRoutingAccelerator -> Maybe [IpSet])
-> (CustomRoutingAccelerator
    -> Maybe [IpSet] -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe [IpSet])
     (Maybe [IpSet])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe [IpSet]
ipSets :: Maybe [IpSet]
$sel:ipSets:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe [IpSet]
ipSets} -> Maybe [IpSet]
ipSets) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe [IpSet]
a -> CustomRoutingAccelerator
s {$sel:ipSets:CustomRoutingAccelerator' :: Maybe [IpSet]
ipSets = Maybe [IpSet]
a} :: CustomRoutingAccelerator) ((Maybe [IpSet] -> f (Maybe [IpSet]))
 -> CustomRoutingAccelerator -> f CustomRoutingAccelerator)
-> ((Maybe [IpSet] -> f (Maybe [IpSet]))
    -> Maybe [IpSet] -> f (Maybe [IpSet]))
-> (Maybe [IpSet] -> f (Maybe [IpSet]))
-> CustomRoutingAccelerator
-> f CustomRoutingAccelerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [IpSet] [IpSet] [IpSet] [IpSet]
-> Iso
     (Maybe [IpSet]) (Maybe [IpSet]) (Maybe [IpSet]) (Maybe [IpSet])
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 [IpSet] [IpSet] [IpSet] [IpSet]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Domain Name System (DNS) name that Global Accelerator creates that
-- points to your accelerator\'s static IP addresses.
--
-- The naming convention for the DNS name is the following: A lowercase
-- letter a, followed by a 16-bit random hex string, followed by
-- .awsglobalaccelerator.com. For example:
-- a1234567890abcdef.awsglobalaccelerator.com.
--
-- For more information about the default DNS name, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing Support for DNS Addressing in Global Accelerator>
-- in the /AWS Global Accelerator Developer Guide/.
customRoutingAccelerator_dnsName :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.Text)
customRoutingAccelerator_dnsName :: (Maybe Text -> f (Maybe Text))
-> CustomRoutingAccelerator -> f CustomRoutingAccelerator
customRoutingAccelerator_dnsName = (CustomRoutingAccelerator -> Maybe Text)
-> (CustomRoutingAccelerator
    -> Maybe Text -> CustomRoutingAccelerator)
-> Lens
     CustomRoutingAccelerator
     CustomRoutingAccelerator
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAccelerator' {Maybe Text
dnsName :: Maybe Text
$sel:dnsName:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
dnsName} -> Maybe Text
dnsName) (\s :: CustomRoutingAccelerator
s@CustomRoutingAccelerator' {} Maybe Text
a -> CustomRoutingAccelerator
s {$sel:dnsName:CustomRoutingAccelerator' :: Maybe Text
dnsName = Maybe Text
a} :: CustomRoutingAccelerator)

instance Core.FromJSON CustomRoutingAccelerator where
  parseJSON :: Value -> Parser CustomRoutingAccelerator
parseJSON =
    String
-> (Object -> Parser CustomRoutingAccelerator)
-> Value
-> Parser CustomRoutingAccelerator
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CustomRoutingAccelerator"
      ( \Object
x ->
          Maybe CustomRoutingAcceleratorStatus
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe POSIX
-> Maybe IpAddressType
-> Maybe Text
-> Maybe [IpSet]
-> Maybe Text
-> CustomRoutingAccelerator
CustomRoutingAccelerator'
            (Maybe CustomRoutingAcceleratorStatus
 -> Maybe Text
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe IpAddressType
 -> Maybe Text
 -> Maybe [IpSet]
 -> Maybe Text
 -> CustomRoutingAccelerator)
-> Parser (Maybe CustomRoutingAcceleratorStatus)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [IpSet]
      -> Maybe Text
      -> CustomRoutingAccelerator)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe CustomRoutingAcceleratorStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [IpSet]
   -> Maybe Text
   -> CustomRoutingAccelerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [IpSet]
      -> Maybe Text
      -> CustomRoutingAccelerator)
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
"AcceleratorArn")
            Parser
  (Maybe Bool
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [IpSet]
   -> Maybe Text
   -> CustomRoutingAccelerator)
-> Parser (Maybe Bool)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [IpSet]
      -> Maybe Text
      -> CustomRoutingAccelerator)
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
"Enabled")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [IpSet]
   -> Maybe Text
   -> CustomRoutingAccelerator)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe IpAddressType
      -> Maybe Text
      -> Maybe [IpSet]
      -> Maybe Text
      -> CustomRoutingAccelerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
            Parser
  (Maybe POSIX
   -> Maybe IpAddressType
   -> Maybe Text
   -> Maybe [IpSet]
   -> Maybe Text
   -> CustomRoutingAccelerator)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe IpAddressType
      -> Maybe Text
      -> Maybe [IpSet]
      -> Maybe Text
      -> CustomRoutingAccelerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedTime")
            Parser
  (Maybe IpAddressType
   -> Maybe Text
   -> Maybe [IpSet]
   -> Maybe Text
   -> CustomRoutingAccelerator)
-> Parser (Maybe IpAddressType)
-> Parser
     (Maybe Text
      -> Maybe [IpSet] -> Maybe Text -> CustomRoutingAccelerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IpAddressType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IpAddressType")
            Parser
  (Maybe Text
   -> Maybe [IpSet] -> Maybe Text -> CustomRoutingAccelerator)
-> Parser (Maybe Text)
-> Parser (Maybe [IpSet] -> Maybe Text -> CustomRoutingAccelerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser (Maybe [IpSet] -> Maybe Text -> CustomRoutingAccelerator)
-> Parser (Maybe [IpSet])
-> Parser (Maybe Text -> CustomRoutingAccelerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [IpSet]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IpSets" Parser (Maybe (Maybe [IpSet]))
-> Maybe [IpSet] -> Parser (Maybe [IpSet])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [IpSet]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> CustomRoutingAccelerator)
-> Parser (Maybe Text) -> Parser CustomRoutingAccelerator
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
"DnsName")
      )

instance Prelude.Hashable CustomRoutingAccelerator

instance Prelude.NFData CustomRoutingAccelerator