{-# 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.AutoScaling.Types.TrafficSourceState where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TrafficSourceState = TrafficSourceState'
{
TrafficSourceState -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
TrafficSourceState -> Maybe Text
trafficSource :: Prelude.Maybe Prelude.Text
}
deriving (TrafficSourceState -> TrafficSourceState -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrafficSourceState -> TrafficSourceState -> Bool
$c/= :: TrafficSourceState -> TrafficSourceState -> Bool
== :: TrafficSourceState -> TrafficSourceState -> Bool
$c== :: TrafficSourceState -> TrafficSourceState -> Bool
Prelude.Eq, ReadPrec [TrafficSourceState]
ReadPrec TrafficSourceState
Int -> ReadS TrafficSourceState
ReadS [TrafficSourceState]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrafficSourceState]
$creadListPrec :: ReadPrec [TrafficSourceState]
readPrec :: ReadPrec TrafficSourceState
$creadPrec :: ReadPrec TrafficSourceState
readList :: ReadS [TrafficSourceState]
$creadList :: ReadS [TrafficSourceState]
readsPrec :: Int -> ReadS TrafficSourceState
$creadsPrec :: Int -> ReadS TrafficSourceState
Prelude.Read, Int -> TrafficSourceState -> ShowS
[TrafficSourceState] -> ShowS
TrafficSourceState -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrafficSourceState] -> ShowS
$cshowList :: [TrafficSourceState] -> ShowS
show :: TrafficSourceState -> String
$cshow :: TrafficSourceState -> String
showsPrec :: Int -> TrafficSourceState -> ShowS
$cshowsPrec :: Int -> TrafficSourceState -> ShowS
Prelude.Show, forall x. Rep TrafficSourceState x -> TrafficSourceState
forall x. TrafficSourceState -> Rep TrafficSourceState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrafficSourceState x -> TrafficSourceState
$cfrom :: forall x. TrafficSourceState -> Rep TrafficSourceState x
Prelude.Generic)
newTrafficSourceState ::
TrafficSourceState
newTrafficSourceState :: TrafficSourceState
newTrafficSourceState =
TrafficSourceState'
{ $sel:state:TrafficSourceState' :: Maybe Text
state = forall a. Maybe a
Prelude.Nothing,
$sel:trafficSource:TrafficSourceState' :: Maybe Text
trafficSource = forall a. Maybe a
Prelude.Nothing
}
trafficSourceState_state :: Lens.Lens' TrafficSourceState (Prelude.Maybe Prelude.Text)
trafficSourceState_state :: Lens' TrafficSourceState (Maybe Text)
trafficSourceState_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficSourceState' {Maybe Text
state :: Maybe Text
$sel:state:TrafficSourceState' :: TrafficSourceState -> Maybe Text
state} -> Maybe Text
state) (\s :: TrafficSourceState
s@TrafficSourceState' {} Maybe Text
a -> TrafficSourceState
s {$sel:state:TrafficSourceState' :: Maybe Text
state = Maybe Text
a} :: TrafficSourceState)
trafficSourceState_trafficSource :: Lens.Lens' TrafficSourceState (Prelude.Maybe Prelude.Text)
trafficSourceState_trafficSource :: Lens' TrafficSourceState (Maybe Text)
trafficSourceState_trafficSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficSourceState' {Maybe Text
trafficSource :: Maybe Text
$sel:trafficSource:TrafficSourceState' :: TrafficSourceState -> Maybe Text
trafficSource} -> Maybe Text
trafficSource) (\s :: TrafficSourceState
s@TrafficSourceState' {} Maybe Text
a -> TrafficSourceState
s {$sel:trafficSource:TrafficSourceState' :: Maybe Text
trafficSource = Maybe Text
a} :: TrafficSourceState)
instance Data.FromXML TrafficSourceState where
parseXML :: [Node] -> Either String TrafficSourceState
parseXML [Node]
x =
Maybe Text -> Maybe Text -> TrafficSourceState
TrafficSourceState'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"State")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TrafficSource")
instance Prelude.Hashable TrafficSourceState where
hashWithSalt :: Int -> TrafficSourceState -> Int
hashWithSalt Int
_salt TrafficSourceState' {Maybe Text
trafficSource :: Maybe Text
state :: Maybe Text
$sel:trafficSource:TrafficSourceState' :: TrafficSourceState -> Maybe Text
$sel:state:TrafficSourceState' :: TrafficSourceState -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trafficSource
instance Prelude.NFData TrafficSourceState where
rnf :: TrafficSourceState -> ()
rnf TrafficSourceState' {Maybe Text
trafficSource :: Maybe Text
state :: Maybe Text
$sel:trafficSource:TrafficSourceState' :: TrafficSourceState -> Maybe Text
$sel:state:TrafficSourceState' :: TrafficSourceState -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trafficSource