on develop help sign in
Regenerating gogol-firebase-dynamiclinks
commita641647fd6b1455ae34478a0acabbf1521fd390f authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 28 Oct 2016, 08:23 (10 years ago) parent33ac893
11 files changed+1963
gogol-firebase-dynamiclinks/LICENSE+367 gogol-firebase-dynamiclinks/Makefile+1 gogol-firebase-dynamiclinks/README.md+28 gogol-firebase-dynamiclinks/Setup.hs+2 gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks.hs+143 gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types.hs+133 gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types/Product.hs+805 gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types/Sum.hs+255 gogol-firebase-dynamiclinks/gen/Network/Google/Resource/FirebaseDynamicLinks/ShortLinks/Create.hs+182 gogol-firebase-dynamiclinks/gogol-firebase-dynamiclinks.cabal+47 gogol-firebase-dynamiclinks/src/.gitkeep
gogol-firebase-dynamiclinks/LICENSEnew file+367
@@ -0,0 +1,367 @@
1+Mozilla Public License Version 2.0
2+==================================
3+
4+1. Definitions
5+--------------
6+
7+1.1. "Contributor"
8+ means each individual or legal entity that creates, contributes to
9+ the creation of, or owns Covered Software.
10+
11+1.2. "Contributor Version"
12+ means the combination of the Contributions of others (if any) used
13+ by a Contributor and that particular Contributor's Contribution.
14+
15+1.3. "Contribution"
16+ means Covered Software of a particular Contributor.
17+
18+1.4. "Covered Software"
19+ means Source Code Form to which the initial Contributor has attached
20+ the notice in Exhibit A, the Executable Form of such Source Code
21+ Form, and Modifications of such Source Code Form, in each case
22+ including portions thereof.
23+
24+1.5. "Incompatible With Secondary Licenses"
25+ means
26+
27+ (a) that the initial Contributor has attached the notice described
28+ in Exhibit B to the Covered Software; or
29+
30+ (b) that the Covered Software was made available under the terms of
31+ version 1.1 or earlier of the License, but not also under the
32+ terms of a Secondary License.
33+
34+1.6. "Executable Form"
35+ means any form of the work other than Source Code Form.
36+
37+1.7. "Larger Work"
38+ means a work that combines Covered Software with other material, in
39+ a separate file or files, that is not Covered Software.
40+
41+1.8. "License"
42+ means this document.
43+
44+1.9. "Licensable"
45+ means having the right to grant, to the maximum extent possible,
46+ whether at the time of the initial grant or subsequently, any and
47+ all of the rights conveyed by this License.
48+
49+1.10. "Modifications"
50+ means any of the following:
51+
52+ (a) any file in Source Code Form that results from an addition to,
53+ deletion from, or modification of the contents of Covered
54+ Software; or
55+
56+ (b) any new file in Source Code Form that contains any Covered
57+ Software.
58+
59+1.11. "Patent Claims" of a Contributor
60+ means any patent claim(s), including without limitation, method,
61+ process, and apparatus claims, in any patent Licensable by such
62+ Contributor that would be infringed, but for the grant of the
63+ License, by the making, using, selling, offering for sale, having
64+ made, import, or transfer of either its Contributions or its
65+ Contributor Version.
66+
67+1.12. "Secondary License"
68+ means either the GNU General Public License, Version 2.0, the GNU
69+ Lesser General Public License, Version 2.1, the GNU Affero General
70+ Public License, Version 3.0, or any later versions of those
71+ licenses.
72+
73+1.13. "Source Code Form"
74+ means the form of the work preferred for making modifications.
75+
76+1.14. "You" (or "Your")
77+ means an individual or a legal entity exercising rights under this
78+ License. For legal entities, "You" includes any entity that
79+ controls, is controlled by, or is under common control with You. For
80+ purposes of this definition, "control" means (a) the power, direct
81+ or indirect, to cause the direction or management of such entity,
82+ whether by contract or otherwise, or (b) ownership of more than
83+ fifty percent (50%) of the outstanding shares or beneficial
84+ ownership of such entity.
85+
86+2. License Grants and Conditions
87+--------------------------------
88+
89+2.1. Grants
90+
91+Each Contributor hereby grants You a world-wide, royalty-free,
92+non-exclusive license:
93+
94+(a) under intellectual property rights (other than patent or trademark)
95+ Licensable by such Contributor to use, reproduce, make available,
96+ modify, display, perform, distribute, and otherwise exploit its
97+ Contributions, either on an unmodified basis, with Modifications, or
98+ as part of a Larger Work; and
99+
100+(b) under Patent Claims of such Contributor to make, use, sell, offer
101+ for sale, have made, import, and otherwise transfer either its
102+ Contributions or its Contributor Version.
103+
104+2.2. Effective Date
105+
106+The licenses granted in Section 2.1 with respect to any Contribution
107+become effective for each Contribution on the date the Contributor first
108+distributes such Contribution.
109+
110+2.3. Limitations on Grant Scope
111+
112+The licenses granted in this Section 2 are the only rights granted under
113+this License. No additional rights or licenses will be implied from the
114+distribution or licensing of Covered Software under this License.
115+Notwithstanding Section 2.1(b) above, no patent license is granted by a
116+Contributor:
117+
118+(a) for any code that a Contributor has removed from Covered Software;
119+ or
120+
121+(b) for infringements caused by: (i) Your and any other third party's
122+ modifications of Covered Software, or (ii) the combination of its
123+ Contributions with other software (except as part of its Contributor
124+ Version); or
125+
126+(c) under Patent Claims infringed by Covered Software in the absence of
127+ its Contributions.
128+
129+This License does not grant any rights in the trademarks, service marks,
130+or logos of any Contributor (except as may be necessary to comply with
131+the notice requirements in Section 3.4).
132+
133+2.4. Subsequent Licenses
134+
135+No Contributor makes additional grants as a result of Your choice to
136+distribute the Covered Software under a subsequent version of this
137+License (see Section 10.2) or under the terms of a Secondary License (if
138+permitted under the terms of Section 3.3).
139+
140+2.5. Representation
141+
142+Each Contributor represents that the Contributor believes its
143+Contributions are its original creation(s) or it has sufficient rights
144+to grant the rights to its Contributions conveyed by this License.
145+
146+2.6. Fair Use
147+
148+This License is not intended to limit any rights You have under
149+applicable copyright doctrines of fair use, fair dealing, or other
150+equivalents.
151+
152+2.7. Conditions
153+
154+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155+in Section 2.1.
156+
157+3. Responsibilities
158+-------------------
159+
160+3.1. Distribution of Source Form
161+
162+All distribution of Covered Software in Source Code Form, including any
163+Modifications that You create or to which You contribute, must be under
164+the terms of this License. You must inform recipients that the Source
165+Code Form of the Covered Software is governed by the terms of this
166+License, and how they can obtain a copy of this License. You may not
167+attempt to alter or restrict the recipients' rights in the Source Code
168+Form.
169+
170+3.2. Distribution of Executable Form
171+
172+If You distribute Covered Software in Executable Form then:
173+
174+(a) such Covered Software must also be made available in Source Code
175+ Form, as described in Section 3.1, and You must inform recipients of
176+ the Executable Form how they can obtain a copy of such Source Code
177+ Form by reasonable means in a timely manner, at a charge no more
178+ than the cost of distribution to the recipient; and
179+
180+(b) You may distribute such Executable Form under the terms of this
181+ License, or sublicense it under different terms, provided that the
182+ license for the Executable Form does not attempt to limit or alter
183+ the recipients' rights in the Source Code Form under this License.
184+
185+3.3. Distribution of a Larger Work
186+
187+You may create and distribute a Larger Work under terms of Your choice,
188+provided that You also comply with the requirements of this License for
189+the Covered Software. If the Larger Work is a combination of Covered
190+Software with a work governed by one or more Secondary Licenses, and the
191+Covered Software is not Incompatible With Secondary Licenses, this
192+License permits You to additionally distribute such Covered Software
193+under the terms of such Secondary License(s), so that the recipient of
194+the Larger Work may, at their option, further distribute the Covered
195+Software under the terms of either this License or such Secondary
196+License(s).
197+
198+3.4. Notices
199+
200+You may not remove or alter the substance of any license notices
201+(including copyright notices, patent notices, disclaimers of warranty,
202+or limitations of liability) contained within the Source Code Form of
203+the Covered Software, except that You may alter any license notices to
204+the extent required to remedy known factual inaccuracies.
205+
206+3.5. Application of Additional Terms
207+
208+You may choose to offer, and to charge a fee for, warranty, support,
209+indemnity or liability obligations to one or more recipients of Covered
210+Software. However, You may do so only on Your own behalf, and not on
211+behalf of any Contributor. You must make it absolutely clear that any
212+such warranty, support, indemnity, or liability obligation is offered by
213+You alone, and You hereby agree to indemnify every Contributor for any
214+liability incurred by such Contributor as a result of warranty, support,
215+indemnity or liability terms You offer. You may include additional
216+disclaimers of warranty and limitations of liability specific to any
217+jurisdiction.
218+
219+4. Inability to Comply Due to Statute or Regulation
220+---------------------------------------------------
221+
222+If it is impossible for You to comply with any of the terms of this
223+License with respect to some or all of the Covered Software due to
224+statute, judicial order, or regulation then You must: (a) comply with
225+the terms of this License to the maximum extent possible; and (b)
226+describe the limitations and the code they affect. Such description must
227+be placed in a text file included with all distributions of the Covered
228+Software under this License. Except to the extent prohibited by statute
229+or regulation, such description must be sufficiently detailed for a
230+recipient of ordinary skill to be able to understand it.
231+
232+5. Termination
233+--------------
234+
235+5.1. The rights granted under this License will terminate automatically
236+if You fail to comply with any of its terms. However, if You become
237+compliant, then the rights granted under this License from a particular
238+Contributor are reinstated (a) provisionally, unless and until such
239+Contributor explicitly and finally terminates Your grants, and (b) on an
240+ongoing basis, if such Contributor fails to notify You of the
241+non-compliance by some reasonable means prior to 60 days after You have
242+come back into compliance. Moreover, Your grants from a particular
243+Contributor are reinstated on an ongoing basis if such Contributor
244+notifies You of the non-compliance by some reasonable means, this is the
245+first time You have received notice of non-compliance with this License
246+from such Contributor, and You become compliant prior to 30 days after
247+Your receipt of the notice.
248+
249+5.2. If You initiate litigation against any entity by asserting a patent
250+infringement claim (excluding declaratory judgment actions,
251+counter-claims, and cross-claims) alleging that a Contributor Version
252+directly or indirectly infringes any patent, then the rights granted to
253+You by any and all Contributors for the Covered Software under Section
254+2.1 of this License shall terminate.
255+
256+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257+end user license agreements (excluding distributors and resellers) which
258+have been validly granted by You or Your distributors under this License
259+prior to termination shall survive termination.
260+
261+************************************************************************
262+* *
263+* 6. Disclaimer of Warranty *
264+* ------------------------- *
265+* *
266+* Covered Software is provided under this License on an "as is" *
267+* basis, without warranty of any kind, either expressed, implied, or *
268+* statutory, including, without limitation, warranties that the *
269+* Covered Software is free of defects, merchantable, fit for a *
270+* particular purpose or non-infringing. The entire risk as to the *
271+* quality and performance of the Covered Software is with You. *
272+* Should any Covered Software prove defective in any respect, You *
273+* (not any Contributor) assume the cost of any necessary servicing, *
274+* repair, or correction. This disclaimer of warranty constitutes an *
275+* essential part of this License. No use of any Covered Software is *
276+* authorized under this License except under this disclaimer. *
277+* *
278+************************************************************************
279+
280+************************************************************************
281+* *
282+* 7. Limitation of Liability *
283+* -------------------------- *
284+* *
285+* Under no circumstances and under no legal theory, whether tort *
286+* (including negligence), contract, or otherwise, shall any *
287+* Contributor, or anyone who distributes Covered Software as *
288+* permitted above, be liable to You for any direct, indirect, *
289+* special, incidental, or consequential damages of any character *
290+* including, without limitation, damages for lost profits, loss of *
291+* goodwill, work stoppage, computer failure or malfunction, or any *
292+* and all other commercial damages or losses, even if such party *
293+* shall have been informed of the possibility of such damages. This *
294+* limitation of liability shall not apply to liability for death or *
295+* personal injury resulting from such party's negligence to the *
296+* extent applicable law prohibits such limitation. Some *
297+* jurisdictions do not allow the exclusion or limitation of *
298+* incidental or consequential damages, so this exclusion and *
299+* limitation may not apply to You. *
300+* *
301+************************************************************************
302+
303+8. Litigation
304+-------------
305+
306+Any litigation relating to this License may be brought only in the
307+courts of a jurisdiction where the defendant maintains its principal
308+place of business and such litigation shall be governed by laws of that
309+jurisdiction, without reference to its conflict-of-law provisions.
310+Nothing in this Section shall prevent a party's ability to bring
311+cross-claims or counter-claims.
312+
313+9. Miscellaneous
314+----------------
315+
316+This License represents the complete agreement concerning the subject
317+matter hereof. If any provision of this License is held to be
318+unenforceable, such provision shall be reformed only to the extent
319+necessary to make it enforceable. Any law or regulation which provides
320+that the language of a contract shall be construed against the drafter
321+shall not be used to construe this License against a Contributor.
322+
323+10. Versions of the License
324+---------------------------
325+
326+10.1. New Versions
327+
328+Mozilla Foundation is the license steward. Except as provided in Section
329+10.3, no one other than the license steward has the right to modify or
330+publish new versions of this License. Each version will be given a
331+distinguishing version number.
332+
333+10.2. Effect of New Versions
334+
335+You may distribute the Covered Software under the terms of the version
336+of the License under which You originally received the Covered Software,
337+or under the terms of any subsequent version published by the license
338+steward.
339+
340+10.3. Modified Versions
341+
342+If you create software not governed by this License, and you want to
343+create a new license for such software, you may create and use a
344+modified version of this License if you rename the license and remove
345+any references to the name of the license steward (except to note that
346+such modified license differs from this License).
347+
348+10.4. Distributing Source Code Form that is Incompatible With Secondary
349+Licenses
350+
351+If You choose to distribute Source Code Form that is Incompatible With
352+Secondary Licenses under the terms of this version of the License, the
353+notice described in Exhibit B of this License must be attached.
354+
355+Exhibit A - Source Code Form License Notice
356+-------------------------------------------
357+
358+ This Source Code Form is subject to the terms of the Mozilla Public
359+ License, v. 2.0. If a copy of the MPL was not distributed with this
360+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
361+
362+If it is not possible or desirable to put the notice in a particular
363+file, then You may include the notice in a location (such as a LICENSE
364+file in a relevant directory) where a recipient would be likely to look
365+for such a notice.
366+
367+You may add additional accurate notices of copyright ownership.
gogol-firebase-dynamiclinks/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-firebase-dynamiclinks/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-firebase-dynamiclinks
2+
3+* [Version](#version)
4+* [Description](#description)
5+* [Contribute](#contribute)
6+* [Licence](#licence)
7+
8+
9+## Version
10+
11+`0.1.0`
12+
13+
14+## Description
15+
16+A client library for the Google Firebase Dynamic Links.
17+
18+
19+## Contribute
20+
21+For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues).
22+
23+> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information.
24+
25+
26+## Licence
27+
28+`gogol-firebase-dynamiclinks` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-firebase-dynamiclinks/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks.hsnew file+143
@@ -0,0 +1,143 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE NoImplicitPrelude #-}
3+{-# LANGUAGE TypeOperators #-}
4+
5+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
6+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
7+
8+-- |
9+-- Module : Network.Google.FirebaseDynamicLinks
10+-- Copyright : (c) 2015-2016 Brendan Hay
11+-- License : Mozilla Public License, v. 2.0.
12+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13+-- Stability : auto-generated
14+-- Portability : non-portable (GHC extensions)
15+--
16+-- Firebase Dynamic Links API enables third party developers to
17+-- programmatically create and manage Dynamic Links.
18+--
19+-- /See:/ <https://firebase.google.com/docs/dynamic-links/ Firebase Dynamic Links API Reference>
20+module Network.Google.FirebaseDynamicLinks
21+ (
22+ -- * Service Configuration
23+ firebaseDynamicLinksService
24+
25+ -- * OAuth Scopes
26+ , firebaseScope
27+
28+ -- * API Declaration
29+ , FirebaseDynamicLinksAPI
30+
31+ -- * Resources
32+
33+ -- ** firebasedynamiclinks.shortLinks.create
34+ , module Network.Google.Resource.FirebaseDynamicLinks.ShortLinks.Create
35+
36+ -- * Types
37+
38+ -- ** Suffix
39+ , Suffix
40+ , suffix
41+ , sOption
42+
43+ -- ** DynamicLinkWarning
44+ , DynamicLinkWarning
45+ , dynamicLinkWarning
46+ , dlwWarningCode
47+ , dlwWarningMessage
48+
49+ -- ** CreateShortDynamicLinkRequest
50+ , CreateShortDynamicLinkRequest
51+ , createShortDynamicLinkRequest
52+ , csdlrLongDynamicLink
53+ , csdlrSuffix
54+ , csdlrDynamicLinkInfo
55+
56+ -- ** SocialMetaTagInfo
57+ , SocialMetaTagInfo
58+ , socialMetaTagInfo
59+ , smtiSocialImageLink
60+ , smtiSocialDescription
61+ , smtiSocialTitle
62+
63+ -- ** CreateShortDynamicLinkResponse
64+ , CreateShortDynamicLinkResponse
65+ , createShortDynamicLinkResponse
66+ , csdlrPreviewLink
67+ , csdlrWarning
68+ , csdlrShortLink
69+
70+ -- ** IosInfo
71+ , IosInfo
72+ , iosInfo
73+ , iiIosBundleId
74+ , iiIosIPadBundleId
75+ , iiIosAppStoreId
76+ , iiIosIPadFallbackLink
77+ , iiIosCustomScheme
78+ , iiIosFallbackLink
79+
80+ -- ** DynamicLinkInfo
81+ , DynamicLinkInfo
82+ , dynamicLinkInfo
83+ , dliSocialMetaTagInfo
84+ , dliDynamicLinkDomain
85+ , dliLink
86+ , dliIosInfo
87+ , dliIsAd
88+ , dliAndroidInfo
89+ , dliAnalyticsInfo
90+
91+ -- ** SuffixOption
92+ , SuffixOption (..)
93+
94+ -- ** Xgafv
95+ , Xgafv (..)
96+
97+ -- ** AndroidInfo
98+ , AndroidInfo
99+ , androidInfo
100+ , aiAndroidMinPackageVersionCode
101+ , aiAndroidFallbackLink
102+ , aiAndroidLink
103+ , aiAndroidPackageName
104+
105+ -- ** DynamicLinkWarningWarningCode
106+ , DynamicLinkWarningWarningCode (..)
107+
108+ -- ** AnalyticsInfo
109+ , AnalyticsInfo
110+ , analyticsInfo
111+ , aiItunesConnectAnalytics
112+ , aiGooglePlayAnalytics
113+
114+ -- ** ITunesConnectAnalytics
115+ , ITunesConnectAnalytics
116+ , iTunesConnectAnalytics
117+ , itcaAt
118+ , itcaMt
119+ , itcaPt
120+ , itcaCt
121+
122+ -- ** GooglePlayAnalytics
123+ , GooglePlayAnalytics
124+ , googlePlayAnalytics
125+ , gpaUtmContent
126+ , gpaUtmMedium
127+ , gpaUtmTerm
128+ , gpaUtmCampaign
129+ , gpaGclid
130+ , gpaUtmSource
131+ ) where
132+
133+import Network.Google.FirebaseDynamicLinks.Types
134+import Network.Google.Prelude
135+import Network.Google.Resource.FirebaseDynamicLinks.ShortLinks.Create
136+
137+{- $resources
138+TODO
139+-}
140+
141+-- | Represents the entirety of the methods and resources available for the Firebase Dynamic Links API service.
142+type FirebaseDynamicLinksAPI =
143+ ShortLinksCreateResource
gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types.hsnew file+133
@@ -0,0 +1,133 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE NoImplicitPrelude #-}
5+{-# LANGUAGE OverloadedStrings #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
8+
9+-- |
10+-- Module : Network.Google.FirebaseDynamicLinks.Types
11+-- Copyright : (c) 2015-2016 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.FirebaseDynamicLinks.Types
18+ (
19+ -- * Service Configuration
20+ firebaseDynamicLinksService
21+
22+ -- * OAuth Scopes
23+ , firebaseScope
24+
25+ -- * Suffix
26+ , Suffix
27+ , suffix
28+ , sOption
29+
30+ -- * DynamicLinkWarning
31+ , DynamicLinkWarning
32+ , dynamicLinkWarning
33+ , dlwWarningCode
34+ , dlwWarningMessage
35+
36+ -- * CreateShortDynamicLinkRequest
37+ , CreateShortDynamicLinkRequest
38+ , createShortDynamicLinkRequest
39+ , csdlrLongDynamicLink
40+ , csdlrSuffix
41+ , csdlrDynamicLinkInfo
42+
43+ -- * SocialMetaTagInfo
44+ , SocialMetaTagInfo
45+ , socialMetaTagInfo
46+ , smtiSocialImageLink
47+ , smtiSocialDescription
48+ , smtiSocialTitle
49+
50+ -- * CreateShortDynamicLinkResponse
51+ , CreateShortDynamicLinkResponse
52+ , createShortDynamicLinkResponse
53+ , csdlrPreviewLink
54+ , csdlrWarning
55+ , csdlrShortLink
56+
57+ -- * IosInfo
58+ , IosInfo
59+ , iosInfo
60+ , iiIosBundleId
61+ , iiIosIPadBundleId
62+ , iiIosAppStoreId
63+ , iiIosIPadFallbackLink
64+ , iiIosCustomScheme
65+ , iiIosFallbackLink
66+
67+ -- * DynamicLinkInfo
68+ , DynamicLinkInfo
69+ , dynamicLinkInfo
70+ , dliSocialMetaTagInfo
71+ , dliDynamicLinkDomain
72+ , dliLink
73+ , dliIosInfo
74+ , dliIsAd
75+ , dliAndroidInfo
76+ , dliAnalyticsInfo
77+
78+ -- * SuffixOption
79+ , SuffixOption (..)
80+
81+ -- * Xgafv
82+ , Xgafv (..)
83+
84+ -- * AndroidInfo
85+ , AndroidInfo
86+ , androidInfo
87+ , aiAndroidMinPackageVersionCode
88+ , aiAndroidFallbackLink
89+ , aiAndroidLink
90+ , aiAndroidPackageName
91+
92+ -- * DynamicLinkWarningWarningCode
93+ , DynamicLinkWarningWarningCode (..)
94+
95+ -- * AnalyticsInfo
96+ , AnalyticsInfo
97+ , analyticsInfo
98+ , aiItunesConnectAnalytics
99+ , aiGooglePlayAnalytics
100+
101+ -- * ITunesConnectAnalytics
102+ , ITunesConnectAnalytics
103+ , iTunesConnectAnalytics
104+ , itcaAt
105+ , itcaMt
106+ , itcaPt
107+ , itcaCt
108+
109+ -- * GooglePlayAnalytics
110+ , GooglePlayAnalytics
111+ , googlePlayAnalytics
112+ , gpaUtmContent
113+ , gpaUtmMedium
114+ , gpaUtmTerm
115+ , gpaUtmCampaign
116+ , gpaGclid
117+ , gpaUtmSource
118+ ) where
119+
120+import Network.Google.FirebaseDynamicLinks.Types.Product
121+import Network.Google.FirebaseDynamicLinks.Types.Sum
122+import Network.Google.Prelude
123+
124+-- | Default request referring to version 'v1' of the Firebase Dynamic Links API. This contains the host and root path used as a starting point for constructing service requests.
125+firebaseDynamicLinksService :: ServiceConfig
126+firebaseDynamicLinksService
127+ = defaultService
128+ (ServiceId "firebasedynamiclinks:v1")
129+ "firebasedynamiclinks.googleapis.com"
130+
131+-- | View and administer all your Firebase data and settings
132+firebaseScope :: Proxy '["https://www.googleapis.com/auth/firebase"]
133+firebaseScope = Proxy;
gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types/Product.hsnew file+805
@@ -0,0 +1,805 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
4+{-# LANGUAGE OverloadedStrings #-}
5+{-# LANGUAGE RecordWildCards #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
8+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
9+
10+-- |
11+-- Module : Network.Google.FirebaseDynamicLinks.Types.Product
12+-- Copyright : (c) 2015-2016 Brendan Hay
13+-- License : Mozilla Public License, v. 2.0.
14+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
15+-- Stability : auto-generated
16+-- Portability : non-portable (GHC extensions)
17+--
18+module Network.Google.FirebaseDynamicLinks.Types.Product where
19+
20+import Network.Google.FirebaseDynamicLinks.Types.Sum
21+import Network.Google.Prelude
22+
23+-- | Short Dynamic Link suffix.
24+--
25+-- /See:/ 'suffix' smart constructor.
26+newtype Suffix = Suffix'
27+ { _sOption :: Maybe SuffixOption
28+ } deriving (Eq,Show,Data,Typeable,Generic)
29+
30+-- | Creates a value of 'Suffix' with the minimum fields required to make a request.
31+--
32+-- Use one of the following lenses to modify other fields as desired:
33+--
34+-- * 'sOption'
35+suffix
36+ :: Suffix
37+suffix =
38+ Suffix'
39+ { _sOption = Nothing
40+ }
41+
42+-- | Suffix option.
43+sOption :: Lens' Suffix (Maybe SuffixOption)
44+sOption = lens _sOption (\ s a -> s{_sOption = a})
45+
46+instance FromJSON Suffix where
47+ parseJSON
48+ = withObject "Suffix"
49+ (\ o -> Suffix' <$> (o .:? "option"))
50+
51+instance ToJSON Suffix where
52+ toJSON Suffix'{..}
53+ = object (catMaybes [("option" .=) <$> _sOption])
54+
55+-- | Dynamic Links warning messages.
56+--
57+-- /See:/ 'dynamicLinkWarning' smart constructor.
58+data DynamicLinkWarning = DynamicLinkWarning'
59+ { _dlwWarningCode :: !(Maybe DynamicLinkWarningWarningCode)
60+ , _dlwWarningMessage :: !(Maybe Text)
61+ } deriving (Eq,Show,Data,Typeable,Generic)
62+
63+-- | Creates a value of 'DynamicLinkWarning' with the minimum fields required to make a request.
64+--
65+-- Use one of the following lenses to modify other fields as desired:
66+--
67+-- * 'dlwWarningCode'
68+--
69+-- * 'dlwWarningMessage'
70+dynamicLinkWarning
71+ :: DynamicLinkWarning
72+dynamicLinkWarning =
73+ DynamicLinkWarning'
74+ { _dlwWarningCode = Nothing
75+ , _dlwWarningMessage = Nothing
76+ }
77+
78+-- | The warning code.
79+dlwWarningCode :: Lens' DynamicLinkWarning (Maybe DynamicLinkWarningWarningCode)
80+dlwWarningCode
81+ = lens _dlwWarningCode
82+ (\ s a -> s{_dlwWarningCode = a})
83+
84+-- | The warning message to help developers improve their requests.
85+dlwWarningMessage :: Lens' DynamicLinkWarning (Maybe Text)
86+dlwWarningMessage
87+ = lens _dlwWarningMessage
88+ (\ s a -> s{_dlwWarningMessage = a})
89+
90+instance FromJSON DynamicLinkWarning where
91+ parseJSON
92+ = withObject "DynamicLinkWarning"
93+ (\ o ->
94+ DynamicLinkWarning' <$>
95+ (o .:? "warningCode") <*> (o .:? "warningMessage"))
96+
97+instance ToJSON DynamicLinkWarning where
98+ toJSON DynamicLinkWarning'{..}
99+ = object
100+ (catMaybes
101+ [("warningCode" .=) <$> _dlwWarningCode,
102+ ("warningMessage" .=) <$> _dlwWarningMessage])
103+
104+-- | Request to create a short Dynamic Link.
105+--
106+-- /See:/ 'createShortDynamicLinkRequest' smart constructor.
107+data CreateShortDynamicLinkRequest = CreateShortDynamicLinkRequest'
108+ { _csdlrLongDynamicLink :: !(Maybe Text)
109+ , _csdlrSuffix :: !(Maybe Suffix)
110+ , _csdlrDynamicLinkInfo :: !(Maybe DynamicLinkInfo)
111+ } deriving (Eq,Show,Data,Typeable,Generic)
112+
113+-- | Creates a value of 'CreateShortDynamicLinkRequest' with the minimum fields required to make a request.
114+--
115+-- Use one of the following lenses to modify other fields as desired:
116+--
117+-- * 'csdlrLongDynamicLink'
118+--
119+-- * 'csdlrSuffix'
120+--
121+-- * 'csdlrDynamicLinkInfo'
122+createShortDynamicLinkRequest
123+ :: CreateShortDynamicLinkRequest
124+createShortDynamicLinkRequest =
125+ CreateShortDynamicLinkRequest'
126+ { _csdlrLongDynamicLink = Nothing
127+ , _csdlrSuffix = Nothing
128+ , _csdlrDynamicLinkInfo = Nothing
129+ }
130+
131+-- | Full long Dynamic Link URL with desired query parameters specified. For
132+-- example,
133+-- \"https:\/\/sample.app.goo.gl\/?link=http:\/\/www.google.com&apn=com.sample\",
134+-- [Learn
135+-- more](https:\/\/firebase.google.com\/docs\/dynamic-links\/android#create-a-dynamic-link-programmatically).
136+csdlrLongDynamicLink :: Lens' CreateShortDynamicLinkRequest (Maybe Text)
137+csdlrLongDynamicLink
138+ = lens _csdlrLongDynamicLink
139+ (\ s a -> s{_csdlrLongDynamicLink = a})
140+
141+-- | Short Dynamic Link suffix. Optional.
142+csdlrSuffix :: Lens' CreateShortDynamicLinkRequest (Maybe Suffix)
143+csdlrSuffix
144+ = lens _csdlrSuffix (\ s a -> s{_csdlrSuffix = a})
145+
146+-- | Information about the Dynamic Link to be shortened. [Learn
147+-- more](https:\/\/firebase.google.com\/docs\/dynamic-links\/android#create-a-dynamic-link-programmatically).
148+csdlrDynamicLinkInfo :: Lens' CreateShortDynamicLinkRequest (Maybe DynamicLinkInfo)
149+csdlrDynamicLinkInfo
150+ = lens _csdlrDynamicLinkInfo
151+ (\ s a -> s{_csdlrDynamicLinkInfo = a})
152+
153+instance FromJSON CreateShortDynamicLinkRequest where
154+ parseJSON
155+ = withObject "CreateShortDynamicLinkRequest"
156+ (\ o ->
157+ CreateShortDynamicLinkRequest' <$>
158+ (o .:? "longDynamicLink") <*> (o .:? "suffix") <*>
159+ (o .:? "dynamicLinkInfo"))
160+
161+instance ToJSON CreateShortDynamicLinkRequest where
162+ toJSON CreateShortDynamicLinkRequest'{..}
163+ = object
164+ (catMaybes
165+ [("longDynamicLink" .=) <$> _csdlrLongDynamicLink,
166+ ("suffix" .=) <$> _csdlrSuffix,
167+ ("dynamicLinkInfo" .=) <$> _csdlrDynamicLinkInfo])
168+
169+-- | Parameters for social meta tag params. Used to set meta tag data for
170+-- link previews on social sites.
171+--
172+-- /See:/ 'socialMetaTagInfo' smart constructor.
173+data SocialMetaTagInfo = SocialMetaTagInfo'
174+ { _smtiSocialImageLink :: !(Maybe Text)
175+ , _smtiSocialDescription :: !(Maybe Text)
176+ , _smtiSocialTitle :: !(Maybe Text)
177+ } deriving (Eq,Show,Data,Typeable,Generic)
178+
179+-- | Creates a value of 'SocialMetaTagInfo' with the minimum fields required to make a request.
180+--
181+-- Use one of the following lenses to modify other fields as desired:
182+--
183+-- * 'smtiSocialImageLink'
184+--
185+-- * 'smtiSocialDescription'
186+--
187+-- * 'smtiSocialTitle'
188+socialMetaTagInfo
189+ :: SocialMetaTagInfo
190+socialMetaTagInfo =
191+ SocialMetaTagInfo'
192+ { _smtiSocialImageLink = Nothing
193+ , _smtiSocialDescription = Nothing
194+ , _smtiSocialTitle = Nothing
195+ }
196+
197+-- | An image url string. Optional.
198+smtiSocialImageLink :: Lens' SocialMetaTagInfo (Maybe Text)
199+smtiSocialImageLink
200+ = lens _smtiSocialImageLink
201+ (\ s a -> s{_smtiSocialImageLink = a})
202+
203+-- | A short description of the link. Optional.
204+smtiSocialDescription :: Lens' SocialMetaTagInfo (Maybe Text)
205+smtiSocialDescription
206+ = lens _smtiSocialDescription
207+ (\ s a -> s{_smtiSocialDescription = a})
208+
209+-- | Title to be displayed. Optional.
210+smtiSocialTitle :: Lens' SocialMetaTagInfo (Maybe Text)
211+smtiSocialTitle
212+ = lens _smtiSocialTitle
213+ (\ s a -> s{_smtiSocialTitle = a})
214+
215+instance FromJSON SocialMetaTagInfo where
216+ parseJSON
217+ = withObject "SocialMetaTagInfo"
218+ (\ o ->
219+ SocialMetaTagInfo' <$>
220+ (o .:? "socialImageLink") <*>
221+ (o .:? "socialDescription")
222+ <*> (o .:? "socialTitle"))
223+
224+instance ToJSON SocialMetaTagInfo where
225+ toJSON SocialMetaTagInfo'{..}
226+ = object
227+ (catMaybes
228+ [("socialImageLink" .=) <$> _smtiSocialImageLink,
229+ ("socialDescription" .=) <$> _smtiSocialDescription,
230+ ("socialTitle" .=) <$> _smtiSocialTitle])
231+
232+-- | Response to create a short Dynamic Link.
233+--
234+-- /See:/ 'createShortDynamicLinkResponse' smart constructor.
235+data CreateShortDynamicLinkResponse = CreateShortDynamicLinkResponse'
236+ { _csdlrPreviewLink :: !(Maybe Text)
237+ , _csdlrWarning :: !(Maybe [DynamicLinkWarning])
238+ , _csdlrShortLink :: !(Maybe Text)
239+ } deriving (Eq,Show,Data,Typeable,Generic)
240+
241+-- | Creates a value of 'CreateShortDynamicLinkResponse' with the minimum fields required to make a request.
242+--
243+-- Use one of the following lenses to modify other fields as desired:
244+--
245+-- * 'csdlrPreviewLink'
246+--
247+-- * 'csdlrWarning'
248+--
249+-- * 'csdlrShortLink'
250+createShortDynamicLinkResponse
251+ :: CreateShortDynamicLinkResponse
252+createShortDynamicLinkResponse =
253+ CreateShortDynamicLinkResponse'
254+ { _csdlrPreviewLink = Nothing
255+ , _csdlrWarning = Nothing
256+ , _csdlrShortLink = Nothing
257+ }
258+
259+-- | Preivew link to show the link flow chart.
260+csdlrPreviewLink :: Lens' CreateShortDynamicLinkResponse (Maybe Text)
261+csdlrPreviewLink
262+ = lens _csdlrPreviewLink
263+ (\ s a -> s{_csdlrPreviewLink = a})
264+
265+-- | Information about potential warnings on link creation.
266+csdlrWarning :: Lens' CreateShortDynamicLinkResponse [DynamicLinkWarning]
267+csdlrWarning
268+ = lens _csdlrWarning (\ s a -> s{_csdlrWarning = a})
269+ . _Default
270+ . _Coerce
271+
272+-- | Short Dynamic Link value. e.g. https:\/\/abcd.app.goo.gl\/wxyz
273+csdlrShortLink :: Lens' CreateShortDynamicLinkResponse (Maybe Text)
274+csdlrShortLink
275+ = lens _csdlrShortLink
276+ (\ s a -> s{_csdlrShortLink = a})
277+
278+instance FromJSON CreateShortDynamicLinkResponse
279+ where
280+ parseJSON
281+ = withObject "CreateShortDynamicLinkResponse"
282+ (\ o ->
283+ CreateShortDynamicLinkResponse' <$>
284+ (o .:? "previewLink") <*>
285+ (o .:? "warning" .!= mempty)
286+ <*> (o .:? "shortLink"))
287+
288+instance ToJSON CreateShortDynamicLinkResponse where
289+ toJSON CreateShortDynamicLinkResponse'{..}
290+ = object
291+ (catMaybes
292+ [("previewLink" .=) <$> _csdlrPreviewLink,
293+ ("warning" .=) <$> _csdlrWarning,
294+ ("shortLink" .=) <$> _csdlrShortLink])
295+
296+-- | iOS related attributes to the Dynamic Link..
297+--
298+-- /See:/ 'iosInfo' smart constructor.
299+data IosInfo = IosInfo'
300+ { _iiIosBundleId :: !(Maybe Text)
301+ , _iiIosIPadBundleId :: !(Maybe Text)
302+ , _iiIosAppStoreId :: !(Maybe Text)
303+ , _iiIosIPadFallbackLink :: !(Maybe Text)
304+ , _iiIosCustomScheme :: !(Maybe Text)
305+ , _iiIosFallbackLink :: !(Maybe Text)
306+ } deriving (Eq,Show,Data,Typeable,Generic)
307+
308+-- | Creates a value of 'IosInfo' with the minimum fields required to make a request.
309+--
310+-- Use one of the following lenses to modify other fields as desired:
311+--
312+-- * 'iiIosBundleId'
313+--
314+-- * 'iiIosIPadBundleId'
315+--
316+-- * 'iiIosAppStoreId'
317+--
318+-- * 'iiIosIPadFallbackLink'
319+--
320+-- * 'iiIosCustomScheme'
321+--
322+-- * 'iiIosFallbackLink'
323+iosInfo
324+ :: IosInfo
325+iosInfo =
326+ IosInfo'
327+ { _iiIosBundleId = Nothing
328+ , _iiIosIPadBundleId = Nothing
329+ , _iiIosAppStoreId = Nothing
330+ , _iiIosIPadFallbackLink = Nothing
331+ , _iiIosCustomScheme = Nothing
332+ , _iiIosFallbackLink = Nothing
333+ }
334+
335+-- | iOS bundle ID of the app.
336+iiIosBundleId :: Lens' IosInfo (Maybe Text)
337+iiIosBundleId
338+ = lens _iiIosBundleId
339+ (\ s a -> s{_iiIosBundleId = a})
340+
341+-- | iPad bundle ID of the app.
342+iiIosIPadBundleId :: Lens' IosInfo (Maybe Text)
343+iiIosIPadBundleId
344+ = lens _iiIosIPadBundleId
345+ (\ s a -> s{_iiIosIPadBundleId = a})
346+
347+-- | iOS App Store ID.
348+iiIosAppStoreId :: Lens' IosInfo (Maybe Text)
349+iiIosAppStoreId
350+ = lens _iiIosAppStoreId
351+ (\ s a -> s{_iiIosAppStoreId = a})
352+
353+-- | If specified, this overrides the ios_fallback_link value on iPads.
354+iiIosIPadFallbackLink :: Lens' IosInfo (Maybe Text)
355+iiIosIPadFallbackLink
356+ = lens _iiIosIPadFallbackLink
357+ (\ s a -> s{_iiIosIPadFallbackLink = a})
358+
359+-- | Custom (destination) scheme to use for iOS. By default, we’ll use the
360+-- bundle ID as the custom scheme. Developer can override this behavior
361+-- using this param.
362+iiIosCustomScheme :: Lens' IosInfo (Maybe Text)
363+iiIosCustomScheme
364+ = lens _iiIosCustomScheme
365+ (\ s a -> s{_iiIosCustomScheme = a})
366+
367+-- | Link to open on iOS if the app is not installed.
368+iiIosFallbackLink :: Lens' IosInfo (Maybe Text)
369+iiIosFallbackLink
370+ = lens _iiIosFallbackLink
371+ (\ s a -> s{_iiIosFallbackLink = a})
372+
373+instance FromJSON IosInfo where
374+ parseJSON
375+ = withObject "IosInfo"
376+ (\ o ->
377+ IosInfo' <$>
378+ (o .:? "iosBundleId") <*> (o .:? "iosIpadBundleId")
379+ <*> (o .:? "iosAppStoreId")
380+ <*> (o .:? "iosIpadFallbackLink")
381+ <*> (o .:? "iosCustomScheme")
382+ <*> (o .:? "iosFallbackLink"))
383+
384+instance ToJSON IosInfo where
385+ toJSON IosInfo'{..}
386+ = object
387+ (catMaybes
388+ [("iosBundleId" .=) <$> _iiIosBundleId,
389+ ("iosIpadBundleId" .=) <$> _iiIosIPadBundleId,
390+ ("iosAppStoreId" .=) <$> _iiIosAppStoreId,
391+ ("iosIpadFallbackLink" .=) <$>
392+ _iiIosIPadFallbackLink,
393+ ("iosCustomScheme" .=) <$> _iiIosCustomScheme,
394+ ("iosFallbackLink" .=) <$> _iiIosFallbackLink])
395+
396+-- | Information about a Dynamic Link.
397+--
398+-- /See:/ 'dynamicLinkInfo' smart constructor.
399+data DynamicLinkInfo = DynamicLinkInfo'
400+ { _dliSocialMetaTagInfo :: !(Maybe SocialMetaTagInfo)
401+ , _dliDynamicLinkDomain :: !(Maybe Text)
402+ , _dliLink :: !(Maybe Text)
403+ , _dliIosInfo :: !(Maybe IosInfo)
404+ , _dliIsAd :: !(Maybe Bool)
405+ , _dliAndroidInfo :: !(Maybe AndroidInfo)
406+ , _dliAnalyticsInfo :: !(Maybe AnalyticsInfo)
407+ } deriving (Eq,Show,Data,Typeable,Generic)
408+
409+-- | Creates a value of 'DynamicLinkInfo' with the minimum fields required to make a request.
410+--
411+-- Use one of the following lenses to modify other fields as desired:
412+--
413+-- * 'dliSocialMetaTagInfo'
414+--
415+-- * 'dliDynamicLinkDomain'
416+--
417+-- * 'dliLink'
418+--
419+-- * 'dliIosInfo'
420+--
421+-- * 'dliIsAd'
422+--
423+-- * 'dliAndroidInfo'
424+--
425+-- * 'dliAnalyticsInfo'
426+dynamicLinkInfo
427+ :: DynamicLinkInfo
428+dynamicLinkInfo =
429+ DynamicLinkInfo'
430+ { _dliSocialMetaTagInfo = Nothing
431+ , _dliDynamicLinkDomain = Nothing
432+ , _dliLink = Nothing
433+ , _dliIosInfo = Nothing
434+ , _dliIsAd = Nothing
435+ , _dliAndroidInfo = Nothing
436+ , _dliAnalyticsInfo = Nothing
437+ }
438+
439+-- | Parameters for social meta tag params. Used to set meta tag data for
440+-- link previews on social sites.
441+dliSocialMetaTagInfo :: Lens' DynamicLinkInfo (Maybe SocialMetaTagInfo)
442+dliSocialMetaTagInfo
443+ = lens _dliSocialMetaTagInfo
444+ (\ s a -> s{_dliSocialMetaTagInfo = a})
445+
446+-- | Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl [Learn
447+-- more](https:\/\/firebase.google.com\/docs\/dynamic-links\/android#set-up-firebase-and-the-dynamic-links-sdk)
448+-- on how to set up Dynamic Link domain associated with your Firebase
449+-- project. Required.
450+dliDynamicLinkDomain :: Lens' DynamicLinkInfo (Maybe Text)
451+dliDynamicLinkDomain
452+ = lens _dliDynamicLinkDomain
453+ (\ s a -> s{_dliDynamicLinkDomain = a})
454+
455+-- | The link your app will open, You can specify any URL your app can
456+-- handle. This link must be a well-formatted URL, be properly URL-encoded,
457+-- and use the HTTP or HTTPS scheme. See \'link\' parameters in the
458+-- [documentation](https:\/\/firebase.google.com\/docs\/dynamic-links\/android#create-a-dynamic-link-programmatically).
459+-- Required.
460+dliLink :: Lens' DynamicLinkInfo (Maybe Text)
461+dliLink = lens _dliLink (\ s a -> s{_dliLink = a})
462+
463+-- | iOS related information. See iOS related parameters in the
464+-- [documentation](https:\/\/firebase.google.com\/docs\/dynamic-links\/ios#create-a-dynamic-link-programmatically).
465+dliIosInfo :: Lens' DynamicLinkInfo (Maybe IosInfo)
466+dliIosInfo
467+ = lens _dliIosInfo (\ s a -> s{_dliIosInfo = a})
468+
469+-- | Declares that the Dynamic Link is used in an advertisement. See the
470+-- \'ad\' parameter in the
471+-- [documentation](https:\/\/firebase.google.com\/docs\/dynamic-links\/android#create-a-dynamic-link-programmatically).
472+dliIsAd :: Lens' DynamicLinkInfo (Maybe Bool)
473+dliIsAd = lens _dliIsAd (\ s a -> s{_dliIsAd = a})
474+
475+-- | Android related information. See Android related parameters in the
476+-- [documentation](https:\/\/firebase.google.com\/docs\/dynamic-links\/android#create-a-dynamic-link-programmatically).
477+dliAndroidInfo :: Lens' DynamicLinkInfo (Maybe AndroidInfo)
478+dliAndroidInfo
479+ = lens _dliAndroidInfo
480+ (\ s a -> s{_dliAndroidInfo = a})
481+
482+-- | Parameters used for tracking. See all tracking parameters in the
483+-- [documentation](https:\/\/firebase.google.com\/docs\/dynamic-links\/android#create-a-dynamic-link-programmatically).
484+dliAnalyticsInfo :: Lens' DynamicLinkInfo (Maybe AnalyticsInfo)
485+dliAnalyticsInfo
486+ = lens _dliAnalyticsInfo
487+ (\ s a -> s{_dliAnalyticsInfo = a})
488+
489+instance FromJSON DynamicLinkInfo where
490+ parseJSON
491+ = withObject "DynamicLinkInfo"
492+ (\ o ->
493+ DynamicLinkInfo' <$>
494+ (o .:? "socialMetaTagInfo") <*>
495+ (o .:? "dynamicLinkDomain")
496+ <*> (o .:? "link")
497+ <*> (o .:? "iosInfo")
498+ <*> (o .:? "isAd")
499+ <*> (o .:? "androidInfo")
500+ <*> (o .:? "analyticsInfo"))
501+
502+instance ToJSON DynamicLinkInfo where
503+ toJSON DynamicLinkInfo'{..}
504+ = object
505+ (catMaybes
506+ [("socialMetaTagInfo" .=) <$> _dliSocialMetaTagInfo,
507+ ("dynamicLinkDomain" .=) <$> _dliDynamicLinkDomain,
508+ ("link" .=) <$> _dliLink,
509+ ("iosInfo" .=) <$> _dliIosInfo,
510+ ("isAd" .=) <$> _dliIsAd,
511+ ("androidInfo" .=) <$> _dliAndroidInfo,
512+ ("analyticsInfo" .=) <$> _dliAnalyticsInfo])
513+
514+-- | Android related attributes to the Dynamic Link.
515+--
516+-- /See:/ 'androidInfo' smart constructor.
517+data AndroidInfo = AndroidInfo'
518+ { _aiAndroidMinPackageVersionCode :: !(Maybe Text)
519+ , _aiAndroidFallbackLink :: !(Maybe Text)
520+ , _aiAndroidLink :: !(Maybe Text)
521+ , _aiAndroidPackageName :: !(Maybe Text)
522+ } deriving (Eq,Show,Data,Typeable,Generic)
523+
524+-- | Creates a value of 'AndroidInfo' with the minimum fields required to make a request.
525+--
526+-- Use one of the following lenses to modify other fields as desired:
527+--
528+-- * 'aiAndroidMinPackageVersionCode'
529+--
530+-- * 'aiAndroidFallbackLink'
531+--
532+-- * 'aiAndroidLink'
533+--
534+-- * 'aiAndroidPackageName'
535+androidInfo
536+ :: AndroidInfo
537+androidInfo =
538+ AndroidInfo'
539+ { _aiAndroidMinPackageVersionCode = Nothing
540+ , _aiAndroidFallbackLink = Nothing
541+ , _aiAndroidLink = Nothing
542+ , _aiAndroidPackageName = Nothing
543+ }
544+
545+-- | Minimum version code for the Android app. If the installed app’s version
546+-- code is lower, then the user is taken to the Play Store.
547+aiAndroidMinPackageVersionCode :: Lens' AndroidInfo (Maybe Text)
548+aiAndroidMinPackageVersionCode
549+ = lens _aiAndroidMinPackageVersionCode
550+ (\ s a -> s{_aiAndroidMinPackageVersionCode = a})
551+
552+-- | Link to open on Android if the app is not installed.
553+aiAndroidFallbackLink :: Lens' AndroidInfo (Maybe Text)
554+aiAndroidFallbackLink
555+ = lens _aiAndroidFallbackLink
556+ (\ s a -> s{_aiAndroidFallbackLink = a})
557+
558+-- | If specified, this overrides the ‘link’ parameter on Android.
559+aiAndroidLink :: Lens' AndroidInfo (Maybe Text)
560+aiAndroidLink
561+ = lens _aiAndroidLink
562+ (\ s a -> s{_aiAndroidLink = a})
563+
564+-- | Android package name of the app.
565+aiAndroidPackageName :: Lens' AndroidInfo (Maybe Text)
566+aiAndroidPackageName
567+ = lens _aiAndroidPackageName
568+ (\ s a -> s{_aiAndroidPackageName = a})
569+
570+instance FromJSON AndroidInfo where
571+ parseJSON
572+ = withObject "AndroidInfo"
573+ (\ o ->
574+ AndroidInfo' <$>
575+ (o .:? "androidMinPackageVersionCode") <*>
576+ (o .:? "androidFallbackLink")
577+ <*> (o .:? "androidLink")
578+ <*> (o .:? "androidPackageName"))
579+
580+instance ToJSON AndroidInfo where
581+ toJSON AndroidInfo'{..}
582+ = object
583+ (catMaybes
584+ [("androidMinPackageVersionCode" .=) <$>
585+ _aiAndroidMinPackageVersionCode,
586+ ("androidFallbackLink" .=) <$>
587+ _aiAndroidFallbackLink,
588+ ("androidLink" .=) <$> _aiAndroidLink,
589+ ("androidPackageName" .=) <$> _aiAndroidPackageName])
590+
591+-- | Tracking parameters supported by Dynamic Link.
592+--
593+-- /See:/ 'analyticsInfo' smart constructor.
594+data AnalyticsInfo = AnalyticsInfo'
595+ { _aiItunesConnectAnalytics :: !(Maybe ITunesConnectAnalytics)
596+ , _aiGooglePlayAnalytics :: !(Maybe GooglePlayAnalytics)
597+ } deriving (Eq,Show,Data,Typeable,Generic)
598+
599+-- | Creates a value of 'AnalyticsInfo' with the minimum fields required to make a request.
600+--
601+-- Use one of the following lenses to modify other fields as desired:
602+--
603+-- * 'aiItunesConnectAnalytics'
604+--
605+-- * 'aiGooglePlayAnalytics'
606+analyticsInfo
607+ :: AnalyticsInfo
608+analyticsInfo =
609+ AnalyticsInfo'
610+ { _aiItunesConnectAnalytics = Nothing
611+ , _aiGooglePlayAnalytics = Nothing
612+ }
613+
614+-- | iTunes Connect App Analytics.
615+aiItunesConnectAnalytics :: Lens' AnalyticsInfo (Maybe ITunesConnectAnalytics)
616+aiItunesConnectAnalytics
617+ = lens _aiItunesConnectAnalytics
618+ (\ s a -> s{_aiItunesConnectAnalytics = a})
619+
620+-- | Google Play Campaign Measurements.
621+aiGooglePlayAnalytics :: Lens' AnalyticsInfo (Maybe GooglePlayAnalytics)
622+aiGooglePlayAnalytics
623+ = lens _aiGooglePlayAnalytics
624+ (\ s a -> s{_aiGooglePlayAnalytics = a})
625+
626+instance FromJSON AnalyticsInfo where
627+ parseJSON
628+ = withObject "AnalyticsInfo"
629+ (\ o ->
630+ AnalyticsInfo' <$>
631+ (o .:? "itunesConnectAnalytics") <*>
632+ (o .:? "googlePlayAnalytics"))
633+
634+instance ToJSON AnalyticsInfo where
635+ toJSON AnalyticsInfo'{..}
636+ = object
637+ (catMaybes
638+ [("itunesConnectAnalytics" .=) <$>
639+ _aiItunesConnectAnalytics,
640+ ("googlePlayAnalytics" .=) <$>
641+ _aiGooglePlayAnalytics])
642+
643+-- | Parameters for iTunes Connect App Analytics.
644+--
645+-- /See:/ 'iTunesConnectAnalytics' smart constructor.
646+data ITunesConnectAnalytics = ITunesConnectAnalytics'
647+ { _itcaAt :: !(Maybe Text)
648+ , _itcaMt :: !(Maybe Text)
649+ , _itcaPt :: !(Maybe Text)
650+ , _itcaCt :: !(Maybe Text)
651+ } deriving (Eq,Show,Data,Typeable,Generic)
652+
653+-- | Creates a value of 'ITunesConnectAnalytics' with the minimum fields required to make a request.
654+--
655+-- Use one of the following lenses to modify other fields as desired:
656+--
657+-- * 'itcaAt'
658+--
659+-- * 'itcaMt'
660+--
661+-- * 'itcaPt'
662+--
663+-- * 'itcaCt'
664+iTunesConnectAnalytics
665+ :: ITunesConnectAnalytics
666+iTunesConnectAnalytics =
667+ ITunesConnectAnalytics'
668+ { _itcaAt = Nothing
669+ , _itcaMt = Nothing
670+ , _itcaPt = Nothing
671+ , _itcaCt = Nothing
672+ }
673+
674+-- | Affiliate token used to create affiliate-coded links.
675+itcaAt :: Lens' ITunesConnectAnalytics (Maybe Text)
676+itcaAt = lens _itcaAt (\ s a -> s{_itcaAt = a})
677+
678+-- | iTune media types, including music, podcasts, audiobooks and so on.
679+itcaMt :: Lens' ITunesConnectAnalytics (Maybe Text)
680+itcaMt = lens _itcaMt (\ s a -> s{_itcaMt = a})
681+
682+-- | Provider token that enables analytics for Dynamic Links from within
683+-- iTunes Connect.
684+itcaPt :: Lens' ITunesConnectAnalytics (Maybe Text)
685+itcaPt = lens _itcaPt (\ s a -> s{_itcaPt = a})
686+
687+-- | Campaign text that developers can optionally add to any link in order to
688+-- track sales from a specific marketing campaign.
689+itcaCt :: Lens' ITunesConnectAnalytics (Maybe Text)
690+itcaCt = lens _itcaCt (\ s a -> s{_itcaCt = a})
691+
692+instance FromJSON ITunesConnectAnalytics where
693+ parseJSON
694+ = withObject "ITunesConnectAnalytics"
695+ (\ o ->
696+ ITunesConnectAnalytics' <$>
697+ (o .:? "at") <*> (o .:? "mt") <*> (o .:? "pt") <*>
698+ (o .:? "ct"))
699+
700+instance ToJSON ITunesConnectAnalytics where
701+ toJSON ITunesConnectAnalytics'{..}
702+ = object
703+ (catMaybes
704+ [("at" .=) <$> _itcaAt, ("mt" .=) <$> _itcaMt,
705+ ("pt" .=) <$> _itcaPt, ("ct" .=) <$> _itcaCt])
706+
707+-- | Parameters for Google Play Campaign Measurements. [Learn
708+-- more](https:\/\/developers.google.com\/analytics\/devguides\/collection\/android\/v4\/campaigns#campaign-params)
709+--
710+-- /See:/ 'googlePlayAnalytics' smart constructor.
711+data GooglePlayAnalytics = GooglePlayAnalytics'
712+ { _gpaUtmContent :: !(Maybe Text)
713+ , _gpaUtmMedium :: !(Maybe Text)
714+ , _gpaUtmTerm :: !(Maybe Text)
715+ , _gpaUtmCampaign :: !(Maybe Text)
716+ , _gpaGclid :: !(Maybe Text)
717+ , _gpaUtmSource :: !(Maybe Text)
718+ } deriving (Eq,Show,Data,Typeable,Generic)
719+
720+-- | Creates a value of 'GooglePlayAnalytics' with the minimum fields required to make a request.
721+--
722+-- Use one of the following lenses to modify other fields as desired:
723+--
724+-- * 'gpaUtmContent'
725+--
726+-- * 'gpaUtmMedium'
727+--
728+-- * 'gpaUtmTerm'
729+--
730+-- * 'gpaUtmCampaign'
731+--
732+-- * 'gpaGclid'
733+--
734+-- * 'gpaUtmSource'
735+googlePlayAnalytics
736+ :: GooglePlayAnalytics
737+googlePlayAnalytics =
738+ GooglePlayAnalytics'
739+ { _gpaUtmContent = Nothing
740+ , _gpaUtmMedium = Nothing
741+ , _gpaUtmTerm = Nothing
742+ , _gpaUtmCampaign = Nothing
743+ , _gpaGclid = Nothing
744+ , _gpaUtmSource = Nothing
745+ }
746+
747+-- | Campaign content; used for A\/B testing and content-targeted ads to
748+-- differentiate ads or links that point to the same URL.
749+gpaUtmContent :: Lens' GooglePlayAnalytics (Maybe Text)
750+gpaUtmContent
751+ = lens _gpaUtmContent
752+ (\ s a -> s{_gpaUtmContent = a})
753+
754+-- | Campaign medium; used to identify a medium such as email or
755+-- cost-per-click.
756+gpaUtmMedium :: Lens' GooglePlayAnalytics (Maybe Text)
757+gpaUtmMedium
758+ = lens _gpaUtmMedium (\ s a -> s{_gpaUtmMedium = a})
759+
760+-- | Campaign term; used with paid search to supply the keywords for ads.
761+gpaUtmTerm :: Lens' GooglePlayAnalytics (Maybe Text)
762+gpaUtmTerm
763+ = lens _gpaUtmTerm (\ s a -> s{_gpaUtmTerm = a})
764+
765+-- | Campaign name; used for keyword analysis to identify a specific product
766+-- promotion or strategic campaign.
767+gpaUtmCampaign :: Lens' GooglePlayAnalytics (Maybe Text)
768+gpaUtmCampaign
769+ = lens _gpaUtmCampaign
770+ (\ s a -> s{_gpaUtmCampaign = a})
771+
772+-- | [AdWords autotagging
773+-- parameter](https:\/\/support.google.com\/analytics\/answer\/1033981?hl=en);
774+-- used to measure Google AdWords ads. This value is generated dynamically
775+-- and should never be modified.
776+gpaGclid :: Lens' GooglePlayAnalytics (Maybe Text)
777+gpaGclid = lens _gpaGclid (\ s a -> s{_gpaGclid = a})
778+
779+-- | Campaign source; used to identify a search engine, newsletter, or other
780+-- source.
781+gpaUtmSource :: Lens' GooglePlayAnalytics (Maybe Text)
782+gpaUtmSource
783+ = lens _gpaUtmSource (\ s a -> s{_gpaUtmSource = a})
784+
785+instance FromJSON GooglePlayAnalytics where
786+ parseJSON
787+ = withObject "GooglePlayAnalytics"
788+ (\ o ->
789+ GooglePlayAnalytics' <$>
790+ (o .:? "utmContent") <*> (o .:? "utmMedium") <*>
791+ (o .:? "utmTerm")
792+ <*> (o .:? "utmCampaign")
793+ <*> (o .:? "gclid")
794+ <*> (o .:? "utmSource"))
795+
796+instance ToJSON GooglePlayAnalytics where
797+ toJSON GooglePlayAnalytics'{..}
798+ = object
799+ (catMaybes
800+ [("utmContent" .=) <$> _gpaUtmContent,
801+ ("utmMedium" .=) <$> _gpaUtmMedium,
802+ ("utmTerm" .=) <$> _gpaUtmTerm,
803+ ("utmCampaign" .=) <$> _gpaUtmCampaign,
804+ ("gclid" .=) <$> _gpaGclid,
805+ ("utmSource" .=) <$> _gpaUtmSource])
gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types/Sum.hsnew file+255
@@ -0,0 +1,255 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE LambdaCase #-}
4+{-# LANGUAGE NoImplicitPrelude #-}
5+{-# LANGUAGE OverloadedStrings #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
8+
9+-- |
10+-- Module : Network.Google.FirebaseDynamicLinks.Types.Sum
11+-- Copyright : (c) 2015-2016 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.FirebaseDynamicLinks.Types.Sum where
18+
19+import Network.Google.Prelude
20+
21+-- | Suffix option.
22+data SuffixOption
23+ = OptionUnspecified
24+ -- ^ @OPTION_UNSPECIFIED@
25+ -- The suffix option is not specified, performs as NOT_GUESSABLE .
26+ | Unguessable
27+ -- ^ @UNGUESSABLE@
28+ -- Short Dynamic Link suffix is a base62 [0-9A-Za-z] encoded string of a
29+ -- random generated 96 bit random number, which has a length of 17 chars.
30+ -- For example, \"nlAR8U4SlKRZw1cb2\". It prevents other people from
31+ -- guessing and crawling short Dynamic Links that contain personal
32+ -- identifiable information.
33+ | Short
34+ -- ^ @SHORT@
35+ -- Short Dynamic Link suffix is a base62 [0-9A-Za-z] string starting with a
36+ -- length of 4 chars. the length will increase when all the space is
37+ -- occupied.
38+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
39+
40+instance Hashable SuffixOption
41+
42+instance FromHttpApiData SuffixOption where
43+ parseQueryParam = \case
44+ "OPTION_UNSPECIFIED" -> Right OptionUnspecified
45+ "UNGUESSABLE" -> Right Unguessable
46+ "SHORT" -> Right Short
47+ x -> Left ("Unable to parse SuffixOption from: " <> x)
48+
49+instance ToHttpApiData SuffixOption where
50+ toQueryParam = \case
51+ OptionUnspecified -> "OPTION_UNSPECIFIED"
52+ Unguessable -> "UNGUESSABLE"
53+ Short -> "SHORT"
54+
55+instance FromJSON SuffixOption where
56+ parseJSON = parseJSONText "SuffixOption"
57+
58+instance ToJSON SuffixOption where
59+ toJSON = toJSONText
60+
61+-- | V1 error format.
62+data Xgafv
63+ = X1
64+ -- ^ @1@
65+ -- v1 error format
66+ | X2
67+ -- ^ @2@
68+ -- v2 error format
69+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
70+
71+instance Hashable Xgafv
72+
73+instance FromHttpApiData Xgafv where
74+ parseQueryParam = \case
75+ "1" -> Right X1
76+ "2" -> Right X2
77+ x -> Left ("Unable to parse Xgafv from: " <> x)
78+
79+instance ToHttpApiData Xgafv where
80+ toQueryParam = \case
81+ X1 -> "1"
82+ X2 -> "2"
83+
84+instance FromJSON Xgafv where
85+ parseJSON = parseJSONText "Xgafv"
86+
87+instance ToJSON Xgafv where
88+ toJSON = toJSONText
89+
90+-- | The warning code.
91+data DynamicLinkWarningWarningCode
92+ = CodeUnspecified
93+ -- ^ @CODE_UNSPECIFIED@
94+ -- Unknown code.
95+ | NotInProjectAndroidPackageName
96+ -- ^ @NOT_IN_PROJECT_ANDROID_PACKAGE_NAME@
97+ -- The Android package does not match any in developer\'s DevConsole
98+ -- project.
99+ | NotIntegerAndroidPackageMinVersion
100+ -- ^ @NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION@
101+ -- The Android minimum version code has to be a valid integer.
102+ | UnnecessaryAndroidPackageMinVersion
103+ -- ^ @UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION@
104+ -- Android package min version param is not needed, e.g. when \'apn\' is
105+ -- missing.
106+ | NotURIAndroidLink
107+ -- ^ @NOT_URI_ANDROID_LINK@
108+ -- Android link is not a valid URI.
109+ | UnnecessaryAndroidLink
110+ -- ^ @UNNECESSARY_ANDROID_LINK@
111+ -- Android link param is not needed, e.g. when param \'al\' and \'link\'
112+ -- have the same value..
113+ | NotURIAndroidFallbackLink
114+ -- ^ @NOT_URI_ANDROID_FALLBACK_LINK@
115+ -- Android fallback link is not a valid URI.
116+ | BadURISchemeAndroidFallbackLink
117+ -- ^ @BAD_URI_SCHEME_ANDROID_FALLBACK_LINK@
118+ -- Android fallback link has an invalid (non http\/https) URI scheme.
119+ | NotInProjectIosBundleId
120+ -- ^ @NOT_IN_PROJECT_IOS_BUNDLE_ID@
121+ -- The iOS bundle ID does not match any in developer\'s DevConsole project.
122+ | NotInProjectIPadBundleId
123+ -- ^ @NOT_IN_PROJECT_IPAD_BUNDLE_ID@
124+ -- The iPad bundle ID does not match any in developer\'s DevConsole
125+ -- project.
126+ | UnnecessaryIosURLScheme
127+ -- ^ @UNNECESSARY_IOS_URL_SCHEME@
128+ -- iOS URL scheme is not needed, e.g. when \'ibi\' are \'ipbi\' are all
129+ -- missing.
130+ | NotNumericIosAppStoreId
131+ -- ^ @NOT_NUMERIC_IOS_APP_STORE_ID@
132+ -- iOS app store ID format is incorrect, e.g. not numeric.
133+ | UnnecessaryIosAppStoreId
134+ -- ^ @UNNECESSARY_IOS_APP_STORE_ID@
135+ -- iOS app store ID is not needed.
136+ | NotURIIosFallbackLink
137+ -- ^ @NOT_URI_IOS_FALLBACK_LINK@
138+ -- iOS fallback link is not a valid URI.
139+ | BadURISchemeIosFallbackLink
140+ -- ^ @BAD_URI_SCHEME_IOS_FALLBACK_LINK@
141+ -- iOS fallback link has an invalid (non http\/https) URI scheme.
142+ | NotURIIPadFallbackLink
143+ -- ^ @NOT_URI_IPAD_FALLBACK_LINK@
144+ -- iPad fallback link is not a valid URI.
145+ | BadURISchemeIPadFallbackLink
146+ -- ^ @BAD_URI_SCHEME_IPAD_FALLBACK_LINK@
147+ -- iPad fallback link has an invalid (non http\/https) URI scheme.
148+ | BadDebugParam
149+ -- ^ @BAD_DEBUG_PARAM@
150+ -- Debug param format is incorrect.
151+ | BadAdParam
152+ -- ^ @BAD_AD_PARAM@
153+ -- isAd param format is incorrect.
154+ | DeprecatedParam
155+ -- ^ @DEPRECATED_PARAM@
156+ -- Indicates a certain param is deprecated.
157+ | UnrecognizedParam
158+ -- ^ @UNRECOGNIZED_PARAM@
159+ -- Indicates certain paramater is not recognized.
160+ | TooLongParam
161+ -- ^ @TOO_LONG_PARAM@
162+ -- Indicates certain paramater is too long.
163+ | NotURISocialImageLink
164+ -- ^ @NOT_URI_SOCIAL_IMAGE_LINK@
165+ -- Social meta tag image link is not a valid URI.
166+ | BadURISchemeSocialImageLink
167+ -- ^ @BAD_URI_SCHEME_SOCIAL_IMAGE_LINK@
168+ -- Social meta tag image link has an invalid (non http\/https) URI scheme.
169+ | NotURISocialURL
170+ -- ^ @NOT_URI_SOCIAL_URL@
171+ | BadURISchemeSocialURL
172+ -- ^ @BAD_URI_SCHEME_SOCIAL_URL@
173+ | LinkLengthTooLong
174+ -- ^ @LINK_LENGTH_TOO_LONG@
175+ -- Dynamic Link URL length is too long.
176+ | LinkWithFragments
177+ -- ^ @LINK_WITH_FRAGMENTS@
178+ -- Dynamic Link URL contains fragments.
179+ | NotMatchingIosBundleIdAndStoreId
180+ -- ^ @NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID@
181+ -- The iOS bundle ID does not match with the given iOS store ID.
182+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
183+
184+instance Hashable DynamicLinkWarningWarningCode
185+
186+instance FromHttpApiData DynamicLinkWarningWarningCode where
187+ parseQueryParam = \case
188+ "CODE_UNSPECIFIED" -> Right CodeUnspecified
189+ "NOT_IN_PROJECT_ANDROID_PACKAGE_NAME" -> Right NotInProjectAndroidPackageName
190+ "NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION" -> Right NotIntegerAndroidPackageMinVersion
191+ "UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION" -> Right UnnecessaryAndroidPackageMinVersion
192+ "NOT_URI_ANDROID_LINK" -> Right NotURIAndroidLink
193+ "UNNECESSARY_ANDROID_LINK" -> Right UnnecessaryAndroidLink
194+ "NOT_URI_ANDROID_FALLBACK_LINK" -> Right NotURIAndroidFallbackLink
195+ "BAD_URI_SCHEME_ANDROID_FALLBACK_LINK" -> Right BadURISchemeAndroidFallbackLink
196+ "NOT_IN_PROJECT_IOS_BUNDLE_ID" -> Right NotInProjectIosBundleId
197+ "NOT_IN_PROJECT_IPAD_BUNDLE_ID" -> Right NotInProjectIPadBundleId
198+ "UNNECESSARY_IOS_URL_SCHEME" -> Right UnnecessaryIosURLScheme
199+ "NOT_NUMERIC_IOS_APP_STORE_ID" -> Right NotNumericIosAppStoreId
200+ "UNNECESSARY_IOS_APP_STORE_ID" -> Right UnnecessaryIosAppStoreId
201+ "NOT_URI_IOS_FALLBACK_LINK" -> Right NotURIIosFallbackLink
202+ "BAD_URI_SCHEME_IOS_FALLBACK_LINK" -> Right BadURISchemeIosFallbackLink
203+ "NOT_URI_IPAD_FALLBACK_LINK" -> Right NotURIIPadFallbackLink
204+ "BAD_URI_SCHEME_IPAD_FALLBACK_LINK" -> Right BadURISchemeIPadFallbackLink
205+ "BAD_DEBUG_PARAM" -> Right BadDebugParam
206+ "BAD_AD_PARAM" -> Right BadAdParam
207+ "DEPRECATED_PARAM" -> Right DeprecatedParam
208+ "UNRECOGNIZED_PARAM" -> Right UnrecognizedParam
209+ "TOO_LONG_PARAM" -> Right TooLongParam
210+ "NOT_URI_SOCIAL_IMAGE_LINK" -> Right NotURISocialImageLink
211+ "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK" -> Right BadURISchemeSocialImageLink
212+ "NOT_URI_SOCIAL_URL" -> Right NotURISocialURL
213+ "BAD_URI_SCHEME_SOCIAL_URL" -> Right BadURISchemeSocialURL
214+ "LINK_LENGTH_TOO_LONG" -> Right LinkLengthTooLong
215+ "LINK_WITH_FRAGMENTS" -> Right LinkWithFragments
216+ "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" -> Right NotMatchingIosBundleIdAndStoreId
217+ x -> Left ("Unable to parse DynamicLinkWarningWarningCode from: " <> x)
218+
219+instance ToHttpApiData DynamicLinkWarningWarningCode where
220+ toQueryParam = \case
221+ CodeUnspecified -> "CODE_UNSPECIFIED"
222+ NotInProjectAndroidPackageName -> "NOT_IN_PROJECT_ANDROID_PACKAGE_NAME"
223+ NotIntegerAndroidPackageMinVersion -> "NOT_INTEGER_ANDROID_PACKAGE_MIN_VERSION"
224+ UnnecessaryAndroidPackageMinVersion -> "UNNECESSARY_ANDROID_PACKAGE_MIN_VERSION"
225+ NotURIAndroidLink -> "NOT_URI_ANDROID_LINK"
226+ UnnecessaryAndroidLink -> "UNNECESSARY_ANDROID_LINK"
227+ NotURIAndroidFallbackLink -> "NOT_URI_ANDROID_FALLBACK_LINK"
228+ BadURISchemeAndroidFallbackLink -> "BAD_URI_SCHEME_ANDROID_FALLBACK_LINK"
229+ NotInProjectIosBundleId -> "NOT_IN_PROJECT_IOS_BUNDLE_ID"
230+ NotInProjectIPadBundleId -> "NOT_IN_PROJECT_IPAD_BUNDLE_ID"
231+ UnnecessaryIosURLScheme -> "UNNECESSARY_IOS_URL_SCHEME"
232+ NotNumericIosAppStoreId -> "NOT_NUMERIC_IOS_APP_STORE_ID"
233+ UnnecessaryIosAppStoreId -> "UNNECESSARY_IOS_APP_STORE_ID"
234+ NotURIIosFallbackLink -> "NOT_URI_IOS_FALLBACK_LINK"
235+ BadURISchemeIosFallbackLink -> "BAD_URI_SCHEME_IOS_FALLBACK_LINK"
236+ NotURIIPadFallbackLink -> "NOT_URI_IPAD_FALLBACK_LINK"
237+ BadURISchemeIPadFallbackLink -> "BAD_URI_SCHEME_IPAD_FALLBACK_LINK"
238+ BadDebugParam -> "BAD_DEBUG_PARAM"
239+ BadAdParam -> "BAD_AD_PARAM"
240+ DeprecatedParam -> "DEPRECATED_PARAM"
241+ UnrecognizedParam -> "UNRECOGNIZED_PARAM"
242+ TooLongParam -> "TOO_LONG_PARAM"
243+ NotURISocialImageLink -> "NOT_URI_SOCIAL_IMAGE_LINK"
244+ BadURISchemeSocialImageLink -> "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK"
245+ NotURISocialURL -> "NOT_URI_SOCIAL_URL"
246+ BadURISchemeSocialURL -> "BAD_URI_SCHEME_SOCIAL_URL"
247+ LinkLengthTooLong -> "LINK_LENGTH_TOO_LONG"
248+ LinkWithFragments -> "LINK_WITH_FRAGMENTS"
249+ NotMatchingIosBundleIdAndStoreId -> "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID"
250+
251+instance FromJSON DynamicLinkWarningWarningCode where
252+ parseJSON = parseJSONText "DynamicLinkWarningWarningCode"
253+
254+instance ToJSON DynamicLinkWarningWarningCode where
255+ toJSON = toJSONText
gogol-firebase-dynamiclinks/gen/Network/Google/Resource/FirebaseDynamicLinks/ShortLinks/Create.hsnew file+182
@@ -0,0 +1,182 @@
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.FirebaseDynamicLinks.ShortLinks.Create
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+-- Creates a short Dynamic Link given either a valid long Dynamic Link or
24+-- details such as Dynamic Link domain, Android and iOS app information.
25+-- The created short Dynamic Link will not expire. Repeated calls with the
26+-- same long Dynamic Link or Dynamic Link information will produce the same
27+-- short Dynamic Link. The Dynamic Link domain in the request must be owned
28+-- by requester\'s Firebase project.
29+--
30+-- /See:/ <https://firebase.google.com/docs/dynamic-links/ Firebase Dynamic Links API Reference> for @firebasedynamiclinks.shortLinks.create@.
31+module Network.Google.Resource.FirebaseDynamicLinks.ShortLinks.Create
32+ (
33+ -- * REST Resource
34+ ShortLinksCreateResource
35+
36+ -- * Creating a Request
37+ , shortLinksCreate
38+ , ShortLinksCreate
39+
40+ -- * Request Lenses
41+ , slcXgafv
42+ , slcUploadProtocol
43+ , slcPp
44+ , slcAccessToken
45+ , slcUploadType
46+ , slcPayload
47+ , slcBearerToken
48+ , slcCallback
49+ ) where
50+
51+import Network.Google.FirebaseDynamicLinks.Types
52+import Network.Google.Prelude
53+
54+-- | A resource alias for @firebasedynamiclinks.shortLinks.create@ method which the
55+-- 'ShortLinksCreate' request conforms to.
56+type ShortLinksCreateResource =
57+ "v1" :>
58+ "shortLinks" :>
59+ QueryParam "$.xgafv" Xgafv :>
60+ QueryParam "upload_protocol" Text :>
61+ QueryParam "pp" Bool :>
62+ QueryParam "access_token" Text :>
63+ QueryParam "uploadType" Text :>
64+ QueryParam "bearer_token" Text :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ ReqBody '[JSON] CreateShortDynamicLinkRequest :>
68+ Post '[JSON] CreateShortDynamicLinkResponse
69+
70+-- | Creates a short Dynamic Link given either a valid long Dynamic Link or
71+-- details such as Dynamic Link domain, Android and iOS app information.
72+-- The created short Dynamic Link will not expire. Repeated calls with the
73+-- same long Dynamic Link or Dynamic Link information will produce the same
74+-- short Dynamic Link. The Dynamic Link domain in the request must be owned
75+-- by requester\'s Firebase project.
76+--
77+-- /See:/ 'shortLinksCreate' smart constructor.
78+data ShortLinksCreate = ShortLinksCreate'
79+ { _slcXgafv :: !(Maybe Xgafv)
80+ , _slcUploadProtocol :: !(Maybe Text)
81+ , _slcPp :: !Bool
82+ , _slcAccessToken :: !(Maybe Text)
83+ , _slcUploadType :: !(Maybe Text)
84+ , _slcPayload :: !CreateShortDynamicLinkRequest
85+ , _slcBearerToken :: !(Maybe Text)
86+ , _slcCallback :: !(Maybe Text)
87+ } deriving (Eq,Show,Data,Typeable,Generic)
88+
89+-- | Creates a value of 'ShortLinksCreate' with the minimum fields required to make a request.
90+--
91+-- Use one of the following lenses to modify other fields as desired:
92+--
93+-- * 'slcXgafv'
94+--
95+-- * 'slcUploadProtocol'
96+--
97+-- * 'slcPp'
98+--
99+-- * 'slcAccessToken'
100+--
101+-- * 'slcUploadType'
102+--
103+-- * 'slcPayload'
104+--
105+-- * 'slcBearerToken'
106+--
107+-- * 'slcCallback'
108+shortLinksCreate
109+ :: CreateShortDynamicLinkRequest -- ^ 'slcPayload'
110+ -> ShortLinksCreate
111+shortLinksCreate pSlcPayload_ =
112+ ShortLinksCreate'
113+ { _slcXgafv = Nothing
114+ , _slcUploadProtocol = Nothing
115+ , _slcPp = True
116+ , _slcAccessToken = Nothing
117+ , _slcUploadType = Nothing
118+ , _slcPayload = pSlcPayload_
119+ , _slcBearerToken = Nothing
120+ , _slcCallback = Nothing
121+ }
122+
123+-- | V1 error format.
124+slcXgafv :: Lens' ShortLinksCreate (Maybe Xgafv)
125+slcXgafv = lens _slcXgafv (\ s a -> s{_slcXgafv = a})
126+
127+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
128+slcUploadProtocol :: Lens' ShortLinksCreate (Maybe Text)
129+slcUploadProtocol
130+ = lens _slcUploadProtocol
131+ (\ s a -> s{_slcUploadProtocol = a})
132+
133+-- | Pretty-print response.
134+slcPp :: Lens' ShortLinksCreate Bool
135+slcPp = lens _slcPp (\ s a -> s{_slcPp = a})
136+
137+-- | OAuth access token.
138+slcAccessToken :: Lens' ShortLinksCreate (Maybe Text)
139+slcAccessToken
140+ = lens _slcAccessToken
141+ (\ s a -> s{_slcAccessToken = a})
142+
143+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
144+slcUploadType :: Lens' ShortLinksCreate (Maybe Text)
145+slcUploadType
146+ = lens _slcUploadType
147+ (\ s a -> s{_slcUploadType = a})
148+
149+-- | Multipart request metadata.
150+slcPayload :: Lens' ShortLinksCreate CreateShortDynamicLinkRequest
151+slcPayload
152+ = lens _slcPayload (\ s a -> s{_slcPayload = a})
153+
154+-- | OAuth bearer token.
155+slcBearerToken :: Lens' ShortLinksCreate (Maybe Text)
156+slcBearerToken
157+ = lens _slcBearerToken
158+ (\ s a -> s{_slcBearerToken = a})
159+
160+-- | JSONP
161+slcCallback :: Lens' ShortLinksCreate (Maybe Text)
162+slcCallback
163+ = lens _slcCallback (\ s a -> s{_slcCallback = a})
164+
165+instance GoogleRequest ShortLinksCreate where
166+ type Rs ShortLinksCreate =
167+ CreateShortDynamicLinkResponse
168+ type Scopes ShortLinksCreate =
169+ '["https://www.googleapis.com/auth/firebase"]
170+ requestClient ShortLinksCreate'{..}
171+ = go _slcXgafv _slcUploadProtocol (Just _slcPp)
172+ _slcAccessToken
173+ _slcUploadType
174+ _slcBearerToken
175+ _slcCallback
176+ (Just AltJSON)
177+ _slcPayload
178+ firebaseDynamicLinksService
179+ where go
180+ = buildClient
181+ (Proxy :: Proxy ShortLinksCreateResource)
182+ mempty
gogol-firebase-dynamiclinks/gogol-firebase-dynamiclinks.cabalnew file+47
@@ -0,0 +1,47 @@
1+name: gogol-firebase-dynamiclinks
2+version: 0.1.0
3+synopsis: Google Firebase Dynamic Links SDK.
4+homepage: https://github.com/brendanhay/gogol
5+bug-reports: https://github.com/brendanhay/gogol/issues
6+license: OtherLicense
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay@gmail.com>
10+copyright: Copyright (c) 2015-2016 Brendan Hay
11+category: Network, Google, Cloud
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md
15+
16+description:
17+ Firebase Dynamic Links API enables third party developers to
18+ programmatically create and manage Dynamic Links.
19+ .
20+ /Warning:/ This is an experimental prototype/preview release which is still
21+ under exploratory development and not intended for public use, caveat emptor!
22+ .
23+ This library is compatible with version @v1@
24+ of the API.
25+
26+source-repository head
27+ type: git
28+ location: git://github.com/brendanhay/gogol.git
29+
30+library
31+ default-language: Haskell2010
32+ hs-source-dirs: src gen
33+
34+ ghc-options: -Wall
35+
36+ exposed-modules:
37+ Network.Google.FirebaseDynamicLinks
38+ , Network.Google.FirebaseDynamicLinks.Types
39+ , Network.Google.Resource.FirebaseDynamicLinks.ShortLinks.Create
40+
41+ other-modules:
42+ Network.Google.FirebaseDynamicLinks.Types.Product
43+ , Network.Google.FirebaseDynamicLinks.Types.Sum
44+
45+ build-depends:
46+ gogol-core == 0.1.0.*
47+ , base >= 4.7 && < 5
gogol-firebase-dynamiclinks/src/.gitkeepnew file

No changes to the content.