{-# 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.ScheduledInstancesPrivateIpAddressConfig 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 qualified Amazonka.Prelude as Prelude
data ScheduledInstancesPrivateIpAddressConfig = ScheduledInstancesPrivateIpAddressConfig'
{
ScheduledInstancesPrivateIpAddressConfig -> Maybe Bool
primary :: Prelude.Maybe Prelude.Bool,
ScheduledInstancesPrivateIpAddressConfig -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text
}
deriving (ScheduledInstancesPrivateIpAddressConfig
-> ScheduledInstancesPrivateIpAddressConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledInstancesPrivateIpAddressConfig
-> ScheduledInstancesPrivateIpAddressConfig -> Bool
$c/= :: ScheduledInstancesPrivateIpAddressConfig
-> ScheduledInstancesPrivateIpAddressConfig -> Bool
== :: ScheduledInstancesPrivateIpAddressConfig
-> ScheduledInstancesPrivateIpAddressConfig -> Bool
$c== :: ScheduledInstancesPrivateIpAddressConfig
-> ScheduledInstancesPrivateIpAddressConfig -> Bool
Prelude.Eq, ReadPrec [ScheduledInstancesPrivateIpAddressConfig]
ReadPrec ScheduledInstancesPrivateIpAddressConfig
Int -> ReadS ScheduledInstancesPrivateIpAddressConfig
ReadS [ScheduledInstancesPrivateIpAddressConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledInstancesPrivateIpAddressConfig]
$creadListPrec :: ReadPrec [ScheduledInstancesPrivateIpAddressConfig]
readPrec :: ReadPrec ScheduledInstancesPrivateIpAddressConfig
$creadPrec :: ReadPrec ScheduledInstancesPrivateIpAddressConfig
readList :: ReadS [ScheduledInstancesPrivateIpAddressConfig]
$creadList :: ReadS [ScheduledInstancesPrivateIpAddressConfig]
readsPrec :: Int -> ReadS ScheduledInstancesPrivateIpAddressConfig
$creadsPrec :: Int -> ReadS ScheduledInstancesPrivateIpAddressConfig
Prelude.Read, Int -> ScheduledInstancesPrivateIpAddressConfig -> ShowS
[ScheduledInstancesPrivateIpAddressConfig] -> ShowS
ScheduledInstancesPrivateIpAddressConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledInstancesPrivateIpAddressConfig] -> ShowS
$cshowList :: [ScheduledInstancesPrivateIpAddressConfig] -> ShowS
show :: ScheduledInstancesPrivateIpAddressConfig -> String
$cshow :: ScheduledInstancesPrivateIpAddressConfig -> String
showsPrec :: Int -> ScheduledInstancesPrivateIpAddressConfig -> ShowS
$cshowsPrec :: Int -> ScheduledInstancesPrivateIpAddressConfig -> ShowS
Prelude.Show, forall x.
Rep ScheduledInstancesPrivateIpAddressConfig x
-> ScheduledInstancesPrivateIpAddressConfig
forall x.
ScheduledInstancesPrivateIpAddressConfig
-> Rep ScheduledInstancesPrivateIpAddressConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduledInstancesPrivateIpAddressConfig x
-> ScheduledInstancesPrivateIpAddressConfig
$cfrom :: forall x.
ScheduledInstancesPrivateIpAddressConfig
-> Rep ScheduledInstancesPrivateIpAddressConfig x
Prelude.Generic)
newScheduledInstancesPrivateIpAddressConfig ::
ScheduledInstancesPrivateIpAddressConfig
newScheduledInstancesPrivateIpAddressConfig :: ScheduledInstancesPrivateIpAddressConfig
newScheduledInstancesPrivateIpAddressConfig =
ScheduledInstancesPrivateIpAddressConfig'
{ $sel:primary:ScheduledInstancesPrivateIpAddressConfig' :: Maybe Bool
primary =
forall a. Maybe a
Prelude.Nothing,
$sel:privateIpAddress:ScheduledInstancesPrivateIpAddressConfig' :: Maybe Text
privateIpAddress =
forall a. Maybe a
Prelude.Nothing
}
scheduledInstancesPrivateIpAddressConfig_primary :: Lens.Lens' ScheduledInstancesPrivateIpAddressConfig (Prelude.Maybe Prelude.Bool)
scheduledInstancesPrivateIpAddressConfig_primary :: Lens' ScheduledInstancesPrivateIpAddressConfig (Maybe Bool)
scheduledInstancesPrivateIpAddressConfig_primary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesPrivateIpAddressConfig' {Maybe Bool
primary :: Maybe Bool
$sel:primary:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Bool
primary} -> Maybe Bool
primary) (\s :: ScheduledInstancesPrivateIpAddressConfig
s@ScheduledInstancesPrivateIpAddressConfig' {} Maybe Bool
a -> ScheduledInstancesPrivateIpAddressConfig
s {$sel:primary:ScheduledInstancesPrivateIpAddressConfig' :: Maybe Bool
primary = Maybe Bool
a} :: ScheduledInstancesPrivateIpAddressConfig)
scheduledInstancesPrivateIpAddressConfig_privateIpAddress :: Lens.Lens' ScheduledInstancesPrivateIpAddressConfig (Prelude.Maybe Prelude.Text)
scheduledInstancesPrivateIpAddressConfig_privateIpAddress :: Lens' ScheduledInstancesPrivateIpAddressConfig (Maybe Text)
scheduledInstancesPrivateIpAddressConfig_privateIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesPrivateIpAddressConfig' {Maybe Text
privateIpAddress :: Maybe Text
$sel:privateIpAddress:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Text
privateIpAddress} -> Maybe Text
privateIpAddress) (\s :: ScheduledInstancesPrivateIpAddressConfig
s@ScheduledInstancesPrivateIpAddressConfig' {} Maybe Text
a -> ScheduledInstancesPrivateIpAddressConfig
s {$sel:privateIpAddress:ScheduledInstancesPrivateIpAddressConfig' :: Maybe Text
privateIpAddress = Maybe Text
a} :: ScheduledInstancesPrivateIpAddressConfig)
instance
Prelude.Hashable
ScheduledInstancesPrivateIpAddressConfig
where
hashWithSalt :: Int -> ScheduledInstancesPrivateIpAddressConfig -> Int
hashWithSalt
Int
_salt
ScheduledInstancesPrivateIpAddressConfig' {Maybe Bool
Maybe Text
privateIpAddress :: Maybe Text
primary :: Maybe Bool
$sel:privateIpAddress:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Text
$sel:primary:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
primary
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
privateIpAddress
instance
Prelude.NFData
ScheduledInstancesPrivateIpAddressConfig
where
rnf :: ScheduledInstancesPrivateIpAddressConfig -> ()
rnf ScheduledInstancesPrivateIpAddressConfig' {Maybe Bool
Maybe Text
privateIpAddress :: Maybe Text
primary :: Maybe Bool
$sel:privateIpAddress:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Text
$sel:primary:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
primary
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
privateIpAddress
instance
Data.ToQuery
ScheduledInstancesPrivateIpAddressConfig
where
toQuery :: ScheduledInstancesPrivateIpAddressConfig -> QueryString
toQuery ScheduledInstancesPrivateIpAddressConfig' {Maybe Bool
Maybe Text
privateIpAddress :: Maybe Text
primary :: Maybe Bool
$sel:privateIpAddress:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Text
$sel:primary:ScheduledInstancesPrivateIpAddressConfig' :: ScheduledInstancesPrivateIpAddressConfig -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Primary" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
primary,
ByteString
"PrivateIpAddress" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
privateIpAddress
]