{-# 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.WorkSpaces.Types.ImagePermission where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ImagePermission = ImagePermission'
{
ImagePermission -> Maybe Text
sharedAccountId :: Prelude.Maybe Prelude.Text
}
deriving (ImagePermission -> ImagePermission -> Bool
(ImagePermission -> ImagePermission -> Bool)
-> (ImagePermission -> ImagePermission -> Bool)
-> Eq ImagePermission
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImagePermission -> ImagePermission -> Bool
$c/= :: ImagePermission -> ImagePermission -> Bool
== :: ImagePermission -> ImagePermission -> Bool
$c== :: ImagePermission -> ImagePermission -> Bool
Prelude.Eq, ReadPrec [ImagePermission]
ReadPrec ImagePermission
Int -> ReadS ImagePermission
ReadS [ImagePermission]
(Int -> ReadS ImagePermission)
-> ReadS [ImagePermission]
-> ReadPrec ImagePermission
-> ReadPrec [ImagePermission]
-> Read ImagePermission
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImagePermission]
$creadListPrec :: ReadPrec [ImagePermission]
readPrec :: ReadPrec ImagePermission
$creadPrec :: ReadPrec ImagePermission
readList :: ReadS [ImagePermission]
$creadList :: ReadS [ImagePermission]
readsPrec :: Int -> ReadS ImagePermission
$creadsPrec :: Int -> ReadS ImagePermission
Prelude.Read, Int -> ImagePermission -> ShowS
[ImagePermission] -> ShowS
ImagePermission -> String
(Int -> ImagePermission -> ShowS)
-> (ImagePermission -> String)
-> ([ImagePermission] -> ShowS)
-> Show ImagePermission
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImagePermission] -> ShowS
$cshowList :: [ImagePermission] -> ShowS
show :: ImagePermission -> String
$cshow :: ImagePermission -> String
showsPrec :: Int -> ImagePermission -> ShowS
$cshowsPrec :: Int -> ImagePermission -> ShowS
Prelude.Show, (forall x. ImagePermission -> Rep ImagePermission x)
-> (forall x. Rep ImagePermission x -> ImagePermission)
-> Generic ImagePermission
forall x. Rep ImagePermission x -> ImagePermission
forall x. ImagePermission -> Rep ImagePermission x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImagePermission x -> ImagePermission
$cfrom :: forall x. ImagePermission -> Rep ImagePermission x
Prelude.Generic)
newImagePermission ::
ImagePermission
newImagePermission :: ImagePermission
newImagePermission =
ImagePermission' :: Maybe Text -> ImagePermission
ImagePermission' {$sel:sharedAccountId:ImagePermission' :: Maybe Text
sharedAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing}
imagePermission_sharedAccountId :: Lens.Lens' ImagePermission (Prelude.Maybe Prelude.Text)
imagePermission_sharedAccountId :: (Maybe Text -> f (Maybe Text))
-> ImagePermission -> f ImagePermission
imagePermission_sharedAccountId = (ImagePermission -> Maybe Text)
-> (ImagePermission -> Maybe Text -> ImagePermission)
-> Lens ImagePermission ImagePermission (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImagePermission' {Maybe Text
sharedAccountId :: Maybe Text
$sel:sharedAccountId:ImagePermission' :: ImagePermission -> Maybe Text
sharedAccountId} -> Maybe Text
sharedAccountId) (\s :: ImagePermission
s@ImagePermission' {} Maybe Text
a -> ImagePermission
s {$sel:sharedAccountId:ImagePermission' :: Maybe Text
sharedAccountId = Maybe Text
a} :: ImagePermission)
instance Core.FromJSON ImagePermission where
parseJSON :: Value -> Parser ImagePermission
parseJSON =
String
-> (Object -> Parser ImagePermission)
-> Value
-> Parser ImagePermission
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ImagePermission"
( \Object
x ->
Maybe Text -> ImagePermission
ImagePermission'
(Maybe Text -> ImagePermission)
-> Parser (Maybe Text) -> Parser ImagePermission
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
"SharedAccountId")
)
instance Prelude.Hashable ImagePermission
instance Prelude.NFData ImagePermission