{-# 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.ElasticBeanstalk.Types.StatusCodes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StatusCodes = StatusCodes'
{
StatusCodes -> Maybe Int
status2xx :: Prelude.Maybe Prelude.Int,
StatusCodes -> Maybe Int
status3xx :: Prelude.Maybe Prelude.Int,
StatusCodes -> Maybe Int
status4xx :: Prelude.Maybe Prelude.Int,
StatusCodes -> Maybe Int
status5xx :: Prelude.Maybe Prelude.Int
}
deriving (StatusCodes -> StatusCodes -> Bool
(StatusCodes -> StatusCodes -> Bool)
-> (StatusCodes -> StatusCodes -> Bool) -> Eq StatusCodes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StatusCodes -> StatusCodes -> Bool
$c/= :: StatusCodes -> StatusCodes -> Bool
== :: StatusCodes -> StatusCodes -> Bool
$c== :: StatusCodes -> StatusCodes -> Bool
Prelude.Eq, ReadPrec [StatusCodes]
ReadPrec StatusCodes
Int -> ReadS StatusCodes
ReadS [StatusCodes]
(Int -> ReadS StatusCodes)
-> ReadS [StatusCodes]
-> ReadPrec StatusCodes
-> ReadPrec [StatusCodes]
-> Read StatusCodes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StatusCodes]
$creadListPrec :: ReadPrec [StatusCodes]
readPrec :: ReadPrec StatusCodes
$creadPrec :: ReadPrec StatusCodes
readList :: ReadS [StatusCodes]
$creadList :: ReadS [StatusCodes]
readsPrec :: Int -> ReadS StatusCodes
$creadsPrec :: Int -> ReadS StatusCodes
Prelude.Read, Int -> StatusCodes -> ShowS
[StatusCodes] -> ShowS
StatusCodes -> String
(Int -> StatusCodes -> ShowS)
-> (StatusCodes -> String)
-> ([StatusCodes] -> ShowS)
-> Show StatusCodes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StatusCodes] -> ShowS
$cshowList :: [StatusCodes] -> ShowS
show :: StatusCodes -> String
$cshow :: StatusCodes -> String
showsPrec :: Int -> StatusCodes -> ShowS
$cshowsPrec :: Int -> StatusCodes -> ShowS
Prelude.Show, (forall x. StatusCodes -> Rep StatusCodes x)
-> (forall x. Rep StatusCodes x -> StatusCodes)
-> Generic StatusCodes
forall x. Rep StatusCodes x -> StatusCodes
forall x. StatusCodes -> Rep StatusCodes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StatusCodes x -> StatusCodes
$cfrom :: forall x. StatusCodes -> Rep StatusCodes x
Prelude.Generic)
newStatusCodes ::
StatusCodes
newStatusCodes :: StatusCodes
newStatusCodes =
StatusCodes' :: Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> StatusCodes
StatusCodes'
{ $sel:status2xx:StatusCodes' :: Maybe Int
status2xx = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:status3xx:StatusCodes' :: Maybe Int
status3xx = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:status4xx:StatusCodes' :: Maybe Int
status4xx = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:status5xx:StatusCodes' :: Maybe Int
status5xx = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
statusCodes_status2xx :: Lens.Lens' StatusCodes (Prelude.Maybe Prelude.Int)
statusCodes_status2xx :: (Maybe Int -> f (Maybe Int)) -> StatusCodes -> f StatusCodes
statusCodes_status2xx = (StatusCodes -> Maybe Int)
-> (StatusCodes -> Maybe Int -> StatusCodes)
-> Lens StatusCodes StatusCodes (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatusCodes' {Maybe Int
status2xx :: Maybe Int
$sel:status2xx:StatusCodes' :: StatusCodes -> Maybe Int
status2xx} -> Maybe Int
status2xx) (\s :: StatusCodes
s@StatusCodes' {} Maybe Int
a -> StatusCodes
s {$sel:status2xx:StatusCodes' :: Maybe Int
status2xx = Maybe Int
a} :: StatusCodes)
statusCodes_status3xx :: Lens.Lens' StatusCodes (Prelude.Maybe Prelude.Int)
statusCodes_status3xx :: (Maybe Int -> f (Maybe Int)) -> StatusCodes -> f StatusCodes
statusCodes_status3xx = (StatusCodes -> Maybe Int)
-> (StatusCodes -> Maybe Int -> StatusCodes)
-> Lens StatusCodes StatusCodes (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatusCodes' {Maybe Int
status3xx :: Maybe Int
$sel:status3xx:StatusCodes' :: StatusCodes -> Maybe Int
status3xx} -> Maybe Int
status3xx) (\s :: StatusCodes
s@StatusCodes' {} Maybe Int
a -> StatusCodes
s {$sel:status3xx:StatusCodes' :: Maybe Int
status3xx = Maybe Int
a} :: StatusCodes)
statusCodes_status4xx :: Lens.Lens' StatusCodes (Prelude.Maybe Prelude.Int)
statusCodes_status4xx :: (Maybe Int -> f (Maybe Int)) -> StatusCodes -> f StatusCodes
statusCodes_status4xx = (StatusCodes -> Maybe Int)
-> (StatusCodes -> Maybe Int -> StatusCodes)
-> Lens StatusCodes StatusCodes (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatusCodes' {Maybe Int
status4xx :: Maybe Int
$sel:status4xx:StatusCodes' :: StatusCodes -> Maybe Int
status4xx} -> Maybe Int
status4xx) (\s :: StatusCodes
s@StatusCodes' {} Maybe Int
a -> StatusCodes
s {$sel:status4xx:StatusCodes' :: Maybe Int
status4xx = Maybe Int
a} :: StatusCodes)
statusCodes_status5xx :: Lens.Lens' StatusCodes (Prelude.Maybe Prelude.Int)
statusCodes_status5xx :: (Maybe Int -> f (Maybe Int)) -> StatusCodes -> f StatusCodes
statusCodes_status5xx = (StatusCodes -> Maybe Int)
-> (StatusCodes -> Maybe Int -> StatusCodes)
-> Lens StatusCodes StatusCodes (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatusCodes' {Maybe Int
status5xx :: Maybe Int
$sel:status5xx:StatusCodes' :: StatusCodes -> Maybe Int
status5xx} -> Maybe Int
status5xx) (\s :: StatusCodes
s@StatusCodes' {} Maybe Int
a -> StatusCodes
s {$sel:status5xx:StatusCodes' :: Maybe Int
status5xx = Maybe Int
a} :: StatusCodes)
instance Core.FromXML StatusCodes where
parseXML :: [Node] -> Either String StatusCodes
parseXML [Node]
x =
Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> StatusCodes
StatusCodes'
(Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> StatusCodes)
-> Either String (Maybe Int)
-> Either
String (Maybe Int -> Maybe Int -> Maybe Int -> StatusCodes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status2xx")
Either String (Maybe Int -> Maybe Int -> Maybe Int -> StatusCodes)
-> Either String (Maybe Int)
-> Either String (Maybe Int -> Maybe Int -> StatusCodes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status3xx")
Either String (Maybe Int -> Maybe Int -> StatusCodes)
-> Either String (Maybe Int)
-> Either String (Maybe Int -> StatusCodes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status4xx")
Either String (Maybe Int -> StatusCodes)
-> Either String (Maybe Int) -> Either String StatusCodes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status5xx")
instance Prelude.Hashable StatusCodes
instance Prelude.NFData StatusCodes