{-# 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.EC2.Types.DiskImageDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.DiskImageFormat
import qualified Amazonka.Prelude as Prelude
data DiskImageDetail = DiskImageDetail'
{
DiskImageDetail -> Integer
bytes :: Prelude.Integer,
DiskImageDetail -> DiskImageFormat
format :: DiskImageFormat,
DiskImageDetail -> Text
importManifestUrl :: Prelude.Text
}
deriving (DiskImageDetail -> DiskImageDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiskImageDetail -> DiskImageDetail -> Bool
$c/= :: DiskImageDetail -> DiskImageDetail -> Bool
== :: DiskImageDetail -> DiskImageDetail -> Bool
$c== :: DiskImageDetail -> DiskImageDetail -> Bool
Prelude.Eq, ReadPrec [DiskImageDetail]
ReadPrec DiskImageDetail
Int -> ReadS DiskImageDetail
ReadS [DiskImageDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DiskImageDetail]
$creadListPrec :: ReadPrec [DiskImageDetail]
readPrec :: ReadPrec DiskImageDetail
$creadPrec :: ReadPrec DiskImageDetail
readList :: ReadS [DiskImageDetail]
$creadList :: ReadS [DiskImageDetail]
readsPrec :: Int -> ReadS DiskImageDetail
$creadsPrec :: Int -> ReadS DiskImageDetail
Prelude.Read, Int -> DiskImageDetail -> ShowS
[DiskImageDetail] -> ShowS
DiskImageDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DiskImageDetail] -> ShowS
$cshowList :: [DiskImageDetail] -> ShowS
show :: DiskImageDetail -> String
$cshow :: DiskImageDetail -> String
showsPrec :: Int -> DiskImageDetail -> ShowS
$cshowsPrec :: Int -> DiskImageDetail -> ShowS
Prelude.Show, forall x. Rep DiskImageDetail x -> DiskImageDetail
forall x. DiskImageDetail -> Rep DiskImageDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DiskImageDetail x -> DiskImageDetail
$cfrom :: forall x. DiskImageDetail -> Rep DiskImageDetail x
Prelude.Generic)
newDiskImageDetail ::
Prelude.Integer ->
DiskImageFormat ->
Prelude.Text ->
DiskImageDetail
newDiskImageDetail :: Integer -> DiskImageFormat -> Text -> DiskImageDetail
newDiskImageDetail
Integer
pBytes_
DiskImageFormat
pFormat_
Text
pImportManifestUrl_ =
DiskImageDetail'
{ $sel:bytes:DiskImageDetail' :: Integer
bytes = Integer
pBytes_,
$sel:format:DiskImageDetail' :: DiskImageFormat
format = DiskImageFormat
pFormat_,
$sel:importManifestUrl:DiskImageDetail' :: Text
importManifestUrl = Text
pImportManifestUrl_
}
diskImageDetail_bytes :: Lens.Lens' DiskImageDetail Prelude.Integer
diskImageDetail_bytes :: Lens' DiskImageDetail Integer
diskImageDetail_bytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskImageDetail' {Integer
bytes :: Integer
$sel:bytes:DiskImageDetail' :: DiskImageDetail -> Integer
bytes} -> Integer
bytes) (\s :: DiskImageDetail
s@DiskImageDetail' {} Integer
a -> DiskImageDetail
s {$sel:bytes:DiskImageDetail' :: Integer
bytes = Integer
a} :: DiskImageDetail)
diskImageDetail_format :: Lens.Lens' DiskImageDetail DiskImageFormat
diskImageDetail_format :: Lens' DiskImageDetail DiskImageFormat
diskImageDetail_format = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskImageDetail' {DiskImageFormat
format :: DiskImageFormat
$sel:format:DiskImageDetail' :: DiskImageDetail -> DiskImageFormat
format} -> DiskImageFormat
format) (\s :: DiskImageDetail
s@DiskImageDetail' {} DiskImageFormat
a -> DiskImageDetail
s {$sel:format:DiskImageDetail' :: DiskImageFormat
format = DiskImageFormat
a} :: DiskImageDetail)
diskImageDetail_importManifestUrl :: Lens.Lens' DiskImageDetail Prelude.Text
diskImageDetail_importManifestUrl :: Lens' DiskImageDetail Text
diskImageDetail_importManifestUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskImageDetail' {Text
importManifestUrl :: Text
$sel:importManifestUrl:DiskImageDetail' :: DiskImageDetail -> Text
importManifestUrl} -> Text
importManifestUrl) (\s :: DiskImageDetail
s@DiskImageDetail' {} Text
a -> DiskImageDetail
s {$sel:importManifestUrl:DiskImageDetail' :: Text
importManifestUrl = Text
a} :: DiskImageDetail)
instance Prelude.Hashable DiskImageDetail where
hashWithSalt :: Int -> DiskImageDetail -> Int
hashWithSalt Int
_salt DiskImageDetail' {Integer
Text
DiskImageFormat
importManifestUrl :: Text
format :: DiskImageFormat
bytes :: Integer
$sel:importManifestUrl:DiskImageDetail' :: DiskImageDetail -> Text
$sel:format:DiskImageDetail' :: DiskImageDetail -> DiskImageFormat
$sel:bytes:DiskImageDetail' :: DiskImageDetail -> Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
bytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DiskImageFormat
format
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
importManifestUrl
instance Prelude.NFData DiskImageDetail where
rnf :: DiskImageDetail -> ()
rnf DiskImageDetail' {Integer
Text
DiskImageFormat
importManifestUrl :: Text
format :: DiskImageFormat
bytes :: Integer
$sel:importManifestUrl:DiskImageDetail' :: DiskImageDetail -> Text
$sel:format:DiskImageDetail' :: DiskImageDetail -> DiskImageFormat
$sel:bytes:DiskImageDetail' :: DiskImageDetail -> Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Integer
bytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DiskImageFormat
format
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
importManifestUrl
instance Data.ToQuery DiskImageDetail where
toQuery :: DiskImageDetail -> QueryString
toQuery DiskImageDetail' {Integer
Text
DiskImageFormat
importManifestUrl :: Text
format :: DiskImageFormat
bytes :: Integer
$sel:importManifestUrl:DiskImageDetail' :: DiskImageDetail -> Text
$sel:format:DiskImageDetail' :: DiskImageDetail -> DiskImageFormat
$sel:bytes:DiskImageDetail' :: DiskImageDetail -> Integer
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Bytes" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Integer
bytes,
ByteString
"Format" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: DiskImageFormat
format,
ByteString
"ImportManifestUrl" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
importManifestUrl
]