{-# 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 #-}
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
data CustomRoutingAccelerator = CustomRoutingAccelerator'
{
CustomRoutingAccelerator -> Maybe Text
acceleratorArn :: Prelude.Maybe Prelude.Text,
CustomRoutingAccelerator -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
CustomRoutingAccelerator -> Maybe Text
dnsName :: Prelude.Maybe Prelude.Text,
CustomRoutingAccelerator -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
CustomRoutingAccelerator -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
CustomRoutingAccelerator -> Maybe [IpSet]
ipSets :: Prelude.Maybe [IpSet],
CustomRoutingAccelerator -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
CustomRoutingAccelerator -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
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)
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
}
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)
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
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)
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)
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)
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
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
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)
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