{-# 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.GroundStation.Types.ConfigIdResponse
-- 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.GroundStation.Types.ConfigIdResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GroundStation.Types.ConfigCapabilityType
import qualified Amazonka.Prelude as Prelude

-- |
--
-- /See:/ 'newConfigIdResponse' smart constructor.
data ConfigIdResponse = ConfigIdResponse'
  { -- | ARN of a @Config@.
    ConfigIdResponse -> Maybe Text
configArn :: Prelude.Maybe Prelude.Text,
    -- | UUID of a @Config@.
    ConfigIdResponse -> Maybe Text
configId :: Prelude.Maybe Prelude.Text,
    -- | Type of a @Config@.
    ConfigIdResponse -> Maybe ConfigCapabilityType
configType :: Prelude.Maybe ConfigCapabilityType
  }
  deriving (ConfigIdResponse -> ConfigIdResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigIdResponse -> ConfigIdResponse -> Bool
$c/= :: ConfigIdResponse -> ConfigIdResponse -> Bool
== :: ConfigIdResponse -> ConfigIdResponse -> Bool
$c== :: ConfigIdResponse -> ConfigIdResponse -> Bool
Prelude.Eq, ReadPrec [ConfigIdResponse]
ReadPrec ConfigIdResponse
Int -> ReadS ConfigIdResponse
ReadS [ConfigIdResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigIdResponse]
$creadListPrec :: ReadPrec [ConfigIdResponse]
readPrec :: ReadPrec ConfigIdResponse
$creadPrec :: ReadPrec ConfigIdResponse
readList :: ReadS [ConfigIdResponse]
$creadList :: ReadS [ConfigIdResponse]
readsPrec :: Int -> ReadS ConfigIdResponse
$creadsPrec :: Int -> ReadS ConfigIdResponse
Prelude.Read, Int -> ConfigIdResponse -> ShowS
[ConfigIdResponse] -> ShowS
ConfigIdResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigIdResponse] -> ShowS
$cshowList :: [ConfigIdResponse] -> ShowS
show :: ConfigIdResponse -> String
$cshow :: ConfigIdResponse -> String
showsPrec :: Int -> ConfigIdResponse -> ShowS
$cshowsPrec :: Int -> ConfigIdResponse -> ShowS
Prelude.Show, forall x. Rep ConfigIdResponse x -> ConfigIdResponse
forall x. ConfigIdResponse -> Rep ConfigIdResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigIdResponse x -> ConfigIdResponse
$cfrom :: forall x. ConfigIdResponse -> Rep ConfigIdResponse x
Prelude.Generic)

-- |
-- Create a value of 'ConfigIdResponse' 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:
--
-- 'configArn', 'configIdResponse_configArn' - ARN of a @Config@.
--
-- 'configId', 'configIdResponse_configId' - UUID of a @Config@.
--
-- 'configType', 'configIdResponse_configType' - Type of a @Config@.
newConfigIdResponse ::
  ConfigIdResponse
newConfigIdResponse :: ConfigIdResponse
newConfigIdResponse =
  ConfigIdResponse'
    { $sel:configArn:ConfigIdResponse' :: Maybe Text
configArn = forall a. Maybe a
Prelude.Nothing,
      $sel:configId:ConfigIdResponse' :: Maybe Text
configId = forall a. Maybe a
Prelude.Nothing,
      $sel:configType:ConfigIdResponse' :: Maybe ConfigCapabilityType
configType = forall a. Maybe a
Prelude.Nothing
    }

-- | ARN of a @Config@.
configIdResponse_configArn :: Lens.Lens' ConfigIdResponse (Prelude.Maybe Prelude.Text)
configIdResponse_configArn :: Lens' ConfigIdResponse (Maybe Text)
configIdResponse_configArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigIdResponse' {Maybe Text
configArn :: Maybe Text
$sel:configArn:ConfigIdResponse' :: ConfigIdResponse -> Maybe Text
configArn} -> Maybe Text
configArn) (\s :: ConfigIdResponse
s@ConfigIdResponse' {} Maybe Text
a -> ConfigIdResponse
s {$sel:configArn:ConfigIdResponse' :: Maybe Text
configArn = Maybe Text
a} :: ConfigIdResponse)

-- | UUID of a @Config@.
configIdResponse_configId :: Lens.Lens' ConfigIdResponse (Prelude.Maybe Prelude.Text)
configIdResponse_configId :: Lens' ConfigIdResponse (Maybe Text)
configIdResponse_configId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigIdResponse' {Maybe Text
configId :: Maybe Text
$sel:configId:ConfigIdResponse' :: ConfigIdResponse -> Maybe Text
configId} -> Maybe Text
configId) (\s :: ConfigIdResponse
s@ConfigIdResponse' {} Maybe Text
a -> ConfigIdResponse
s {$sel:configId:ConfigIdResponse' :: Maybe Text
configId = Maybe Text
a} :: ConfigIdResponse)

-- | Type of a @Config@.
configIdResponse_configType :: Lens.Lens' ConfigIdResponse (Prelude.Maybe ConfigCapabilityType)
configIdResponse_configType :: Lens' ConfigIdResponse (Maybe ConfigCapabilityType)
configIdResponse_configType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigIdResponse' {Maybe ConfigCapabilityType
configType :: Maybe ConfigCapabilityType
$sel:configType:ConfigIdResponse' :: ConfigIdResponse -> Maybe ConfigCapabilityType
configType} -> Maybe ConfigCapabilityType
configType) (\s :: ConfigIdResponse
s@ConfigIdResponse' {} Maybe ConfigCapabilityType
a -> ConfigIdResponse
s {$sel:configType:ConfigIdResponse' :: Maybe ConfigCapabilityType
configType = Maybe ConfigCapabilityType
a} :: ConfigIdResponse)

instance Data.FromJSON ConfigIdResponse where
  parseJSON :: Value -> Parser ConfigIdResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ConfigIdResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Text -> Maybe ConfigCapabilityType -> ConfigIdResponse
ConfigIdResponse'
            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
"configArn")
            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
"configId")
            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
"configType")
      )

instance Prelude.Hashable ConfigIdResponse where
  hashWithSalt :: Int -> ConfigIdResponse -> Int
hashWithSalt Int
_salt ConfigIdResponse' {Maybe Text
Maybe ConfigCapabilityType
configType :: Maybe ConfigCapabilityType
configId :: Maybe Text
configArn :: Maybe Text
$sel:configType:ConfigIdResponse' :: ConfigIdResponse -> Maybe ConfigCapabilityType
$sel:configId:ConfigIdResponse' :: ConfigIdResponse -> Maybe Text
$sel:configArn:ConfigIdResponse' :: ConfigIdResponse -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigCapabilityType
configType

instance Prelude.NFData ConfigIdResponse where
  rnf :: ConfigIdResponse -> ()
rnf ConfigIdResponse' {Maybe Text
Maybe ConfigCapabilityType
configType :: Maybe ConfigCapabilityType
configId :: Maybe Text
configArn :: Maybe Text
$sel:configType:ConfigIdResponse' :: ConfigIdResponse -> Maybe ConfigCapabilityType
$sel:configId:ConfigIdResponse' :: ConfigIdResponse -> Maybe Text
$sel:configArn:ConfigIdResponse' :: ConfigIdResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConfigCapabilityType
configType