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