module Network.Google.Resource.YouTube.Watermarks.Set
    (
    
      WatermarksSetResource
    
    , watermarksSet
    , WatermarksSet
    
    , wsChannelId
    , wsPayload
    , wsOnBehalfOfContentOwner
    ) where
import           Network.Google.Prelude
import           Network.Google.YouTube.Types
type WatermarksSetResource =
     "youtube" :>
       "v3" :>
         "watermarks" :>
           "set" :>
             QueryParam "channelId" Text :>
               QueryParam "onBehalfOfContentOwner" Text :>
                 QueryParam "alt" AltJSON :>
                   ReqBody '[JSON] InvideoBranding :> Post '[JSON] ()
       :<|>
       "upload" :>
         "youtube" :>
           "v3" :>
             "watermarks" :>
               "set" :>
                 QueryParam "channelId" Text :>
                   QueryParam "onBehalfOfContentOwner" Text :>
                     QueryParam "alt" AltJSON :>
                       QueryParam "uploadType" Multipart :>
                         MultipartRelated '[JSON] InvideoBranding :>
                           Post '[JSON] ()
data WatermarksSet = WatermarksSet'
    { _wsChannelId              :: !Text
    , _wsPayload                :: !InvideoBranding
    , _wsOnBehalfOfContentOwner :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)
watermarksSet
    :: Text 
    -> InvideoBranding 
    -> WatermarksSet
watermarksSet pWsChannelId_ pWsPayload_ =
    WatermarksSet'
    { _wsChannelId = pWsChannelId_
    , _wsPayload = pWsPayload_
    , _wsOnBehalfOfContentOwner = Nothing
    }
wsChannelId :: Lens' WatermarksSet Text
wsChannelId
  = lens _wsChannelId (\ s a -> s{_wsChannelId = a})
wsPayload :: Lens' WatermarksSet InvideoBranding
wsPayload
  = lens _wsPayload (\ s a -> s{_wsPayload = a})
wsOnBehalfOfContentOwner :: Lens' WatermarksSet (Maybe Text)
wsOnBehalfOfContentOwner
  = lens _wsOnBehalfOfContentOwner
      (\ s a -> s{_wsOnBehalfOfContentOwner = a})
instance GoogleRequest WatermarksSet where
        type Rs WatermarksSet = ()
        type Scopes WatermarksSet =
             '["https://www.googleapis.com/auth/youtube",
               "https://www.googleapis.com/auth/youtube.force-ssl",
               "https://www.googleapis.com/auth/youtube.upload",
               "https://www.googleapis.com/auth/youtubepartner"]
        requestClient WatermarksSet'{..}
          = go (Just _wsChannelId) _wsOnBehalfOfContentOwner
              (Just AltJSON)
              _wsPayload
              youTubeService
          where go :<|> _
                  = buildClient (Proxy :: Proxy WatermarksSetResource)
                      mempty
instance GoogleRequest (MediaUpload WatermarksSet)
         where
        type Rs (MediaUpload WatermarksSet) = ()
        type Scopes (MediaUpload WatermarksSet) =
             Scopes WatermarksSet
        requestClient (MediaUpload WatermarksSet'{..} body)
          = go (Just _wsChannelId) _wsOnBehalfOfContentOwner
              (Just AltJSON)
              (Just Multipart)
              _wsPayload
              body
              youTubeService
          where _ :<|> go
                  = buildClient (Proxy :: Proxy WatermarksSetResource)
                      mempty