module Network.AWS.CloudFront.GetStreamingDistributionConfig
(
GetStreamingDistributionConfig
, getStreamingDistributionConfig
, gsdcId
, GetStreamingDistributionConfigResponse
, getStreamingDistributionConfigResponse
, gsdcrETag
, gsdcrStreamingDistributionConfig
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestXML
import Network.AWS.CloudFront.Types
import qualified GHC.Exts
newtype GetStreamingDistributionConfig = GetStreamingDistributionConfig
{ _gsdcId :: Text
} deriving (Eq, Ord, Read, Show, Monoid, IsString)
getStreamingDistributionConfig :: Text
-> GetStreamingDistributionConfig
getStreamingDistributionConfig p1 = GetStreamingDistributionConfig
{ _gsdcId = p1
}
gsdcId :: Lens' GetStreamingDistributionConfig Text
gsdcId = lens _gsdcId (\s a -> s { _gsdcId = a })
data GetStreamingDistributionConfigResponse = GetStreamingDistributionConfigResponse
{ _gsdcrETag :: Maybe Text
, _gsdcrStreamingDistributionConfig :: Maybe StreamingDistributionConfig
} deriving (Eq, Read, Show)
getStreamingDistributionConfigResponse :: GetStreamingDistributionConfigResponse
getStreamingDistributionConfigResponse = GetStreamingDistributionConfigResponse
{ _gsdcrStreamingDistributionConfig = Nothing
, _gsdcrETag = Nothing
}
gsdcrETag :: Lens' GetStreamingDistributionConfigResponse (Maybe Text)
gsdcrETag = lens _gsdcrETag (\s a -> s { _gsdcrETag = a })
gsdcrStreamingDistributionConfig :: Lens' GetStreamingDistributionConfigResponse (Maybe StreamingDistributionConfig)
gsdcrStreamingDistributionConfig =
lens _gsdcrStreamingDistributionConfig
(\s a -> s { _gsdcrStreamingDistributionConfig = a })
instance ToPath GetStreamingDistributionConfig where
toPath GetStreamingDistributionConfig{..} = mconcat
[ "/2014-11-06/streaming-distribution/"
, toText _gsdcId
, "/config"
]
instance ToQuery GetStreamingDistributionConfig where
toQuery = const mempty
instance ToHeaders GetStreamingDistributionConfig
instance ToXMLRoot GetStreamingDistributionConfig where
toXMLRoot = const (namespaced ns "GetStreamingDistributionConfig" [])
instance ToXML GetStreamingDistributionConfig
instance AWSRequest GetStreamingDistributionConfig where
type Sv GetStreamingDistributionConfig = CloudFront
type Rs GetStreamingDistributionConfig = GetStreamingDistributionConfigResponse
request = get
response = xmlHeaderResponse $ \h x -> GetStreamingDistributionConfigResponse
<$> h ~:? "ETag"
<*> x .@? "StreamingDistributionConfig"