{-# 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.StorageGateway.Types.FileShareInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.StorageGateway.Types.FileShareType
data FileShareInfo = FileShareInfo'
{ FileShareInfo -> Maybe Text
fileShareStatus :: Prelude.Maybe Prelude.Text,
FileShareInfo -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
FileShareInfo -> Maybe Text
fileShareId :: Prelude.Maybe Prelude.Text,
FileShareInfo -> Maybe Text
fileShareARN :: Prelude.Maybe Prelude.Text,
FileShareInfo -> Maybe FileShareType
fileShareType :: Prelude.Maybe FileShareType
}
deriving (FileShareInfo -> FileShareInfo -> Bool
(FileShareInfo -> FileShareInfo -> Bool)
-> (FileShareInfo -> FileShareInfo -> Bool) -> Eq FileShareInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileShareInfo -> FileShareInfo -> Bool
$c/= :: FileShareInfo -> FileShareInfo -> Bool
== :: FileShareInfo -> FileShareInfo -> Bool
$c== :: FileShareInfo -> FileShareInfo -> Bool
Prelude.Eq, ReadPrec [FileShareInfo]
ReadPrec FileShareInfo
Int -> ReadS FileShareInfo
ReadS [FileShareInfo]
(Int -> ReadS FileShareInfo)
-> ReadS [FileShareInfo]
-> ReadPrec FileShareInfo
-> ReadPrec [FileShareInfo]
-> Read FileShareInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileShareInfo]
$creadListPrec :: ReadPrec [FileShareInfo]
readPrec :: ReadPrec FileShareInfo
$creadPrec :: ReadPrec FileShareInfo
readList :: ReadS [FileShareInfo]
$creadList :: ReadS [FileShareInfo]
readsPrec :: Int -> ReadS FileShareInfo
$creadsPrec :: Int -> ReadS FileShareInfo
Prelude.Read, Int -> FileShareInfo -> ShowS
[FileShareInfo] -> ShowS
FileShareInfo -> String
(Int -> FileShareInfo -> ShowS)
-> (FileShareInfo -> String)
-> ([FileShareInfo] -> ShowS)
-> Show FileShareInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileShareInfo] -> ShowS
$cshowList :: [FileShareInfo] -> ShowS
show :: FileShareInfo -> String
$cshow :: FileShareInfo -> String
showsPrec :: Int -> FileShareInfo -> ShowS
$cshowsPrec :: Int -> FileShareInfo -> ShowS
Prelude.Show, (forall x. FileShareInfo -> Rep FileShareInfo x)
-> (forall x. Rep FileShareInfo x -> FileShareInfo)
-> Generic FileShareInfo
forall x. Rep FileShareInfo x -> FileShareInfo
forall x. FileShareInfo -> Rep FileShareInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileShareInfo x -> FileShareInfo
$cfrom :: forall x. FileShareInfo -> Rep FileShareInfo x
Prelude.Generic)
newFileShareInfo ::
FileShareInfo
newFileShareInfo :: FileShareInfo
newFileShareInfo =
FileShareInfo' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileShareType
-> FileShareInfo
FileShareInfo'
{ $sel:fileShareStatus:FileShareInfo' :: Maybe Text
fileShareStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayARN:FileShareInfo' :: Maybe Text
gatewayARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileShareId:FileShareInfo' :: Maybe Text
fileShareId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileShareARN:FileShareInfo' :: Maybe Text
fileShareARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileShareType:FileShareInfo' :: Maybe FileShareType
fileShareType = Maybe FileShareType
forall a. Maybe a
Prelude.Nothing
}
fileShareInfo_fileShareStatus :: Lens.Lens' FileShareInfo (Prelude.Maybe Prelude.Text)
fileShareInfo_fileShareStatus :: (Maybe Text -> f (Maybe Text)) -> FileShareInfo -> f FileShareInfo
fileShareInfo_fileShareStatus = (FileShareInfo -> Maybe Text)
-> (FileShareInfo -> Maybe Text -> FileShareInfo)
-> Lens FileShareInfo FileShareInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileShareInfo' {Maybe Text
fileShareStatus :: Maybe Text
$sel:fileShareStatus:FileShareInfo' :: FileShareInfo -> Maybe Text
fileShareStatus} -> Maybe Text
fileShareStatus) (\s :: FileShareInfo
s@FileShareInfo' {} Maybe Text
a -> FileShareInfo
s {$sel:fileShareStatus:FileShareInfo' :: Maybe Text
fileShareStatus = Maybe Text
a} :: FileShareInfo)
fileShareInfo_gatewayARN :: Lens.Lens' FileShareInfo (Prelude.Maybe Prelude.Text)
fileShareInfo_gatewayARN :: (Maybe Text -> f (Maybe Text)) -> FileShareInfo -> f FileShareInfo
fileShareInfo_gatewayARN = (FileShareInfo -> Maybe Text)
-> (FileShareInfo -> Maybe Text -> FileShareInfo)
-> Lens FileShareInfo FileShareInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileShareInfo' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:FileShareInfo' :: FileShareInfo -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: FileShareInfo
s@FileShareInfo' {} Maybe Text
a -> FileShareInfo
s {$sel:gatewayARN:FileShareInfo' :: Maybe Text
gatewayARN = Maybe Text
a} :: FileShareInfo)
fileShareInfo_fileShareId :: Lens.Lens' FileShareInfo (Prelude.Maybe Prelude.Text)
fileShareInfo_fileShareId :: (Maybe Text -> f (Maybe Text)) -> FileShareInfo -> f FileShareInfo
fileShareInfo_fileShareId = (FileShareInfo -> Maybe Text)
-> (FileShareInfo -> Maybe Text -> FileShareInfo)
-> Lens FileShareInfo FileShareInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileShareInfo' {Maybe Text
fileShareId :: Maybe Text
$sel:fileShareId:FileShareInfo' :: FileShareInfo -> Maybe Text
fileShareId} -> Maybe Text
fileShareId) (\s :: FileShareInfo
s@FileShareInfo' {} Maybe Text
a -> FileShareInfo
s {$sel:fileShareId:FileShareInfo' :: Maybe Text
fileShareId = Maybe Text
a} :: FileShareInfo)
fileShareInfo_fileShareARN :: Lens.Lens' FileShareInfo (Prelude.Maybe Prelude.Text)
fileShareInfo_fileShareARN :: (Maybe Text -> f (Maybe Text)) -> FileShareInfo -> f FileShareInfo
fileShareInfo_fileShareARN = (FileShareInfo -> Maybe Text)
-> (FileShareInfo -> Maybe Text -> FileShareInfo)
-> Lens FileShareInfo FileShareInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileShareInfo' {Maybe Text
fileShareARN :: Maybe Text
$sel:fileShareARN:FileShareInfo' :: FileShareInfo -> Maybe Text
fileShareARN} -> Maybe Text
fileShareARN) (\s :: FileShareInfo
s@FileShareInfo' {} Maybe Text
a -> FileShareInfo
s {$sel:fileShareARN:FileShareInfo' :: Maybe Text
fileShareARN = Maybe Text
a} :: FileShareInfo)
fileShareInfo_fileShareType :: Lens.Lens' FileShareInfo (Prelude.Maybe FileShareType)
fileShareInfo_fileShareType :: (Maybe FileShareType -> f (Maybe FileShareType))
-> FileShareInfo -> f FileShareInfo
fileShareInfo_fileShareType = (FileShareInfo -> Maybe FileShareType)
-> (FileShareInfo -> Maybe FileShareType -> FileShareInfo)
-> Lens
FileShareInfo
FileShareInfo
(Maybe FileShareType)
(Maybe FileShareType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileShareInfo' {Maybe FileShareType
fileShareType :: Maybe FileShareType
$sel:fileShareType:FileShareInfo' :: FileShareInfo -> Maybe FileShareType
fileShareType} -> Maybe FileShareType
fileShareType) (\s :: FileShareInfo
s@FileShareInfo' {} Maybe FileShareType
a -> FileShareInfo
s {$sel:fileShareType:FileShareInfo' :: Maybe FileShareType
fileShareType = Maybe FileShareType
a} :: FileShareInfo)
instance Core.FromJSON FileShareInfo where
parseJSON :: Value -> Parser FileShareInfo
parseJSON =
String
-> (Object -> Parser FileShareInfo)
-> Value
-> Parser FileShareInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FileShareInfo"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileShareType
-> FileShareInfo
FileShareInfo'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileShareType
-> FileShareInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileShareType
-> FileShareInfo)
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
"FileShareStatus")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileShareType
-> FileShareInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe FileShareType -> FileShareInfo)
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
"GatewayARN")
Parser
(Maybe Text -> Maybe Text -> Maybe FileShareType -> FileShareInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe FileShareType -> FileShareInfo)
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
"FileShareId")
Parser (Maybe Text -> Maybe FileShareType -> FileShareInfo)
-> Parser (Maybe Text)
-> Parser (Maybe FileShareType -> FileShareInfo)
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
"FileShareARN")
Parser (Maybe FileShareType -> FileShareInfo)
-> Parser (Maybe FileShareType) -> Parser FileShareInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FileShareType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FileShareType")
)
instance Prelude.Hashable FileShareInfo
instance Prelude.NFData FileShareInfo