{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Greengrass.Types.SoftwareToUpdate
-- 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.Greengrass.Types.SoftwareToUpdate
  ( SoftwareToUpdate
      ( ..,
        SoftwareToUpdate_Core,
        SoftwareToUpdate_Ota_agent
      ),
  )
where

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

-- | The piece of software on the Greengrass core that will be updated.
newtype SoftwareToUpdate = SoftwareToUpdate'
  { SoftwareToUpdate -> Text
fromSoftwareToUpdate ::
      Data.Text
  }
  deriving stock
    ( Int -> SoftwareToUpdate -> ShowS
[SoftwareToUpdate] -> ShowS
SoftwareToUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SoftwareToUpdate] -> ShowS
$cshowList :: [SoftwareToUpdate] -> ShowS
show :: SoftwareToUpdate -> String
$cshow :: SoftwareToUpdate -> String
showsPrec :: Int -> SoftwareToUpdate -> ShowS
$cshowsPrec :: Int -> SoftwareToUpdate -> ShowS
Prelude.Show,
      ReadPrec [SoftwareToUpdate]
ReadPrec SoftwareToUpdate
Int -> ReadS SoftwareToUpdate
ReadS [SoftwareToUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SoftwareToUpdate]
$creadListPrec :: ReadPrec [SoftwareToUpdate]
readPrec :: ReadPrec SoftwareToUpdate
$creadPrec :: ReadPrec SoftwareToUpdate
readList :: ReadS [SoftwareToUpdate]
$creadList :: ReadS [SoftwareToUpdate]
readsPrec :: Int -> ReadS SoftwareToUpdate
$creadsPrec :: Int -> ReadS SoftwareToUpdate
Prelude.Read,
      SoftwareToUpdate -> SoftwareToUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
$c/= :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
== :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
$c== :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
Prelude.Eq,
      Eq SoftwareToUpdate
SoftwareToUpdate -> SoftwareToUpdate -> Bool
SoftwareToUpdate -> SoftwareToUpdate -> Ordering
SoftwareToUpdate -> SoftwareToUpdate -> SoftwareToUpdate
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SoftwareToUpdate -> SoftwareToUpdate -> SoftwareToUpdate
$cmin :: SoftwareToUpdate -> SoftwareToUpdate -> SoftwareToUpdate
max :: SoftwareToUpdate -> SoftwareToUpdate -> SoftwareToUpdate
$cmax :: SoftwareToUpdate -> SoftwareToUpdate -> SoftwareToUpdate
>= :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
$c>= :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
> :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
$c> :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
<= :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
$c<= :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
< :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
$c< :: SoftwareToUpdate -> SoftwareToUpdate -> Bool
compare :: SoftwareToUpdate -> SoftwareToUpdate -> Ordering
$ccompare :: SoftwareToUpdate -> SoftwareToUpdate -> Ordering
Prelude.Ord,
      forall x. Rep SoftwareToUpdate x -> SoftwareToUpdate
forall x. SoftwareToUpdate -> Rep SoftwareToUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SoftwareToUpdate x -> SoftwareToUpdate
$cfrom :: forall x. SoftwareToUpdate -> Rep SoftwareToUpdate x
Prelude.Generic
    )
  deriving newtype
    ( Eq SoftwareToUpdate
Int -> SoftwareToUpdate -> Int
SoftwareToUpdate -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SoftwareToUpdate -> Int
$chash :: SoftwareToUpdate -> Int
hashWithSalt :: Int -> SoftwareToUpdate -> Int
$chashWithSalt :: Int -> SoftwareToUpdate -> Int
Prelude.Hashable,
      SoftwareToUpdate -> ()
forall a. (a -> ()) -> NFData a
rnf :: SoftwareToUpdate -> ()
$crnf :: SoftwareToUpdate -> ()
Prelude.NFData,
      Text -> Either String SoftwareToUpdate
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String SoftwareToUpdate
$cfromText :: Text -> Either String SoftwareToUpdate
Data.FromText,
      SoftwareToUpdate -> Text
forall a. (a -> Text) -> ToText a
toText :: SoftwareToUpdate -> Text
$ctoText :: SoftwareToUpdate -> Text
Data.ToText,
      SoftwareToUpdate -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: SoftwareToUpdate -> ByteString
$ctoBS :: SoftwareToUpdate -> ByteString
Data.ToByteString,
      SoftwareToUpdate -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: SoftwareToUpdate -> ByteStringBuilder
$cbuild :: SoftwareToUpdate -> ByteStringBuilder
Data.ToLog,
      HeaderName -> SoftwareToUpdate -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> SoftwareToUpdate -> [Header]
$ctoHeader :: HeaderName -> SoftwareToUpdate -> [Header]
Data.ToHeader,
      SoftwareToUpdate -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: SoftwareToUpdate -> QueryString
$ctoQuery :: SoftwareToUpdate -> QueryString
Data.ToQuery,
      Value -> Parser [SoftwareToUpdate]
Value -> Parser SoftwareToUpdate
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [SoftwareToUpdate]
$cparseJSONList :: Value -> Parser [SoftwareToUpdate]
parseJSON :: Value -> Parser SoftwareToUpdate
$cparseJSON :: Value -> Parser SoftwareToUpdate
Data.FromJSON,
      FromJSONKeyFunction [SoftwareToUpdate]
FromJSONKeyFunction SoftwareToUpdate
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [SoftwareToUpdate]
$cfromJSONKeyList :: FromJSONKeyFunction [SoftwareToUpdate]
fromJSONKey :: FromJSONKeyFunction SoftwareToUpdate
$cfromJSONKey :: FromJSONKeyFunction SoftwareToUpdate
Data.FromJSONKey,
      [SoftwareToUpdate] -> Encoding
[SoftwareToUpdate] -> Value
SoftwareToUpdate -> Encoding
SoftwareToUpdate -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SoftwareToUpdate] -> Encoding
$ctoEncodingList :: [SoftwareToUpdate] -> Encoding
toJSONList :: [SoftwareToUpdate] -> Value
$ctoJSONList :: [SoftwareToUpdate] -> Value
toEncoding :: SoftwareToUpdate -> Encoding
$ctoEncoding :: SoftwareToUpdate -> Encoding
toJSON :: SoftwareToUpdate -> Value
$ctoJSON :: SoftwareToUpdate -> Value
Data.ToJSON,
      ToJSONKeyFunction [SoftwareToUpdate]
ToJSONKeyFunction SoftwareToUpdate
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [SoftwareToUpdate]
$ctoJSONKeyList :: ToJSONKeyFunction [SoftwareToUpdate]
toJSONKey :: ToJSONKeyFunction SoftwareToUpdate
$ctoJSONKey :: ToJSONKeyFunction SoftwareToUpdate
Data.ToJSONKey,
      [Node] -> Either String SoftwareToUpdate
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String SoftwareToUpdate
$cparseXML :: [Node] -> Either String SoftwareToUpdate
Data.FromXML,
      SoftwareToUpdate -> XML
forall a. (a -> XML) -> ToXML a
toXML :: SoftwareToUpdate -> XML
$ctoXML :: SoftwareToUpdate -> XML
Data.ToXML
    )

pattern SoftwareToUpdate_Core :: SoftwareToUpdate
pattern $bSoftwareToUpdate_Core :: SoftwareToUpdate
$mSoftwareToUpdate_Core :: forall {r}. SoftwareToUpdate -> ((# #) -> r) -> ((# #) -> r) -> r
SoftwareToUpdate_Core = SoftwareToUpdate' "core"

pattern SoftwareToUpdate_Ota_agent :: SoftwareToUpdate
pattern $bSoftwareToUpdate_Ota_agent :: SoftwareToUpdate
$mSoftwareToUpdate_Ota_agent :: forall {r}. SoftwareToUpdate -> ((# #) -> r) -> ((# #) -> r) -> r
SoftwareToUpdate_Ota_agent = SoftwareToUpdate' "ota_agent"

{-# COMPLETE
  SoftwareToUpdate_Core,
  SoftwareToUpdate_Ota_agent,
  SoftwareToUpdate'
  #-}