{-# 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.MissionProfileListItem
-- 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.MissionProfileListItem where

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

-- | Item in a list of mission profiles.
--
-- /See:/ 'newMissionProfileListItem' smart constructor.
data MissionProfileListItem = MissionProfileListItem'
  { -- | UUID of a mission profile.
    MissionProfileListItem -> Maybe Text
missionProfileId :: Prelude.Maybe Prelude.Text,
    -- | ARN of a mission profile.
    MissionProfileListItem -> Maybe Text
missionProfileArn :: Prelude.Maybe Prelude.Text,
    -- | Name of a mission profile.
    MissionProfileListItem -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Region of a mission profile.
    MissionProfileListItem -> Maybe Text
region :: Prelude.Maybe Prelude.Text
  }
  deriving (MissionProfileListItem -> MissionProfileListItem -> Bool
(MissionProfileListItem -> MissionProfileListItem -> Bool)
-> (MissionProfileListItem -> MissionProfileListItem -> Bool)
-> Eq MissionProfileListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MissionProfileListItem -> MissionProfileListItem -> Bool
$c/= :: MissionProfileListItem -> MissionProfileListItem -> Bool
== :: MissionProfileListItem -> MissionProfileListItem -> Bool
$c== :: MissionProfileListItem -> MissionProfileListItem -> Bool
Prelude.Eq, ReadPrec [MissionProfileListItem]
ReadPrec MissionProfileListItem
Int -> ReadS MissionProfileListItem
ReadS [MissionProfileListItem]
(Int -> ReadS MissionProfileListItem)
-> ReadS [MissionProfileListItem]
-> ReadPrec MissionProfileListItem
-> ReadPrec [MissionProfileListItem]
-> Read MissionProfileListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MissionProfileListItem]
$creadListPrec :: ReadPrec [MissionProfileListItem]
readPrec :: ReadPrec MissionProfileListItem
$creadPrec :: ReadPrec MissionProfileListItem
readList :: ReadS [MissionProfileListItem]
$creadList :: ReadS [MissionProfileListItem]
readsPrec :: Int -> ReadS MissionProfileListItem
$creadsPrec :: Int -> ReadS MissionProfileListItem
Prelude.Read, Int -> MissionProfileListItem -> ShowS
[MissionProfileListItem] -> ShowS
MissionProfileListItem -> String
(Int -> MissionProfileListItem -> ShowS)
-> (MissionProfileListItem -> String)
-> ([MissionProfileListItem] -> ShowS)
-> Show MissionProfileListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MissionProfileListItem] -> ShowS
$cshowList :: [MissionProfileListItem] -> ShowS
show :: MissionProfileListItem -> String
$cshow :: MissionProfileListItem -> String
showsPrec :: Int -> MissionProfileListItem -> ShowS
$cshowsPrec :: Int -> MissionProfileListItem -> ShowS
Prelude.Show, (forall x. MissionProfileListItem -> Rep MissionProfileListItem x)
-> (forall x.
    Rep MissionProfileListItem x -> MissionProfileListItem)
-> Generic MissionProfileListItem
forall x. Rep MissionProfileListItem x -> MissionProfileListItem
forall x. MissionProfileListItem -> Rep MissionProfileListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MissionProfileListItem x -> MissionProfileListItem
$cfrom :: forall x. MissionProfileListItem -> Rep MissionProfileListItem x
Prelude.Generic)

-- |
-- Create a value of 'MissionProfileListItem' 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:
--
-- 'missionProfileId', 'missionProfileListItem_missionProfileId' - UUID of a mission profile.
--
-- 'missionProfileArn', 'missionProfileListItem_missionProfileArn' - ARN of a mission profile.
--
-- 'name', 'missionProfileListItem_name' - Name of a mission profile.
--
-- 'region', 'missionProfileListItem_region' - Region of a mission profile.
newMissionProfileListItem ::
  MissionProfileListItem
newMissionProfileListItem :: MissionProfileListItem
newMissionProfileListItem =
  MissionProfileListItem' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> MissionProfileListItem
MissionProfileListItem'
    { $sel:missionProfileId:MissionProfileListItem' :: Maybe Text
missionProfileId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:missionProfileArn:MissionProfileListItem' :: Maybe Text
missionProfileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:MissionProfileListItem' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:MissionProfileListItem' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | UUID of a mission profile.
missionProfileListItem_missionProfileId :: Lens.Lens' MissionProfileListItem (Prelude.Maybe Prelude.Text)
missionProfileListItem_missionProfileId :: (Maybe Text -> f (Maybe Text))
-> MissionProfileListItem -> f MissionProfileListItem
missionProfileListItem_missionProfileId = (MissionProfileListItem -> Maybe Text)
-> (MissionProfileListItem -> Maybe Text -> MissionProfileListItem)
-> Lens
     MissionProfileListItem
     MissionProfileListItem
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MissionProfileListItem' {Maybe Text
missionProfileId :: Maybe Text
$sel:missionProfileId:MissionProfileListItem' :: MissionProfileListItem -> Maybe Text
missionProfileId} -> Maybe Text
missionProfileId) (\s :: MissionProfileListItem
s@MissionProfileListItem' {} Maybe Text
a -> MissionProfileListItem
s {$sel:missionProfileId:MissionProfileListItem' :: Maybe Text
missionProfileId = Maybe Text
a} :: MissionProfileListItem)

-- | ARN of a mission profile.
missionProfileListItem_missionProfileArn :: Lens.Lens' MissionProfileListItem (Prelude.Maybe Prelude.Text)
missionProfileListItem_missionProfileArn :: (Maybe Text -> f (Maybe Text))
-> MissionProfileListItem -> f MissionProfileListItem
missionProfileListItem_missionProfileArn = (MissionProfileListItem -> Maybe Text)
-> (MissionProfileListItem -> Maybe Text -> MissionProfileListItem)
-> Lens
     MissionProfileListItem
     MissionProfileListItem
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MissionProfileListItem' {Maybe Text
missionProfileArn :: Maybe Text
$sel:missionProfileArn:MissionProfileListItem' :: MissionProfileListItem -> Maybe Text
missionProfileArn} -> Maybe Text
missionProfileArn) (\s :: MissionProfileListItem
s@MissionProfileListItem' {} Maybe Text
a -> MissionProfileListItem
s {$sel:missionProfileArn:MissionProfileListItem' :: Maybe Text
missionProfileArn = Maybe Text
a} :: MissionProfileListItem)

-- | Name of a mission profile.
missionProfileListItem_name :: Lens.Lens' MissionProfileListItem (Prelude.Maybe Prelude.Text)
missionProfileListItem_name :: (Maybe Text -> f (Maybe Text))
-> MissionProfileListItem -> f MissionProfileListItem
missionProfileListItem_name = (MissionProfileListItem -> Maybe Text)
-> (MissionProfileListItem -> Maybe Text -> MissionProfileListItem)
-> Lens
     MissionProfileListItem
     MissionProfileListItem
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MissionProfileListItem' {Maybe Text
name :: Maybe Text
$sel:name:MissionProfileListItem' :: MissionProfileListItem -> Maybe Text
name} -> Maybe Text
name) (\s :: MissionProfileListItem
s@MissionProfileListItem' {} Maybe Text
a -> MissionProfileListItem
s {$sel:name:MissionProfileListItem' :: Maybe Text
name = Maybe Text
a} :: MissionProfileListItem)

-- | Region of a mission profile.
missionProfileListItem_region :: Lens.Lens' MissionProfileListItem (Prelude.Maybe Prelude.Text)
missionProfileListItem_region :: (Maybe Text -> f (Maybe Text))
-> MissionProfileListItem -> f MissionProfileListItem
missionProfileListItem_region = (MissionProfileListItem -> Maybe Text)
-> (MissionProfileListItem -> Maybe Text -> MissionProfileListItem)
-> Lens
     MissionProfileListItem
     MissionProfileListItem
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MissionProfileListItem' {Maybe Text
region :: Maybe Text
$sel:region:MissionProfileListItem' :: MissionProfileListItem -> Maybe Text
region} -> Maybe Text
region) (\s :: MissionProfileListItem
s@MissionProfileListItem' {} Maybe Text
a -> MissionProfileListItem
s {$sel:region:MissionProfileListItem' :: Maybe Text
region = Maybe Text
a} :: MissionProfileListItem)

instance Core.FromJSON MissionProfileListItem where
  parseJSON :: Value -> Parser MissionProfileListItem
parseJSON =
    String
-> (Object -> Parser MissionProfileListItem)
-> Value
-> Parser MissionProfileListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MissionProfileListItem"
      ( \Object
x ->
          Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> MissionProfileListItem
MissionProfileListItem'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> MissionProfileListItem)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> MissionProfileListItem)
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
"missionProfileId")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> MissionProfileListItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> MissionProfileListItem)
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
"missionProfileArn")
            Parser (Maybe Text -> Maybe Text -> MissionProfileListItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MissionProfileListItem)
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
"name")
            Parser (Maybe Text -> MissionProfileListItem)
-> Parser (Maybe Text) -> Parser MissionProfileListItem
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
"region")
      )

instance Prelude.Hashable MissionProfileListItem

instance Prelude.NFData MissionProfileListItem