{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MGN.Types.IdentificationHints
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MGN.Types.IdentificationHints where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Identification hints.
--
-- /See:/ 'newIdentificationHints' smart constructor.
data IdentificationHints = IdentificationHints'
  { -- | Hostname identification hint.
    IdentificationHints -> Maybe Text
hostname :: Prelude.Maybe Prelude.Text,
    -- | FQDN address identification hint.
    IdentificationHints -> Maybe Text
fqdn :: Prelude.Maybe Prelude.Text,
    -- | AWS Instance ID identification hint.
    IdentificationHints -> Maybe Text
awsInstanceID :: Prelude.Maybe Prelude.Text,
    -- | vmWare UUID identification hint.
    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)

-- |
-- Create a value of 'IdentificationHints' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'hostname', 'identificationHints_hostname' - Hostname identification hint.
--
-- 'fqdn', 'identificationHints_fqdn' - FQDN address identification hint.
--
-- 'awsInstanceID', 'identificationHints_awsInstanceID' - AWS Instance ID identification hint.
--
-- 'vmWareUuid', 'identificationHints_vmWareUuid' - vmWare UUID identification hint.
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
    }

-- | Hostname identification hint.
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)

-- | FQDN address identification hint.
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)

-- | AWS Instance ID identification hint.
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)

-- | vmWare UUID identification hint.
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