{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MGN.Types.IdentificationHints where

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

-- | Identification hints.
--
-- /See:/ 'newIdentificationHints' smart constructor.
data IdentificationHints = IdentificationHints'
  { -- | AWS Instance ID identification hint.
    IdentificationHints -> Maybe Text
awsInstanceID :: Prelude.Maybe Prelude.Text,
    -- | FQDN address identification hint.
    IdentificationHints -> Maybe Text
fqdn :: Prelude.Maybe Prelude.Text,
    -- | Hostname identification hint.
    IdentificationHints -> Maybe Text
hostname :: Prelude.Maybe Prelude.Text,
    -- | vCenter VM path identification hint.
    IdentificationHints -> Maybe Text
vmPath :: Prelude.Maybe Prelude.Text,
    -- | vmWare UUID identification hint.
    IdentificationHints -> Maybe Text
vmWareUuid :: Prelude.Maybe Prelude.Text
  }
  deriving (IdentificationHints -> IdentificationHints -> Bool
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]
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
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. 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:
--
-- 'awsInstanceID', 'identificationHints_awsInstanceID' - AWS Instance ID identification hint.
--
-- 'fqdn', 'identificationHints_fqdn' - FQDN address identification hint.
--
-- 'hostname', 'identificationHints_hostname' - Hostname identification hint.
--
-- 'vmPath', 'identificationHints_vmPath' - vCenter VM path identification hint.
--
-- 'vmWareUuid', 'identificationHints_vmWareUuid' - vmWare UUID identification hint.
newIdentificationHints ::
  IdentificationHints
newIdentificationHints :: IdentificationHints
newIdentificationHints =
  IdentificationHints'
    { $sel:awsInstanceID:IdentificationHints' :: Maybe Text
awsInstanceID =
        forall a. Maybe a
Prelude.Nothing,
      $sel:fqdn:IdentificationHints' :: Maybe Text
fqdn = forall a. Maybe a
Prelude.Nothing,
      $sel:hostname:IdentificationHints' :: Maybe Text
hostname = forall a. Maybe a
Prelude.Nothing,
      $sel:vmPath:IdentificationHints' :: Maybe Text
vmPath = forall a. Maybe a
Prelude.Nothing,
      $sel:vmWareUuid:IdentificationHints' :: Maybe Text
vmWareUuid = forall a. Maybe a
Prelude.Nothing
    }

-- | AWS Instance ID identification hint.
identificationHints_awsInstanceID :: Lens.Lens' IdentificationHints (Prelude.Maybe Prelude.Text)
identificationHints_awsInstanceID :: Lens' IdentificationHints (Maybe Text)
identificationHints_awsInstanceID = 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)

-- | FQDN address identification hint.
identificationHints_fqdn :: Lens.Lens' IdentificationHints (Prelude.Maybe Prelude.Text)
identificationHints_fqdn :: Lens' IdentificationHints (Maybe Text)
identificationHints_fqdn = 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)

-- | Hostname identification hint.
identificationHints_hostname :: Lens.Lens' IdentificationHints (Prelude.Maybe Prelude.Text)
identificationHints_hostname :: Lens' IdentificationHints (Maybe Text)
identificationHints_hostname = 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)

-- | vCenter VM path identification hint.
identificationHints_vmPath :: Lens.Lens' IdentificationHints (Prelude.Maybe Prelude.Text)
identificationHints_vmPath :: Lens' IdentificationHints (Maybe Text)
identificationHints_vmPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentificationHints' {Maybe Text
vmPath :: Maybe Text
$sel:vmPath:IdentificationHints' :: IdentificationHints -> Maybe Text
vmPath} -> Maybe Text
vmPath) (\s :: IdentificationHints
s@IdentificationHints' {} Maybe Text
a -> IdentificationHints
s {$sel:vmPath:IdentificationHints' :: Maybe Text
vmPath = Maybe Text
a} :: IdentificationHints)

-- | vmWare UUID identification hint.
identificationHints_vmWareUuid :: Lens.Lens' IdentificationHints (Prelude.Maybe Prelude.Text)
identificationHints_vmWareUuid :: Lens' IdentificationHints (Maybe Text)
identificationHints_vmWareUuid = 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 Data.FromJSON IdentificationHints where
  parseJSON :: Value -> Parser IdentificationHints
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"IdentificationHints"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IdentificationHints
IdentificationHints'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"awsInstanceID")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fqdn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"hostname")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vmPath")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vmWareUuid")
      )

instance Prelude.Hashable IdentificationHints where
  hashWithSalt :: Int -> IdentificationHints -> Int
hashWithSalt Int
_salt IdentificationHints' {Maybe Text
vmWareUuid :: Maybe Text
vmPath :: Maybe Text
hostname :: Maybe Text
fqdn :: Maybe Text
awsInstanceID :: Maybe Text
$sel:vmWareUuid:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:vmPath:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:hostname:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:fqdn:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:awsInstanceID:IdentificationHints' :: IdentificationHints -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsInstanceID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fqdn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostname
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vmPath
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vmWareUuid

instance Prelude.NFData IdentificationHints where
  rnf :: IdentificationHints -> ()
rnf IdentificationHints' {Maybe Text
vmWareUuid :: Maybe Text
vmPath :: Maybe Text
hostname :: Maybe Text
fqdn :: Maybe Text
awsInstanceID :: Maybe Text
$sel:vmWareUuid:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:vmPath:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:hostname:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:fqdn:IdentificationHints' :: IdentificationHints -> Maybe Text
$sel:awsInstanceID:IdentificationHints' :: IdentificationHints -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsInstanceID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fqdn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hostname
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vmPath
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vmWareUuid