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