-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google URL Shortener SDK.
--   
--   Lets you create, inspect, and manage goo.gl short URLs
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>v1</tt> of the API.
@package gogol-urlshortener
@version 0.3.0


module Network.Google.URLShortener.Types

-- | Default request referring to version <tt>v1</tt> of the URL Shortener
--   API. This contains the host and root path used as a starting point for
--   constructing service requests.
uRLShortenerService :: ServiceConfig

-- | Manage your goo.gl short URLs
urlShortenerScope :: Proxy '["https://www.googleapis.com/auth/urlshortener"]
data URL

-- | Creates a value of <a>URL</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uStatus</a></li>
--   <li><a>uKind</a></li>
--   <li><a>uCreated</a></li>
--   <li><a>uAnalytics</a></li>
--   <li><a>uLongURL</a></li>
--   <li><a>uId</a></li>
--   </ul>
url :: URL

-- | Status of the target URL. Possible values: "OK", "MALWARE",
--   "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was
--   flagged as spam, for example.
uStatus :: Lens' URL (Maybe Text)

-- | The fixed string "urlshortener#url".
uKind :: Lens' URL Text

-- | Time the short URL was created; ISO 8601 representation using the
--   yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g.
--   "2010-10-14T19:01:24.944+00:00".
uCreated :: Lens' URL (Maybe Text)

-- | A summary of the click analytics for the short and long URL. Might not
--   be present if not requested or currently unavailable.
uAnalytics :: Lens' URL (Maybe AnalyticsSummary)

-- | Long URL, e.g. "http://www.google.com/". Might not be present if the
--   status is "REMOVED".
uLongURL :: Lens' URL (Maybe Text)

-- | Short URL, e.g. "http://goo.gl/l6MS".
uId :: Lens' URL (Maybe Text)
data StringCount

-- | Creates a value of <a>StringCount</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>scCount</a></li>
--   <li><a>scId</a></li>
--   </ul>
stringCount :: StringCount

-- | Number of clicks for this top entry, e.g. for this particular country
--   or browser.
scCount :: Lens' StringCount (Maybe Int64)

-- | Label assigned to this top entry, e.g. "US" or "Chrome".
scId :: Lens' StringCount (Maybe Text)

-- | Additional information to return.
data URLListProjection

-- | <tt>ANALYTICS_CLICKS</tt> Returns short URL click counts.
AnalyticsClicks :: URLListProjection

-- | <tt>FULL</tt> Returns short URL click counts.
Full :: URLListProjection
data AnalyticsSnapshot

-- | Creates a value of <a>AnalyticsSnapshot</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>asPlatforms</a></li>
--   <li><a>asShortURLClicks</a></li>
--   <li><a>asReferrers</a></li>
--   <li><a>asCountries</a></li>
--   <li><a>asLongURLClicks</a></li>
--   <li><a>asBrowsers</a></li>
--   </ul>
analyticsSnapshot :: AnalyticsSnapshot

-- | Top platforms or OSes, e.g. "Windows"; sorted by (descending) click
--   counts. Only present if this data is available.
asPlatforms :: Lens' AnalyticsSnapshot [StringCount]

-- | Number of clicks on this short URL.
asShortURLClicks :: Lens' AnalyticsSnapshot (Maybe Int64)

-- | Top referring hosts, e.g. "www.google.com"; sorted by (descending)
--   click counts. Only present if this data is available.
asReferrers :: Lens' AnalyticsSnapshot [StringCount]

-- | Top countries (expressed as country codes), e.g. "US" or "DE"; sorted
--   by (descending) click counts. Only present if this data is available.
asCountries :: Lens' AnalyticsSnapshot [StringCount]

-- | Number of clicks on all goo.gl short URLs pointing to this long URL.
asLongURLClicks :: Lens' AnalyticsSnapshot (Maybe Int64)

-- | Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only
--   present if this data is available.
asBrowsers :: Lens' AnalyticsSnapshot [StringCount]
data AnalyticsSummary

-- | Creates a value of <a>AnalyticsSummary</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>asWeek</a></li>
--   <li><a>asAllTime</a></li>
--   <li><a>asDay</a></li>
--   <li><a>asTwoHours</a></li>
--   <li><a>asMonth</a></li>
--   </ul>
analyticsSummary :: AnalyticsSummary

-- | Click analytics over the last week.
asWeek :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over all time.
asAllTime :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over the last day.
asDay :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over the last two hours.
asTwoHours :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over the last month.
asMonth :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Additional information to return.
data URLGetProjection

-- | <tt>ANALYTICS_CLICKS</tt> Returns only click counts.
UGPAnalyticsClicks :: URLGetProjection

-- | <tt>ANALYTICS_TOP_STRINGS</tt> Returns only top string counts.
UGPAnalyticsTopStrings :: URLGetProjection

-- | <tt>FULL</tt> Returns the creation timestamp and all available
--   analytics.
UGPFull :: URLGetProjection
data URLHistory

-- | Creates a value of <a>URLHistory</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uhTotalItems</a></li>
--   <li><a>uhNextPageToken</a></li>
--   <li><a>uhItemsPerPage</a></li>
--   <li><a>uhKind</a></li>
--   <li><a>uhItems</a></li>
--   </ul>
urlHistory :: URLHistory

-- | Total number of short URLs associated with this user (may be
--   approximate).
uhTotalItems :: Lens' URLHistory (Maybe Int32)

-- | A token to provide to get the next page of results.
uhNextPageToken :: Lens' URLHistory (Maybe Text)

-- | Number of items returned with each full "page" of results. Note that
--   the last page could have fewer items than the "itemsPerPage" value.
uhItemsPerPage :: Lens' URLHistory (Maybe Int32)

-- | The fixed string "urlshortener#urlHistory".
uhKind :: Lens' URLHistory Text

-- | A list of URL resources.
uhItems :: Lens' URLHistory [URL]


-- | Retrieves a list of URLs shortened by a user.
--   
--   <i>See:</i> <a>URL Shortener API Reference</a> for
--   <tt>urlshortener.url.list</tt>.
module Network.Google.Resource.URLShortener.URL.List

-- | A resource alias for <tt>urlshortener.url.list</tt> method which the
--   <a>URLList</a> request conforms to.
type URLListResource = "urlshortener" :> ("v1" :> ("url" :> ("history" :> (QueryParam "start-token" Text :> (QueryParam "projection" URLListProjection :> (QueryParam "alt" AltJSON :> Get '[JSON] URLHistory))))))

-- | Creates a value of <a>URLList</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ulStartToken</a></li>
--   <li><a>ulProjection</a></li>
--   </ul>
urlList :: URLList

-- | Retrieves a list of URLs shortened by a user.
--   
--   <i>See:</i> <a>urlList</a> smart constructor.
data URLList

-- | Token for requesting successive pages of results.
ulStartToken :: Lens' URLList (Maybe Text)

-- | Additional information to return.
ulProjection :: Lens' URLList (Maybe URLListProjection)
instance GHC.Generics.Generic Network.Google.Resource.URLShortener.URL.List.URLList
instance Data.Data.Data Network.Google.Resource.URLShortener.URL.List.URLList
instance GHC.Show.Show Network.Google.Resource.URLShortener.URL.List.URLList
instance GHC.Classes.Eq Network.Google.Resource.URLShortener.URL.List.URLList
instance Network.Google.Types.GoogleRequest Network.Google.Resource.URLShortener.URL.List.URLList


-- | Creates a new short URL.
--   
--   <i>See:</i> <a>URL Shortener API Reference</a> for
--   <tt>urlshortener.url.insert</tt>.
module Network.Google.Resource.URLShortener.URL.Insert

-- | A resource alias for <tt>urlshortener.url.insert</tt> method which the
--   <a>URLInsert</a> request conforms to.
type URLInsertResource = "urlshortener" :> ("v1" :> ("url" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] URL :> Post '[JSON] URL))))

-- | Creates a value of <a>URLInsert</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uiPayload</a></li>
--   </ul>
urlInsert :: URL -> URLInsert

-- | Creates a new short URL.
--   
--   <i>See:</i> <a>urlInsert</a> smart constructor.
data URLInsert

-- | Multipart request metadata.
uiPayload :: Lens' URLInsert URL
instance GHC.Generics.Generic Network.Google.Resource.URLShortener.URL.Insert.URLInsert
instance Data.Data.Data Network.Google.Resource.URLShortener.URL.Insert.URLInsert
instance GHC.Show.Show Network.Google.Resource.URLShortener.URL.Insert.URLInsert
instance GHC.Classes.Eq Network.Google.Resource.URLShortener.URL.Insert.URLInsert
instance Network.Google.Types.GoogleRequest Network.Google.Resource.URLShortener.URL.Insert.URLInsert


-- | Expands a short URL or gets creation time and analytics.
--   
--   <i>See:</i> <a>URL Shortener API Reference</a> for
--   <tt>urlshortener.url.get</tt>.
module Network.Google.Resource.URLShortener.URL.Get

-- | A resource alias for <tt>urlshortener.url.get</tt> method which the
--   <a>URLGet</a> request conforms to.
type URLGetResource = "urlshortener" :> ("v1" :> ("url" :> (QueryParam "shortUrl" Text :> (QueryParam "projection" URLGetProjection :> (QueryParam "alt" AltJSON :> Get '[JSON] URL)))))

-- | Creates a value of <a>URLGet</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ugProjection</a></li>
--   <li><a>ugShortURL</a></li>
--   </ul>
urlGet :: Text -> URLGet

-- | Expands a short URL or gets creation time and analytics.
--   
--   <i>See:</i> <a>urlGet</a> smart constructor.
data URLGet

-- | Additional information to return.
ugProjection :: Lens' URLGet (Maybe URLGetProjection)

-- | The short URL, including the protocol.
ugShortURL :: Lens' URLGet Text
instance GHC.Generics.Generic Network.Google.Resource.URLShortener.URL.Get.URLGet
instance Data.Data.Data Network.Google.Resource.URLShortener.URL.Get.URLGet
instance GHC.Show.Show Network.Google.Resource.URLShortener.URL.Get.URLGet
instance GHC.Classes.Eq Network.Google.Resource.URLShortener.URL.Get.URLGet
instance Network.Google.Types.GoogleRequest Network.Google.Resource.URLShortener.URL.Get.URLGet


-- | Lets you create, inspect, and manage goo.gl short URLs
--   
--   <i>See:</i> <a>URL Shortener API Reference</a>
module Network.Google.URLShortener

-- | Default request referring to version <tt>v1</tt> of the URL Shortener
--   API. This contains the host and root path used as a starting point for
--   constructing service requests.
uRLShortenerService :: ServiceConfig

-- | Manage your goo.gl short URLs
urlShortenerScope :: Proxy '["https://www.googleapis.com/auth/urlshortener"]

-- | Represents the entirety of the methods and resources available for the
--   URL Shortener API service.
type URLShortenerAPI = URLInsertResource :<|> (URLListResource :<|> URLGetResource)
data URL

-- | Creates a value of <a>URL</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uStatus</a></li>
--   <li><a>uKind</a></li>
--   <li><a>uCreated</a></li>
--   <li><a>uAnalytics</a></li>
--   <li><a>uLongURL</a></li>
--   <li><a>uId</a></li>
--   </ul>
url :: URL

-- | Status of the target URL. Possible values: "OK", "MALWARE",
--   "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was
--   flagged as spam, for example.
uStatus :: Lens' URL (Maybe Text)

-- | The fixed string "urlshortener#url".
uKind :: Lens' URL Text

-- | Time the short URL was created; ISO 8601 representation using the
--   yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g.
--   "2010-10-14T19:01:24.944+00:00".
uCreated :: Lens' URL (Maybe Text)

-- | A summary of the click analytics for the short and long URL. Might not
--   be present if not requested or currently unavailable.
uAnalytics :: Lens' URL (Maybe AnalyticsSummary)

-- | Long URL, e.g. "http://www.google.com/". Might not be present if the
--   status is "REMOVED".
uLongURL :: Lens' URL (Maybe Text)

-- | Short URL, e.g. "http://goo.gl/l6MS".
uId :: Lens' URL (Maybe Text)
data StringCount

-- | Creates a value of <a>StringCount</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>scCount</a></li>
--   <li><a>scId</a></li>
--   </ul>
stringCount :: StringCount

-- | Number of clicks for this top entry, e.g. for this particular country
--   or browser.
scCount :: Lens' StringCount (Maybe Int64)

-- | Label assigned to this top entry, e.g. "US" or "Chrome".
scId :: Lens' StringCount (Maybe Text)

-- | Additional information to return.
data URLListProjection

-- | <tt>ANALYTICS_CLICKS</tt> Returns short URL click counts.
AnalyticsClicks :: URLListProjection

-- | <tt>FULL</tt> Returns short URL click counts.
Full :: URLListProjection
data AnalyticsSnapshot

-- | Creates a value of <a>AnalyticsSnapshot</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>asPlatforms</a></li>
--   <li><a>asShortURLClicks</a></li>
--   <li><a>asReferrers</a></li>
--   <li><a>asCountries</a></li>
--   <li><a>asLongURLClicks</a></li>
--   <li><a>asBrowsers</a></li>
--   </ul>
analyticsSnapshot :: AnalyticsSnapshot

-- | Top platforms or OSes, e.g. "Windows"; sorted by (descending) click
--   counts. Only present if this data is available.
asPlatforms :: Lens' AnalyticsSnapshot [StringCount]

-- | Number of clicks on this short URL.
asShortURLClicks :: Lens' AnalyticsSnapshot (Maybe Int64)

-- | Top referring hosts, e.g. "www.google.com"; sorted by (descending)
--   click counts. Only present if this data is available.
asReferrers :: Lens' AnalyticsSnapshot [StringCount]

-- | Top countries (expressed as country codes), e.g. "US" or "DE"; sorted
--   by (descending) click counts. Only present if this data is available.
asCountries :: Lens' AnalyticsSnapshot [StringCount]

-- | Number of clicks on all goo.gl short URLs pointing to this long URL.
asLongURLClicks :: Lens' AnalyticsSnapshot (Maybe Int64)

-- | Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only
--   present if this data is available.
asBrowsers :: Lens' AnalyticsSnapshot [StringCount]
data AnalyticsSummary

-- | Creates a value of <a>AnalyticsSummary</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>asWeek</a></li>
--   <li><a>asAllTime</a></li>
--   <li><a>asDay</a></li>
--   <li><a>asTwoHours</a></li>
--   <li><a>asMonth</a></li>
--   </ul>
analyticsSummary :: AnalyticsSummary

-- | Click analytics over the last week.
asWeek :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over all time.
asAllTime :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over the last day.
asDay :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over the last two hours.
asTwoHours :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Click analytics over the last month.
asMonth :: Lens' AnalyticsSummary (Maybe AnalyticsSnapshot)

-- | Additional information to return.
data URLGetProjection

-- | <tt>ANALYTICS_CLICKS</tt> Returns only click counts.
UGPAnalyticsClicks :: URLGetProjection

-- | <tt>ANALYTICS_TOP_STRINGS</tt> Returns only top string counts.
UGPAnalyticsTopStrings :: URLGetProjection

-- | <tt>FULL</tt> Returns the creation timestamp and all available
--   analytics.
UGPFull :: URLGetProjection
data URLHistory

-- | Creates a value of <a>URLHistory</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uhTotalItems</a></li>
--   <li><a>uhNextPageToken</a></li>
--   <li><a>uhItemsPerPage</a></li>
--   <li><a>uhKind</a></li>
--   <li><a>uhItems</a></li>
--   </ul>
urlHistory :: URLHistory

-- | Total number of short URLs associated with this user (may be
--   approximate).
uhTotalItems :: Lens' URLHistory (Maybe Int32)

-- | A token to provide to get the next page of results.
uhNextPageToken :: Lens' URLHistory (Maybe Text)

-- | Number of items returned with each full "page" of results. Note that
--   the last page could have fewer items than the "itemsPerPage" value.
uhItemsPerPage :: Lens' URLHistory (Maybe Int32)

-- | The fixed string "urlshortener#urlHistory".
uhKind :: Lens' URLHistory Text

-- | A list of URL resources.
uhItems :: Lens' URLHistory [URL]
