gogol-maps-coordinate (empty) → 0.0.1
raw patch · 20 files changed
+3972/−0 lines, 20 filesdep +basedep +gogol-coresetup-changed
Dependencies added: base, gogol-core
Files
- LICENSE +367/−0
- README.md +28/−0
- Setup.hs +2/−0
- gen/Network/Google/MapsCoordinate.hs +243/−0
- gen/Network/Google/MapsCoordinate/Types.hs +186/−0
- gen/Network/Google/MapsCoordinate/Types/Product.hs +1233/−0
- gen/Network/Google/MapsCoordinate/Types/Sum.hs +107/−0
- gen/Network/Google/Resource/Coordinate/CustomFieldDef/List.hs +86/−0
- gen/Network/Google/Resource/Coordinate/Jobs/Get.hs +94/−0
- gen/Network/Google/Resource/Coordinate/Jobs/Insert.hs +215/−0
- gen/Network/Google/Resource/Coordinate/Jobs/List.hs +137/−0
- gen/Network/Google/Resource/Coordinate/Jobs/Patch.hs +239/−0
- gen/Network/Google/Resource/Coordinate/Jobs/Update.hs +237/−0
- gen/Network/Google/Resource/Coordinate/Location/List.hs +139/−0
- gen/Network/Google/Resource/Coordinate/Schedule/Get.hs +96/−0
- gen/Network/Google/Resource/Coordinate/Schedule/Patch.hs +161/−0
- gen/Network/Google/Resource/Coordinate/Schedule/Update.hs +159/−0
- gen/Network/Google/Resource/Coordinate/Team/List.hs +103/−0
- gen/Network/Google/Resource/Coordinate/Worker/List.hs +83/−0
- gogol-maps-coordinate.cabal +57/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,28 @@+# gogol-maps-coordinate++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`0.0.1`+++## Description++A client library for the Google Maps Coordinate.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`gogol-maps-coordinate` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ gen/Network/Google/MapsCoordinate.hs view
@@ -0,0 +1,243 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- |+-- Module : Network.Google.MapsCoordinate+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lets you view and manage jobs in a Coordinate team.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference>+module Network.Google.MapsCoordinate+ (+ -- * Service Configuration+ mapsCoordinateService++ -- * API Declaration+ , MapsCoordinateAPI++ -- * Resources++ -- ** coordinate.customFieldDef.list+ , module Network.Google.Resource.Coordinate.CustomFieldDef.List++ -- ** coordinate.jobs.get+ , module Network.Google.Resource.Coordinate.Jobs.Get++ -- ** coordinate.jobs.insert+ , module Network.Google.Resource.Coordinate.Jobs.Insert++ -- ** coordinate.jobs.list+ , module Network.Google.Resource.Coordinate.Jobs.List++ -- ** coordinate.jobs.patch+ , module Network.Google.Resource.Coordinate.Jobs.Patch++ -- ** coordinate.jobs.update+ , module Network.Google.Resource.Coordinate.Jobs.Update++ -- ** coordinate.location.list+ , module Network.Google.Resource.Coordinate.Location.List++ -- ** coordinate.schedule.get+ , module Network.Google.Resource.Coordinate.Schedule.Get++ -- ** coordinate.schedule.patch+ , module Network.Google.Resource.Coordinate.Schedule.Patch++ -- ** coordinate.schedule.update+ , module Network.Google.Resource.Coordinate.Schedule.Update++ -- ** coordinate.team.list+ , module Network.Google.Resource.Coordinate.Team.List++ -- ** coordinate.worker.list+ , module Network.Google.Resource.Coordinate.Worker.List++ -- * Types++ -- ** LocationListResponse+ , LocationListResponse+ , locationListResponse+ , llrTokenPagination+ , llrNextPageToken+ , llrKind+ , llrItems++ -- ** JobsPatchProgress+ , JobsPatchProgress (..)++ -- ** TokenPagination+ , TokenPagination+ , tokenPagination+ , tpNextPageToken+ , tpKind+ , tpPreviousPageToken++ -- ** WorkerListResponse+ , WorkerListResponse+ , workerListResponse+ , wlrKind+ , wlrItems++ -- ** Schedule+ , Schedule+ , schedule+ , sAllDay+ , sStartTime+ , sKind+ , sEndTime+ , sDuration++ -- ** Location+ , Location+ , location+ , lAddressLine+ , lKind+ , lLat+ , lLng++ -- ** JobsUpdateProgress+ , JobsUpdateProgress (..)++ -- ** JobState+ , JobState+ , jobState+ , jsLocation+ , jsProgress+ , jsNote+ , jsKind+ , jsCustomerPhoneNumber+ , jsCustomerName+ , jsAssignee+ , jsCustomFields+ , jsTitle++ -- ** CustomFieldDef+ , CustomFieldDef+ , customFieldDef+ , cfdEnabled+ , cfdKind+ , cfdName+ , cfdRequiredForCheckout+ , cfdId+ , cfdEnumitems+ , cfdType++ -- ** JobListResponse+ , JobListResponse+ , jobListResponse+ , jlrNextPageToken+ , jlrKind+ , jlrItems++ -- ** JobChange+ , JobChange+ , jobChange+ , jcState+ , jcKind+ , jcTimestamp++ -- ** TeamListResponse+ , TeamListResponse+ , teamListResponse+ , tlrKind+ , tlrItems++ -- ** CustomFieldDefListResponse+ , CustomFieldDefListResponse+ , customFieldDefListResponse+ , cfdlrKind+ , cfdlrItems++ -- ** Job+ , Job+ , job+ , jState+ , jKind+ , jJobChange+ , jId++ -- ** CustomFields+ , CustomFields+ , customFields+ , cfKind+ , cfCustomField++ -- ** Team+ , Team+ , team+ , tKind+ , tName+ , tId++ -- ** LocationRecord+ , LocationRecord+ , locationRecord+ , lrKind+ , lrLatitude+ , lrConfidenceRadius+ , lrLongitude+ , lrCollectionTime++ -- ** Worker+ , Worker+ , worker+ , wKind+ , wId++ -- ** CustomField+ , CustomField+ , customField+ , cCustomFieldId+ , cKind+ , cValue++ -- ** EnumItemDef+ , EnumItemDef+ , enumItemDef+ , eidKind+ , eidValue+ , eidActive+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude+import Network.Google.Resource.Coordinate.CustomFieldDef.List+import Network.Google.Resource.Coordinate.Jobs.Get+import Network.Google.Resource.Coordinate.Jobs.Insert+import Network.Google.Resource.Coordinate.Jobs.List+import Network.Google.Resource.Coordinate.Jobs.Patch+import Network.Google.Resource.Coordinate.Jobs.Update+import Network.Google.Resource.Coordinate.Location.List+import Network.Google.Resource.Coordinate.Schedule.Get+import Network.Google.Resource.Coordinate.Schedule.Patch+import Network.Google.Resource.Coordinate.Schedule.Update+import Network.Google.Resource.Coordinate.Team.List+import Network.Google.Resource.Coordinate.Worker.List++{- $resources+TODO+-}++-- | Represents the entirety of the methods and resources available for the Google Maps Coordinate API service.+type MapsCoordinateAPI =+ SchedulePatchResource :<|> ScheduleGetResource :<|>+ ScheduleUpdateResource+ :<|> LocationListResource+ :<|> CustomFieldDefListResource+ :<|> JobsInsertResource+ :<|> JobsListResource+ :<|> JobsPatchResource+ :<|> JobsGetResource+ :<|> JobsUpdateResource+ :<|> TeamListResource+ :<|> WorkerListResource
+ gen/Network/Google/MapsCoordinate/Types.hs view
@@ -0,0 +1,186 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.MapsCoordinate.Types+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.Google.MapsCoordinate.Types+ (+ -- * Service Configuration+ mapsCoordinateService++ -- * OAuth Scopes+ , coordinateScope+ , coordinateReadonlyScope++ -- * LocationListResponse+ , LocationListResponse+ , locationListResponse+ , llrTokenPagination+ , llrNextPageToken+ , llrKind+ , llrItems++ -- * JobsPatchProgress+ , JobsPatchProgress (..)++ -- * TokenPagination+ , TokenPagination+ , tokenPagination+ , tpNextPageToken+ , tpKind+ , tpPreviousPageToken++ -- * WorkerListResponse+ , WorkerListResponse+ , workerListResponse+ , wlrKind+ , wlrItems++ -- * Schedule+ , Schedule+ , schedule+ , sAllDay+ , sStartTime+ , sKind+ , sEndTime+ , sDuration++ -- * Location+ , Location+ , location+ , lAddressLine+ , lKind+ , lLat+ , lLng++ -- * JobsUpdateProgress+ , JobsUpdateProgress (..)++ -- * JobState+ , JobState+ , jobState+ , jsLocation+ , jsProgress+ , jsNote+ , jsKind+ , jsCustomerPhoneNumber+ , jsCustomerName+ , jsAssignee+ , jsCustomFields+ , jsTitle++ -- * CustomFieldDef+ , CustomFieldDef+ , customFieldDef+ , cfdEnabled+ , cfdKind+ , cfdName+ , cfdRequiredForCheckout+ , cfdId+ , cfdEnumitems+ , cfdType++ -- * JobListResponse+ , JobListResponse+ , jobListResponse+ , jlrNextPageToken+ , jlrKind+ , jlrItems++ -- * JobChange+ , JobChange+ , jobChange+ , jcState+ , jcKind+ , jcTimestamp++ -- * TeamListResponse+ , TeamListResponse+ , teamListResponse+ , tlrKind+ , tlrItems++ -- * CustomFieldDefListResponse+ , CustomFieldDefListResponse+ , customFieldDefListResponse+ , cfdlrKind+ , cfdlrItems++ -- * Job+ , Job+ , job+ , jState+ , jKind+ , jJobChange+ , jId++ -- * CustomFields+ , CustomFields+ , customFields+ , cfKind+ , cfCustomField++ -- * Team+ , Team+ , team+ , tKind+ , tName+ , tId++ -- * LocationRecord+ , LocationRecord+ , locationRecord+ , lrKind+ , lrLatitude+ , lrConfidenceRadius+ , lrLongitude+ , lrCollectionTime++ -- * Worker+ , Worker+ , worker+ , wKind+ , wId++ -- * CustomField+ , CustomField+ , customField+ , cCustomFieldId+ , cKind+ , cValue++ -- * EnumItemDef+ , EnumItemDef+ , enumItemDef+ , eidKind+ , eidValue+ , eidActive+ ) where++import Network.Google.MapsCoordinate.Types.Product+import Network.Google.MapsCoordinate.Types.Sum+import Network.Google.Prelude++-- | Default request referring to version 'v1' of the Google Maps Coordinate API. This contains the host and root path used as a starting point for constructing service requests.+mapsCoordinateService :: Service+mapsCoordinateService+ = defaultService (ServiceId "coordinate:v1")+ "www.googleapis.com"++-- | View and manage your Google Maps Coordinate jobs+coordinateScope :: OAuthScope+coordinateScope = "https://www.googleapis.com/auth/coordinate";++-- | View your Google Coordinate jobs+coordinateReadonlyScope :: OAuthScope+coordinateReadonlyScope = "https://www.googleapis.com/auth/coordinate.readonly";
+ gen/Network/Google/MapsCoordinate/Types/Product.hs view
@@ -0,0 +1,1233 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.MapsCoordinate.Types.Product+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.Google.MapsCoordinate.Types.Product where++import Network.Google.MapsCoordinate.Types.Sum+import Network.Google.Prelude++-- | Response from a List Locations request.+--+-- /See:/ 'locationListResponse' smart constructor.+data LocationListResponse = LocationListResponse+ { _llrTokenPagination :: !(Maybe TokenPagination)+ , _llrNextPageToken :: !(Maybe Text)+ , _llrKind :: !Text+ , _llrItems :: !(Maybe [LocationRecord])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'LocationListResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'llrTokenPagination'+--+-- * 'llrNextPageToken'+--+-- * 'llrKind'+--+-- * 'llrItems'+locationListResponse+ :: LocationListResponse+locationListResponse =+ LocationListResponse+ { _llrTokenPagination = Nothing+ , _llrNextPageToken = Nothing+ , _llrKind = "coordinate#locationList"+ , _llrItems = Nothing+ }++-- | Pagination information for token pagination.+llrTokenPagination :: Lens' LocationListResponse (Maybe TokenPagination)+llrTokenPagination+ = lens _llrTokenPagination+ (\ s a -> s{_llrTokenPagination = a})++-- | A token to provide to get the next page of results.+llrNextPageToken :: Lens' LocationListResponse (Maybe Text)+llrNextPageToken+ = lens _llrNextPageToken+ (\ s a -> s{_llrNextPageToken = a})++-- | Identifies this object as a list of locations.+llrKind :: Lens' LocationListResponse Text+llrKind = lens _llrKind (\ s a -> s{_llrKind = a})++-- | Locations in the collection.+llrItems :: Lens' LocationListResponse [LocationRecord]+llrItems+ = lens _llrItems (\ s a -> s{_llrItems = a}) .+ _Default+ . _Coerce++instance FromJSON LocationListResponse where+ parseJSON+ = withObject "LocationListResponse"+ (\ o ->+ LocationListResponse <$>+ (o .:? "tokenPagination") <*> (o .:? "nextPageToken")+ <*> (o .:? "kind" .!= "coordinate#locationList")+ <*> (o .:? "items" .!= mempty))++instance ToJSON LocationListResponse where+ toJSON LocationListResponse{..}+ = object+ (catMaybes+ [("tokenPagination" .=) <$> _llrTokenPagination,+ ("nextPageToken" .=) <$> _llrNextPageToken,+ Just ("kind" .= _llrKind),+ ("items" .=) <$> _llrItems])++-- | Pagination information.+--+-- /See:/ 'tokenPagination' smart constructor.+data TokenPagination = TokenPagination+ { _tpNextPageToken :: !(Maybe Text)+ , _tpKind :: !Text+ , _tpPreviousPageToken :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TokenPagination' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tpNextPageToken'+--+-- * 'tpKind'+--+-- * 'tpPreviousPageToken'+tokenPagination+ :: TokenPagination+tokenPagination =+ TokenPagination+ { _tpNextPageToken = Nothing+ , _tpKind = "coordinate#tokenPagination"+ , _tpPreviousPageToken = Nothing+ }++-- | A token to provide to get the next page of results.+tpNextPageToken :: Lens' TokenPagination (Maybe Text)+tpNextPageToken+ = lens _tpNextPageToken+ (\ s a -> s{_tpNextPageToken = a})++-- | Identifies this object as pagination information.+tpKind :: Lens' TokenPagination Text+tpKind = lens _tpKind (\ s a -> s{_tpKind = a})++-- | A token to provide to get the previous page of results.+tpPreviousPageToken :: Lens' TokenPagination (Maybe Text)+tpPreviousPageToken+ = lens _tpPreviousPageToken+ (\ s a -> s{_tpPreviousPageToken = a})++instance FromJSON TokenPagination where+ parseJSON+ = withObject "TokenPagination"+ (\ o ->+ TokenPagination <$>+ (o .:? "nextPageToken") <*>+ (o .:? "kind" .!= "coordinate#tokenPagination")+ <*> (o .:? "previousPageToken"))++instance ToJSON TokenPagination where+ toJSON TokenPagination{..}+ = object+ (catMaybes+ [("nextPageToken" .=) <$> _tpNextPageToken,+ Just ("kind" .= _tpKind),+ ("previousPageToken" .=) <$> _tpPreviousPageToken])++-- | Response from a List Workers request.+--+-- /See:/ 'workerListResponse' smart constructor.+data WorkerListResponse = WorkerListResponse+ { _wlrKind :: !Text+ , _wlrItems :: !(Maybe [Worker])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'WorkerListResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'wlrKind'+--+-- * 'wlrItems'+workerListResponse+ :: WorkerListResponse+workerListResponse =+ WorkerListResponse+ { _wlrKind = "coordinate#workerList"+ , _wlrItems = Nothing+ }++-- | Identifies this object as a list of workers.+wlrKind :: Lens' WorkerListResponse Text+wlrKind = lens _wlrKind (\ s a -> s{_wlrKind = a})++-- | Workers in the collection.+wlrItems :: Lens' WorkerListResponse [Worker]+wlrItems+ = lens _wlrItems (\ s a -> s{_wlrItems = a}) .+ _Default+ . _Coerce++instance FromJSON WorkerListResponse where+ parseJSON+ = withObject "WorkerListResponse"+ (\ o ->+ WorkerListResponse <$>+ (o .:? "kind" .!= "coordinate#workerList") <*>+ (o .:? "items" .!= mempty))++instance ToJSON WorkerListResponse where+ toJSON WorkerListResponse{..}+ = object+ (catMaybes+ [Just ("kind" .= _wlrKind),+ ("items" .=) <$> _wlrItems])++-- | Job schedule.+--+-- /See:/ 'schedule' smart constructor.+data Schedule = Schedule+ { _sAllDay :: !(Maybe Bool)+ , _sStartTime :: !(Maybe (Textual Word64))+ , _sKind :: !Text+ , _sEndTime :: !(Maybe (Textual Word64))+ , _sDuration :: !(Maybe (Textual Word64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Schedule' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sAllDay'+--+-- * 'sStartTime'+--+-- * 'sKind'+--+-- * 'sEndTime'+--+-- * 'sDuration'+schedule+ :: Schedule+schedule =+ Schedule+ { _sAllDay = Nothing+ , _sStartTime = Nothing+ , _sKind = "coordinate#schedule"+ , _sEndTime = Nothing+ , _sDuration = Nothing+ }++-- | Whether the job is scheduled for the whole day. Time of day in+-- start\/end times is ignored if this is true.+sAllDay :: Lens' Schedule (Maybe Bool)+sAllDay = lens _sAllDay (\ s a -> s{_sAllDay = a})++-- | Scheduled start time in milliseconds since epoch.+sStartTime :: Lens' Schedule (Maybe Word64)+sStartTime+ = lens _sStartTime (\ s a -> s{_sStartTime = a}) .+ mapping _Coerce++-- | Identifies this object as a job schedule.+sKind :: Lens' Schedule Text+sKind = lens _sKind (\ s a -> s{_sKind = a})++-- | Scheduled end time in milliseconds since epoch.+sEndTime :: Lens' Schedule (Maybe Word64)+sEndTime+ = lens _sEndTime (\ s a -> s{_sEndTime = a}) .+ mapping _Coerce++-- | Job duration in milliseconds.+sDuration :: Lens' Schedule (Maybe Word64)+sDuration+ = lens _sDuration (\ s a -> s{_sDuration = a}) .+ mapping _Coerce++instance FromJSON Schedule where+ parseJSON+ = withObject "Schedule"+ (\ o ->+ Schedule <$>+ (o .:? "allDay") <*> (o .:? "startTime") <*>+ (o .:? "kind" .!= "coordinate#schedule")+ <*> (o .:? "endTime")+ <*> (o .:? "duration"))++instance ToJSON Schedule where+ toJSON Schedule{..}+ = object+ (catMaybes+ [("allDay" .=) <$> _sAllDay,+ ("startTime" .=) <$> _sStartTime,+ Just ("kind" .= _sKind),+ ("endTime" .=) <$> _sEndTime,+ ("duration" .=) <$> _sDuration])++-- | Location of a job.+--+-- /See:/ 'location' smart constructor.+data Location = Location+ { _lAddressLine :: !(Maybe [Text])+ , _lKind :: !Text+ , _lLat :: !(Maybe (Textual Double))+ , _lLng :: !(Maybe (Textual Double))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Location' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lAddressLine'+--+-- * 'lKind'+--+-- * 'lLat'+--+-- * 'lLng'+location+ :: Location+location =+ Location+ { _lAddressLine = Nothing+ , _lKind = "coordinate#location"+ , _lLat = Nothing+ , _lLng = Nothing+ }++-- | Address.+lAddressLine :: Lens' Location [Text]+lAddressLine+ = lens _lAddressLine (\ s a -> s{_lAddressLine = a})+ . _Default+ . _Coerce++-- | Identifies this object as a location.+lKind :: Lens' Location Text+lKind = lens _lKind (\ s a -> s{_lKind = a})++-- | Latitude.+lLat :: Lens' Location (Maybe Double)+lLat+ = lens _lLat (\ s a -> s{_lLat = a}) .+ mapping _Coerce++-- | Longitude.+lLng :: Lens' Location (Maybe Double)+lLng+ = lens _lLng (\ s a -> s{_lLng = a}) .+ mapping _Coerce++instance FromJSON Location where+ parseJSON+ = withObject "Location"+ (\ o ->+ Location <$>+ (o .:? "addressLine" .!= mempty) <*>+ (o .:? "kind" .!= "coordinate#location")+ <*> (o .:? "lat")+ <*> (o .:? "lng"))++instance ToJSON Location where+ toJSON Location{..}+ = object+ (catMaybes+ [("addressLine" .=) <$> _lAddressLine,+ Just ("kind" .= _lKind), ("lat" .=) <$> _lLat,+ ("lng" .=) <$> _lLng])++-- | Current state of a job.+--+-- /See:/ 'jobState' smart constructor.+data JobState = JobState+ { _jsLocation :: !(Maybe Location)+ , _jsProgress :: !(Maybe Text)+ , _jsNote :: !(Maybe [Text])+ , _jsKind :: !Text+ , _jsCustomerPhoneNumber :: !(Maybe Text)+ , _jsCustomerName :: !(Maybe Text)+ , _jsAssignee :: !(Maybe Text)+ , _jsCustomFields :: !(Maybe CustomFields)+ , _jsTitle :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobState' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jsLocation'+--+-- * 'jsProgress'+--+-- * 'jsNote'+--+-- * 'jsKind'+--+-- * 'jsCustomerPhoneNumber'+--+-- * 'jsCustomerName'+--+-- * 'jsAssignee'+--+-- * 'jsCustomFields'+--+-- * 'jsTitle'+jobState+ :: JobState+jobState =+ JobState+ { _jsLocation = Nothing+ , _jsProgress = Nothing+ , _jsNote = Nothing+ , _jsKind = "coordinate#jobState"+ , _jsCustomerPhoneNumber = Nothing+ , _jsCustomerName = Nothing+ , _jsAssignee = Nothing+ , _jsCustomFields = Nothing+ , _jsTitle = Nothing+ }++-- | Job location.+jsLocation :: Lens' JobState (Maybe Location)+jsLocation+ = lens _jsLocation (\ s a -> s{_jsLocation = a})++-- | Job progress.+jsProgress :: Lens' JobState (Maybe Text)+jsProgress+ = lens _jsProgress (\ s a -> s{_jsProgress = a})++-- | Note added to the job.+jsNote :: Lens' JobState [Text]+jsNote+ = lens _jsNote (\ s a -> s{_jsNote = a}) . _Default .+ _Coerce++-- | Identifies this object as a job state.+jsKind :: Lens' JobState Text+jsKind = lens _jsKind (\ s a -> s{_jsKind = a})++-- | Customer phone number.+jsCustomerPhoneNumber :: Lens' JobState (Maybe Text)+jsCustomerPhoneNumber+ = lens _jsCustomerPhoneNumber+ (\ s a -> s{_jsCustomerPhoneNumber = a})++-- | Customer name.+jsCustomerName :: Lens' JobState (Maybe Text)+jsCustomerName+ = lens _jsCustomerName+ (\ s a -> s{_jsCustomerName = a})++-- | Email address of the assignee, or the string \"DELETED_USER\" if the+-- account is no longer available.+jsAssignee :: Lens' JobState (Maybe Text)+jsAssignee+ = lens _jsAssignee (\ s a -> s{_jsAssignee = a})++-- | Custom fields.+jsCustomFields :: Lens' JobState (Maybe CustomFields)+jsCustomFields+ = lens _jsCustomFields+ (\ s a -> s{_jsCustomFields = a})++-- | Job title.+jsTitle :: Lens' JobState (Maybe Text)+jsTitle = lens _jsTitle (\ s a -> s{_jsTitle = a})++instance FromJSON JobState where+ parseJSON+ = withObject "JobState"+ (\ o ->+ JobState <$>+ (o .:? "location") <*> (o .:? "progress") <*>+ (o .:? "note" .!= mempty)+ <*> (o .:? "kind" .!= "coordinate#jobState")+ <*> (o .:? "customerPhoneNumber")+ <*> (o .:? "customerName")+ <*> (o .:? "assignee")+ <*> (o .:? "customFields")+ <*> (o .:? "title"))++instance ToJSON JobState where+ toJSON JobState{..}+ = object+ (catMaybes+ [("location" .=) <$> _jsLocation,+ ("progress" .=) <$> _jsProgress,+ ("note" .=) <$> _jsNote, Just ("kind" .= _jsKind),+ ("customerPhoneNumber" .=) <$>+ _jsCustomerPhoneNumber,+ ("customerName" .=) <$> _jsCustomerName,+ ("assignee" .=) <$> _jsAssignee,+ ("customFields" .=) <$> _jsCustomFields,+ ("title" .=) <$> _jsTitle])++-- | Custom field definition.+--+-- /See:/ 'customFieldDef' smart constructor.+data CustomFieldDef = CustomFieldDef+ { _cfdEnabled :: !(Maybe Bool)+ , _cfdKind :: !Text+ , _cfdName :: !(Maybe Text)+ , _cfdRequiredForCheckout :: !(Maybe Bool)+ , _cfdId :: !(Maybe (Textual Int64))+ , _cfdEnumitems :: !(Maybe [EnumItemDef])+ , _cfdType :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomFieldDef' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cfdEnabled'+--+-- * 'cfdKind'+--+-- * 'cfdName'+--+-- * 'cfdRequiredForCheckout'+--+-- * 'cfdId'+--+-- * 'cfdEnumitems'+--+-- * 'cfdType'+customFieldDef+ :: CustomFieldDef+customFieldDef =+ CustomFieldDef+ { _cfdEnabled = Nothing+ , _cfdKind = "coordinate#customFieldDef"+ , _cfdName = Nothing+ , _cfdRequiredForCheckout = Nothing+ , _cfdId = Nothing+ , _cfdEnumitems = Nothing+ , _cfdType = Nothing+ }++-- | Whether the field is enabled.+cfdEnabled :: Lens' CustomFieldDef (Maybe Bool)+cfdEnabled+ = lens _cfdEnabled (\ s a -> s{_cfdEnabled = a})++-- | Identifies this object as a custom field definition.+cfdKind :: Lens' CustomFieldDef Text+cfdKind = lens _cfdKind (\ s a -> s{_cfdKind = a})++-- | Custom field name.+cfdName :: Lens' CustomFieldDef (Maybe Text)+cfdName = lens _cfdName (\ s a -> s{_cfdName = a})++-- | Whether the field is required for checkout.+cfdRequiredForCheckout :: Lens' CustomFieldDef (Maybe Bool)+cfdRequiredForCheckout+ = lens _cfdRequiredForCheckout+ (\ s a -> s{_cfdRequiredForCheckout = a})++-- | Custom field id.+cfdId :: Lens' CustomFieldDef (Maybe Int64)+cfdId+ = lens _cfdId (\ s a -> s{_cfdId = a}) .+ mapping _Coerce++-- | List of enum items for this custom field. Populated only if the field+-- type is enum. Enum fields appear as \'lists\' in the Coordinate web and+-- mobile UI.+cfdEnumitems :: Lens' CustomFieldDef [EnumItemDef]+cfdEnumitems+ = lens _cfdEnumitems (\ s a -> s{_cfdEnumitems = a})+ . _Default+ . _Coerce++-- | Custom field type.+cfdType :: Lens' CustomFieldDef (Maybe Text)+cfdType = lens _cfdType (\ s a -> s{_cfdType = a})++instance FromJSON CustomFieldDef where+ parseJSON+ = withObject "CustomFieldDef"+ (\ o ->+ CustomFieldDef <$>+ (o .:? "enabled") <*>+ (o .:? "kind" .!= "coordinate#customFieldDef")+ <*> (o .:? "name")+ <*> (o .:? "requiredForCheckout")+ <*> (o .:? "id")+ <*> (o .:? "enumitems" .!= mempty)+ <*> (o .:? "type"))++instance ToJSON CustomFieldDef where+ toJSON CustomFieldDef{..}+ = object+ (catMaybes+ [("enabled" .=) <$> _cfdEnabled,+ Just ("kind" .= _cfdKind), ("name" .=) <$> _cfdName,+ ("requiredForCheckout" .=) <$>+ _cfdRequiredForCheckout,+ ("id" .=) <$> _cfdId,+ ("enumitems" .=) <$> _cfdEnumitems,+ ("type" .=) <$> _cfdType])++-- | Response from a List Jobs request.+--+-- /See:/ 'jobListResponse' smart constructor.+data JobListResponse = JobListResponse+ { _jlrNextPageToken :: !(Maybe Text)+ , _jlrKind :: !Text+ , _jlrItems :: !(Maybe [Job])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobListResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jlrNextPageToken'+--+-- * 'jlrKind'+--+-- * 'jlrItems'+jobListResponse+ :: JobListResponse+jobListResponse =+ JobListResponse+ { _jlrNextPageToken = Nothing+ , _jlrKind = "coordinate#jobList"+ , _jlrItems = Nothing+ }++-- | A token to provide to get the next page of results.+jlrNextPageToken :: Lens' JobListResponse (Maybe Text)+jlrNextPageToken+ = lens _jlrNextPageToken+ (\ s a -> s{_jlrNextPageToken = a})++-- | Identifies this object as a list of jobs.+jlrKind :: Lens' JobListResponse Text+jlrKind = lens _jlrKind (\ s a -> s{_jlrKind = a})++-- | Jobs in the collection.+jlrItems :: Lens' JobListResponse [Job]+jlrItems+ = lens _jlrItems (\ s a -> s{_jlrItems = a}) .+ _Default+ . _Coerce++instance FromJSON JobListResponse where+ parseJSON+ = withObject "JobListResponse"+ (\ o ->+ JobListResponse <$>+ (o .:? "nextPageToken") <*>+ (o .:? "kind" .!= "coordinate#jobList")+ <*> (o .:? "items" .!= mempty))++instance ToJSON JobListResponse where+ toJSON JobListResponse{..}+ = object+ (catMaybes+ [("nextPageToken" .=) <$> _jlrNextPageToken,+ Just ("kind" .= _jlrKind),+ ("items" .=) <$> _jlrItems])++-- | Change to a job. For example assigning the job to a different worker.+--+-- /See:/ 'jobChange' smart constructor.+data JobChange = JobChange+ { _jcState :: !(Maybe JobState)+ , _jcKind :: !Text+ , _jcTimestamp :: !(Maybe (Textual Word64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobChange' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jcState'+--+-- * 'jcKind'+--+-- * 'jcTimestamp'+jobChange+ :: JobChange+jobChange =+ JobChange+ { _jcState = Nothing+ , _jcKind = "coordinate#jobChange"+ , _jcTimestamp = Nothing+ }++-- | Change applied to the job. Only the fields that were changed are set.+jcState :: Lens' JobChange (Maybe JobState)+jcState = lens _jcState (\ s a -> s{_jcState = a})++-- | Identifies this object as a job change.+jcKind :: Lens' JobChange Text+jcKind = lens _jcKind (\ s a -> s{_jcKind = a})++-- | Time at which this change was applied.+jcTimestamp :: Lens' JobChange (Maybe Word64)+jcTimestamp+ = lens _jcTimestamp (\ s a -> s{_jcTimestamp = a}) .+ mapping _Coerce++instance FromJSON JobChange where+ parseJSON+ = withObject "JobChange"+ (\ o ->+ JobChange <$>+ (o .:? "state") <*>+ (o .:? "kind" .!= "coordinate#jobChange")+ <*> (o .:? "timestamp"))++instance ToJSON JobChange where+ toJSON JobChange{..}+ = object+ (catMaybes+ [("state" .=) <$> _jcState, Just ("kind" .= _jcKind),+ ("timestamp" .=) <$> _jcTimestamp])++-- | Response from a List Teams request.+--+-- /See:/ 'teamListResponse' smart constructor.+data TeamListResponse = TeamListResponse+ { _tlrKind :: !Text+ , _tlrItems :: !(Maybe [Team])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TeamListResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tlrKind'+--+-- * 'tlrItems'+teamListResponse+ :: TeamListResponse+teamListResponse =+ TeamListResponse+ { _tlrKind = "coordinate#teamList"+ , _tlrItems = Nothing+ }++-- | Identifies this object as a list of teams.+tlrKind :: Lens' TeamListResponse Text+tlrKind = lens _tlrKind (\ s a -> s{_tlrKind = a})++-- | Teams in the collection.+tlrItems :: Lens' TeamListResponse [Team]+tlrItems+ = lens _tlrItems (\ s a -> s{_tlrItems = a}) .+ _Default+ . _Coerce++instance FromJSON TeamListResponse where+ parseJSON+ = withObject "TeamListResponse"+ (\ o ->+ TeamListResponse <$>+ (o .:? "kind" .!= "coordinate#teamList") <*>+ (o .:? "items" .!= mempty))++instance ToJSON TeamListResponse where+ toJSON TeamListResponse{..}+ = object+ (catMaybes+ [Just ("kind" .= _tlrKind),+ ("items" .=) <$> _tlrItems])++-- | Collection of custom field definitions for a team.+--+-- /See:/ 'customFieldDefListResponse' smart constructor.+data CustomFieldDefListResponse = CustomFieldDefListResponse+ { _cfdlrKind :: !Text+ , _cfdlrItems :: !(Maybe [CustomFieldDef])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomFieldDefListResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cfdlrKind'+--+-- * 'cfdlrItems'+customFieldDefListResponse+ :: CustomFieldDefListResponse+customFieldDefListResponse =+ CustomFieldDefListResponse+ { _cfdlrKind = "coordinate#customFieldDefList"+ , _cfdlrItems = Nothing+ }++-- | Identifies this object as a collection of custom field definitions in a+-- team.+cfdlrKind :: Lens' CustomFieldDefListResponse Text+cfdlrKind+ = lens _cfdlrKind (\ s a -> s{_cfdlrKind = a})++-- | Collection of custom field definitions in a team.+cfdlrItems :: Lens' CustomFieldDefListResponse [CustomFieldDef]+cfdlrItems+ = lens _cfdlrItems (\ s a -> s{_cfdlrItems = a}) .+ _Default+ . _Coerce++instance FromJSON CustomFieldDefListResponse where+ parseJSON+ = withObject "CustomFieldDefListResponse"+ (\ o ->+ CustomFieldDefListResponse <$>+ (o .:? "kind" .!= "coordinate#customFieldDefList")+ <*> (o .:? "items" .!= mempty))++instance ToJSON CustomFieldDefListResponse where+ toJSON CustomFieldDefListResponse{..}+ = object+ (catMaybes+ [Just ("kind" .= _cfdlrKind),+ ("items" .=) <$> _cfdlrItems])++-- | A job.+--+-- /See:/ 'job' smart constructor.+data Job = Job+ { _jState :: !(Maybe JobState)+ , _jKind :: !Text+ , _jJobChange :: !(Maybe [JobChange])+ , _jId :: !(Maybe (Textual Word64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Job' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jState'+--+-- * 'jKind'+--+-- * 'jJobChange'+--+-- * 'jId'+job+ :: Job+job =+ Job+ { _jState = Nothing+ , _jKind = "coordinate#job"+ , _jJobChange = Nothing+ , _jId = Nothing+ }++-- | Current job state.+jState :: Lens' Job (Maybe JobState)+jState = lens _jState (\ s a -> s{_jState = a})++-- | Identifies this object as a job.+jKind :: Lens' Job Text+jKind = lens _jKind (\ s a -> s{_jKind = a})++-- | List of job changes since it was created. The first change corresponds+-- to the state of the job when it was created.+jJobChange :: Lens' Job [JobChange]+jJobChange+ = lens _jJobChange (\ s a -> s{_jJobChange = a}) .+ _Default+ . _Coerce++-- | Job id.+jId :: Lens' Job (Maybe Word64)+jId+ = lens _jId (\ s a -> s{_jId = a}) . mapping _Coerce++instance FromJSON Job where+ parseJSON+ = withObject "Job"+ (\ o ->+ Job <$>+ (o .:? "state") <*>+ (o .:? "kind" .!= "coordinate#job")+ <*> (o .:? "jobChange" .!= mempty)+ <*> (o .:? "id"))++instance ToJSON Job where+ toJSON Job{..}+ = object+ (catMaybes+ [("state" .=) <$> _jState, Just ("kind" .= _jKind),+ ("jobChange" .=) <$> _jJobChange,+ ("id" .=) <$> _jId])++-- | Collection of custom fields.+--+-- /See:/ 'customFields' smart constructor.+data CustomFields = CustomFields+ { _cfKind :: !Text+ , _cfCustomField :: !(Maybe [CustomField])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomFields' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cfKind'+--+-- * 'cfCustomField'+customFields+ :: CustomFields+customFields =+ CustomFields+ { _cfKind = "coordinate#customFields"+ , _cfCustomField = Nothing+ }++-- | Identifies this object as a collection of custom fields.+cfKind :: Lens' CustomFields Text+cfKind = lens _cfKind (\ s a -> s{_cfKind = a})++-- | Collection of custom fields.+cfCustomField :: Lens' CustomFields [CustomField]+cfCustomField+ = lens _cfCustomField+ (\ s a -> s{_cfCustomField = a})+ . _Default+ . _Coerce++instance FromJSON CustomFields where+ parseJSON+ = withObject "CustomFields"+ (\ o ->+ CustomFields <$>+ (o .:? "kind" .!= "coordinate#customFields") <*>+ (o .:? "customField" .!= mempty))++instance ToJSON CustomFields where+ toJSON CustomFields{..}+ = object+ (catMaybes+ [Just ("kind" .= _cfKind),+ ("customField" .=) <$> _cfCustomField])++-- | A Coordinate team.+--+-- /See:/ 'team' smart constructor.+data Team = Team+ { _tKind :: !Text+ , _tName :: !(Maybe Text)+ , _tId :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Team' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tKind'+--+-- * 'tName'+--+-- * 'tId'+team+ :: Team+team =+ Team+ { _tKind = "coordinate#team"+ , _tName = Nothing+ , _tId = Nothing+ }++-- | Identifies this object as a team.+tKind :: Lens' Team Text+tKind = lens _tKind (\ s a -> s{_tKind = a})++-- | Team name+tName :: Lens' Team (Maybe Text)+tName = lens _tName (\ s a -> s{_tName = a})++-- | Team id, as found in a coordinate team url e.g.+-- https:\/\/coordinate.google.com\/f\/xyz where \"xyz\" is the team id.+tId :: Lens' Team (Maybe Text)+tId = lens _tId (\ s a -> s{_tId = a})++instance FromJSON Team where+ parseJSON+ = withObject "Team"+ (\ o ->+ Team <$>+ (o .:? "kind" .!= "coordinate#team") <*>+ (o .:? "name")+ <*> (o .:? "id"))++instance ToJSON Team where+ toJSON Team{..}+ = object+ (catMaybes+ [Just ("kind" .= _tKind), ("name" .=) <$> _tName,+ ("id" .=) <$> _tId])++-- | Recorded location of a worker.+--+-- /See:/ 'locationRecord' smart constructor.+data LocationRecord = LocationRecord+ { _lrKind :: !Text+ , _lrLatitude :: !(Maybe (Textual Double))+ , _lrConfidenceRadius :: !(Maybe (Textual Double))+ , _lrLongitude :: !(Maybe (Textual Double))+ , _lrCollectionTime :: !(Maybe (Textual Int64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'LocationRecord' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrKind'+--+-- * 'lrLatitude'+--+-- * 'lrConfidenceRadius'+--+-- * 'lrLongitude'+--+-- * 'lrCollectionTime'+locationRecord+ :: LocationRecord+locationRecord =+ LocationRecord+ { _lrKind = "coordinate#locationRecord"+ , _lrLatitude = Nothing+ , _lrConfidenceRadius = Nothing+ , _lrLongitude = Nothing+ , _lrCollectionTime = Nothing+ }++-- | Identifies this object as a location.+lrKind :: Lens' LocationRecord Text+lrKind = lens _lrKind (\ s a -> s{_lrKind = a})++-- | Latitude.+lrLatitude :: Lens' LocationRecord (Maybe Double)+lrLatitude+ = lens _lrLatitude (\ s a -> s{_lrLatitude = a}) .+ mapping _Coerce++-- | The location accuracy in meters. This is the radius of a 95% confidence+-- interval around the location measurement.+lrConfidenceRadius :: Lens' LocationRecord (Maybe Double)+lrConfidenceRadius+ = lens _lrConfidenceRadius+ (\ s a -> s{_lrConfidenceRadius = a})+ . mapping _Coerce++-- | Longitude.+lrLongitude :: Lens' LocationRecord (Maybe Double)+lrLongitude+ = lens _lrLongitude (\ s a -> s{_lrLongitude = a}) .+ mapping _Coerce++-- | The collection time in milliseconds since the epoch.+lrCollectionTime :: Lens' LocationRecord (Maybe Int64)+lrCollectionTime+ = lens _lrCollectionTime+ (\ s a -> s{_lrCollectionTime = a})+ . mapping _Coerce++instance FromJSON LocationRecord where+ parseJSON+ = withObject "LocationRecord"+ (\ o ->+ LocationRecord <$>+ (o .:? "kind" .!= "coordinate#locationRecord") <*>+ (o .:? "latitude")+ <*> (o .:? "confidenceRadius")+ <*> (o .:? "longitude")+ <*> (o .:? "collectionTime"))++instance ToJSON LocationRecord where+ toJSON LocationRecord{..}+ = object+ (catMaybes+ [Just ("kind" .= _lrKind),+ ("latitude" .=) <$> _lrLatitude,+ ("confidenceRadius" .=) <$> _lrConfidenceRadius,+ ("longitude" .=) <$> _lrLongitude,+ ("collectionTime" .=) <$> _lrCollectionTime])++-- | A worker in a Coordinate team.+--+-- /See:/ 'worker' smart constructor.+data Worker = Worker+ { _wKind :: !Text+ , _wId :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'Worker' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'wKind'+--+-- * 'wId'+worker+ :: Worker+worker =+ Worker+ { _wKind = "coordinate#worker"+ , _wId = Nothing+ }++-- | Identifies this object as a worker.+wKind :: Lens' Worker Text+wKind = lens _wKind (\ s a -> s{_wKind = a})++-- | Worker email address. If a worker has been deleted from your team, the+-- email address will appear as DELETED_USER.+wId :: Lens' Worker (Maybe Text)+wId = lens _wId (\ s a -> s{_wId = a})++instance FromJSON Worker where+ parseJSON+ = withObject "Worker"+ (\ o ->+ Worker <$>+ (o .:? "kind" .!= "coordinate#worker") <*>+ (o .:? "id"))++instance ToJSON Worker where+ toJSON Worker{..}+ = object+ (catMaybes+ [Just ("kind" .= _wKind), ("id" .=) <$> _wId])++-- | Custom field.+--+-- /See:/ 'customField' smart constructor.+data CustomField = CustomField+ { _cCustomFieldId :: !(Maybe (Textual Int64))+ , _cKind :: !Text+ , _cValue :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomField' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cCustomFieldId'+--+-- * 'cKind'+--+-- * 'cValue'+customField+ :: CustomField+customField =+ CustomField+ { _cCustomFieldId = Nothing+ , _cKind = "coordinate#customField"+ , _cValue = Nothing+ }++-- | Custom field id.+cCustomFieldId :: Lens' CustomField (Maybe Int64)+cCustomFieldId+ = lens _cCustomFieldId+ (\ s a -> s{_cCustomFieldId = a})+ . mapping _Coerce++-- | Identifies this object as a custom field.+cKind :: Lens' CustomField Text+cKind = lens _cKind (\ s a -> s{_cKind = a})++-- | Custom field value.+cValue :: Lens' CustomField (Maybe Text)+cValue = lens _cValue (\ s a -> s{_cValue = a})++instance FromJSON CustomField where+ parseJSON+ = withObject "CustomField"+ (\ o ->+ CustomField <$>+ (o .:? "customFieldId") <*>+ (o .:? "kind" .!= "coordinate#customField")+ <*> (o .:? "value"))++instance ToJSON CustomField where+ toJSON CustomField{..}+ = object+ (catMaybes+ [("customFieldId" .=) <$> _cCustomFieldId,+ Just ("kind" .= _cKind), ("value" .=) <$> _cValue])++-- | Enum Item definition.+--+-- /See:/ 'enumItemDef' smart constructor.+data EnumItemDef = EnumItemDef+ { _eidKind :: !Text+ , _eidValue :: !(Maybe Text)+ , _eidActive :: !(Maybe Bool)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'EnumItemDef' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eidKind'+--+-- * 'eidValue'+--+-- * 'eidActive'+enumItemDef+ :: EnumItemDef+enumItemDef =+ EnumItemDef+ { _eidKind = "coordinate#enumItemDef"+ , _eidValue = Nothing+ , _eidActive = Nothing+ }++-- | Identifies this object as an enum item definition.+eidKind :: Lens' EnumItemDef Text+eidKind = lens _eidKind (\ s a -> s{_eidKind = a})++-- | Custom field value.+eidValue :: Lens' EnumItemDef (Maybe Text)+eidValue = lens _eidValue (\ s a -> s{_eidValue = a})++-- | Whether the enum item is active. Jobs may contain inactive enum values;+-- however, setting an enum to an inactive value when creating or updating+-- a job will result in a 500 error.+eidActive :: Lens' EnumItemDef (Maybe Bool)+eidActive+ = lens _eidActive (\ s a -> s{_eidActive = a})++instance FromJSON EnumItemDef where+ parseJSON+ = withObject "EnumItemDef"+ (\ o ->+ EnumItemDef <$>+ (o .:? "kind" .!= "coordinate#enumItemDef") <*>+ (o .:? "value")+ <*> (o .:? "active"))++instance ToJSON EnumItemDef where+ toJSON EnumItemDef{..}+ = object+ (catMaybes+ [Just ("kind" .= _eidKind),+ ("value" .=) <$> _eidValue,+ ("active" .=) <$> _eidActive])
+ gen/Network/Google/MapsCoordinate/Types/Sum.hs view
@@ -0,0 +1,107 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.MapsCoordinate.Types.Sum+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.Google.MapsCoordinate.Types.Sum where++import Network.Google.Prelude++-- | Job progress+data JobsPatchProgress+ = Completed+ -- ^ @COMPLETED@+ -- Completed+ | InProgress+ -- ^ @IN_PROGRESS@+ -- In progress+ | NotAccepted+ -- ^ @NOT_ACCEPTED@+ -- Not accepted+ | NotStarted+ -- ^ @NOT_STARTED@+ -- Not started+ | Obsolete+ -- ^ @OBSOLETE@+ -- Obsolete+ deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)++instance Hashable JobsPatchProgress++instance FromText JobsPatchProgress where+ fromText = \case+ "COMPLETED" -> Just Completed+ "IN_PROGRESS" -> Just InProgress+ "NOT_ACCEPTED" -> Just NotAccepted+ "NOT_STARTED" -> Just NotStarted+ "OBSOLETE" -> Just Obsolete+ _ -> Nothing++instance ToText JobsPatchProgress where+ toText = \case+ Completed -> "COMPLETED"+ InProgress -> "IN_PROGRESS"+ NotAccepted -> "NOT_ACCEPTED"+ NotStarted -> "NOT_STARTED"+ Obsolete -> "OBSOLETE"++instance FromJSON JobsPatchProgress where+ parseJSON = parseJSONText "JobsPatchProgress"++instance ToJSON JobsPatchProgress where+ toJSON = toJSONText++-- | Job progress+data JobsUpdateProgress+ = JUPCompleted+ -- ^ @COMPLETED@+ -- Completed+ | JUPInProgress+ -- ^ @IN_PROGRESS@+ -- In progress+ | JUPNotAccepted+ -- ^ @NOT_ACCEPTED@+ -- Not accepted+ | JUPNotStarted+ -- ^ @NOT_STARTED@+ -- Not started+ | JUPObsolete+ -- ^ @OBSOLETE@+ -- Obsolete+ deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)++instance Hashable JobsUpdateProgress++instance FromText JobsUpdateProgress where+ fromText = \case+ "COMPLETED" -> Just JUPCompleted+ "IN_PROGRESS" -> Just JUPInProgress+ "NOT_ACCEPTED" -> Just JUPNotAccepted+ "NOT_STARTED" -> Just JUPNotStarted+ "OBSOLETE" -> Just JUPObsolete+ _ -> Nothing++instance ToText JobsUpdateProgress where+ toText = \case+ JUPCompleted -> "COMPLETED"+ JUPInProgress -> "IN_PROGRESS"+ JUPNotAccepted -> "NOT_ACCEPTED"+ JUPNotStarted -> "NOT_STARTED"+ JUPObsolete -> "OBSOLETE"++instance FromJSON JobsUpdateProgress where+ parseJSON = parseJSONText "JobsUpdateProgress"++instance ToJSON JobsUpdateProgress where+ toJSON = toJSONText
+ gen/Network/Google/Resource/Coordinate/CustomFieldDef/List.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.CustomFieldDef.List+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a list of custom field definitions for a team.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.customFieldDef.list@.+module Network.Google.Resource.Coordinate.CustomFieldDef.List+ (+ -- * REST Resource+ CustomFieldDefListResource++ -- * Creating a Request+ , customFieldDefList+ , CustomFieldDefList++ -- * Request Lenses+ , cfdlTeamId+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.customFieldDef.list@ method which the+-- 'CustomFieldDefList' request conforms to.+type CustomFieldDefListResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "custom_fields" :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] CustomFieldDefListResponse++-- | Retrieves a list of custom field definitions for a team.+--+-- /See:/ 'customFieldDefList' smart constructor.+newtype CustomFieldDefList = CustomFieldDefList+ { _cfdlTeamId :: Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'CustomFieldDefList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cfdlTeamId'+customFieldDefList+ :: Text -- ^ 'cfdlTeamId'+ -> CustomFieldDefList+customFieldDefList pCfdlTeamId_ =+ CustomFieldDefList+ { _cfdlTeamId = pCfdlTeamId_+ }++-- | Team ID+cfdlTeamId :: Lens' CustomFieldDefList Text+cfdlTeamId+ = lens _cfdlTeamId (\ s a -> s{_cfdlTeamId = a})++instance GoogleRequest CustomFieldDefList where+ type Rs CustomFieldDefList =+ CustomFieldDefListResponse+ requestClient CustomFieldDefList{..}+ = go _cfdlTeamId (Just AltJSON) mapsCoordinateService+ where go+ = buildClient+ (Proxy :: Proxy CustomFieldDefListResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Jobs/Get.hs view
@@ -0,0 +1,94 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Jobs.Get+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a job, including all the changes made to the job.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.jobs.get@.+module Network.Google.Resource.Coordinate.Jobs.Get+ (+ -- * REST Resource+ JobsGetResource++ -- * Creating a Request+ , jobsGet+ , JobsGet++ -- * Request Lenses+ , jgJobId+ , jgTeamId+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.jobs.get@ method which the+-- 'JobsGet' request conforms to.+type JobsGetResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ Capture "jobId" (Textual Word64) :>+ QueryParam "alt" AltJSON :> Get '[JSON] Job++-- | Retrieves a job, including all the changes made to the job.+--+-- /See:/ 'jobsGet' smart constructor.+data JobsGet = JobsGet+ { _jgJobId :: !(Textual Word64)+ , _jgTeamId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobsGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jgJobId'+--+-- * 'jgTeamId'+jobsGet+ :: Word64 -- ^ 'jgJobId'+ -> Text -- ^ 'jgTeamId'+ -> JobsGet+jobsGet pJgJobId_ pJgTeamId_ =+ JobsGet+ { _jgJobId = _Coerce # pJgJobId_+ , _jgTeamId = pJgTeamId_+ }++-- | Job number+jgJobId :: Lens' JobsGet Word64+jgJobId+ = lens _jgJobId (\ s a -> s{_jgJobId = a}) . _Coerce++-- | Team ID+jgTeamId :: Lens' JobsGet Text+jgTeamId = lens _jgTeamId (\ s a -> s{_jgTeamId = a})++instance GoogleRequest JobsGet where+ type Rs JobsGet = Job+ requestClient JobsGet{..}+ = go _jgTeamId _jgJobId (Just AltJSON)+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy JobsGetResource) mempty
+ gen/Network/Google/Resource/Coordinate/Jobs/Insert.hs view
@@ -0,0 +1,215 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Jobs.Insert+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Inserts a new job. Only the state field of the job should be set.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.jobs.insert@.+module Network.Google.Resource.Coordinate.Jobs.Insert+ (+ -- * REST Resource+ JobsInsertResource++ -- * Creating a Request+ , jobsInsert+ , JobsInsert++ -- * Request Lenses+ , jiNote+ , jiTeamId+ , jiCustomerPhoneNumber+ , jiCustomerName+ , jiAddress+ , jiPayload+ , jiAssignee+ , jiLat+ , jiLng+ , jiTitle+ , jiCustomField+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.jobs.insert@ method which the+-- 'JobsInsert' request conforms to.+type JobsInsertResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ QueryParam "address" Text :>+ QueryParam "lat" (Textual Double) :>+ QueryParam "lng" (Textual Double) :>+ QueryParam "title" Text :>+ QueryParam "note" Text :>+ QueryParam "customerPhoneNumber" Text :>+ QueryParam "customerName" Text :>+ QueryParam "assignee" Text :>+ QueryParams "customField" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Job :> Post '[JSON] Job++-- | Inserts a new job. Only the state field of the job should be set.+--+-- /See:/ 'jobsInsert' smart constructor.+data JobsInsert = JobsInsert+ { _jiNote :: !(Maybe Text)+ , _jiTeamId :: !Text+ , _jiCustomerPhoneNumber :: !(Maybe Text)+ , _jiCustomerName :: !(Maybe Text)+ , _jiAddress :: !Text+ , _jiPayload :: !Job+ , _jiAssignee :: !(Maybe Text)+ , _jiLat :: !(Textual Double)+ , _jiLng :: !(Textual Double)+ , _jiTitle :: !Text+ , _jiCustomField :: !(Maybe [Text])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobsInsert' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jiNote'+--+-- * 'jiTeamId'+--+-- * 'jiCustomerPhoneNumber'+--+-- * 'jiCustomerName'+--+-- * 'jiAddress'+--+-- * 'jiPayload'+--+-- * 'jiAssignee'+--+-- * 'jiLat'+--+-- * 'jiLng'+--+-- * 'jiTitle'+--+-- * 'jiCustomField'+jobsInsert+ :: Text -- ^ 'jiTeamId'+ -> Text -- ^ 'jiAddress'+ -> Job -- ^ 'jiPayload'+ -> Double -- ^ 'jiLat'+ -> Double -- ^ 'jiLng'+ -> Text -- ^ 'jiTitle'+ -> JobsInsert+jobsInsert pJiTeamId_ pJiAddress_ pJiPayload_ pJiLat_ pJiLng_ pJiTitle_ =+ JobsInsert+ { _jiNote = Nothing+ , _jiTeamId = pJiTeamId_+ , _jiCustomerPhoneNumber = Nothing+ , _jiCustomerName = Nothing+ , _jiAddress = pJiAddress_+ , _jiPayload = pJiPayload_+ , _jiAssignee = Nothing+ , _jiLat = _Coerce # pJiLat_+ , _jiLng = _Coerce # pJiLng_+ , _jiTitle = pJiTitle_+ , _jiCustomField = Nothing+ }++-- | Job note as newline (Unix) separated string+jiNote :: Lens' JobsInsert (Maybe Text)+jiNote = lens _jiNote (\ s a -> s{_jiNote = a})++-- | Team ID+jiTeamId :: Lens' JobsInsert Text+jiTeamId = lens _jiTeamId (\ s a -> s{_jiTeamId = a})++-- | Customer phone number+jiCustomerPhoneNumber :: Lens' JobsInsert (Maybe Text)+jiCustomerPhoneNumber+ = lens _jiCustomerPhoneNumber+ (\ s a -> s{_jiCustomerPhoneNumber = a})++-- | Customer name+jiCustomerName :: Lens' JobsInsert (Maybe Text)+jiCustomerName+ = lens _jiCustomerName+ (\ s a -> s{_jiCustomerName = a})++-- | Job address as newline (Unix) separated string+jiAddress :: Lens' JobsInsert Text+jiAddress+ = lens _jiAddress (\ s a -> s{_jiAddress = a})++-- | Multipart request metadata.+jiPayload :: Lens' JobsInsert Job+jiPayload+ = lens _jiPayload (\ s a -> s{_jiPayload = a})++-- | Assignee email address, or empty string to unassign.+jiAssignee :: Lens' JobsInsert (Maybe Text)+jiAssignee+ = lens _jiAssignee (\ s a -> s{_jiAssignee = a})++-- | The latitude coordinate of this job\'s location.+jiLat :: Lens' JobsInsert Double+jiLat+ = lens _jiLat (\ s a -> s{_jiLat = a}) . _Coerce++-- | The longitude coordinate of this job\'s location.+jiLng :: Lens' JobsInsert Double+jiLng+ = lens _jiLng (\ s a -> s{_jiLng = a}) . _Coerce++-- | Job title+jiTitle :: Lens' JobsInsert Text+jiTitle = lens _jiTitle (\ s a -> s{_jiTitle = a})++-- | Sets the value of custom fields. To set a custom field, pass the field+-- id (from \/team\/teamId\/custom_fields), a URL escaped \'=\' character,+-- and the desired value as a parameter. For example,+-- customField=12%3DAlice. Repeat the parameter for each custom field. Note+-- that \'=\' cannot appear in the parameter value. Specifying an invalid,+-- or inactive enum field will result in an error 500.+jiCustomField :: Lens' JobsInsert [Text]+jiCustomField+ = lens _jiCustomField+ (\ s a -> s{_jiCustomField = a})+ . _Default+ . _Coerce++instance GoogleRequest JobsInsert where+ type Rs JobsInsert = Job+ requestClient JobsInsert{..}+ = go _jiTeamId (Just _jiAddress) (Just _jiLat)+ (Just _jiLng)+ (Just _jiTitle)+ _jiNote+ _jiCustomerPhoneNumber+ _jiCustomerName+ _jiAssignee+ (_jiCustomField ^. _Default)+ (Just AltJSON)+ _jiPayload+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy JobsInsertResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Jobs/List.hs view
@@ -0,0 +1,137 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Jobs.List+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves jobs created or modified since the given timestamp.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.jobs.list@.+module Network.Google.Resource.Coordinate.Jobs.List+ (+ -- * REST Resource+ JobsListResource++ -- * Creating a Request+ , jobsList+ , JobsList++ -- * Request Lenses+ , jlTeamId+ , jlMinModifiedTimestampMs+ , jlOmitJobChanges+ , jlPageToken+ , jlMaxResults+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.jobs.list@ method which the+-- 'JobsList' request conforms to.+type JobsListResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ QueryParam "minModifiedTimestampMs" (Textual Word64)+ :>+ QueryParam "omitJobChanges" Bool :>+ QueryParam "pageToken" Text :>+ QueryParam "maxResults" (Textual Word32) :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] JobListResponse++-- | Retrieves jobs created or modified since the given timestamp.+--+-- /See:/ 'jobsList' smart constructor.+data JobsList = JobsList+ { _jlTeamId :: !Text+ , _jlMinModifiedTimestampMs :: !(Maybe (Textual Word64))+ , _jlOmitJobChanges :: !(Maybe Bool)+ , _jlPageToken :: !(Maybe Text)+ , _jlMaxResults :: !(Maybe (Textual Word32))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobsList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jlTeamId'+--+-- * 'jlMinModifiedTimestampMs'+--+-- * 'jlOmitJobChanges'+--+-- * 'jlPageToken'+--+-- * 'jlMaxResults'+jobsList+ :: Text -- ^ 'jlTeamId'+ -> JobsList+jobsList pJlTeamId_ =+ JobsList+ { _jlTeamId = pJlTeamId_+ , _jlMinModifiedTimestampMs = Nothing+ , _jlOmitJobChanges = Nothing+ , _jlPageToken = Nothing+ , _jlMaxResults = Nothing+ }++-- | Team ID+jlTeamId :: Lens' JobsList Text+jlTeamId = lens _jlTeamId (\ s a -> s{_jlTeamId = a})++-- | Minimum time a job was modified in milliseconds since epoch.+jlMinModifiedTimestampMs :: Lens' JobsList (Maybe Word64)+jlMinModifiedTimestampMs+ = lens _jlMinModifiedTimestampMs+ (\ s a -> s{_jlMinModifiedTimestampMs = a})+ . mapping _Coerce++-- | Whether to omit detail job history information.+jlOmitJobChanges :: Lens' JobsList (Maybe Bool)+jlOmitJobChanges+ = lens _jlOmitJobChanges+ (\ s a -> s{_jlOmitJobChanges = a})++-- | Continuation token+jlPageToken :: Lens' JobsList (Maybe Text)+jlPageToken+ = lens _jlPageToken (\ s a -> s{_jlPageToken = a})++-- | Maximum number of results to return in one page.+jlMaxResults :: Lens' JobsList (Maybe Word32)+jlMaxResults+ = lens _jlMaxResults (\ s a -> s{_jlMaxResults = a})+ . mapping _Coerce++instance GoogleRequest JobsList where+ type Rs JobsList = JobListResponse+ requestClient JobsList{..}+ = go _jlTeamId _jlMinModifiedTimestampMs+ _jlOmitJobChanges+ _jlPageToken+ _jlMaxResults+ (Just AltJSON)+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy JobsListResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Jobs/Patch.hs view
@@ -0,0 +1,239 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Jobs.Patch+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a job. Fields that are set in the job state will be updated.+-- This method supports patch semantics.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.jobs.patch@.+module Network.Google.Resource.Coordinate.Jobs.Patch+ (+ -- * REST Resource+ JobsPatchResource++ -- * Creating a Request+ , jobsPatch+ , JobsPatch++ -- * Request Lenses+ , jpJobId+ , jpProgress+ , jpNote+ , jpTeamId+ , jpCustomerPhoneNumber+ , jpCustomerName+ , jpAddress+ , jpPayload+ , jpAssignee+ , jpLat+ , jpLng+ , jpTitle+ , jpCustomField+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.jobs.patch@ method which the+-- 'JobsPatch' request conforms to.+type JobsPatchResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ Capture "jobId" (Textual Word64) :>+ QueryParam "progress" JobsPatchProgress :>+ QueryParam "note" Text :>+ QueryParam "customerPhoneNumber" Text :>+ QueryParam "customerName" Text :>+ QueryParam "address" Text :>+ QueryParam "assignee" Text :>+ QueryParam "lat" (Textual Double) :>+ QueryParam "lng" (Textual Double) :>+ QueryParam "title" Text :>+ QueryParams "customField" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Job :> Patch '[JSON] Job++-- | Updates a job. Fields that are set in the job state will be updated.+-- This method supports patch semantics.+--+-- /See:/ 'jobsPatch' smart constructor.+data JobsPatch = JobsPatch+ { _jpJobId :: !(Textual Word64)+ , _jpProgress :: !(Maybe JobsPatchProgress)+ , _jpNote :: !(Maybe Text)+ , _jpTeamId :: !Text+ , _jpCustomerPhoneNumber :: !(Maybe Text)+ , _jpCustomerName :: !(Maybe Text)+ , _jpAddress :: !(Maybe Text)+ , _jpPayload :: !Job+ , _jpAssignee :: !(Maybe Text)+ , _jpLat :: !(Maybe (Textual Double))+ , _jpLng :: !(Maybe (Textual Double))+ , _jpTitle :: !(Maybe Text)+ , _jpCustomField :: !(Maybe [Text])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobsPatch' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jpJobId'+--+-- * 'jpProgress'+--+-- * 'jpNote'+--+-- * 'jpTeamId'+--+-- * 'jpCustomerPhoneNumber'+--+-- * 'jpCustomerName'+--+-- * 'jpAddress'+--+-- * 'jpPayload'+--+-- * 'jpAssignee'+--+-- * 'jpLat'+--+-- * 'jpLng'+--+-- * 'jpTitle'+--+-- * 'jpCustomField'+jobsPatch+ :: Word64 -- ^ 'jpJobId'+ -> Text -- ^ 'jpTeamId'+ -> Job -- ^ 'jpPayload'+ -> JobsPatch+jobsPatch pJpJobId_ pJpTeamId_ pJpPayload_ =+ JobsPatch+ { _jpJobId = _Coerce # pJpJobId_+ , _jpProgress = Nothing+ , _jpNote = Nothing+ , _jpTeamId = pJpTeamId_+ , _jpCustomerPhoneNumber = Nothing+ , _jpCustomerName = Nothing+ , _jpAddress = Nothing+ , _jpPayload = pJpPayload_+ , _jpAssignee = Nothing+ , _jpLat = Nothing+ , _jpLng = Nothing+ , _jpTitle = Nothing+ , _jpCustomField = Nothing+ }++-- | Job number+jpJobId :: Lens' JobsPatch Word64+jpJobId+ = lens _jpJobId (\ s a -> s{_jpJobId = a}) . _Coerce++-- | Job progress+jpProgress :: Lens' JobsPatch (Maybe JobsPatchProgress)+jpProgress+ = lens _jpProgress (\ s a -> s{_jpProgress = a})++-- | Job note as newline (Unix) separated string+jpNote :: Lens' JobsPatch (Maybe Text)+jpNote = lens _jpNote (\ s a -> s{_jpNote = a})++-- | Team ID+jpTeamId :: Lens' JobsPatch Text+jpTeamId = lens _jpTeamId (\ s a -> s{_jpTeamId = a})++-- | Customer phone number+jpCustomerPhoneNumber :: Lens' JobsPatch (Maybe Text)+jpCustomerPhoneNumber+ = lens _jpCustomerPhoneNumber+ (\ s a -> s{_jpCustomerPhoneNumber = a})++-- | Customer name+jpCustomerName :: Lens' JobsPatch (Maybe Text)+jpCustomerName+ = lens _jpCustomerName+ (\ s a -> s{_jpCustomerName = a})++-- | Job address as newline (Unix) separated string+jpAddress :: Lens' JobsPatch (Maybe Text)+jpAddress+ = lens _jpAddress (\ s a -> s{_jpAddress = a})++-- | Multipart request metadata.+jpPayload :: Lens' JobsPatch Job+jpPayload+ = lens _jpPayload (\ s a -> s{_jpPayload = a})++-- | Assignee email address, or empty string to unassign.+jpAssignee :: Lens' JobsPatch (Maybe Text)+jpAssignee+ = lens _jpAssignee (\ s a -> s{_jpAssignee = a})++-- | The latitude coordinate of this job\'s location.+jpLat :: Lens' JobsPatch (Maybe Double)+jpLat+ = lens _jpLat (\ s a -> s{_jpLat = a}) .+ mapping _Coerce++-- | The longitude coordinate of this job\'s location.+jpLng :: Lens' JobsPatch (Maybe Double)+jpLng+ = lens _jpLng (\ s a -> s{_jpLng = a}) .+ mapping _Coerce++-- | Job title+jpTitle :: Lens' JobsPatch (Maybe Text)+jpTitle = lens _jpTitle (\ s a -> s{_jpTitle = a})++-- | Sets the value of custom fields. To set a custom field, pass the field+-- id (from \/team\/teamId\/custom_fields), a URL escaped \'=\' character,+-- and the desired value as a parameter. For example,+-- customField=12%3DAlice. Repeat the parameter for each custom field. Note+-- that \'=\' cannot appear in the parameter value. Specifying an invalid,+-- or inactive enum field will result in an error 500.+jpCustomField :: Lens' JobsPatch [Text]+jpCustomField+ = lens _jpCustomField+ (\ s a -> s{_jpCustomField = a})+ . _Default+ . _Coerce++instance GoogleRequest JobsPatch where+ type Rs JobsPatch = Job+ requestClient JobsPatch{..}+ = go _jpTeamId _jpJobId _jpProgress _jpNote+ _jpCustomerPhoneNumber+ _jpCustomerName+ _jpAddress+ _jpAssignee+ _jpLat+ _jpLng+ _jpTitle+ (_jpCustomField ^. _Default)+ (Just AltJSON)+ _jpPayload+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy JobsPatchResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Jobs/Update.hs view
@@ -0,0 +1,237 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Jobs.Update+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a job. Fields that are set in the job state will be updated.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.jobs.update@.+module Network.Google.Resource.Coordinate.Jobs.Update+ (+ -- * REST Resource+ JobsUpdateResource++ -- * Creating a Request+ , jobsUpdate+ , JobsUpdate++ -- * Request Lenses+ , juJobId+ , juProgress+ , juNote+ , juTeamId+ , juCustomerPhoneNumber+ , juCustomerName+ , juAddress+ , juPayload+ , juAssignee+ , juLat+ , juLng+ , juTitle+ , juCustomField+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.jobs.update@ method which the+-- 'JobsUpdate' request conforms to.+type JobsUpdateResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ Capture "jobId" (Textual Word64) :>+ QueryParam "progress" JobsUpdateProgress :>+ QueryParam "note" Text :>+ QueryParam "customerPhoneNumber" Text :>+ QueryParam "customerName" Text :>+ QueryParam "address" Text :>+ QueryParam "assignee" Text :>+ QueryParam "lat" (Textual Double) :>+ QueryParam "lng" (Textual Double) :>+ QueryParam "title" Text :>+ QueryParams "customField" Text :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Job :> Put '[JSON] Job++-- | Updates a job. Fields that are set in the job state will be updated.+--+-- /See:/ 'jobsUpdate' smart constructor.+data JobsUpdate = JobsUpdate+ { _juJobId :: !(Textual Word64)+ , _juProgress :: !(Maybe JobsUpdateProgress)+ , _juNote :: !(Maybe Text)+ , _juTeamId :: !Text+ , _juCustomerPhoneNumber :: !(Maybe Text)+ , _juCustomerName :: !(Maybe Text)+ , _juAddress :: !(Maybe Text)+ , _juPayload :: !Job+ , _juAssignee :: !(Maybe Text)+ , _juLat :: !(Maybe (Textual Double))+ , _juLng :: !(Maybe (Textual Double))+ , _juTitle :: !(Maybe Text)+ , _juCustomField :: !(Maybe [Text])+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'JobsUpdate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'juJobId'+--+-- * 'juProgress'+--+-- * 'juNote'+--+-- * 'juTeamId'+--+-- * 'juCustomerPhoneNumber'+--+-- * 'juCustomerName'+--+-- * 'juAddress'+--+-- * 'juPayload'+--+-- * 'juAssignee'+--+-- * 'juLat'+--+-- * 'juLng'+--+-- * 'juTitle'+--+-- * 'juCustomField'+jobsUpdate+ :: Word64 -- ^ 'juJobId'+ -> Text -- ^ 'juTeamId'+ -> Job -- ^ 'juPayload'+ -> JobsUpdate+jobsUpdate pJuJobId_ pJuTeamId_ pJuPayload_ =+ JobsUpdate+ { _juJobId = _Coerce # pJuJobId_+ , _juProgress = Nothing+ , _juNote = Nothing+ , _juTeamId = pJuTeamId_+ , _juCustomerPhoneNumber = Nothing+ , _juCustomerName = Nothing+ , _juAddress = Nothing+ , _juPayload = pJuPayload_+ , _juAssignee = Nothing+ , _juLat = Nothing+ , _juLng = Nothing+ , _juTitle = Nothing+ , _juCustomField = Nothing+ }++-- | Job number+juJobId :: Lens' JobsUpdate Word64+juJobId+ = lens _juJobId (\ s a -> s{_juJobId = a}) . _Coerce++-- | Job progress+juProgress :: Lens' JobsUpdate (Maybe JobsUpdateProgress)+juProgress+ = lens _juProgress (\ s a -> s{_juProgress = a})++-- | Job note as newline (Unix) separated string+juNote :: Lens' JobsUpdate (Maybe Text)+juNote = lens _juNote (\ s a -> s{_juNote = a})++-- | Team ID+juTeamId :: Lens' JobsUpdate Text+juTeamId = lens _juTeamId (\ s a -> s{_juTeamId = a})++-- | Customer phone number+juCustomerPhoneNumber :: Lens' JobsUpdate (Maybe Text)+juCustomerPhoneNumber+ = lens _juCustomerPhoneNumber+ (\ s a -> s{_juCustomerPhoneNumber = a})++-- | Customer name+juCustomerName :: Lens' JobsUpdate (Maybe Text)+juCustomerName+ = lens _juCustomerName+ (\ s a -> s{_juCustomerName = a})++-- | Job address as newline (Unix) separated string+juAddress :: Lens' JobsUpdate (Maybe Text)+juAddress+ = lens _juAddress (\ s a -> s{_juAddress = a})++-- | Multipart request metadata.+juPayload :: Lens' JobsUpdate Job+juPayload+ = lens _juPayload (\ s a -> s{_juPayload = a})++-- | Assignee email address, or empty string to unassign.+juAssignee :: Lens' JobsUpdate (Maybe Text)+juAssignee+ = lens _juAssignee (\ s a -> s{_juAssignee = a})++-- | The latitude coordinate of this job\'s location.+juLat :: Lens' JobsUpdate (Maybe Double)+juLat+ = lens _juLat (\ s a -> s{_juLat = a}) .+ mapping _Coerce++-- | The longitude coordinate of this job\'s location.+juLng :: Lens' JobsUpdate (Maybe Double)+juLng+ = lens _juLng (\ s a -> s{_juLng = a}) .+ mapping _Coerce++-- | Job title+juTitle :: Lens' JobsUpdate (Maybe Text)+juTitle = lens _juTitle (\ s a -> s{_juTitle = a})++-- | Sets the value of custom fields. To set a custom field, pass the field+-- id (from \/team\/teamId\/custom_fields), a URL escaped \'=\' character,+-- and the desired value as a parameter. For example,+-- customField=12%3DAlice. Repeat the parameter for each custom field. Note+-- that \'=\' cannot appear in the parameter value. Specifying an invalid,+-- or inactive enum field will result in an error 500.+juCustomField :: Lens' JobsUpdate [Text]+juCustomField+ = lens _juCustomField+ (\ s a -> s{_juCustomField = a})+ . _Default+ . _Coerce++instance GoogleRequest JobsUpdate where+ type Rs JobsUpdate = Job+ requestClient JobsUpdate{..}+ = go _juTeamId _juJobId _juProgress _juNote+ _juCustomerPhoneNumber+ _juCustomerName+ _juAddress+ _juAssignee+ _juLat+ _juLng+ _juTitle+ (_juCustomField ^. _Default)+ (Just AltJSON)+ _juPayload+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy JobsUpdateResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Location/List.hs view
@@ -0,0 +1,139 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Location.List+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a list of locations for a worker.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.location.list@.+module Network.Google.Resource.Coordinate.Location.List+ (+ -- * REST Resource+ LocationListResource++ -- * Creating a Request+ , locationList+ , LocationList++ -- * Request Lenses+ , llWorkerEmail+ , llStartTimestampMs+ , llTeamId+ , llPageToken+ , llMaxResults+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.location.list@ method which the+-- 'LocationList' request conforms to.+type LocationListResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "workers" :>+ Capture "workerEmail" Text :>+ "locations" :>+ QueryParam "startTimestampMs" (Textual Word64) :>+ QueryParam "pageToken" Text :>+ QueryParam "maxResults" (Textual Word32) :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] LocationListResponse++-- | Retrieves a list of locations for a worker.+--+-- /See:/ 'locationList' smart constructor.+data LocationList = LocationList+ { _llWorkerEmail :: !Text+ , _llStartTimestampMs :: !(Textual Word64)+ , _llTeamId :: !Text+ , _llPageToken :: !(Maybe Text)+ , _llMaxResults :: !(Maybe (Textual Word32))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'LocationList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'llWorkerEmail'+--+-- * 'llStartTimestampMs'+--+-- * 'llTeamId'+--+-- * 'llPageToken'+--+-- * 'llMaxResults'+locationList+ :: Text -- ^ 'llWorkerEmail'+ -> Word64 -- ^ 'llStartTimestampMs'+ -> Text -- ^ 'llTeamId'+ -> LocationList+locationList pLlWorkerEmail_ pLlStartTimestampMs_ pLlTeamId_ =+ LocationList+ { _llWorkerEmail = pLlWorkerEmail_+ , _llStartTimestampMs = _Coerce # pLlStartTimestampMs_+ , _llTeamId = pLlTeamId_+ , _llPageToken = Nothing+ , _llMaxResults = Nothing+ }++-- | Worker email address.+llWorkerEmail :: Lens' LocationList Text+llWorkerEmail+ = lens _llWorkerEmail+ (\ s a -> s{_llWorkerEmail = a})++-- | Start timestamp in milliseconds since the epoch.+llStartTimestampMs :: Lens' LocationList Word64+llStartTimestampMs+ = lens _llStartTimestampMs+ (\ s a -> s{_llStartTimestampMs = a})+ . _Coerce++-- | Team ID+llTeamId :: Lens' LocationList Text+llTeamId = lens _llTeamId (\ s a -> s{_llTeamId = a})++-- | Continuation token+llPageToken :: Lens' LocationList (Maybe Text)+llPageToken+ = lens _llPageToken (\ s a -> s{_llPageToken = a})++-- | Maximum number of results to return in one page.+llMaxResults :: Lens' LocationList (Maybe Word32)+llMaxResults+ = lens _llMaxResults (\ s a -> s{_llMaxResults = a})+ . mapping _Coerce++instance GoogleRequest LocationList where+ type Rs LocationList = LocationListResponse+ requestClient LocationList{..}+ = go _llTeamId _llWorkerEmail+ (Just _llStartTimestampMs)+ _llPageToken+ _llMaxResults+ (Just AltJSON)+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy LocationListResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Schedule/Get.hs view
@@ -0,0 +1,96 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Schedule.Get+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the schedule for a job.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.schedule.get@.+module Network.Google.Resource.Coordinate.Schedule.Get+ (+ -- * REST Resource+ ScheduleGetResource++ -- * Creating a Request+ , scheduleGet+ , ScheduleGet++ -- * Request Lenses+ , sgJobId+ , sgTeamId+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.schedule.get@ method which the+-- 'ScheduleGet' request conforms to.+type ScheduleGetResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ Capture "jobId" (Textual Word64) :>+ "schedule" :>+ QueryParam "alt" AltJSON :> Get '[JSON] Schedule++-- | Retrieves the schedule for a job.+--+-- /See:/ 'scheduleGet' smart constructor.+data ScheduleGet = ScheduleGet+ { _sgJobId :: !(Textual Word64)+ , _sgTeamId :: !Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ScheduleGet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sgJobId'+--+-- * 'sgTeamId'+scheduleGet+ :: Word64 -- ^ 'sgJobId'+ -> Text -- ^ 'sgTeamId'+ -> ScheduleGet+scheduleGet pSgJobId_ pSgTeamId_ =+ ScheduleGet+ { _sgJobId = _Coerce # pSgJobId_+ , _sgTeamId = pSgTeamId_+ }++-- | Job number+sgJobId :: Lens' ScheduleGet Word64+sgJobId+ = lens _sgJobId (\ s a -> s{_sgJobId = a}) . _Coerce++-- | Team ID+sgTeamId :: Lens' ScheduleGet Text+sgTeamId = lens _sgTeamId (\ s a -> s{_sgTeamId = a})++instance GoogleRequest ScheduleGet where+ type Rs ScheduleGet = Schedule+ requestClient ScheduleGet{..}+ = go _sgTeamId _sgJobId (Just AltJSON)+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy ScheduleGetResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Schedule/Patch.hs view
@@ -0,0 +1,161 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Schedule.Patch+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Replaces the schedule of a job with the provided schedule. This method+-- supports patch semantics.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.schedule.patch@.+module Network.Google.Resource.Coordinate.Schedule.Patch+ (+ -- * REST Resource+ SchedulePatchResource++ -- * Creating a Request+ , schedulePatch+ , SchedulePatch++ -- * Request Lenses+ , spJobId+ , spAllDay+ , spStartTime+ , spTeamId+ , spPayload+ , spEndTime+ , spDuration+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.schedule.patch@ method which the+-- 'SchedulePatch' request conforms to.+type SchedulePatchResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ Capture "jobId" (Textual Word64) :>+ "schedule" :>+ QueryParam "allDay" Bool :>+ QueryParam "startTime" (Textual Word64) :>+ QueryParam "endTime" (Textual Word64) :>+ QueryParam "duration" (Textual Word64) :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Schedule :> Patch '[JSON] Schedule++-- | Replaces the schedule of a job with the provided schedule. This method+-- supports patch semantics.+--+-- /See:/ 'schedulePatch' smart constructor.+data SchedulePatch = SchedulePatch+ { _spJobId :: !(Textual Word64)+ , _spAllDay :: !(Maybe Bool)+ , _spStartTime :: !(Maybe (Textual Word64))+ , _spTeamId :: !Text+ , _spPayload :: !Schedule+ , _spEndTime :: !(Maybe (Textual Word64))+ , _spDuration :: !(Maybe (Textual Word64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'SchedulePatch' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'spJobId'+--+-- * 'spAllDay'+--+-- * 'spStartTime'+--+-- * 'spTeamId'+--+-- * 'spPayload'+--+-- * 'spEndTime'+--+-- * 'spDuration'+schedulePatch+ :: Word64 -- ^ 'spJobId'+ -> Text -- ^ 'spTeamId'+ -> Schedule -- ^ 'spPayload'+ -> SchedulePatch+schedulePatch pSpJobId_ pSpTeamId_ pSpPayload_ =+ SchedulePatch+ { _spJobId = _Coerce # pSpJobId_+ , _spAllDay = Nothing+ , _spStartTime = Nothing+ , _spTeamId = pSpTeamId_+ , _spPayload = pSpPayload_+ , _spEndTime = Nothing+ , _spDuration = Nothing+ }++-- | Job number+spJobId :: Lens' SchedulePatch Word64+spJobId+ = lens _spJobId (\ s a -> s{_spJobId = a}) . _Coerce++-- | Whether the job is scheduled for the whole day. Time of day in+-- start\/end times is ignored if this is true.+spAllDay :: Lens' SchedulePatch (Maybe Bool)+spAllDay = lens _spAllDay (\ s a -> s{_spAllDay = a})++-- | Scheduled start time in milliseconds since epoch.+spStartTime :: Lens' SchedulePatch (Maybe Word64)+spStartTime+ = lens _spStartTime (\ s a -> s{_spStartTime = a}) .+ mapping _Coerce++-- | Team ID+spTeamId :: Lens' SchedulePatch Text+spTeamId = lens _spTeamId (\ s a -> s{_spTeamId = a})++-- | Multipart request metadata.+spPayload :: Lens' SchedulePatch Schedule+spPayload+ = lens _spPayload (\ s a -> s{_spPayload = a})++-- | Scheduled end time in milliseconds since epoch.+spEndTime :: Lens' SchedulePatch (Maybe Word64)+spEndTime+ = lens _spEndTime (\ s a -> s{_spEndTime = a}) .+ mapping _Coerce++-- | Job duration in milliseconds.+spDuration :: Lens' SchedulePatch (Maybe Word64)+spDuration+ = lens _spDuration (\ s a -> s{_spDuration = a}) .+ mapping _Coerce++instance GoogleRequest SchedulePatch where+ type Rs SchedulePatch = Schedule+ requestClient SchedulePatch{..}+ = go _spTeamId _spJobId _spAllDay _spStartTime+ _spEndTime+ _spDuration+ (Just AltJSON)+ _spPayload+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy SchedulePatchResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Schedule/Update.hs view
@@ -0,0 +1,159 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Schedule.Update+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Replaces the schedule of a job with the provided schedule.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.schedule.update@.+module Network.Google.Resource.Coordinate.Schedule.Update+ (+ -- * REST Resource+ ScheduleUpdateResource++ -- * Creating a Request+ , scheduleUpdate+ , ScheduleUpdate++ -- * Request Lenses+ , suJobId+ , suAllDay+ , suStartTime+ , suTeamId+ , suPayload+ , suEndTime+ , suDuration+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.schedule.update@ method which the+-- 'ScheduleUpdate' request conforms to.+type ScheduleUpdateResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "jobs" :>+ Capture "jobId" (Textual Word64) :>+ "schedule" :>+ QueryParam "allDay" Bool :>+ QueryParam "startTime" (Textual Word64) :>+ QueryParam "endTime" (Textual Word64) :>+ QueryParam "duration" (Textual Word64) :>+ QueryParam "alt" AltJSON :>+ ReqBody '[JSON] Schedule :> Put '[JSON] Schedule++-- | Replaces the schedule of a job with the provided schedule.+--+-- /See:/ 'scheduleUpdate' smart constructor.+data ScheduleUpdate = ScheduleUpdate+ { _suJobId :: !(Textual Word64)+ , _suAllDay :: !(Maybe Bool)+ , _suStartTime :: !(Maybe (Textual Word64))+ , _suTeamId :: !Text+ , _suPayload :: !Schedule+ , _suEndTime :: !(Maybe (Textual Word64))+ , _suDuration :: !(Maybe (Textual Word64))+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'ScheduleUpdate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'suJobId'+--+-- * 'suAllDay'+--+-- * 'suStartTime'+--+-- * 'suTeamId'+--+-- * 'suPayload'+--+-- * 'suEndTime'+--+-- * 'suDuration'+scheduleUpdate+ :: Word64 -- ^ 'suJobId'+ -> Text -- ^ 'suTeamId'+ -> Schedule -- ^ 'suPayload'+ -> ScheduleUpdate+scheduleUpdate pSuJobId_ pSuTeamId_ pSuPayload_ =+ ScheduleUpdate+ { _suJobId = _Coerce # pSuJobId_+ , _suAllDay = Nothing+ , _suStartTime = Nothing+ , _suTeamId = pSuTeamId_+ , _suPayload = pSuPayload_+ , _suEndTime = Nothing+ , _suDuration = Nothing+ }++-- | Job number+suJobId :: Lens' ScheduleUpdate Word64+suJobId+ = lens _suJobId (\ s a -> s{_suJobId = a}) . _Coerce++-- | Whether the job is scheduled for the whole day. Time of day in+-- start\/end times is ignored if this is true.+suAllDay :: Lens' ScheduleUpdate (Maybe Bool)+suAllDay = lens _suAllDay (\ s a -> s{_suAllDay = a})++-- | Scheduled start time in milliseconds since epoch.+suStartTime :: Lens' ScheduleUpdate (Maybe Word64)+suStartTime+ = lens _suStartTime (\ s a -> s{_suStartTime = a}) .+ mapping _Coerce++-- | Team ID+suTeamId :: Lens' ScheduleUpdate Text+suTeamId = lens _suTeamId (\ s a -> s{_suTeamId = a})++-- | Multipart request metadata.+suPayload :: Lens' ScheduleUpdate Schedule+suPayload+ = lens _suPayload (\ s a -> s{_suPayload = a})++-- | Scheduled end time in milliseconds since epoch.+suEndTime :: Lens' ScheduleUpdate (Maybe Word64)+suEndTime+ = lens _suEndTime (\ s a -> s{_suEndTime = a}) .+ mapping _Coerce++-- | Job duration in milliseconds.+suDuration :: Lens' ScheduleUpdate (Maybe Word64)+suDuration+ = lens _suDuration (\ s a -> s{_suDuration = a}) .+ mapping _Coerce++instance GoogleRequest ScheduleUpdate where+ type Rs ScheduleUpdate = Schedule+ requestClient ScheduleUpdate{..}+ = go _suTeamId _suJobId _suAllDay _suStartTime+ _suEndTime+ _suDuration+ (Just AltJSON)+ _suPayload+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy ScheduleUpdateResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Team/List.hs view
@@ -0,0 +1,103 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Team.List+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a list of teams for a user.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.team.list@.+module Network.Google.Resource.Coordinate.Team.List+ (+ -- * REST Resource+ TeamListResource++ -- * Creating a Request+ , teamList+ , TeamList++ -- * Request Lenses+ , tlDispatcher+ , tlAdmin+ , tlWorker+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.team.list@ method which the+-- 'TeamList' request conforms to.+type TeamListResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ QueryParam "dispatcher" Bool :>+ QueryParam "admin" Bool :>+ QueryParam "worker" Bool :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] TeamListResponse++-- | Retrieves a list of teams for a user.+--+-- /See:/ 'teamList' smart constructor.+data TeamList = TeamList+ { _tlDispatcher :: !(Maybe Bool)+ , _tlAdmin :: !(Maybe Bool)+ , _tlWorker :: !(Maybe Bool)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'TeamList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tlDispatcher'+--+-- * 'tlAdmin'+--+-- * 'tlWorker'+teamList+ :: TeamList+teamList =+ TeamList+ { _tlDispatcher = Nothing+ , _tlAdmin = Nothing+ , _tlWorker = Nothing+ }++-- | Whether to include teams for which the user has the Dispatcher role.+tlDispatcher :: Lens' TeamList (Maybe Bool)+tlDispatcher+ = lens _tlDispatcher (\ s a -> s{_tlDispatcher = a})++-- | Whether to include teams for which the user has the Admin role.+tlAdmin :: Lens' TeamList (Maybe Bool)+tlAdmin = lens _tlAdmin (\ s a -> s{_tlAdmin = a})++-- | Whether to include teams for which the user has the Worker role.+tlWorker :: Lens' TeamList (Maybe Bool)+tlWorker = lens _tlWorker (\ s a -> s{_tlWorker = a})++instance GoogleRequest TeamList where+ type Rs TeamList = TeamListResponse+ requestClient TeamList{..}+ = go _tlDispatcher _tlAdmin _tlWorker (Just AltJSON)+ mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy TeamListResource)+ mempty
+ gen/Network/Google/Resource/Coordinate/Worker/List.hs view
@@ -0,0 +1,83 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}++{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Network.Google.Resource.Coordinate.Worker.List+-- Copyright : (c) 2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a list of workers in a team.+--+-- /See:/ <https://developers.google.com/coordinate/ Google Maps Coordinate API Reference> for @coordinate.worker.list@.+module Network.Google.Resource.Coordinate.Worker.List+ (+ -- * REST Resource+ WorkerListResource++ -- * Creating a Request+ , workerList+ , WorkerList++ -- * Request Lenses+ , wlTeamId+ ) where++import Network.Google.MapsCoordinate.Types+import Network.Google.Prelude++-- | A resource alias for @coordinate.worker.list@ method which the+-- 'WorkerList' request conforms to.+type WorkerListResource =+ "coordinate" :>+ "v1" :>+ "teams" :>+ Capture "teamId" Text :>+ "workers" :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] WorkerListResponse++-- | Retrieves a list of workers in a team.+--+-- /See:/ 'workerList' smart constructor.+newtype WorkerList = WorkerList+ { _wlTeamId :: Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'WorkerList' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'wlTeamId'+workerList+ :: Text -- ^ 'wlTeamId'+ -> WorkerList+workerList pWlTeamId_ =+ WorkerList+ { _wlTeamId = pWlTeamId_+ }++-- | Team ID+wlTeamId :: Lens' WorkerList Text+wlTeamId = lens _wlTeamId (\ s a -> s{_wlTeamId = a})++instance GoogleRequest WorkerList where+ type Rs WorkerList = WorkerListResponse+ requestClient WorkerList{..}+ = go _wlTeamId (Just AltJSON) mapsCoordinateService+ where go+ = buildClient (Proxy :: Proxy WorkerListResource)+ mempty
+ gogol-maps-coordinate.cabal view
@@ -0,0 +1,57 @@+name: gogol-maps-coordinate+version: 0.0.1+synopsis: Google Maps Coordinate SDK.+homepage: https://github.com/brendanhay/gogol+bug-reports: https://github.com/brendanhay/gogol/issues+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2015 Brendan Hay+category: Network, Google, Cloud+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md++description:+ Lets you view and manage jobs in a Coordinate team.+ .+ /Warning:/ This is an experimental prototype/preview release which is still+ under exploratory development and not intended for public use, caveat emptor!+ .+ This library is compatible with version @v1@+ of the API.++source-repository head+ type: git+ location: git://github.com/brendanhay/gogol.git++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options: -Wall++ exposed-modules:+ Network.Google.MapsCoordinate+ , Network.Google.MapsCoordinate.Types+ , Network.Google.Resource.Coordinate.CustomFieldDef.List+ , Network.Google.Resource.Coordinate.Jobs.Get+ , Network.Google.Resource.Coordinate.Jobs.Insert+ , Network.Google.Resource.Coordinate.Jobs.List+ , Network.Google.Resource.Coordinate.Jobs.Patch+ , Network.Google.Resource.Coordinate.Jobs.Update+ , Network.Google.Resource.Coordinate.Location.List+ , Network.Google.Resource.Coordinate.Schedule.Get+ , Network.Google.Resource.Coordinate.Schedule.Patch+ , Network.Google.Resource.Coordinate.Schedule.Update+ , Network.Google.Resource.Coordinate.Team.List+ , Network.Google.Resource.Coordinate.Worker.List++ other-modules:+ Network.Google.MapsCoordinate.Types.Product+ , Network.Google.MapsCoordinate.Types.Sum++ build-depends:+ gogol-core == 0.0.1.*+ , base >= 4.7 && < 5