{-# 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.VcenterClient
-- 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.VcenterClient 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

-- | vCenter client.
--
-- /See:/ 'newVcenterClient' smart constructor.
data VcenterClient = VcenterClient'
  { -- | Arn of vCenter client.
    VcenterClient -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Datacenter name of vCenter client.
    VcenterClient -> Maybe Text
datacenterName :: Prelude.Maybe Prelude.Text,
    -- | Hostname of vCenter client .
    VcenterClient -> Maybe Text
hostname :: Prelude.Maybe Prelude.Text,
    -- | Last seen time of vCenter client.
    VcenterClient -> Maybe Text
lastSeenDatetime :: Prelude.Maybe Prelude.Text,
    -- | Tags for Source Server of vCenter client.
    VcenterClient -> Maybe (Sensitive (HashMap Text Text))
sourceServerTags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | Tags for vCenter client.
    VcenterClient -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | ID of vCenter client.
    VcenterClient -> Maybe Text
vcenterClientID :: Prelude.Maybe Prelude.Text,
    -- | Vcenter UUID of vCenter client.
    VcenterClient -> Maybe Text
vcenterUUID :: Prelude.Maybe Prelude.Text
  }
  deriving (VcenterClient -> VcenterClient -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VcenterClient -> VcenterClient -> Bool
$c/= :: VcenterClient -> VcenterClient -> Bool
== :: VcenterClient -> VcenterClient -> Bool
$c== :: VcenterClient -> VcenterClient -> Bool
Prelude.Eq, Int -> VcenterClient -> ShowS
[VcenterClient] -> ShowS
VcenterClient -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VcenterClient] -> ShowS
$cshowList :: [VcenterClient] -> ShowS
show :: VcenterClient -> String
$cshow :: VcenterClient -> String
showsPrec :: Int -> VcenterClient -> ShowS
$cshowsPrec :: Int -> VcenterClient -> ShowS
Prelude.Show, forall x. Rep VcenterClient x -> VcenterClient
forall x. VcenterClient -> Rep VcenterClient x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VcenterClient x -> VcenterClient
$cfrom :: forall x. VcenterClient -> Rep VcenterClient x
Prelude.Generic)

-- |
-- Create a value of 'VcenterClient' 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:
--
-- 'arn', 'vcenterClient_arn' - Arn of vCenter client.
--
-- 'datacenterName', 'vcenterClient_datacenterName' - Datacenter name of vCenter client.
--
-- 'hostname', 'vcenterClient_hostname' - Hostname of vCenter client .
--
-- 'lastSeenDatetime', 'vcenterClient_lastSeenDatetime' - Last seen time of vCenter client.
--
-- 'sourceServerTags', 'vcenterClient_sourceServerTags' - Tags for Source Server of vCenter client.
--
-- 'tags', 'vcenterClient_tags' - Tags for vCenter client.
--
-- 'vcenterClientID', 'vcenterClient_vcenterClientID' - ID of vCenter client.
--
-- 'vcenterUUID', 'vcenterClient_vcenterUUID' - Vcenter UUID of vCenter client.
newVcenterClient ::
  VcenterClient
newVcenterClient :: VcenterClient
newVcenterClient =
  VcenterClient'
    { $sel:arn:VcenterClient' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:datacenterName:VcenterClient' :: Maybe Text
datacenterName = forall a. Maybe a
Prelude.Nothing,
      $sel:hostname:VcenterClient' :: Maybe Text
hostname = forall a. Maybe a
Prelude.Nothing,
      $sel:lastSeenDatetime:VcenterClient' :: Maybe Text
lastSeenDatetime = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceServerTags:VcenterClient' :: Maybe (Sensitive (HashMap Text Text))
sourceServerTags = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:VcenterClient' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:vcenterClientID:VcenterClient' :: Maybe Text
vcenterClientID = forall a. Maybe a
Prelude.Nothing,
      $sel:vcenterUUID:VcenterClient' :: Maybe Text
vcenterUUID = forall a. Maybe a
Prelude.Nothing
    }

-- | Arn of vCenter client.
vcenterClient_arn :: Lens.Lens' VcenterClient (Prelude.Maybe Prelude.Text)
vcenterClient_arn :: Lens' VcenterClient (Maybe Text)
vcenterClient_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe Text
arn :: Maybe Text
$sel:arn:VcenterClient' :: VcenterClient -> Maybe Text
arn} -> Maybe Text
arn) (\s :: VcenterClient
s@VcenterClient' {} Maybe Text
a -> VcenterClient
s {$sel:arn:VcenterClient' :: Maybe Text
arn = Maybe Text
a} :: VcenterClient)

-- | Datacenter name of vCenter client.
vcenterClient_datacenterName :: Lens.Lens' VcenterClient (Prelude.Maybe Prelude.Text)
vcenterClient_datacenterName :: Lens' VcenterClient (Maybe Text)
vcenterClient_datacenterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe Text
datacenterName :: Maybe Text
$sel:datacenterName:VcenterClient' :: VcenterClient -> Maybe Text
datacenterName} -> Maybe Text
datacenterName) (\s :: VcenterClient
s@VcenterClient' {} Maybe Text
a -> VcenterClient
s {$sel:datacenterName:VcenterClient' :: Maybe Text
datacenterName = Maybe Text
a} :: VcenterClient)

-- | Hostname of vCenter client .
vcenterClient_hostname :: Lens.Lens' VcenterClient (Prelude.Maybe Prelude.Text)
vcenterClient_hostname :: Lens' VcenterClient (Maybe Text)
vcenterClient_hostname = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe Text
hostname :: Maybe Text
$sel:hostname:VcenterClient' :: VcenterClient -> Maybe Text
hostname} -> Maybe Text
hostname) (\s :: VcenterClient
s@VcenterClient' {} Maybe Text
a -> VcenterClient
s {$sel:hostname:VcenterClient' :: Maybe Text
hostname = Maybe Text
a} :: VcenterClient)

-- | Last seen time of vCenter client.
vcenterClient_lastSeenDatetime :: Lens.Lens' VcenterClient (Prelude.Maybe Prelude.Text)
vcenterClient_lastSeenDatetime :: Lens' VcenterClient (Maybe Text)
vcenterClient_lastSeenDatetime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe Text
lastSeenDatetime :: Maybe Text
$sel:lastSeenDatetime:VcenterClient' :: VcenterClient -> Maybe Text
lastSeenDatetime} -> Maybe Text
lastSeenDatetime) (\s :: VcenterClient
s@VcenterClient' {} Maybe Text
a -> VcenterClient
s {$sel:lastSeenDatetime:VcenterClient' :: Maybe Text
lastSeenDatetime = Maybe Text
a} :: VcenterClient)

-- | Tags for Source Server of vCenter client.
vcenterClient_sourceServerTags :: Lens.Lens' VcenterClient (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
vcenterClient_sourceServerTags :: Lens' VcenterClient (Maybe (HashMap Text Text))
vcenterClient_sourceServerTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe (Sensitive (HashMap Text Text))
sourceServerTags :: Maybe (Sensitive (HashMap Text Text))
$sel:sourceServerTags:VcenterClient' :: VcenterClient -> Maybe (Sensitive (HashMap Text Text))
sourceServerTags} -> Maybe (Sensitive (HashMap Text Text))
sourceServerTags) (\s :: VcenterClient
s@VcenterClient' {} Maybe (Sensitive (HashMap Text Text))
a -> VcenterClient
s {$sel:sourceServerTags:VcenterClient' :: Maybe (Sensitive (HashMap Text Text))
sourceServerTags = Maybe (Sensitive (HashMap Text Text))
a} :: VcenterClient) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | Tags for vCenter client.
vcenterClient_tags :: Lens.Lens' VcenterClient (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
vcenterClient_tags :: Lens' VcenterClient (Maybe (HashMap Text Text))
vcenterClient_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:VcenterClient' :: VcenterClient -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: VcenterClient
s@VcenterClient' {} Maybe (Sensitive (HashMap Text Text))
a -> VcenterClient
s {$sel:tags:VcenterClient' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: VcenterClient) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | ID of vCenter client.
vcenterClient_vcenterClientID :: Lens.Lens' VcenterClient (Prelude.Maybe Prelude.Text)
vcenterClient_vcenterClientID :: Lens' VcenterClient (Maybe Text)
vcenterClient_vcenterClientID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe Text
vcenterClientID :: Maybe Text
$sel:vcenterClientID:VcenterClient' :: VcenterClient -> Maybe Text
vcenterClientID} -> Maybe Text
vcenterClientID) (\s :: VcenterClient
s@VcenterClient' {} Maybe Text
a -> VcenterClient
s {$sel:vcenterClientID:VcenterClient' :: Maybe Text
vcenterClientID = Maybe Text
a} :: VcenterClient)

-- | Vcenter UUID of vCenter client.
vcenterClient_vcenterUUID :: Lens.Lens' VcenterClient (Prelude.Maybe Prelude.Text)
vcenterClient_vcenterUUID :: Lens' VcenterClient (Maybe Text)
vcenterClient_vcenterUUID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VcenterClient' {Maybe Text
vcenterUUID :: Maybe Text
$sel:vcenterUUID:VcenterClient' :: VcenterClient -> Maybe Text
vcenterUUID} -> Maybe Text
vcenterUUID) (\s :: VcenterClient
s@VcenterClient' {} Maybe Text
a -> VcenterClient
s {$sel:vcenterUUID:VcenterClient' :: Maybe Text
vcenterUUID = Maybe Text
a} :: VcenterClient)

instance Data.FromJSON VcenterClient where
  parseJSON :: Value -> Parser VcenterClient
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"VcenterClient"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Maybe Text
-> VcenterClient
VcenterClient'
            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
"arn")
            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
"datacenterName")
            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
"lastSeenDatetime")
            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
"sourceServerTags"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"vcenterClientID")
            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
"vcenterUUID")
      )

instance Prelude.Hashable VcenterClient where
  hashWithSalt :: Int -> VcenterClient -> Int
hashWithSalt Int
_salt VcenterClient' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
vcenterUUID :: Maybe Text
vcenterClientID :: Maybe Text
tags :: Maybe (Sensitive (HashMap Text Text))
sourceServerTags :: Maybe (Sensitive (HashMap Text Text))
lastSeenDatetime :: Maybe Text
hostname :: Maybe Text
datacenterName :: Maybe Text
arn :: Maybe Text
$sel:vcenterUUID:VcenterClient' :: VcenterClient -> Maybe Text
$sel:vcenterClientID:VcenterClient' :: VcenterClient -> Maybe Text
$sel:tags:VcenterClient' :: VcenterClient -> Maybe (Sensitive (HashMap Text Text))
$sel:sourceServerTags:VcenterClient' :: VcenterClient -> Maybe (Sensitive (HashMap Text Text))
$sel:lastSeenDatetime:VcenterClient' :: VcenterClient -> Maybe Text
$sel:hostname:VcenterClient' :: VcenterClient -> Maybe Text
$sel:datacenterName:VcenterClient' :: VcenterClient -> Maybe Text
$sel:arn:VcenterClient' :: VcenterClient -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
datacenterName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostname
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastSeenDatetime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
sourceServerTags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vcenterClientID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vcenterUUID

instance Prelude.NFData VcenterClient where
  rnf :: VcenterClient -> ()
rnf VcenterClient' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
vcenterUUID :: Maybe Text
vcenterClientID :: Maybe Text
tags :: Maybe (Sensitive (HashMap Text Text))
sourceServerTags :: Maybe (Sensitive (HashMap Text Text))
lastSeenDatetime :: Maybe Text
hostname :: Maybe Text
datacenterName :: Maybe Text
arn :: Maybe Text
$sel:vcenterUUID:VcenterClient' :: VcenterClient -> Maybe Text
$sel:vcenterClientID:VcenterClient' :: VcenterClient -> Maybe Text
$sel:tags:VcenterClient' :: VcenterClient -> Maybe (Sensitive (HashMap Text Text))
$sel:sourceServerTags:VcenterClient' :: VcenterClient -> Maybe (Sensitive (HashMap Text Text))
$sel:lastSeenDatetime:VcenterClient' :: VcenterClient -> Maybe Text
$sel:hostname:VcenterClient' :: VcenterClient -> Maybe Text
$sel:datacenterName:VcenterClient' :: VcenterClient -> Maybe Text
$sel:arn:VcenterClient' :: VcenterClient -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
datacenterName
      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
lastSeenDatetime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
sourceServerTags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vcenterClientID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vcenterUUID