{-# 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.CodeDeploy.Types.FileExistsBehavior
-- 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.CodeDeploy.Types.FileExistsBehavior
  ( FileExistsBehavior
      ( ..,
        FileExistsBehavior_DISALLOW,
        FileExistsBehavior_OVERWRITE,
        FileExistsBehavior_RETAIN
      ),
  )
where

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

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

pattern FileExistsBehavior_DISALLOW :: FileExistsBehavior
pattern $bFileExistsBehavior_DISALLOW :: FileExistsBehavior
$mFileExistsBehavior_DISALLOW :: forall r. FileExistsBehavior -> (Void# -> r) -> (Void# -> r) -> r
FileExistsBehavior_DISALLOW = FileExistsBehavior' "DISALLOW"

pattern FileExistsBehavior_OVERWRITE :: FileExistsBehavior
pattern $bFileExistsBehavior_OVERWRITE :: FileExistsBehavior
$mFileExistsBehavior_OVERWRITE :: forall r. FileExistsBehavior -> (Void# -> r) -> (Void# -> r) -> r
FileExistsBehavior_OVERWRITE = FileExistsBehavior' "OVERWRITE"

pattern FileExistsBehavior_RETAIN :: FileExistsBehavior
pattern $bFileExistsBehavior_RETAIN :: FileExistsBehavior
$mFileExistsBehavior_RETAIN :: forall r. FileExistsBehavior -> (Void# -> r) -> (Void# -> r) -> r
FileExistsBehavior_RETAIN = FileExistsBehavior' "RETAIN"

{-# COMPLETE
  FileExistsBehavior_DISALLOW,
  FileExistsBehavior_OVERWRITE,
  FileExistsBehavior_RETAIN,
  FileExistsBehavior'
  #-}