{-# 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.Outposts.Types.Site where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Outposts.Types.RackPhysicalProperties
import qualified Amazonka.Prelude as Prelude
data Site = Site'
{ Site -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
Site -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Site -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Site -> Maybe Text
notes :: Prelude.Maybe Prelude.Text,
Site -> Maybe Text
operatingAddressCity :: Prelude.Maybe Prelude.Text,
Site -> Maybe Text
operatingAddressCountryCode :: Prelude.Maybe Prelude.Text,
Site -> Maybe Text
operatingAddressStateOrRegion :: Prelude.Maybe Prelude.Text,
Site -> Maybe RackPhysicalProperties
rackPhysicalProperties :: Prelude.Maybe RackPhysicalProperties,
Site -> Maybe Text
siteArn :: Prelude.Maybe Prelude.Text,
Site -> Maybe Text
siteId :: Prelude.Maybe Prelude.Text,
Site -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (Site -> Site -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Site -> Site -> Bool
$c/= :: Site -> Site -> Bool
== :: Site -> Site -> Bool
$c== :: Site -> Site -> Bool
Prelude.Eq, ReadPrec [Site]
ReadPrec Site
Int -> ReadS Site
ReadS [Site]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Site]
$creadListPrec :: ReadPrec [Site]
readPrec :: ReadPrec Site
$creadPrec :: ReadPrec Site
readList :: ReadS [Site]
$creadList :: ReadS [Site]
readsPrec :: Int -> ReadS Site
$creadsPrec :: Int -> ReadS Site
Prelude.Read, Int -> Site -> ShowS
[Site] -> ShowS
Site -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Site] -> ShowS
$cshowList :: [Site] -> ShowS
show :: Site -> String
$cshow :: Site -> String
showsPrec :: Int -> Site -> ShowS
$cshowsPrec :: Int -> Site -> ShowS
Prelude.Show, forall x. Rep Site x -> Site
forall x. Site -> Rep Site x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Site x -> Site
$cfrom :: forall x. Site -> Rep Site x
Prelude.Generic)
newSite ::
Site
newSite :: Site
newSite =
Site'
{ $sel:accountId:Site' :: Maybe Text
accountId = forall a. Maybe a
Prelude.Nothing,
$sel:description:Site' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:name:Site' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:notes:Site' :: Maybe Text
notes = forall a. Maybe a
Prelude.Nothing,
$sel:operatingAddressCity:Site' :: Maybe Text
operatingAddressCity = forall a. Maybe a
Prelude.Nothing,
$sel:operatingAddressCountryCode:Site' :: Maybe Text
operatingAddressCountryCode = forall a. Maybe a
Prelude.Nothing,
$sel:operatingAddressStateOrRegion:Site' :: Maybe Text
operatingAddressStateOrRegion = forall a. Maybe a
Prelude.Nothing,
$sel:rackPhysicalProperties:Site' :: Maybe RackPhysicalProperties
rackPhysicalProperties = forall a. Maybe a
Prelude.Nothing,
$sel:siteArn:Site' :: Maybe Text
siteArn = forall a. Maybe a
Prelude.Nothing,
$sel:siteId:Site' :: Maybe Text
siteId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:Site' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
site_accountId :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_accountId :: Lens' Site (Maybe Text)
site_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
accountId :: Maybe Text
$sel:accountId:Site' :: Site -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:accountId:Site' :: Maybe Text
accountId = Maybe Text
a} :: Site)
site_description :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_description :: Lens' Site (Maybe Text)
site_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
description :: Maybe Text
$sel:description:Site' :: Site -> Maybe Text
description} -> Maybe Text
description) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:description:Site' :: Maybe Text
description = Maybe Text
a} :: Site)
site_name :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_name :: Lens' Site (Maybe Text)
site_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
name :: Maybe Text
$sel:name:Site' :: Site -> Maybe Text
name} -> Maybe Text
name) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:name:Site' :: Maybe Text
name = Maybe Text
a} :: Site)
site_notes :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_notes :: Lens' Site (Maybe Text)
site_notes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
notes :: Maybe Text
$sel:notes:Site' :: Site -> Maybe Text
notes} -> Maybe Text
notes) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:notes:Site' :: Maybe Text
notes = Maybe Text
a} :: Site)
site_operatingAddressCity :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_operatingAddressCity :: Lens' Site (Maybe Text)
site_operatingAddressCity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
operatingAddressCity :: Maybe Text
$sel:operatingAddressCity:Site' :: Site -> Maybe Text
operatingAddressCity} -> Maybe Text
operatingAddressCity) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:operatingAddressCity:Site' :: Maybe Text
operatingAddressCity = Maybe Text
a} :: Site)
site_operatingAddressCountryCode :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_operatingAddressCountryCode :: Lens' Site (Maybe Text)
site_operatingAddressCountryCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
operatingAddressCountryCode :: Maybe Text
$sel:operatingAddressCountryCode:Site' :: Site -> Maybe Text
operatingAddressCountryCode} -> Maybe Text
operatingAddressCountryCode) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:operatingAddressCountryCode:Site' :: Maybe Text
operatingAddressCountryCode = Maybe Text
a} :: Site)
site_operatingAddressStateOrRegion :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_operatingAddressStateOrRegion :: Lens' Site (Maybe Text)
site_operatingAddressStateOrRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
operatingAddressStateOrRegion :: Maybe Text
$sel:operatingAddressStateOrRegion:Site' :: Site -> Maybe Text
operatingAddressStateOrRegion} -> Maybe Text
operatingAddressStateOrRegion) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:operatingAddressStateOrRegion:Site' :: Maybe Text
operatingAddressStateOrRegion = Maybe Text
a} :: Site)
site_rackPhysicalProperties :: Lens.Lens' Site (Prelude.Maybe RackPhysicalProperties)
site_rackPhysicalProperties :: Lens' Site (Maybe RackPhysicalProperties)
site_rackPhysicalProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe RackPhysicalProperties
rackPhysicalProperties :: Maybe RackPhysicalProperties
$sel:rackPhysicalProperties:Site' :: Site -> Maybe RackPhysicalProperties
rackPhysicalProperties} -> Maybe RackPhysicalProperties
rackPhysicalProperties) (\s :: Site
s@Site' {} Maybe RackPhysicalProperties
a -> Site
s {$sel:rackPhysicalProperties:Site' :: Maybe RackPhysicalProperties
rackPhysicalProperties = Maybe RackPhysicalProperties
a} :: Site)
site_siteArn :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_siteArn :: Lens' Site (Maybe Text)
site_siteArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
siteArn :: Maybe Text
$sel:siteArn:Site' :: Site -> Maybe Text
siteArn} -> Maybe Text
siteArn) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:siteArn:Site' :: Maybe Text
siteArn = Maybe Text
a} :: Site)
site_siteId :: Lens.Lens' Site (Prelude.Maybe Prelude.Text)
site_siteId :: Lens' Site (Maybe Text)
site_siteId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe Text
siteId :: Maybe Text
$sel:siteId:Site' :: Site -> Maybe Text
siteId} -> Maybe Text
siteId) (\s :: Site
s@Site' {} Maybe Text
a -> Site
s {$sel:siteId:Site' :: Maybe Text
siteId = Maybe Text
a} :: Site)
site_tags :: Lens.Lens' Site (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
site_tags :: Lens' Site (Maybe (HashMap Text Text))
site_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Site' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Site' :: Site -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Site
s@Site' {} Maybe (HashMap Text Text)
a -> Site
s {$sel:tags:Site' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Site) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON Site where
parseJSON :: Value -> Parser Site
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Site"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RackPhysicalProperties
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Site
Site'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AccountId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Notes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OperatingAddressCity")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OperatingAddressCountryCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OperatingAddressStateOrRegion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RackPhysicalProperties")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SiteArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SiteId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Site where
hashWithSalt :: Int -> Site -> Int
hashWithSalt Int
_salt Site' {Maybe Text
Maybe (HashMap Text Text)
Maybe RackPhysicalProperties
tags :: Maybe (HashMap Text Text)
siteId :: Maybe Text
siteArn :: Maybe Text
rackPhysicalProperties :: Maybe RackPhysicalProperties
operatingAddressStateOrRegion :: Maybe Text
operatingAddressCountryCode :: Maybe Text
operatingAddressCity :: Maybe Text
notes :: Maybe Text
name :: Maybe Text
description :: Maybe Text
accountId :: Maybe Text
$sel:tags:Site' :: Site -> Maybe (HashMap Text Text)
$sel:siteId:Site' :: Site -> Maybe Text
$sel:siteArn:Site' :: Site -> Maybe Text
$sel:rackPhysicalProperties:Site' :: Site -> Maybe RackPhysicalProperties
$sel:operatingAddressStateOrRegion:Site' :: Site -> Maybe Text
$sel:operatingAddressCountryCode:Site' :: Site -> Maybe Text
$sel:operatingAddressCity:Site' :: Site -> Maybe Text
$sel:notes:Site' :: Site -> Maybe Text
$sel:name:Site' :: Site -> Maybe Text
$sel:description:Site' :: Site -> Maybe Text
$sel:accountId:Site' :: Site -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operatingAddressCity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operatingAddressCountryCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operatingAddressStateOrRegion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RackPhysicalProperties
rackPhysicalProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
siteArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
siteId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData Site where
rnf :: Site -> ()
rnf Site' {Maybe Text
Maybe (HashMap Text Text)
Maybe RackPhysicalProperties
tags :: Maybe (HashMap Text Text)
siteId :: Maybe Text
siteArn :: Maybe Text
rackPhysicalProperties :: Maybe RackPhysicalProperties
operatingAddressStateOrRegion :: Maybe Text
operatingAddressCountryCode :: Maybe Text
operatingAddressCity :: Maybe Text
notes :: Maybe Text
name :: Maybe Text
description :: Maybe Text
accountId :: Maybe Text
$sel:tags:Site' :: Site -> Maybe (HashMap Text Text)
$sel:siteId:Site' :: Site -> Maybe Text
$sel:siteArn:Site' :: Site -> Maybe Text
$sel:rackPhysicalProperties:Site' :: Site -> Maybe RackPhysicalProperties
$sel:operatingAddressStateOrRegion:Site' :: Site -> Maybe Text
$sel:operatingAddressCountryCode:Site' :: Site -> Maybe Text
$sel:operatingAddressCity:Site' :: Site -> Maybe Text
$sel:notes:Site' :: Site -> Maybe Text
$sel:name:Site' :: Site -> Maybe Text
$sel:description:Site' :: Site -> Maybe Text
$sel:accountId:Site' :: Site -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
notes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operatingAddressCity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operatingAddressCountryCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operatingAddressStateOrRegion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RackPhysicalProperties
rackPhysicalProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
siteArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
siteId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags