{-# 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.Lightsail.Types.ContainerServicePower where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ContainerServicePower = ContainerServicePower'
{
ContainerServicePower -> Maybe Text
powerId :: Prelude.Maybe Prelude.Text,
ContainerServicePower -> Maybe Double
cpuCount :: Prelude.Maybe Prelude.Double,
ContainerServicePower -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ContainerServicePower -> Maybe Double
price :: Prelude.Maybe Prelude.Double,
ContainerServicePower -> Maybe Bool
isActive :: Prelude.Maybe Prelude.Bool,
ContainerServicePower -> Maybe Double
ramSizeInGb :: Prelude.Maybe Prelude.Double
}
deriving (ContainerServicePower -> ContainerServicePower -> Bool
(ContainerServicePower -> ContainerServicePower -> Bool)
-> (ContainerServicePower -> ContainerServicePower -> Bool)
-> Eq ContainerServicePower
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerServicePower -> ContainerServicePower -> Bool
$c/= :: ContainerServicePower -> ContainerServicePower -> Bool
== :: ContainerServicePower -> ContainerServicePower -> Bool
$c== :: ContainerServicePower -> ContainerServicePower -> Bool
Prelude.Eq, ReadPrec [ContainerServicePower]
ReadPrec ContainerServicePower
Int -> ReadS ContainerServicePower
ReadS [ContainerServicePower]
(Int -> ReadS ContainerServicePower)
-> ReadS [ContainerServicePower]
-> ReadPrec ContainerServicePower
-> ReadPrec [ContainerServicePower]
-> Read ContainerServicePower
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerServicePower]
$creadListPrec :: ReadPrec [ContainerServicePower]
readPrec :: ReadPrec ContainerServicePower
$creadPrec :: ReadPrec ContainerServicePower
readList :: ReadS [ContainerServicePower]
$creadList :: ReadS [ContainerServicePower]
readsPrec :: Int -> ReadS ContainerServicePower
$creadsPrec :: Int -> ReadS ContainerServicePower
Prelude.Read, Int -> ContainerServicePower -> ShowS
[ContainerServicePower] -> ShowS
ContainerServicePower -> String
(Int -> ContainerServicePower -> ShowS)
-> (ContainerServicePower -> String)
-> ([ContainerServicePower] -> ShowS)
-> Show ContainerServicePower
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerServicePower] -> ShowS
$cshowList :: [ContainerServicePower] -> ShowS
show :: ContainerServicePower -> String
$cshow :: ContainerServicePower -> String
showsPrec :: Int -> ContainerServicePower -> ShowS
$cshowsPrec :: Int -> ContainerServicePower -> ShowS
Prelude.Show, (forall x. ContainerServicePower -> Rep ContainerServicePower x)
-> (forall x. Rep ContainerServicePower x -> ContainerServicePower)
-> Generic ContainerServicePower
forall x. Rep ContainerServicePower x -> ContainerServicePower
forall x. ContainerServicePower -> Rep ContainerServicePower x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerServicePower x -> ContainerServicePower
$cfrom :: forall x. ContainerServicePower -> Rep ContainerServicePower x
Prelude.Generic)
newContainerServicePower ::
ContainerServicePower
newContainerServicePower :: ContainerServicePower
newContainerServicePower =
ContainerServicePower' :: Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Double
-> ContainerServicePower
ContainerServicePower'
{ $sel:powerId:ContainerServicePower' :: Maybe Text
powerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cpuCount:ContainerServicePower' :: Maybe Double
cpuCount = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:name:ContainerServicePower' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:price:ContainerServicePower' :: Maybe Double
price = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:isActive:ContainerServicePower' :: Maybe Bool
isActive = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:ramSizeInGb:ContainerServicePower' :: Maybe Double
ramSizeInGb = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
containerServicePower_powerId :: Lens.Lens' ContainerServicePower (Prelude.Maybe Prelude.Text)
containerServicePower_powerId :: (Maybe Text -> f (Maybe Text))
-> ContainerServicePower -> f ContainerServicePower
containerServicePower_powerId = (ContainerServicePower -> Maybe Text)
-> (ContainerServicePower -> Maybe Text -> ContainerServicePower)
-> Lens
ContainerServicePower
ContainerServicePower
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServicePower' {Maybe Text
powerId :: Maybe Text
$sel:powerId:ContainerServicePower' :: ContainerServicePower -> Maybe Text
powerId} -> Maybe Text
powerId) (\s :: ContainerServicePower
s@ContainerServicePower' {} Maybe Text
a -> ContainerServicePower
s {$sel:powerId:ContainerServicePower' :: Maybe Text
powerId = Maybe Text
a} :: ContainerServicePower)
containerServicePower_cpuCount :: Lens.Lens' ContainerServicePower (Prelude.Maybe Prelude.Double)
containerServicePower_cpuCount :: (Maybe Double -> f (Maybe Double))
-> ContainerServicePower -> f ContainerServicePower
containerServicePower_cpuCount = (ContainerServicePower -> Maybe Double)
-> (ContainerServicePower -> Maybe Double -> ContainerServicePower)
-> Lens
ContainerServicePower
ContainerServicePower
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServicePower' {Maybe Double
cpuCount :: Maybe Double
$sel:cpuCount:ContainerServicePower' :: ContainerServicePower -> Maybe Double
cpuCount} -> Maybe Double
cpuCount) (\s :: ContainerServicePower
s@ContainerServicePower' {} Maybe Double
a -> ContainerServicePower
s {$sel:cpuCount:ContainerServicePower' :: Maybe Double
cpuCount = Maybe Double
a} :: ContainerServicePower)
containerServicePower_name :: Lens.Lens' ContainerServicePower (Prelude.Maybe Prelude.Text)
containerServicePower_name :: (Maybe Text -> f (Maybe Text))
-> ContainerServicePower -> f ContainerServicePower
containerServicePower_name = (ContainerServicePower -> Maybe Text)
-> (ContainerServicePower -> Maybe Text -> ContainerServicePower)
-> Lens
ContainerServicePower
ContainerServicePower
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServicePower' {Maybe Text
name :: Maybe Text
$sel:name:ContainerServicePower' :: ContainerServicePower -> Maybe Text
name} -> Maybe Text
name) (\s :: ContainerServicePower
s@ContainerServicePower' {} Maybe Text
a -> ContainerServicePower
s {$sel:name:ContainerServicePower' :: Maybe Text
name = Maybe Text
a} :: ContainerServicePower)
containerServicePower_price :: Lens.Lens' ContainerServicePower (Prelude.Maybe Prelude.Double)
containerServicePower_price :: (Maybe Double -> f (Maybe Double))
-> ContainerServicePower -> f ContainerServicePower
containerServicePower_price = (ContainerServicePower -> Maybe Double)
-> (ContainerServicePower -> Maybe Double -> ContainerServicePower)
-> Lens
ContainerServicePower
ContainerServicePower
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServicePower' {Maybe Double
price :: Maybe Double
$sel:price:ContainerServicePower' :: ContainerServicePower -> Maybe Double
price} -> Maybe Double
price) (\s :: ContainerServicePower
s@ContainerServicePower' {} Maybe Double
a -> ContainerServicePower
s {$sel:price:ContainerServicePower' :: Maybe Double
price = Maybe Double
a} :: ContainerServicePower)
containerServicePower_isActive :: Lens.Lens' ContainerServicePower (Prelude.Maybe Prelude.Bool)
containerServicePower_isActive :: (Maybe Bool -> f (Maybe Bool))
-> ContainerServicePower -> f ContainerServicePower
containerServicePower_isActive = (ContainerServicePower -> Maybe Bool)
-> (ContainerServicePower -> Maybe Bool -> ContainerServicePower)
-> Lens
ContainerServicePower
ContainerServicePower
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServicePower' {Maybe Bool
isActive :: Maybe Bool
$sel:isActive:ContainerServicePower' :: ContainerServicePower -> Maybe Bool
isActive} -> Maybe Bool
isActive) (\s :: ContainerServicePower
s@ContainerServicePower' {} Maybe Bool
a -> ContainerServicePower
s {$sel:isActive:ContainerServicePower' :: Maybe Bool
isActive = Maybe Bool
a} :: ContainerServicePower)
containerServicePower_ramSizeInGb :: Lens.Lens' ContainerServicePower (Prelude.Maybe Prelude.Double)
containerServicePower_ramSizeInGb :: (Maybe Double -> f (Maybe Double))
-> ContainerServicePower -> f ContainerServicePower
containerServicePower_ramSizeInGb = (ContainerServicePower -> Maybe Double)
-> (ContainerServicePower -> Maybe Double -> ContainerServicePower)
-> Lens
ContainerServicePower
ContainerServicePower
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServicePower' {Maybe Double
ramSizeInGb :: Maybe Double
$sel:ramSizeInGb:ContainerServicePower' :: ContainerServicePower -> Maybe Double
ramSizeInGb} -> Maybe Double
ramSizeInGb) (\s :: ContainerServicePower
s@ContainerServicePower' {} Maybe Double
a -> ContainerServicePower
s {$sel:ramSizeInGb:ContainerServicePower' :: Maybe Double
ramSizeInGb = Maybe Double
a} :: ContainerServicePower)
instance Core.FromJSON ContainerServicePower where
parseJSON :: Value -> Parser ContainerServicePower
parseJSON =
String
-> (Object -> Parser ContainerServicePower)
-> Value
-> Parser ContainerServicePower
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ContainerServicePower"
( \Object
x ->
Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Double
-> ContainerServicePower
ContainerServicePower'
(Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Double
-> ContainerServicePower)
-> Parser (Maybe Text)
-> Parser
(Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Double
-> ContainerServicePower)
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
"powerId")
Parser
(Maybe Double
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Double
-> ContainerServicePower)
-> Parser (Maybe Double)
-> Parser
(Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Double
-> ContainerServicePower)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cpuCount")
Parser
(Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Double
-> ContainerServicePower)
-> Parser (Maybe Text)
-> Parser
(Maybe Double
-> Maybe Bool -> Maybe Double -> ContainerServicePower)
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
"name")
Parser
(Maybe Double
-> Maybe Bool -> Maybe Double -> ContainerServicePower)
-> Parser (Maybe Double)
-> Parser (Maybe Bool -> Maybe Double -> ContainerServicePower)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"price")
Parser (Maybe Bool -> Maybe Double -> ContainerServicePower)
-> Parser (Maybe Bool)
-> Parser (Maybe Double -> ContainerServicePower)
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
"isActive")
Parser (Maybe Double -> ContainerServicePower)
-> Parser (Maybe Double) -> Parser ContainerServicePower
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ramSizeInGb")
)
instance Prelude.Hashable ContainerServicePower
instance Prelude.NFData ContainerServicePower