{-# 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.CustomRoutingAcceleratorAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomRoutingAcceleratorAttributes = CustomRoutingAcceleratorAttributes'
{
CustomRoutingAcceleratorAttributes -> Maybe Text
flowLogsS3Prefix :: Prelude.Maybe Prelude.Text,
CustomRoutingAcceleratorAttributes -> Maybe Bool
flowLogsEnabled :: Prelude.Maybe Prelude.Bool,
CustomRoutingAcceleratorAttributes -> Maybe Text
flowLogsS3Bucket :: Prelude.Maybe Prelude.Text
}
deriving (CustomRoutingAcceleratorAttributes
-> CustomRoutingAcceleratorAttributes -> Bool
(CustomRoutingAcceleratorAttributes
-> CustomRoutingAcceleratorAttributes -> Bool)
-> (CustomRoutingAcceleratorAttributes
-> CustomRoutingAcceleratorAttributes -> Bool)
-> Eq CustomRoutingAcceleratorAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomRoutingAcceleratorAttributes
-> CustomRoutingAcceleratorAttributes -> Bool
$c/= :: CustomRoutingAcceleratorAttributes
-> CustomRoutingAcceleratorAttributes -> Bool
== :: CustomRoutingAcceleratorAttributes
-> CustomRoutingAcceleratorAttributes -> Bool
$c== :: CustomRoutingAcceleratorAttributes
-> CustomRoutingAcceleratorAttributes -> Bool
Prelude.Eq, ReadPrec [CustomRoutingAcceleratorAttributes]
ReadPrec CustomRoutingAcceleratorAttributes
Int -> ReadS CustomRoutingAcceleratorAttributes
ReadS [CustomRoutingAcceleratorAttributes]
(Int -> ReadS CustomRoutingAcceleratorAttributes)
-> ReadS [CustomRoutingAcceleratorAttributes]
-> ReadPrec CustomRoutingAcceleratorAttributes
-> ReadPrec [CustomRoutingAcceleratorAttributes]
-> Read CustomRoutingAcceleratorAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomRoutingAcceleratorAttributes]
$creadListPrec :: ReadPrec [CustomRoutingAcceleratorAttributes]
readPrec :: ReadPrec CustomRoutingAcceleratorAttributes
$creadPrec :: ReadPrec CustomRoutingAcceleratorAttributes
readList :: ReadS [CustomRoutingAcceleratorAttributes]
$creadList :: ReadS [CustomRoutingAcceleratorAttributes]
readsPrec :: Int -> ReadS CustomRoutingAcceleratorAttributes
$creadsPrec :: Int -> ReadS CustomRoutingAcceleratorAttributes
Prelude.Read, Int -> CustomRoutingAcceleratorAttributes -> ShowS
[CustomRoutingAcceleratorAttributes] -> ShowS
CustomRoutingAcceleratorAttributes -> String
(Int -> CustomRoutingAcceleratorAttributes -> ShowS)
-> (CustomRoutingAcceleratorAttributes -> String)
-> ([CustomRoutingAcceleratorAttributes] -> ShowS)
-> Show CustomRoutingAcceleratorAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomRoutingAcceleratorAttributes] -> ShowS
$cshowList :: [CustomRoutingAcceleratorAttributes] -> ShowS
show :: CustomRoutingAcceleratorAttributes -> String
$cshow :: CustomRoutingAcceleratorAttributes -> String
showsPrec :: Int -> CustomRoutingAcceleratorAttributes -> ShowS
$cshowsPrec :: Int -> CustomRoutingAcceleratorAttributes -> ShowS
Prelude.Show, (forall x.
CustomRoutingAcceleratorAttributes
-> Rep CustomRoutingAcceleratorAttributes x)
-> (forall x.
Rep CustomRoutingAcceleratorAttributes x
-> CustomRoutingAcceleratorAttributes)
-> Generic CustomRoutingAcceleratorAttributes
forall x.
Rep CustomRoutingAcceleratorAttributes x
-> CustomRoutingAcceleratorAttributes
forall x.
CustomRoutingAcceleratorAttributes
-> Rep CustomRoutingAcceleratorAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomRoutingAcceleratorAttributes x
-> CustomRoutingAcceleratorAttributes
$cfrom :: forall x.
CustomRoutingAcceleratorAttributes
-> Rep CustomRoutingAcceleratorAttributes x
Prelude.Generic)
newCustomRoutingAcceleratorAttributes ::
CustomRoutingAcceleratorAttributes
newCustomRoutingAcceleratorAttributes :: CustomRoutingAcceleratorAttributes
newCustomRoutingAcceleratorAttributes =
CustomRoutingAcceleratorAttributes' :: Maybe Text
-> Maybe Bool -> Maybe Text -> CustomRoutingAcceleratorAttributes
CustomRoutingAcceleratorAttributes'
{ $sel:flowLogsS3Prefix:CustomRoutingAcceleratorAttributes' :: Maybe Text
flowLogsS3Prefix =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:flowLogsEnabled:CustomRoutingAcceleratorAttributes' :: Maybe Bool
flowLogsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:flowLogsS3Bucket:CustomRoutingAcceleratorAttributes' :: Maybe Text
flowLogsS3Bucket = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
customRoutingAcceleratorAttributes_flowLogsS3Prefix :: Lens.Lens' CustomRoutingAcceleratorAttributes (Prelude.Maybe Prelude.Text)
customRoutingAcceleratorAttributes_flowLogsS3Prefix :: (Maybe Text -> f (Maybe Text))
-> CustomRoutingAcceleratorAttributes
-> f CustomRoutingAcceleratorAttributes
customRoutingAcceleratorAttributes_flowLogsS3Prefix = (CustomRoutingAcceleratorAttributes -> Maybe Text)
-> (CustomRoutingAcceleratorAttributes
-> Maybe Text -> CustomRoutingAcceleratorAttributes)
-> Lens
CustomRoutingAcceleratorAttributes
CustomRoutingAcceleratorAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAcceleratorAttributes' {Maybe Text
flowLogsS3Prefix :: Maybe Text
$sel:flowLogsS3Prefix:CustomRoutingAcceleratorAttributes' :: CustomRoutingAcceleratorAttributes -> Maybe Text
flowLogsS3Prefix} -> Maybe Text
flowLogsS3Prefix) (\s :: CustomRoutingAcceleratorAttributes
s@CustomRoutingAcceleratorAttributes' {} Maybe Text
a -> CustomRoutingAcceleratorAttributes
s {$sel:flowLogsS3Prefix:CustomRoutingAcceleratorAttributes' :: Maybe Text
flowLogsS3Prefix = Maybe Text
a} :: CustomRoutingAcceleratorAttributes)
customRoutingAcceleratorAttributes_flowLogsEnabled :: Lens.Lens' CustomRoutingAcceleratorAttributes (Prelude.Maybe Prelude.Bool)
customRoutingAcceleratorAttributes_flowLogsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> CustomRoutingAcceleratorAttributes
-> f CustomRoutingAcceleratorAttributes
customRoutingAcceleratorAttributes_flowLogsEnabled = (CustomRoutingAcceleratorAttributes -> Maybe Bool)
-> (CustomRoutingAcceleratorAttributes
-> Maybe Bool -> CustomRoutingAcceleratorAttributes)
-> Lens
CustomRoutingAcceleratorAttributes
CustomRoutingAcceleratorAttributes
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAcceleratorAttributes' {Maybe Bool
flowLogsEnabled :: Maybe Bool
$sel:flowLogsEnabled:CustomRoutingAcceleratorAttributes' :: CustomRoutingAcceleratorAttributes -> Maybe Bool
flowLogsEnabled} -> Maybe Bool
flowLogsEnabled) (\s :: CustomRoutingAcceleratorAttributes
s@CustomRoutingAcceleratorAttributes' {} Maybe Bool
a -> CustomRoutingAcceleratorAttributes
s {$sel:flowLogsEnabled:CustomRoutingAcceleratorAttributes' :: Maybe Bool
flowLogsEnabled = Maybe Bool
a} :: CustomRoutingAcceleratorAttributes)
customRoutingAcceleratorAttributes_flowLogsS3Bucket :: Lens.Lens' CustomRoutingAcceleratorAttributes (Prelude.Maybe Prelude.Text)
customRoutingAcceleratorAttributes_flowLogsS3Bucket :: (Maybe Text -> f (Maybe Text))
-> CustomRoutingAcceleratorAttributes
-> f CustomRoutingAcceleratorAttributes
customRoutingAcceleratorAttributes_flowLogsS3Bucket = (CustomRoutingAcceleratorAttributes -> Maybe Text)
-> (CustomRoutingAcceleratorAttributes
-> Maybe Text -> CustomRoutingAcceleratorAttributes)
-> Lens
CustomRoutingAcceleratorAttributes
CustomRoutingAcceleratorAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomRoutingAcceleratorAttributes' {Maybe Text
flowLogsS3Bucket :: Maybe Text
$sel:flowLogsS3Bucket:CustomRoutingAcceleratorAttributes' :: CustomRoutingAcceleratorAttributes -> Maybe Text
flowLogsS3Bucket} -> Maybe Text
flowLogsS3Bucket) (\s :: CustomRoutingAcceleratorAttributes
s@CustomRoutingAcceleratorAttributes' {} Maybe Text
a -> CustomRoutingAcceleratorAttributes
s {$sel:flowLogsS3Bucket:CustomRoutingAcceleratorAttributes' :: Maybe Text
flowLogsS3Bucket = Maybe Text
a} :: CustomRoutingAcceleratorAttributes)
instance
Core.FromJSON
CustomRoutingAcceleratorAttributes
where
parseJSON :: Value -> Parser CustomRoutingAcceleratorAttributes
parseJSON =
String
-> (Object -> Parser CustomRoutingAcceleratorAttributes)
-> Value
-> Parser CustomRoutingAcceleratorAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomRoutingAcceleratorAttributes"
( \Object
x ->
Maybe Text
-> Maybe Bool -> Maybe Text -> CustomRoutingAcceleratorAttributes
CustomRoutingAcceleratorAttributes'
(Maybe Text
-> Maybe Bool -> Maybe Text -> CustomRoutingAcceleratorAttributes)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool -> Maybe Text -> CustomRoutingAcceleratorAttributes)
forall (f :: * -> *) a b. Functor 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
"FlowLogsS3Prefix")
Parser
(Maybe Bool -> Maybe Text -> CustomRoutingAcceleratorAttributes)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> CustomRoutingAcceleratorAttributes)
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
"FlowLogsEnabled")
Parser (Maybe Text -> CustomRoutingAcceleratorAttributes)
-> Parser (Maybe Text) -> Parser CustomRoutingAcceleratorAttributes
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
"FlowLogsS3Bucket")
)
instance
Prelude.Hashable
CustomRoutingAcceleratorAttributes
instance
Prelude.NFData
CustomRoutingAcceleratorAttributes