{-# 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, query) 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 getProtectionR :: Text -> Text -> Text -> Request 'RO Value getProtectionR :: Text -> Text -> Text -> Request 'RO Value getProtectionR Text user Text repo Text branch = Paths -> QueryString -> Request 'RO Value forall (mt :: RW) a. Paths -> QueryString -> Request mt a query [Text "repos", Text user, Text repo, Text "branches", Text branch, Text "protection"] []