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

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

-- | Attributes of a custom routing accelerator.
--
-- /See:/ 'newCustomRoutingAccelerator' smart constructor.
data CustomRoutingAccelerator = CustomRoutingAccelerator'
  { -- | The Amazon Resource Name (ARN) of the custom routing accelerator.
    CustomRoutingAccelerator -> Maybe Text
acceleratorArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the accelerator was created.
    CustomRoutingAccelerator -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
    -- | The Domain Name System (DNS) name that Global Accelerator creates that
    -- points to an accelerator\'s static IPv4 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.
    --
    -- If you have a dual-stack accelerator, you also have a second DNS name,
    -- @DualStackDnsName@, that points to both the A record and the AAAA record
    -- for all four static addresses for the accelerator: two IPv4 addresses
    -- and two IPv6 addresses.
    --
    -- For more information about the default DNS name, see
    -- <https://docs.aws.amazon.com/global-accelerator/latest/dg/dns-addressing-custom-domains.dns-addressing.html Support for DNS addressing in Global Accelerator>
    -- in the /Global Accelerator Developer Guide/.
    CustomRoutingAccelerator -> Maybe Text
dnsName :: 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 IP address type that an accelerator supports. For a custom routing
    -- accelerator, the value must be IPV4.
    CustomRoutingAccelerator -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
    -- | The static IP addresses that Global Accelerator associates with the
    -- accelerator.
    CustomRoutingAccelerator -> Maybe [IpSet]
ipSets :: Prelude.Maybe [IpSet],
    -- | The date and time that the accelerator was last modified.
    CustomRoutingAccelerator -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
    -- | 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,
    -- | Describes the deployment status of the accelerator.
    CustomRoutingAccelerator -> Maybe CustomRoutingAcceleratorStatus
status :: Prelude.Maybe CustomRoutingAcceleratorStatus
  }
  deriving (CustomRoutingAccelerator -> CustomRoutingAccelerator -> Bool
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]
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
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.
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:
--
-- 'acceleratorArn', 'customRoutingAccelerator_acceleratorArn' - The Amazon Resource Name (ARN) of the custom routing accelerator.
--
-- 'createdTime', 'customRoutingAccelerator_createdTime' - The date and time that the accelerator was created.
--
-- 'dnsName', 'customRoutingAccelerator_dnsName' - The Domain Name System (DNS) name that Global Accelerator creates that
-- points to an accelerator\'s static IPv4 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.
--
-- If you have a dual-stack accelerator, you also have a second DNS name,
-- @DualStackDnsName@, that points to both the A record and the AAAA record
-- for all four static addresses for the accelerator: two IPv4 addresses
-- and two IPv6 addresses.
--
-- For more information about the default DNS name, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/dns-addressing-custom-domains.dns-addressing.html Support for DNS addressing in Global Accelerator>
-- in the /Global Accelerator Developer Guide/.
--
-- '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.
--
-- 'ipAddressType', 'customRoutingAccelerator_ipAddressType' - The IP address type that an accelerator supports. For a custom routing
-- accelerator, the value must be IPV4.
--
-- 'ipSets', 'customRoutingAccelerator_ipSets' - The static IP addresses that Global Accelerator associates with the
-- accelerator.
--
-- 'lastModifiedTime', 'customRoutingAccelerator_lastModifiedTime' - The date and time that the accelerator was last modified.
--
-- '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.
--
-- 'status', 'customRoutingAccelerator_status' - Describes the deployment status of the accelerator.
newCustomRoutingAccelerator ::
  CustomRoutingAccelerator
newCustomRoutingAccelerator :: CustomRoutingAccelerator
newCustomRoutingAccelerator =
  CustomRoutingAccelerator'
    { $sel:acceleratorArn:CustomRoutingAccelerator' :: Maybe Text
acceleratorArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:CustomRoutingAccelerator' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
      $sel:dnsName:CustomRoutingAccelerator' :: Maybe Text
dnsName = forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:CustomRoutingAccelerator' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
      $sel:ipAddressType:CustomRoutingAccelerator' :: Maybe IpAddressType
ipAddressType = forall a. Maybe a
Prelude.Nothing,
      $sel:ipSets:CustomRoutingAccelerator' :: Maybe [IpSet]
ipSets = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:CustomRoutingAccelerator' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CustomRoutingAccelerator' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:status:CustomRoutingAccelerator' :: Maybe CustomRoutingAcceleratorStatus
status = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the custom routing accelerator.
customRoutingAccelerator_acceleratorArn :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.Text)
customRoutingAccelerator_acceleratorArn :: Lens' CustomRoutingAccelerator (Maybe Text)
customRoutingAccelerator_acceleratorArn = 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)

-- | The date and time that the accelerator was created.
customRoutingAccelerator_createdTime :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.UTCTime)
customRoutingAccelerator_createdTime :: Lens' CustomRoutingAccelerator (Maybe UTCTime)
customRoutingAccelerator_createdTime = 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) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Domain Name System (DNS) name that Global Accelerator creates that
-- points to an accelerator\'s static IPv4 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.
--
-- If you have a dual-stack accelerator, you also have a second DNS name,
-- @DualStackDnsName@, that points to both the A record and the AAAA record
-- for all four static addresses for the accelerator: two IPv4 addresses
-- and two IPv6 addresses.
--
-- For more information about the default DNS name, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/dns-addressing-custom-domains.dns-addressing.html Support for DNS addressing in Global Accelerator>
-- in the /Global Accelerator Developer Guide/.
customRoutingAccelerator_dnsName :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.Text)
customRoutingAccelerator_dnsName :: Lens' CustomRoutingAccelerator (Maybe Text)
customRoutingAccelerator_dnsName = 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)

-- | 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 :: Lens' CustomRoutingAccelerator (Maybe Bool)
customRoutingAccelerator_enabled = 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 IP address type that an accelerator supports. For a custom routing
-- accelerator, the value must be IPV4.
customRoutingAccelerator_ipAddressType :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe IpAddressType)
customRoutingAccelerator_ipAddressType :: Lens' CustomRoutingAccelerator (Maybe IpAddressType)
customRoutingAccelerator_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 static IP addresses that Global Accelerator associates with the
-- accelerator.
customRoutingAccelerator_ipSets :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe [IpSet])
customRoutingAccelerator_ipSets :: Lens' CustomRoutingAccelerator (Maybe [IpSet])
customRoutingAccelerator_ipSets = 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) 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 date and time that the accelerator was last modified.
customRoutingAccelerator_lastModifiedTime :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe Prelude.UTCTime)
customRoutingAccelerator_lastModifiedTime :: Lens' CustomRoutingAccelerator (Maybe UTCTime)
customRoutingAccelerator_lastModifiedTime = 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) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | 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 :: Lens' CustomRoutingAccelerator (Maybe Text)
customRoutingAccelerator_name = 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)

-- | Describes the deployment status of the accelerator.
customRoutingAccelerator_status :: Lens.Lens' CustomRoutingAccelerator (Prelude.Maybe CustomRoutingAcceleratorStatus)
customRoutingAccelerator_status :: Lens'
  CustomRoutingAccelerator (Maybe CustomRoutingAcceleratorStatus)
customRoutingAccelerator_status = 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)

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

instance Prelude.Hashable CustomRoutingAccelerator where
  hashWithSalt :: Int -> CustomRoutingAccelerator -> Int
hashWithSalt Int
_salt CustomRoutingAccelerator' {Maybe Bool
Maybe [IpSet]
Maybe Text
Maybe POSIX
Maybe CustomRoutingAcceleratorStatus
Maybe IpAddressType
status :: Maybe CustomRoutingAcceleratorStatus
name :: Maybe Text
lastModifiedTime :: Maybe POSIX
ipSets :: Maybe [IpSet]
ipAddressType :: Maybe IpAddressType
enabled :: Maybe Bool
dnsName :: Maybe Text
createdTime :: Maybe POSIX
acceleratorArn :: Maybe Text
$sel:status:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe CustomRoutingAcceleratorStatus
$sel:name:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
$sel:lastModifiedTime:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe POSIX
$sel:ipSets:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe [IpSet]
$sel:ipAddressType:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe IpAddressType
$sel:enabled:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Bool
$sel:dnsName:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
$sel:createdTime:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe POSIX
$sel:acceleratorArn:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
acceleratorArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dnsName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpAddressType
ipAddressType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [IpSet]
ipSets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomRoutingAcceleratorStatus
status

instance Prelude.NFData CustomRoutingAccelerator where
  rnf :: CustomRoutingAccelerator -> ()
rnf CustomRoutingAccelerator' {Maybe Bool
Maybe [IpSet]
Maybe Text
Maybe POSIX
Maybe CustomRoutingAcceleratorStatus
Maybe IpAddressType
status :: Maybe CustomRoutingAcceleratorStatus
name :: Maybe Text
lastModifiedTime :: Maybe POSIX
ipSets :: Maybe [IpSet]
ipAddressType :: Maybe IpAddressType
enabled :: Maybe Bool
dnsName :: Maybe Text
createdTime :: Maybe POSIX
acceleratorArn :: Maybe Text
$sel:status:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe CustomRoutingAcceleratorStatus
$sel:name:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
$sel:lastModifiedTime:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe POSIX
$sel:ipSets:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe [IpSet]
$sel:ipAddressType:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe IpAddressType
$sel:enabled:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Bool
$sel:dnsName:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
$sel:createdTime:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe POSIX
$sel:acceleratorArn:CustomRoutingAccelerator' :: CustomRoutingAccelerator -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceleratorArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dnsName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpAddressType
ipAddressType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [IpSet]
ipSets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomRoutingAcceleratorStatus
status