on develop help sign in
Regenerating gogol-android-publisher from latest service definition
commit9bd498816ec1b7da3a5da097ea86917e147baa89 authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 25 Oct 2016, 11:37 (10 years ago) parentd9ab01b
9 files changed+424−27
gen/model/androidpublisher/v1.1/androidpublisher-api.json+4−4 gen/model/androidpublisher/v1/androidpublisher-api.json+4−4 gen/model/androidpublisher/v2/androidpublisher-api.json+98−7 gogol-android-publisher/gen/Network/Google/AndroidPublisher.hs+18 gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types.hs+13 gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs+86−12 gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Sum.hs+22 gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/DeobfuscationFiles/Upload.hs+178 gogol-android-publisher/gogol-android-publisher.cabal+1
gen/model/androidpublisher/v1.1/androidpublisher-api.json+4−4
@@ -1,12 +1,12 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/yLZNoMooQ7qHvZwtvucNfre7PCU\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/pZoln3VTirzMcP9u12GQ--6eh1U\"",
44 "discoveryVersion": "v1",
55 "id": "androidpublisher:v1.1",
66 "name": "androidpublisher",
77 "canonicalName": "Android Publisher",
88 "version": "v1.1",
9− "revision": "20150323",
9+ "revision": "20160722",
1010 "title": "Google Play Developer API",
1111 "description": "Lets Android application developers access their Google Play accounts.",
1212 "ownerDomain": "google.com",
@@ -119,7 +119,7 @@
119119 },
120120 "initiationTimestampMsec": {
121121 "type": "string",
122− "description": "Time at which the subscription was granted, in milliseconds since Epoch.",
122+ "description": "Time at which the subscription was granted, in milliseconds since the Epoch.",
123123 "format": "int64"
124124 },
125125 "kind": {
@@ -129,7 +129,7 @@
129129 },
130130 "validUntilTimestampMsec": {
131131 "type": "string",
132− "description": "Time at which the subscription will expire, in milliseconds since Epoch.",
132+ "description": "Time at which the subscription will expire, in milliseconds since the Epoch.",
133133 "format": "int64"
134134 }
135135 }
gen/model/androidpublisher/v1/androidpublisher-api.json+4−4
@@ -1,12 +1,12 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/JGynskXPDYAm7HfLDYPma5VcVjE\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/-S9kxgdQT4cuFfcjtElZbFgO3uc\"",
44 "discoveryVersion": "v1",
55 "id": "androidpublisher:v1",
66 "name": "androidpublisher",
77 "canonicalName": "Android Publisher",
88 "version": "v1",
9− "revision": "20150323",
9+ "revision": "20160722",
1010 "title": "Google Play Developer API",
1111 "description": "Lets Android application developers access their Google Play accounts.",
1212 "ownerDomain": "google.com",
@@ -88,7 +88,7 @@
8888 },
8989 "initiationTimestampMsec": {
9090 "type": "string",
91− "description": "Time at which the subscription was granted, in milliseconds since Epoch.",
91+ "description": "Time at which the subscription was granted, in milliseconds since the Epoch.",
9292 "format": "int64"
9393 },
9494 "kind": {
@@ -98,7 +98,7 @@
9898 },
9999 "validUntilTimestampMsec": {
100100 "type": "string",
101− "description": "Time at which the subscription will expire, in milliseconds since Epoch.",
101+ "description": "Time at which the subscription will expire, in milliseconds since the Epoch.",
102102 "format": "int64"
103103 }
104104 }
gen/model/androidpublisher/v2/androidpublisher-api.json+98−7
@@ -1,12 +1,12 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/kcmli-0AhQgKCzcLiKZ8WixyuKk\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/lK1rSeSt4REctli37J8Co4N4a5s\"",
44 "discoveryVersion": "v1",
55 "id": "androidpublisher:v2",
66 "name": "androidpublisher",
77 "canonicalName": "Android Publisher",
88 "version": "v2",
9− "revision": "20160516",
9+ "revision": "20161017",
1010 "title": "Google Play Developer API",
1111 "description": "Lets Android application developers access their Google Play accounts.",
1212 "ownerDomain": "google.com",
@@ -222,6 +222,26 @@
222222 }
223223 }
224224 },
225+ "DeobfuscationFile": {
226+ "id": "DeobfuscationFile",
227+ "type": "object",
228+ "description": "Represents a deobfuscation file.",
229+ "properties": {
230+ "symbolType": {
231+ "type": "string",
232+ "description": "The type of the deobfuscation file."
233+ }
234+ }
235+ },
236+ "DeobfuscationFilesUploadResponse": {
237+ "id": "DeobfuscationFilesUploadResponse",
238+ "type": "object",
239+ "properties": {
240+ "deobfuscationFile": {
241+ "$ref": "DeobfuscationFile"
242+ }
243+ }
244+ },
225245 "DeveloperComment": {
226246 "id": "DeveloperComment",
227247 "type": "object",
@@ -881,7 +901,7 @@
881901 "properties": {
882902 "desiredExpiryTimeMillis": {
883903 "type": "string",
884− "description": "The desired next expiry time for the subscription in milliseconds since Epoch. The given time must be after the current expiry time for the subscription.",
904+ "description": "The desired next expiry time to assign to the subscription, in milliseconds since the Epoch. The given time must be later/greater than the current expiry time for the subscription.",
885905 "format": "int64"
886906 },
887907 "expectedExpiryTimeMillis": {
@@ -902,7 +922,7 @@
902922 },
903923 "cancelReason": {
904924 "type": "integer",
905− "description": "The cancel reason of the subscription, if the subscription is not auto renewing. Possible values are: \n- User cancelled the subscription \n- Subscription was cancelled by the system, for example because of a billing problem",
925+ "description": "The reason why a subscription was cancelled or is not auto-renewing. Possible values are: \n- User cancelled the subscription \n- Subscription was cancelled by the system, for example because of a billing problem",
906926 "format": "int32"
907927 },
908928 "countryCode": {
@@ -915,7 +935,7 @@
915935 },
916936 "expiryTimeMillis": {
917937 "type": "string",
918− "description": "Time at which the subscription will expire, in milliseconds since Epoch.",
938+ "description": "Time at which the subscription will expire, in milliseconds since the Epoch.",
919939 "format": "int64"
920940 },
921941 "kind": {
@@ -930,7 +950,7 @@
930950 },
931951 "priceAmountMicros": {
932952 "type": "string",
933− "description": "Price of the subscription, not including tax. Price is expressed in micro-units, where 1,000,000 micro-units equal one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000.",
953+ "description": "Price of the subscription, not including tax. Price is expressed in micro-units, where 1,000,000 micro-units represents one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000.",
934954 "format": "int64"
935955 },
936956 "priceCurrencyCode": {
@@ -939,7 +959,7 @@
939959 },
940960 "startTimeMillis": {
941961 "type": "string",
942− "description": "Time at which the subscription was granted, in milliseconds since Epoch.",
962+ "description": "Time at which the subscription was granted, in milliseconds since the Epoch.",
943963 "format": "int64"
944964 }
945965 }
@@ -1609,6 +1629,77 @@
16091629 }
16101630 }
16111631 },
1632+ "deobfuscationfiles": {
1633+ "methods": {
1634+ "upload": {
1635+ "id": "androidpublisher.edits.deobfuscationfiles.upload",
1636+ "path": "{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}",
1637+ "httpMethod": "POST",
1638+ "description": "Uploads the deobfuscation file of the specified APK. If a deobfuscation file already exists, it will be replaced.",
1639+ "parameters": {
1640+ "apkVersionCode": {
1641+ "type": "integer",
1642+ "description": "The version code of the APK whose deobfuscation file is being uploaded.",
1643+ "required": true,
1644+ "format": "int32",
1645+ "location": "path"
1646+ },
1647+ "deobfuscationFileType": {
1648+ "type": "string",
1649+ "required": true,
1650+ "enum": [
1651+ "proguard"
1652+ ],
1653+ "enumDescriptions": [
1654+ ""
1655+ ],
1656+ "location": "path"
1657+ },
1658+ "editId": {
1659+ "type": "string",
1660+ "description": "Unique identifier for this edit.",
1661+ "required": true,
1662+ "location": "path"
1663+ },
1664+ "packageName": {
1665+ "type": "string",
1666+ "description": "Unique identifier of the Android app for which the deobfuscatiuon files are being uploaded; for example, \"com.spiffygame\".",
1667+ "required": true,
1668+ "location": "path"
1669+ }
1670+ },
1671+ "parameterOrder": [
1672+ "packageName",
1673+ "editId",
1674+ "apkVersionCode",
1675+ "deobfuscationFileType"
1676+ ],
1677+ "response": {
1678+ "$ref": "DeobfuscationFilesUploadResponse"
1679+ },
1680+ "scopes": [
1681+ "https://www.googleapis.com/auth/androidpublisher"
1682+ ],
1683+ "supportsMediaUpload": true,
1684+ "mediaUpload": {
1685+ "accept": [
1686+ "application/octet-stream"
1687+ ],
1688+ "maxSize": "300MB",
1689+ "protocols": {
1690+ "simple": {
1691+ "multipart": true,
1692+ "path": "/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}"
1693+ },
1694+ "resumable": {
1695+ "multipart": true,
1696+ "path": "/resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/deobfuscationFiles/{deobfuscationFileType}"
1697+ }
1698+ }
1699+ }
1700+ }
1701+ }
1702+ },
16121703 "details": {
16131704 "methods": {
16141705 "get": {
gogol-android-publisher/gen/Network/Google/AndroidPublisher.hs+18
@@ -62,6 +62,9 @@ module Network.Google.AndroidPublisher
6262 -- ** androidpublisher.edits.delete
6363 , module Network.Google.Resource.AndroidPublisher.Edits.Delete
6464
65+ -- ** androidpublisher.edits.deobfuscationfiles.upload
66+ , module Network.Google.Resource.AndroidPublisher.Edits.DeobfuscationFiles.Upload
67+
6568 -- ** androidpublisher.edits.details.get
6669 , module Network.Google.Resource.AndroidPublisher.Edits.Details.Get
6770
@@ -425,6 +428,11 @@ module Network.Google.AndroidPublisher
425428 -- ** EditsTestersGetTrack
426429 , EditsTestersGetTrack (..)
427430
431+ -- ** DeobfuscationFile
432+ , DeobfuscationFile
433+ , deobfuscationFile
434+ , dfSymbolType
435+
428436 -- ** ExpansionFilesUploadResponse
429437 , ExpansionFilesUploadResponse
430438 , expansionFilesUploadResponse
@@ -444,6 +452,11 @@ module Network.Google.AndroidPublisher
444452 , pStart
445453 , pDefaultPrice
446454
455+ -- ** DeobfuscationFilesUploadResponse
456+ , DeobfuscationFilesUploadResponse
457+ , deobfuscationFilesUploadResponse
458+ , dfurDeobfuscationFile
459+
447460 -- ** InAppProductsListResponse
448461 , InAppProductsListResponse
449462 , inAppProductsListResponse
@@ -452,6 +465,9 @@ module Network.Google.AndroidPublisher
452465 , iaplrKind
453466 , iaplrInAppProduct
454467
468+ -- ** EditsDeobfuscationFilesUploadDeobfuscationFileType
469+ , EditsDeobfuscationFilesUploadDeobfuscationFileType (..)
470+
455471 -- ** EditsExpansionFilesUploadExpansionFileType
456472 , EditsExpansionFilesUploadExpansionFileType (..)
457473
@@ -634,6 +650,7 @@ import Network.Google.Resource.AndroidPublisher.Edits.APKs.List
634650import Network.Google.Resource.AndroidPublisher.Edits.APKs.Upload
635651import Network.Google.Resource.AndroidPublisher.Edits.Commit
636652import Network.Google.Resource.AndroidPublisher.Edits.Delete
653+import Network.Google.Resource.AndroidPublisher.Edits.DeobfuscationFiles.Upload
637654import Network.Google.Resource.AndroidPublisher.Edits.Details.Get
638655import Network.Google.Resource.AndroidPublisher.Edits.Details.Patch
639656import Network.Google.Resource.AndroidPublisher.Edits.Details.Update
@@ -707,6 +724,7 @@ type AndroidPublisherAPI =
707724 :<|> EditsTracksPatchResource
708725 :<|> EditsTracksGetResource
709726 :<|> EditsTracksUpdateResource
727+ :<|> EditsDeobfuscationFilesUploadResource
710728 :<|> EditsTestersPatchResource
711729 :<|> EditsTestersGetResource
712730 :<|> EditsTestersUpdateResource
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types.hs+13
@@ -251,6 +251,11 @@ module Network.Google.AndroidPublisher.Types
251251 -- * EditsTestersGetTrack
252252 , EditsTestersGetTrack (..)
253253
254+ -- * DeobfuscationFile
255+ , DeobfuscationFile
256+ , deobfuscationFile
257+ , dfSymbolType
258+
254259 -- * ExpansionFilesUploadResponse
255260 , ExpansionFilesUploadResponse
256261 , expansionFilesUploadResponse
@@ -270,6 +275,11 @@ module Network.Google.AndroidPublisher.Types
270275 , pStart
271276 , pDefaultPrice
272277
278+ -- * DeobfuscationFilesUploadResponse
279+ , DeobfuscationFilesUploadResponse
280+ , deobfuscationFilesUploadResponse
281+ , dfurDeobfuscationFile
282+
273283 -- * InAppProductsListResponse
274284 , InAppProductsListResponse
275285 , inAppProductsListResponse
@@ -278,6 +288,9 @@ module Network.Google.AndroidPublisher.Types
278288 , iaplrKind
279289 , iaplrInAppProduct
280290
291+ -- * EditsDeobfuscationFilesUploadDeobfuscationFileType
292+ , EditsDeobfuscationFilesUploadDeobfuscationFileType (..)
293+
281294 -- * EditsExpansionFilesUploadExpansionFileType
282295 , EditsExpansionFilesUploadExpansionFileType (..)
283296
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs+86−12
@@ -1403,7 +1403,8 @@ spPaymentState
14031403spKind :: Lens' SubscriptionPurchase Text
14041404spKind = lens _spKind (\ s a -> s{_spKind = a})
14051405
1406−-- | Time at which the subscription will expire, in milliseconds since Epoch.
1406+-- | Time at which the subscription will expire, in milliseconds since the
1407+-- Epoch.
14071408spExpiryTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64)
14081409spExpiryTimeMillis
14091410 = lens _spExpiryTimeMillis
@@ -1425,10 +1426,9 @@ spPriceCurrencyCode
14251426 = lens _spPriceCurrencyCode
14261427 (\ s a -> s{_spPriceCurrencyCode = a})
14271428
1428−-- | The cancel reason of the subscription, if the subscription is not auto
1429−-- renewing. Possible values are: - User cancelled the subscription -
1430−-- Subscription was cancelled by the system, for example because of a
1431−-- billing problem
1429+-- | The reason why a subscription was cancelled or is not auto-renewing.
1430+-- Possible values are: - User cancelled the subscription - Subscription
1431+-- was cancelled by the system, for example because of a billing problem
14321432spCancelReason :: Lens' SubscriptionPurchase (Maybe Int32)
14331433spCancelReason
14341434 = lens _spCancelReason
@@ -1450,16 +1450,17 @@ spDeveloperPayload
14501450 (\ s a -> s{_spDeveloperPayload = a})
14511451
14521452-- | Price of the subscription, not including tax. Price is expressed in
1453−-- micro-units, where 1,000,000 micro-units equal one unit of the currency.
1454−-- For example, if the subscription price is €1.99, price_amount_micros is
1455−-- 1990000.
1453+-- micro-units, where 1,000,000 micro-units represents one unit of the
1454+-- currency. For example, if the subscription price is €1.99,
1455+-- price_amount_micros is 1990000.
14561456spPriceAmountMicros :: Lens' SubscriptionPurchase (Maybe Int64)
14571457spPriceAmountMicros
14581458 = lens _spPriceAmountMicros
14591459 (\ s a -> s{_spPriceAmountMicros = a})
14601460 . mapping _Coerce
14611461
1462−-- | Time at which the subscription was granted, in milliseconds since Epoch.
1462+-- | Time at which the subscription was granted, in milliseconds since the
1463+-- Epoch.
14631464spStartTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64)
14641465spStartTimeMillis
14651466 = lens _spStartTimeMillis
@@ -1866,6 +1867,40 @@ instance ToJSON ExternallyHostedAPK where
18661867 ("certificateBase64s" .=) <$>
18671868 _ehapkCertificateBase64s])
18681869
1870+-- | Represents a deobfuscation file.
1871+--
1872+-- /See:/ 'deobfuscationFile' smart constructor.
1873+newtype DeobfuscationFile = DeobfuscationFile'
1874+ { _dfSymbolType :: Maybe Text
1875+ } deriving (Eq,Show,Data,Typeable,Generic)
1876+
1877+-- | Creates a value of 'DeobfuscationFile' with the minimum fields required to make a request.
1878+--
1879+-- Use one of the following lenses to modify other fields as desired:
1880+--
1881+-- * 'dfSymbolType'
1882+deobfuscationFile
1883+ :: DeobfuscationFile
1884+deobfuscationFile =
1885+ DeobfuscationFile'
1886+ { _dfSymbolType = Nothing
1887+ }
1888+
1889+-- | The type of the deobfuscation file.
1890+dfSymbolType :: Lens' DeobfuscationFile (Maybe Text)
1891+dfSymbolType
1892+ = lens _dfSymbolType (\ s a -> s{_dfSymbolType = a})
1893+
1894+instance FromJSON DeobfuscationFile where
1895+ parseJSON
1896+ = withObject "DeobfuscationFile"
1897+ (\ o -> DeobfuscationFile' <$> (o .:? "symbolType"))
1898+
1899+instance ToJSON DeobfuscationFile where
1900+ toJSON DeobfuscationFile'{..}
1901+ = object
1902+ (catMaybes [("symbolType" .=) <$> _dfSymbolType])
1903+
18691904--
18701905-- /See:/ 'expansionFilesUploadResponse' smart constructor.
18711906newtype ExpansionFilesUploadResponse = ExpansionFilesUploadResponse'
@@ -1981,6 +2016,45 @@ instance ToJSON Prorate where
19812016 [("start" .=) <$> _pStart,
19822017 ("defaultPrice" .=) <$> _pDefaultPrice])
19832018
2019+--
2020+-- /See:/ 'deobfuscationFilesUploadResponse' smart constructor.
2021+newtype DeobfuscationFilesUploadResponse = DeobfuscationFilesUploadResponse'
2022+ { _dfurDeobfuscationFile :: Maybe DeobfuscationFile
2023+ } deriving (Eq,Show,Data,Typeable,Generic)
2024+
2025+-- | Creates a value of 'DeobfuscationFilesUploadResponse' with the minimum fields required to make a request.
2026+--
2027+-- Use one of the following lenses to modify other fields as desired:
2028+--
2029+-- * 'dfurDeobfuscationFile'
2030+deobfuscationFilesUploadResponse
2031+ :: DeobfuscationFilesUploadResponse
2032+deobfuscationFilesUploadResponse =
2033+ DeobfuscationFilesUploadResponse'
2034+ { _dfurDeobfuscationFile = Nothing
2035+ }
2036+
2037+dfurDeobfuscationFile :: Lens' DeobfuscationFilesUploadResponse (Maybe DeobfuscationFile)
2038+dfurDeobfuscationFile
2039+ = lens _dfurDeobfuscationFile
2040+ (\ s a -> s{_dfurDeobfuscationFile = a})
2041+
2042+instance FromJSON DeobfuscationFilesUploadResponse
2043+ where
2044+ parseJSON
2045+ = withObject "DeobfuscationFilesUploadResponse"
2046+ (\ o ->
2047+ DeobfuscationFilesUploadResponse' <$>
2048+ (o .:? "deobfuscationFile"))
2049+
2050+instance ToJSON DeobfuscationFilesUploadResponse
2051+ where
2052+ toJSON DeobfuscationFilesUploadResponse'{..}
2053+ = object
2054+ (catMaybes
2055+ [("deobfuscationFile" .=) <$>
2056+ _dfurDeobfuscationFile])
2057+
19842058--
19852059-- /See:/ 'inAppProductsListResponse' smart constructor.
19862060data InAppProductsListResponse = InAppProductsListResponse'
@@ -2262,9 +2336,9 @@ subscriptionDeferralInfo =
22622336 , _sdiExpectedExpiryTimeMillis = Nothing
22632337 }
22642338
2265−-- | The desired next expiry time for the subscription in milliseconds since
2266−-- Epoch. The given time must be after the current expiry time for the
2267−-- subscription.
2339+-- | The desired next expiry time to assign to the subscription, in
2340+-- milliseconds since the Epoch. The given time must be later\/greater than
2341+-- the current expiry time for the subscription.
22682342sdiDesiredExpiryTimeMillis :: Lens' SubscriptionDeferralInfo (Maybe Int64)
22692343sdiDesiredExpiryTimeMillis
22702344 = lens _sdiDesiredExpiryTimeMillis
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Sum.hs+22
@@ -353,6 +353,28 @@ instance FromJSON EditsImagesUploadImageType where
353353instance ToJSON EditsImagesUploadImageType where
354354 toJSON = toJSONText
355355
356+data EditsDeobfuscationFilesUploadDeobfuscationFileType
357+ = Proguard
358+ -- ^ @proguard@
359+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
360+
361+instance Hashable EditsDeobfuscationFilesUploadDeobfuscationFileType
362+
363+instance FromHttpApiData EditsDeobfuscationFilesUploadDeobfuscationFileType where
364+ parseQueryParam = \case
365+ "proguard" -> Right Proguard
366+ x -> Left ("Unable to parse EditsDeobfuscationFilesUploadDeobfuscationFileType from: " <> x)
367+
368+instance ToHttpApiData EditsDeobfuscationFilesUploadDeobfuscationFileType where
369+ toQueryParam = \case
370+ Proguard -> "proguard"
371+
372+instance FromJSON EditsDeobfuscationFilesUploadDeobfuscationFileType where
373+ parseJSON = parseJSONText "EditsDeobfuscationFilesUploadDeobfuscationFileType"
374+
375+instance ToJSON EditsDeobfuscationFilesUploadDeobfuscationFileType where
376+ toJSON = toJSONText
377+
356378data EditsExpansionFilesUploadExpansionFileType
357379 = Main
358380 -- ^ @main@
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/DeobfuscationFiles/Upload.hsnew file+178
@@ -0,0 +1,178 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidPublisher.Edits.DeobfuscationFiles.Upload
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Uploads the deobfuscation file of the specified APK. If a deobfuscation
24+-- file already exists, it will be replaced.
25+--
26+-- /See:/ <https://developers.google.com/android-publisher Google Play Developer API Reference> for @androidpublisher.edits.deobfuscationfiles.upload@.
27+module Network.Google.Resource.AndroidPublisher.Edits.DeobfuscationFiles.Upload
28+ (
29+ -- * REST Resource
30+ EditsDeobfuscationFilesUploadResource
31+
32+ -- * Creating a Request
33+ , editsDeobfuscationFilesUpload
34+ , EditsDeobfuscationFilesUpload
35+
36+ -- * Request Lenses
37+ , edfuDeobfuscationFileType
38+ , edfuPackageName
39+ , edfuAPKVersionCode
40+ , edfuEditId
41+ ) where
42+
43+import Network.Google.AndroidPublisher.Types
44+import Network.Google.Prelude
45+
46+-- | A resource alias for @androidpublisher.edits.deobfuscationfiles.upload@ method which the
47+-- 'EditsDeobfuscationFilesUpload' request conforms to.
48+type EditsDeobfuscationFilesUploadResource =
49+ "androidpublisher" :>
50+ "v2" :>
51+ "applications" :>
52+ Capture "packageName" Text :>
53+ "edits" :>
54+ Capture "editId" Text :>
55+ "apks" :>
56+ Capture "apkVersionCode" (Textual Int32) :>
57+ "deobfuscationFiles" :>
58+ Capture "deobfuscationFileType"
59+ EditsDeobfuscationFilesUploadDeobfuscationFileType
60+ :>
61+ QueryParam "alt" AltJSON :>
62+ Post '[JSON] DeobfuscationFilesUploadResponse
63+ :<|>
64+ "upload" :>
65+ "androidpublisher" :>
66+ "v2" :>
67+ "applications" :>
68+ Capture "packageName" Text :>
69+ "edits" :>
70+ Capture "editId" Text :>
71+ "apks" :>
72+ Capture "apkVersionCode" (Textual Int32) :>
73+ "deobfuscationFiles" :>
74+ Capture "deobfuscationFileType"
75+ EditsDeobfuscationFilesUploadDeobfuscationFileType
76+ :>
77+ QueryParam "alt" AltJSON :>
78+ QueryParam "uploadType" AltMedia :>
79+ AltMedia :>
80+ Post '[JSON] DeobfuscationFilesUploadResponse
81+
82+-- | Uploads the deobfuscation file of the specified APK. If a deobfuscation
83+-- file already exists, it will be replaced.
84+--
85+-- /See:/ 'editsDeobfuscationFilesUpload' smart constructor.
86+data EditsDeobfuscationFilesUpload = EditsDeobfuscationFilesUpload'
87+ { _edfuDeobfuscationFileType :: !EditsDeobfuscationFilesUploadDeobfuscationFileType
88+ , _edfuPackageName :: !Text
89+ , _edfuAPKVersionCode :: !(Textual Int32)
90+ , _edfuEditId :: !Text
91+ } deriving (Eq,Show,Data,Typeable,Generic)
92+
93+-- | Creates a value of 'EditsDeobfuscationFilesUpload' with the minimum fields required to make a request.
94+--
95+-- Use one of the following lenses to modify other fields as desired:
96+--
97+-- * 'edfuDeobfuscationFileType'
98+--
99+-- * 'edfuPackageName'
100+--
101+-- * 'edfuAPKVersionCode'
102+--
103+-- * 'edfuEditId'
104+editsDeobfuscationFilesUpload
105+ :: EditsDeobfuscationFilesUploadDeobfuscationFileType -- ^ 'edfuDeobfuscationFileType'
106+ -> Text -- ^ 'edfuPackageName'
107+ -> Int32 -- ^ 'edfuAPKVersionCode'
108+ -> Text -- ^ 'edfuEditId'
109+ -> EditsDeobfuscationFilesUpload
110+editsDeobfuscationFilesUpload pEdfuDeobfuscationFileType_ pEdfuPackageName_ pEdfuAPKVersionCode_ pEdfuEditId_ =
111+ EditsDeobfuscationFilesUpload'
112+ { _edfuDeobfuscationFileType = pEdfuDeobfuscationFileType_
113+ , _edfuPackageName = pEdfuPackageName_
114+ , _edfuAPKVersionCode = _Coerce # pEdfuAPKVersionCode_
115+ , _edfuEditId = pEdfuEditId_
116+ }
117+
118+edfuDeobfuscationFileType :: Lens' EditsDeobfuscationFilesUpload EditsDeobfuscationFilesUploadDeobfuscationFileType
119+edfuDeobfuscationFileType
120+ = lens _edfuDeobfuscationFileType
121+ (\ s a -> s{_edfuDeobfuscationFileType = a})
122+
123+-- | Unique identifier of the Android app for which the deobfuscatiuon files
124+-- are being uploaded; for example, \"com.spiffygame\".
125+edfuPackageName :: Lens' EditsDeobfuscationFilesUpload Text
126+edfuPackageName
127+ = lens _edfuPackageName
128+ (\ s a -> s{_edfuPackageName = a})
129+
130+-- | The version code of the APK whose deobfuscation file is being uploaded.
131+edfuAPKVersionCode :: Lens' EditsDeobfuscationFilesUpload Int32
132+edfuAPKVersionCode
133+ = lens _edfuAPKVersionCode
134+ (\ s a -> s{_edfuAPKVersionCode = a})
135+ . _Coerce
136+
137+-- | Unique identifier for this edit.
138+edfuEditId :: Lens' EditsDeobfuscationFilesUpload Text
139+edfuEditId
140+ = lens _edfuEditId (\ s a -> s{_edfuEditId = a})
141+
142+instance GoogleRequest EditsDeobfuscationFilesUpload
143+ where
144+ type Rs EditsDeobfuscationFilesUpload =
145+ DeobfuscationFilesUploadResponse
146+ type Scopes EditsDeobfuscationFilesUpload =
147+ '["https://www.googleapis.com/auth/androidpublisher"]
148+ requestClient EditsDeobfuscationFilesUpload'{..}
149+ = go _edfuPackageName _edfuEditId _edfuAPKVersionCode
150+ _edfuDeobfuscationFileType
151+ (Just AltJSON)
152+ androidPublisherService
153+ where go :<|> _
154+ = buildClient
155+ (Proxy ::
156+ Proxy EditsDeobfuscationFilesUploadResource)
157+ mempty
158+
159+instance GoogleRequest
160+ (MediaUpload EditsDeobfuscationFilesUpload) where
161+ type Rs (MediaUpload EditsDeobfuscationFilesUpload) =
162+ DeobfuscationFilesUploadResponse
163+ type Scopes
164+ (MediaUpload EditsDeobfuscationFilesUpload)
165+ = Scopes EditsDeobfuscationFilesUpload
166+ requestClient
167+ (MediaUpload EditsDeobfuscationFilesUpload'{..} body)
168+ = go _edfuPackageName _edfuEditId _edfuAPKVersionCode
169+ _edfuDeobfuscationFileType
170+ (Just AltJSON)
171+ (Just AltMedia)
172+ body
173+ androidPublisherService
174+ where _ :<|> go
175+ = buildClient
176+ (Proxy ::
177+ Proxy EditsDeobfuscationFilesUploadResource)
178+ mempty
gogol-android-publisher/gogol-android-publisher.cabal+1
@@ -46,6 +46,7 @@ library
4646 , Network.Google.Resource.AndroidPublisher.Edits.APKs.Upload
4747 , Network.Google.Resource.AndroidPublisher.Edits.Commit
4848 , Network.Google.Resource.AndroidPublisher.Edits.Delete
49+ , Network.Google.Resource.AndroidPublisher.Edits.DeobfuscationFiles.Upload
4950 , Network.Google.Resource.AndroidPublisher.Edits.Details.Get
5051 , Network.Google.Resource.AndroidPublisher.Edits.Details.Patch
5152 , Network.Google.Resource.AndroidPublisher.Edits.Details.Update