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

import qualified Amazonka.Core as Core
import Amazonka.GroundStation.Types.ConfigCapabilityType
import qualified Amazonka.Lens as Lens
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
(ConfigIdResponse -> ConfigIdResponse -> Bool)
-> (ConfigIdResponse -> ConfigIdResponse -> Bool)
-> Eq ConfigIdResponse
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]
(Int -> ReadS ConfigIdResponse)
-> ReadS [ConfigIdResponse]
-> ReadPrec ConfigIdResponse
-> ReadPrec [ConfigIdResponse]
-> Read 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
(Int -> ConfigIdResponse -> ShowS)
-> (ConfigIdResponse -> String)
-> ([ConfigIdResponse] -> ShowS)
-> Show ConfigIdResponse
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. ConfigIdResponse -> Rep ConfigIdResponse x)
-> (forall x. Rep ConfigIdResponse x -> ConfigIdResponse)
-> Generic ConfigIdResponse
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' :: Maybe Text
-> Maybe Text -> Maybe ConfigCapabilityType -> ConfigIdResponse
ConfigIdResponse'
    { $sel:configArn:ConfigIdResponse' :: Maybe Text
configArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configId:ConfigIdResponse' :: Maybe Text
configId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configType:ConfigIdResponse' :: Maybe ConfigCapabilityType
configType = Maybe ConfigCapabilityType
forall a. Maybe a
Prelude.Nothing
    }

-- | ARN of a @Config@.
configIdResponse_configArn :: Lens.Lens' ConfigIdResponse (Prelude.Maybe Prelude.Text)
configIdResponse_configArn :: (Maybe Text -> f (Maybe Text))
-> ConfigIdResponse -> f ConfigIdResponse
configIdResponse_configArn = (ConfigIdResponse -> Maybe Text)
-> (ConfigIdResponse -> Maybe Text -> ConfigIdResponse)
-> Lens ConfigIdResponse ConfigIdResponse (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> ConfigIdResponse -> f ConfigIdResponse
configIdResponse_configId = (ConfigIdResponse -> Maybe Text)
-> (ConfigIdResponse -> Maybe Text -> ConfigIdResponse)
-> Lens ConfigIdResponse ConfigIdResponse (Maybe Text) (Maybe Text)
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 :: (Maybe ConfigCapabilityType -> f (Maybe ConfigCapabilityType))
-> ConfigIdResponse -> f ConfigIdResponse
configIdResponse_configType = (ConfigIdResponse -> Maybe ConfigCapabilityType)
-> (ConfigIdResponse
    -> Maybe ConfigCapabilityType -> ConfigIdResponse)
-> Lens
     ConfigIdResponse
     ConfigIdResponse
     (Maybe ConfigCapabilityType)
     (Maybe ConfigCapabilityType)
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 Core.FromJSON ConfigIdResponse where
  parseJSON :: Value -> Parser ConfigIdResponse
parseJSON =
    String
-> (Object -> Parser ConfigIdResponse)
-> Value
-> Parser ConfigIdResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConfigIdResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Text -> Maybe ConfigCapabilityType -> ConfigIdResponse
ConfigIdResponse'
            (Maybe Text
 -> Maybe Text -> Maybe ConfigCapabilityType -> ConfigIdResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe ConfigCapabilityType -> ConfigIdResponse)
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
"configArn")
            Parser
  (Maybe Text -> Maybe ConfigCapabilityType -> ConfigIdResponse)
-> Parser (Maybe Text)
-> Parser (Maybe ConfigCapabilityType -> ConfigIdResponse)
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
"configId")
            Parser (Maybe ConfigCapabilityType -> ConfigIdResponse)
-> Parser (Maybe ConfigCapabilityType) -> Parser ConfigIdResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigCapabilityType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configType")
      )

instance Prelude.Hashable ConfigIdResponse

instance Prelude.NFData ConfigIdResponse