{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} module GitHub.Paths.Repos.Branches where import Data.Aeson (Value, encode) import Data.Text (Text) import GitHub.Data.Request (CommandMethod (Put), RW (..), Request, command) addProtectionR :: Text -> Text -> Text -> Value -> Request 'RW Value addProtectionR :: Text -> Text -> Text -> Value -> Request 'RW Value addProtectionR Text user Text repo Text branch = CommandMethod -> Paths -> ByteString -> Request 'RW Value forall a. CommandMethod -> Paths -> ByteString -> Request 'RW a command CommandMethod Put [Text "repos", Text user, Text repo, Text "branches", Text branch, Text "protection"] (ByteString -> Request 'RW Value) -> (Value -> ByteString) -> Value -> Request 'RW Value forall b c a. (b -> c) -> (a -> b) -> a -> c . Value -> ByteString forall a. ToJSON a => a -> ByteString encode