{-# 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-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.Greengrass.Types.SoftwareToUpdate
  ( SoftwareToUpdate
      ( ..,
        SoftwareToUpdate_Core,
        SoftwareToUpdate_Ota_agent
      ),
  )
where

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

-- | The piece of software on the Greengrass core that will be updated.
newtype SoftwareToUpdate = SoftwareToUpdate'
  { SoftwareToUpdate -> Text
fromSoftwareToUpdate ::
      Core.Text
  }
  deriving stock
    ( Int -> SoftwareToUpdate -> ShowS
[SoftwareToUpdate] -> ShowS
SoftwareToUpdate -> String
(Int -> SoftwareToUpdate -> ShowS)
-> (SoftwareToUpdate -> String)
-> ([SoftwareToUpdate] -> ShowS)
-> Show SoftwareToUpdate
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]
(Int -> ReadS SoftwareToUpdate)
-> ReadS [SoftwareToUpdate]
-> ReadPrec SoftwareToUpdate
-> ReadPrec [SoftwareToUpdate]
-> Read 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
(SoftwareToUpdate -> SoftwareToUpdate -> Bool)
-> (SoftwareToUpdate -> SoftwareToUpdate -> Bool)
-> Eq SoftwareToUpdate
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
Eq SoftwareToUpdate
-> (SoftwareToUpdate -> SoftwareToUpdate -> Ordering)
-> (SoftwareToUpdate -> SoftwareToUpdate -> Bool)
-> (SoftwareToUpdate -> SoftwareToUpdate -> Bool)
-> (SoftwareToUpdate -> SoftwareToUpdate -> Bool)
-> (SoftwareToUpdate -> SoftwareToUpdate -> Bool)
-> (SoftwareToUpdate -> SoftwareToUpdate -> SoftwareToUpdate)
-> (SoftwareToUpdate -> SoftwareToUpdate -> SoftwareToUpdate)
-> Ord 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
$cp1Ord :: Eq SoftwareToUpdate
Prelude.Ord,
      (forall x. SoftwareToUpdate -> Rep SoftwareToUpdate x)
-> (forall x. Rep SoftwareToUpdate x -> SoftwareToUpdate)
-> Generic SoftwareToUpdate
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
    ( Int -> SoftwareToUpdate -> Int
SoftwareToUpdate -> Int
(Int -> SoftwareToUpdate -> Int)
-> (SoftwareToUpdate -> Int) -> Hashable SoftwareToUpdate
forall 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 -> ()
(SoftwareToUpdate -> ()) -> NFData SoftwareToUpdate
forall a. (a -> ()) -> NFData a
rnf :: SoftwareToUpdate -> ()
$crnf :: SoftwareToUpdate -> ()
Prelude.NFData,
      Text -> Either String SoftwareToUpdate
(Text -> Either String SoftwareToUpdate)
-> FromText SoftwareToUpdate
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String SoftwareToUpdate
$cfromText :: Text -> Either String SoftwareToUpdate
Core.FromText,
      SoftwareToUpdate -> Text
(SoftwareToUpdate -> Text) -> ToText SoftwareToUpdate
forall a. (a -> Text) -> ToText a
toText :: SoftwareToUpdate -> Text
$ctoText :: SoftwareToUpdate -> Text
Core.ToText,
      SoftwareToUpdate -> ByteString
(SoftwareToUpdate -> ByteString) -> ToByteString SoftwareToUpdate
forall a. (a -> ByteString) -> ToByteString a
toBS :: SoftwareToUpdate -> ByteString
$ctoBS :: SoftwareToUpdate -> ByteString
Core.ToByteString,
      SoftwareToUpdate -> ByteStringBuilder
(SoftwareToUpdate -> ByteStringBuilder) -> ToLog SoftwareToUpdate
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: SoftwareToUpdate -> ByteStringBuilder
$cbuild :: SoftwareToUpdate -> ByteStringBuilder
Core.ToLog,
      HeaderName -> SoftwareToUpdate -> [Header]
(HeaderName -> SoftwareToUpdate -> [Header])
-> ToHeader SoftwareToUpdate
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> SoftwareToUpdate -> [Header]
$ctoHeader :: HeaderName -> SoftwareToUpdate -> [Header]
Core.ToHeader,
      SoftwareToUpdate -> QueryString
(SoftwareToUpdate -> QueryString) -> ToQuery SoftwareToUpdate
forall a. (a -> QueryString) -> ToQuery a
toQuery :: SoftwareToUpdate -> QueryString
$ctoQuery :: SoftwareToUpdate -> QueryString
Core.ToQuery,
      Value -> Parser [SoftwareToUpdate]
Value -> Parser SoftwareToUpdate
(Value -> Parser SoftwareToUpdate)
-> (Value -> Parser [SoftwareToUpdate])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [SoftwareToUpdate]
FromJSONKeyFunction SoftwareToUpdate
FromJSONKeyFunction SoftwareToUpdate
-> FromJSONKeyFunction [SoftwareToUpdate]
-> FromJSONKey SoftwareToUpdate
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [SoftwareToUpdate]
$cfromJSONKeyList :: FromJSONKeyFunction [SoftwareToUpdate]
fromJSONKey :: FromJSONKeyFunction SoftwareToUpdate
$cfromJSONKey :: FromJSONKeyFunction SoftwareToUpdate
Core.FromJSONKey,
      [SoftwareToUpdate] -> Encoding
[SoftwareToUpdate] -> Value
SoftwareToUpdate -> Encoding
SoftwareToUpdate -> Value
(SoftwareToUpdate -> Value)
-> (SoftwareToUpdate -> Encoding)
-> ([SoftwareToUpdate] -> Value)
-> ([SoftwareToUpdate] -> Encoding)
-> ToJSON SoftwareToUpdate
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
Core.ToJSON,
      ToJSONKeyFunction [SoftwareToUpdate]
ToJSONKeyFunction SoftwareToUpdate
ToJSONKeyFunction SoftwareToUpdate
-> ToJSONKeyFunction [SoftwareToUpdate]
-> ToJSONKey SoftwareToUpdate
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [SoftwareToUpdate]
$ctoJSONKeyList :: ToJSONKeyFunction [SoftwareToUpdate]
toJSONKey :: ToJSONKeyFunction SoftwareToUpdate
$ctoJSONKey :: ToJSONKeyFunction SoftwareToUpdate
Core.ToJSONKey,
      [Node] -> Either String SoftwareToUpdate
([Node] -> Either String SoftwareToUpdate)
-> FromXML SoftwareToUpdate
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String SoftwareToUpdate
$cparseXML :: [Node] -> Either String SoftwareToUpdate
Core.FromXML,
      SoftwareToUpdate -> XML
(SoftwareToUpdate -> XML) -> ToXML SoftwareToUpdate
forall a. (a -> XML) -> ToXML a
toXML :: SoftwareToUpdate -> XML
$ctoXML :: SoftwareToUpdate -> XML
Core.ToXML
    )

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

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

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