@@ -1,294 +0,0 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DeriveDataTypeable #-}
3−{-# LANGUAGE DeriveGeneric #-}
4−{-# LANGUAGE FlexibleInstances #-}
5−{-# LANGUAGE OverloadedStrings #-}
6−{-# LANGUAGE RecordWildCards #-}
7−{-# LANGUAGE TypeFamilies #-}
8−{-# LANGUAGE TypeOperators #-}
10−{-# OPTIONS_GHC -fno-warn-unused-imports #-}
11−{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
14−-- Module : Network.Google.Resource.DFAReporting.AccountUserProfiles.List
15−-- Copyright : (c) 2015 Brendan Hay
16−-- License : Mozilla Public License, v. 2.0.
17−-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
18−-- Stability : auto-generated
19−-- Portability : non-portable (GHC extensions)
21−-- | Retrieves a list of account user profiles, possibly filtered.
23−-- /See:/ <https://developers.google.com/doubleclick-advertisers/reporting/ DCM/DFA Reporting And Trafficking API Reference> for @DfareportingAccountUserProfilesList@.
24−module Network.Google.Resource.DFAReporting.AccountUserProfiles.List
27− AccountUserProfilesListResource
29− -- * Creating a Request
30− , accountUserProfilesList'
31− , AccountUserProfilesList'
52−import Network.Google.DFAReporting.Types
53−import Network.Google.Prelude
55−-- | A resource alias for @DfareportingAccountUserProfilesList@ which the
56−-- 'AccountUserProfilesList'' request conforms to.
57−type AccountUserProfilesListResource =
59− Capture "profileId" Int64 :>
60− "accountUserProfiles" :>
61− QueryParam "userRoleId" Int64 :>
62− QueryParam "searchString" Text :>
63− QueryParams "ids" Int64 :>
64− QueryParam "sortOrder"
65− DfareportingAccountUserProfilesListSortOrder
67− QueryParam "active" Bool :>
68− QueryParam "pageToken" Text :>
69− QueryParam "sortField"
70− DfareportingAccountUserProfilesListSortField
72− QueryParam "subaccountId" Int64 :>
73− QueryParam "maxResults" Int32 :>
74− QueryParam "quotaUser" Text :>
75− QueryParam "prettyPrint" Bool :>
76− QueryParam "userIp" Text :>
77− QueryParam "fields" Text :>
78− QueryParam "key" Key :>
79− QueryParam "oauth_token" OAuthToken :>
80− QueryParam "alt" AltJSON :>
82− AccountUserProfilesListResponse
84−-- | Retrieves a list of account user profiles, possibly filtered.
86−-- /See:/ 'accountUserProfilesList'' smart constructor.
87−data AccountUserProfilesList' = AccountUserProfilesList'
88− { _auplQuotaUser :: !(Maybe Text)
89− , _auplPrettyPrint :: !Bool
90− , _auplUserRoleId :: !(Maybe Int64)
91− , _auplUserIP :: !(Maybe Text)
92− , _auplSearchString :: !(Maybe Text)
93− , _auplIds :: !(Maybe [Int64])
94− , _auplProfileId :: !Int64
95− , _auplSortOrder :: !(Maybe DfareportingAccountUserProfilesListSortOrder)
96− , _auplActive :: !(Maybe Bool)
97− , _auplKey :: !(Maybe Key)
98− , _auplPageToken :: !(Maybe Text)
99− , _auplSortField :: !(Maybe DfareportingAccountUserProfilesListSortField)
100− , _auplSubAccountId :: !(Maybe Int64)
101− , _auplOAuthToken :: !(Maybe OAuthToken)
102− , _auplMaxResults :: !(Maybe Int32)
103− , _auplFields :: !(Maybe Text)
104− } deriving (Eq,Show,Data,Typeable,Generic)
106−-- | Creates a value of 'AccountUserProfilesList'' with the minimum fields required to make a request.
108−-- Use one of the following lenses to modify other fields as desired:
112−-- * 'auplPrettyPrint'
114−-- * 'auplUserRoleId'
118−-- * 'auplSearchString'
134−-- * 'auplSubAccountId'
136−-- * 'auplOAuthToken'
138−-- * 'auplMaxResults'
141−accountUserProfilesList'
142− :: Int64 -- ^ 'profileId'
143− -> AccountUserProfilesList'
144−accountUserProfilesList' pAuplProfileId_ =
145− AccountUserProfilesList'
146− { _auplQuotaUser = Nothing
147− , _auplPrettyPrint = True
148− , _auplUserRoleId = Nothing
149− , _auplUserIP = Nothing
150− , _auplSearchString = Nothing
151− , _auplIds = Nothing
152− , _auplProfileId = pAuplProfileId_
153− , _auplSortOrder = Nothing
154− , _auplActive = Nothing
155− , _auplKey = Nothing
156− , _auplPageToken = Nothing
157− , _auplSortField = Nothing
158− , _auplSubAccountId = Nothing
159− , _auplOAuthToken = Nothing
160− , _auplMaxResults = Nothing
161− , _auplFields = Nothing
164−-- | Available to use for quota purposes for server-side applications. Can be
165−-- any arbitrary string assigned to a user, but should not exceed 40
166−-- characters. Overrides userIp if both are provided.
167−auplQuotaUser :: Lens' AccountUserProfilesList' (Maybe Text)
169− = lens _auplQuotaUser
170− (\ s a -> s{_auplQuotaUser = a})
172−-- | Returns response with indentations and line breaks.
173−auplPrettyPrint :: Lens' AccountUserProfilesList' Bool
175− = lens _auplPrettyPrint
176− (\ s a -> s{_auplPrettyPrint = a})
178−-- | Select only user profiles with the specified user role ID.
179−auplUserRoleId :: Lens' AccountUserProfilesList' (Maybe Int64)
181− = lens _auplUserRoleId
182− (\ s a -> s{_auplUserRoleId = a})
184−-- | IP address of the site where the request originates. Use this if you
185−-- want to enforce per-user limits.
186−auplUserIP :: Lens' AccountUserProfilesList' (Maybe Text)
188− = lens _auplUserIP (\ s a -> s{_auplUserIP = a})
190−-- | Allows searching for objects by name, ID or email. Wildcards (*) are
191−-- allowed. For example, \"user profile*2015\" will return objects with
192−-- names like \"user profile June 2015\", \"user profile April 2015\", or
193−-- simply \"user profile 2015\". Most of the searches also add wildcards
194−-- implicitly at the start and the end of the search string. For example, a
195−-- search string of \"user profile\" will match objects with name \"my user
196−-- profile\", \"user profile 2015\", or simply \"user profile\".
197−auplSearchString :: Lens' AccountUserProfilesList' (Maybe Text)
199− = lens _auplSearchString
200− (\ s a -> s{_auplSearchString = a})
202−-- | Select only user profiles with these IDs.
203−auplIds :: Lens' AccountUserProfilesList' [Int64]
205− = lens _auplIds (\ s a -> s{_auplIds = a}) . _Default
208−-- | User profile ID associated with this request.
209−auplProfileId :: Lens' AccountUserProfilesList' Int64
211− = lens _auplProfileId
212− (\ s a -> s{_auplProfileId = a})
214−-- | Order of sorted results, default is ASCENDING.
215−auplSortOrder :: Lens' AccountUserProfilesList' (Maybe DfareportingAccountUserProfilesListSortOrder)
217− = lens _auplSortOrder
218− (\ s a -> s{_auplSortOrder = a})
220−-- | Select only active user profiles.
221−auplActive :: Lens' AccountUserProfilesList' (Maybe Bool)
223− = lens _auplActive (\ s a -> s{_auplActive = a})
225−-- | API key. Your API key identifies your project and provides you with API
226−-- access, quota, and reports. Required unless you provide an OAuth 2.0
228−auplKey :: Lens' AccountUserProfilesList' (Maybe Key)
229−auplKey = lens _auplKey (\ s a -> s{_auplKey = a})
231−-- | Value of the nextPageToken from the previous result page.
232−auplPageToken :: Lens' AccountUserProfilesList' (Maybe Text)
234− = lens _auplPageToken
235− (\ s a -> s{_auplPageToken = a})
237−-- | Field by which to sort the list.
238−auplSortField :: Lens' AccountUserProfilesList' (Maybe DfareportingAccountUserProfilesListSortField)
240− = lens _auplSortField
241− (\ s a -> s{_auplSortField = a})
243−-- | Select only user profiles with the specified subaccount ID.
244−auplSubAccountId :: Lens' AccountUserProfilesList' (Maybe Int64)
246− = lens _auplSubAccountId
247− (\ s a -> s{_auplSubAccountId = a})
249−-- | OAuth 2.0 token for the current user.
250−auplOAuthToken :: Lens' AccountUserProfilesList' (Maybe OAuthToken)
252− = lens _auplOAuthToken
253− (\ s a -> s{_auplOAuthToken = a})
255−-- | Maximum number of results to return.
256−auplMaxResults :: Lens' AccountUserProfilesList' (Maybe Int32)
258− = lens _auplMaxResults
259− (\ s a -> s{_auplMaxResults = a})
261−-- | Selector specifying which fields to include in a partial response.
262−auplFields :: Lens' AccountUserProfilesList' (Maybe Text)
264− = lens _auplFields (\ s a -> s{_auplFields = a})
266−instance GoogleAuth AccountUserProfilesList' where
267− authKey = auplKey . _Just
268− authToken = auplOAuthToken . _Just
270−instance GoogleRequest AccountUserProfilesList' where
271− type Rs AccountUserProfilesList' =
272− AccountUserProfilesListResponse
273− request = requestWithRoute defReq dFAReportingURL
274− requestWithRoute r u AccountUserProfilesList'{..}
275− = go _auplProfileId _auplUserRoleId _auplSearchString
276− (_auplIds ^. _Default)
284− (Just _auplPrettyPrint)
292− (Proxy :: Proxy AccountUserProfilesListResource)