{-# 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.ResourceReceivingAccess 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 ResourceReceivingAccess = ResourceReceivingAccess'
{
ResourceReceivingAccess -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ResourceReceivingAccess -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text
}
deriving (ResourceReceivingAccess -> ResourceReceivingAccess -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceReceivingAccess -> ResourceReceivingAccess -> Bool
$c/= :: ResourceReceivingAccess -> ResourceReceivingAccess -> Bool
== :: ResourceReceivingAccess -> ResourceReceivingAccess -> Bool
$c== :: ResourceReceivingAccess -> ResourceReceivingAccess -> Bool
Prelude.Eq, ReadPrec [ResourceReceivingAccess]
ReadPrec ResourceReceivingAccess
Int -> ReadS ResourceReceivingAccess
ReadS [ResourceReceivingAccess]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceReceivingAccess]
$creadListPrec :: ReadPrec [ResourceReceivingAccess]
readPrec :: ReadPrec ResourceReceivingAccess
$creadPrec :: ReadPrec ResourceReceivingAccess
readList :: ReadS [ResourceReceivingAccess]
$creadList :: ReadS [ResourceReceivingAccess]
readsPrec :: Int -> ReadS ResourceReceivingAccess
$creadsPrec :: Int -> ReadS ResourceReceivingAccess
Prelude.Read, Int -> ResourceReceivingAccess -> ShowS
[ResourceReceivingAccess] -> ShowS
ResourceReceivingAccess -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceReceivingAccess] -> ShowS
$cshowList :: [ResourceReceivingAccess] -> ShowS
show :: ResourceReceivingAccess -> String
$cshow :: ResourceReceivingAccess -> String
showsPrec :: Int -> ResourceReceivingAccess -> ShowS
$cshowsPrec :: Int -> ResourceReceivingAccess -> ShowS
Prelude.Show, forall x. Rep ResourceReceivingAccess x -> ResourceReceivingAccess
forall x. ResourceReceivingAccess -> Rep ResourceReceivingAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceReceivingAccess x -> ResourceReceivingAccess
$cfrom :: forall x. ResourceReceivingAccess -> Rep ResourceReceivingAccess x
Prelude.Generic)
newResourceReceivingAccess ::
ResourceReceivingAccess
newResourceReceivingAccess :: ResourceReceivingAccess
newResourceReceivingAccess =
ResourceReceivingAccess'
{ $sel:name:ResourceReceivingAccess' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:ResourceReceivingAccess' :: Maybe Text
resourceType = forall a. Maybe a
Prelude.Nothing
}
resourceReceivingAccess_name :: Lens.Lens' ResourceReceivingAccess (Prelude.Maybe Prelude.Text)
resourceReceivingAccess_name :: Lens' ResourceReceivingAccess (Maybe Text)
resourceReceivingAccess_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceReceivingAccess' {Maybe Text
name :: Maybe Text
$sel:name:ResourceReceivingAccess' :: ResourceReceivingAccess -> Maybe Text
name} -> Maybe Text
name) (\s :: ResourceReceivingAccess
s@ResourceReceivingAccess' {} Maybe Text
a -> ResourceReceivingAccess
s {$sel:name:ResourceReceivingAccess' :: Maybe Text
name = Maybe Text
a} :: ResourceReceivingAccess)
resourceReceivingAccess_resourceType :: Lens.Lens' ResourceReceivingAccess (Prelude.Maybe Prelude.Text)
resourceReceivingAccess_resourceType :: Lens' ResourceReceivingAccess (Maybe Text)
resourceReceivingAccess_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceReceivingAccess' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:ResourceReceivingAccess' :: ResourceReceivingAccess -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: ResourceReceivingAccess
s@ResourceReceivingAccess' {} Maybe Text
a -> ResourceReceivingAccess
s {$sel:resourceType:ResourceReceivingAccess' :: Maybe Text
resourceType = Maybe Text
a} :: ResourceReceivingAccess)
instance Data.FromJSON ResourceReceivingAccess where
parseJSON :: Value -> Parser ResourceReceivingAccess
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ResourceReceivingAccess"
( \Object
x ->
Maybe Text -> Maybe Text -> ResourceReceivingAccess
ResourceReceivingAccess'
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
"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
"resourceType")
)
instance Prelude.Hashable ResourceReceivingAccess where
hashWithSalt :: Int -> ResourceReceivingAccess -> Int
hashWithSalt Int
_salt ResourceReceivingAccess' {Maybe Text
resourceType :: Maybe Text
name :: Maybe Text
$sel:resourceType:ResourceReceivingAccess' :: ResourceReceivingAccess -> Maybe Text
$sel:name:ResourceReceivingAccess' :: ResourceReceivingAccess -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceType
instance Prelude.NFData ResourceReceivingAccess where
rnf :: ResourceReceivingAccess -> ()
rnf ResourceReceivingAccess' {Maybe Text
resourceType :: Maybe Text
name :: Maybe Text
$sel:resourceType:ResourceReceivingAccess' :: ResourceReceivingAccess -> Maybe Text
$sel:name:ResourceReceivingAccess' :: ResourceReceivingAccess -> Maybe Text
..} =
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
resourceType