on develop help sign in
Regenerating gogol-resourcemanager from updated service defintions
commit217bef1bf79408e69f3062a0fe2c27be9c6c8e1c authorBrendan Hay <brendan.g.hay@gmail.com> dateSat 11 Feb 2017, 11:36 (10 years ago) parent41e6e47
21 files changed+633−73
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Operations/Get.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/Get.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/GetIAMPolicy.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/Search.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/SetIAMPolicy.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/TestIAMPermissions.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Create.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Delete.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Get.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/GetAncestry.hs+191 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/GetIAMPolicy.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/List.hs+5−5 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/SetIAMPolicy.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/TestIAMPermissions.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Undelete.hs+3−3 gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Update.hs+3−3 gogol-resourcemanager/gen/Network/Google/ResourceManager.hs+34 gogol-resourcemanager/gen/Network/Google/ResourceManager/Types.hs+29 gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs+126−26 gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Sum.hs+205 gogol-resourcemanager/gogol-resourcemanager.cabal+1
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Operations/Get.hs+3−3
@@ -53,7 +53,7 @@ import Network.Google.ResourceManager.Types
5353type OperationsGetResource =
5454 "v1" :>
5555 Capture "name" Text :>
56− QueryParam "$.xgafv" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
5757 QueryParam "upload_protocol" Text :>
5858 QueryParam "pp" Bool :>
5959 QueryParam "access_token" Text :>
@@ -68,7 +68,7 @@ type OperationsGetResource =
6868--
6969-- /See:/ 'operationsGet' smart constructor.
7070data OperationsGet = OperationsGet'
71− { _ogXgafv :: !(Maybe Text)
71+ { _ogXgafv :: !(Maybe Xgafv)
7272 , _ogUploadProtocol :: !(Maybe Text)
7373 , _ogPp :: !Bool
7474 , _ogAccessToken :: !(Maybe Text)
@@ -113,7 +113,7 @@ operationsGet pOgName_ =
113113 }
114114
115115-- | V1 error format.
116−ogXgafv :: Lens' OperationsGet (Maybe Text)
116+ogXgafv :: Lens' OperationsGet (Maybe Xgafv)
117117ogXgafv = lens _ogXgafv (\ s a -> s{_ogXgafv = a})
118118
119119-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/Get.hs+3−3
@@ -52,7 +52,7 @@ import Network.Google.ResourceManager.Types
5252type OrganizationsGetResource =
5353 "v1" :>
5454 Capture "name" Text :>
55− QueryParam "$.xgafv" Text :>
55+ QueryParam "$.xgafv" Xgafv :>
5656 QueryParam "upload_protocol" Text :>
5757 QueryParam "pp" Bool :>
5858 QueryParam "access_token" Text :>
@@ -66,7 +66,7 @@ type OrganizationsGetResource =
6666--
6767-- /See:/ 'organizationsGet' smart constructor.
6868data OrganizationsGet = OrganizationsGet'
69− { _oggXgafv :: !(Maybe Text)
69+ { _oggXgafv :: !(Maybe Xgafv)
7070 , _oggUploadProtocol :: !(Maybe Text)
7171 , _oggPp :: !Bool
7272 , _oggAccessToken :: !(Maybe Text)
@@ -111,7 +111,7 @@ organizationsGet pOggName_ =
111111 }
112112
113113-- | V1 error format.
114−oggXgafv :: Lens' OrganizationsGet (Maybe Text)
114+oggXgafv :: Lens' OrganizationsGet (Maybe Xgafv)
115115oggXgafv = lens _oggXgafv (\ s a -> s{_oggXgafv = a})
116116
117117-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/GetIAMPolicy.hs+3−3
@@ -55,7 +55,7 @@ import Network.Google.ResourceManager.Types
5555type OrganizationsGetIAMPolicyResource =
5656 "v1" :>
5757 CaptureMode "resource" "getIamPolicy" Text :>
58− QueryParam "$.xgafv" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
5959 QueryParam "upload_protocol" Text :>
6060 QueryParam "pp" Bool :>
6161 QueryParam "access_token" Text :>
@@ -73,7 +73,7 @@ type OrganizationsGetIAMPolicyResource =
7373--
7474-- /See:/ 'organizationsGetIAMPolicy' smart constructor.
7575data OrganizationsGetIAMPolicy = OrganizationsGetIAMPolicy'
76− { _ogipXgafv :: !(Maybe Text)
76+ { _ogipXgafv :: !(Maybe Xgafv)
7777 , _ogipUploadProtocol :: !(Maybe Text)
7878 , _ogipPp :: !Bool
7979 , _ogipAccessToken :: !(Maybe Text)
@@ -123,7 +123,7 @@ organizationsGetIAMPolicy pOgipPayload_ pOgipResource_ =
123123 }
124124
125125-- | V1 error format.
126−ogipXgafv :: Lens' OrganizationsGetIAMPolicy (Maybe Text)
126+ogipXgafv :: Lens' OrganizationsGetIAMPolicy (Maybe Xgafv)
127127ogipXgafv
128128 = lens _ogipXgafv (\ s a -> s{_ogipXgafv = a})
129129
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/Search.hs+3−3
@@ -54,7 +54,7 @@ import Network.Google.ResourceManager.Types
5454type OrganizationsSearchResource =
5555 "v1" :>
5656 "organizations:search" :>
57− QueryParam "$.xgafv" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
5858 QueryParam "upload_protocol" Text :>
5959 QueryParam "pp" Bool :>
6060 QueryParam "access_token" Text :>
@@ -72,7 +72,7 @@ type OrganizationsSearchResource =
7272--
7373-- /See:/ 'organizationsSearch' smart constructor.
7474data OrganizationsSearch = OrganizationsSearch'
75− { _osXgafv :: !(Maybe Text)
75+ { _osXgafv :: !(Maybe Xgafv)
7676 , _osUploadProtocol :: !(Maybe Text)
7777 , _osPp :: !Bool
7878 , _osAccessToken :: !(Maybe Text)
@@ -117,7 +117,7 @@ organizationsSearch pOsPayload_ =
117117 }
118118
119119-- | V1 error format.
120−osXgafv :: Lens' OrganizationsSearch (Maybe Text)
120+osXgafv :: Lens' OrganizationsSearch (Maybe Xgafv)
121121osXgafv = lens _osXgafv (\ s a -> s{_osXgafv = a})
122122
123123-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/SetIAMPolicy.hs+3−3
@@ -54,7 +54,7 @@ import Network.Google.ResourceManager.Types
5454type OrganizationsSetIAMPolicyResource =
5555 "v1" :>
5656 CaptureMode "resource" "setIamPolicy" Text :>
57− QueryParam "$.xgafv" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
5858 QueryParam "upload_protocol" Text :>
5959 QueryParam "pp" Bool :>
6060 QueryParam "access_token" Text :>
@@ -71,7 +71,7 @@ type OrganizationsSetIAMPolicyResource =
7171--
7272-- /See:/ 'organizationsSetIAMPolicy' smart constructor.
7373data OrganizationsSetIAMPolicy = OrganizationsSetIAMPolicy'
74− { _osipXgafv :: !(Maybe Text)
74+ { _osipXgafv :: !(Maybe Xgafv)
7575 , _osipUploadProtocol :: !(Maybe Text)
7676 , _osipPp :: !Bool
7777 , _osipAccessToken :: !(Maybe Text)
@@ -121,7 +121,7 @@ organizationsSetIAMPolicy pOsipPayload_ pOsipResource_ =
121121 }
122122
123123-- | V1 error format.
124−osipXgafv :: Lens' OrganizationsSetIAMPolicy (Maybe Text)
124+osipXgafv :: Lens' OrganizationsSetIAMPolicy (Maybe Xgafv)
125125osipXgafv
126126 = lens _osipXgafv (\ s a -> s{_osipXgafv = a})
127127
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/TestIAMPermissions.hs+3−3
@@ -54,7 +54,7 @@ import Network.Google.ResourceManager.Types
5454type OrganizationsTestIAMPermissionsResource =
5555 "v1" :>
5656 CaptureMode "resource" "testIamPermissions" Text :>
57− QueryParam "$.xgafv" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
5858 QueryParam "upload_protocol" Text :>
5959 QueryParam "pp" Bool :>
6060 QueryParam "access_token" Text :>
@@ -71,7 +71,7 @@ type OrganizationsTestIAMPermissionsResource =
7171--
7272-- /See:/ 'organizationsTestIAMPermissions' smart constructor.
7373data OrganizationsTestIAMPermissions = OrganizationsTestIAMPermissions'
74− { _otipXgafv :: !(Maybe Text)
74+ { _otipXgafv :: !(Maybe Xgafv)
7575 , _otipUploadProtocol :: !(Maybe Text)
7676 , _otipPp :: !Bool
7777 , _otipAccessToken :: !(Maybe Text)
@@ -121,7 +121,7 @@ organizationsTestIAMPermissions pOtipPayload_ pOtipResource_ =
121121 }
122122
123123-- | V1 error format.
124−otipXgafv :: Lens' OrganizationsTestIAMPermissions (Maybe Text)
124+otipXgafv :: Lens' OrganizationsTestIAMPermissions (Maybe Xgafv)
125125otipXgafv
126126 = lens _otipXgafv (\ s a -> s{_otipXgafv = a})
127127
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Create.hs+3−3
@@ -57,7 +57,7 @@ import Network.Google.ResourceManager.Types
5757type ProjectsCreateResource =
5858 "v1" :>
5959 "projects" :>
60− QueryParam "$.xgafv" Text :>
60+ QueryParam "$.xgafv" Xgafv :>
6161 QueryParam "upload_protocol" Text :>
6262 QueryParam "pp" Bool :>
6363 QueryParam "access_token" Text :>
@@ -77,7 +77,7 @@ type ProjectsCreateResource =
7777--
7878-- /See:/ 'projectsCreate' smart constructor.
7979data ProjectsCreate = ProjectsCreate'
80− { _pcXgafv :: !(Maybe Text)
80+ { _pcXgafv :: !(Maybe Xgafv)
8181 , _pcUploadProtocol :: !(Maybe Text)
8282 , _pcPp :: !Bool
8383 , _pcAccessToken :: !(Maybe Text)
@@ -122,7 +122,7 @@ projectsCreate pPcPayload_ =
122122 }
123123
124124-- | V1 error format.
125−pcXgafv :: Lens' ProjectsCreate (Maybe Text)
125+pcXgafv :: Lens' ProjectsCreate (Maybe Xgafv)
126126pcXgafv = lens _pcXgafv (\ s a -> s{_pcXgafv = a})
127127
128128-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Delete.hs+3−3
@@ -64,7 +64,7 @@ type ProjectsDeleteResource =
6464 "v1" :>
6565 "projects" :>
6666 Capture "projectId" Text :>
67− QueryParam "$.xgafv" Text :>
67+ QueryParam "$.xgafv" Xgafv :>
6868 QueryParam "upload_protocol" Text :>
6969 QueryParam "pp" Bool :>
7070 QueryParam "access_token" Text :>
@@ -89,7 +89,7 @@ type ProjectsDeleteResource =
8989--
9090-- /See:/ 'projectsDelete' smart constructor.
9191data ProjectsDelete = ProjectsDelete'
92− { _pdXgafv :: !(Maybe Text)
92+ { _pdXgafv :: !(Maybe Xgafv)
9393 , _pdUploadProtocol :: !(Maybe Text)
9494 , _pdPp :: !Bool
9595 , _pdAccessToken :: !(Maybe Text)
@@ -134,7 +134,7 @@ projectsDelete pPdProjectId_ =
134134 }
135135
136136-- | V1 error format.
137−pdXgafv :: Lens' ProjectsDelete (Maybe Text)
137+pdXgafv :: Lens' ProjectsDelete (Maybe Xgafv)
138138pdXgafv = lens _pdXgafv (\ s a -> s{_pdXgafv = a})
139139
140140-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Get.hs+3−3
@@ -54,7 +54,7 @@ type ProjectsGetResource =
5454 "v1" :>
5555 "projects" :>
5656 Capture "projectId" Text :>
57− QueryParam "$.xgafv" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
5858 QueryParam "upload_protocol" Text :>
5959 QueryParam "pp" Bool :>
6060 QueryParam "access_token" Text :>
@@ -69,7 +69,7 @@ type ProjectsGetResource =
6969--
7070-- /See:/ 'projectsGet' smart constructor.
7171data ProjectsGet = ProjectsGet'
72− { _pgXgafv :: !(Maybe Text)
72+ { _pgXgafv :: !(Maybe Xgafv)
7373 , _pgUploadProtocol :: !(Maybe Text)
7474 , _pgPp :: !Bool
7575 , _pgAccessToken :: !(Maybe Text)
@@ -114,7 +114,7 @@ projectsGet pPgProjectId_ =
114114 }
115115
116116-- | V1 error format.
117−pgXgafv :: Lens' ProjectsGet (Maybe Text)
117+pgXgafv :: Lens' ProjectsGet (Maybe Xgafv)
118118pgXgafv = lens _pgXgafv (\ s a -> s{_pgXgafv = a})
119119
120120-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/GetAncestry.hsnew file+191
@@ -0,0 +1,191 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.CloudResourceManager.Projects.GetAncestry
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Gets a list of ancestors in the resource hierarchy for the Project
24+-- identified by the specified \`project_id\` (for example,
25+-- \`my-project-123\`). The caller must have read permissions for this
26+-- Project.
27+--
28+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.getAncestry@.
29+module Network.Google.Resource.CloudResourceManager.Projects.GetAncestry
30+ (
31+ -- * REST Resource
32+ ProjectsGetAncestryResource
33+
34+ -- * Creating a Request
35+ , projectsGetAncestry
36+ , ProjectsGetAncestry
37+
38+ -- * Request Lenses
39+ , pgaXgafv
40+ , pgaUploadProtocol
41+ , pgaPp
42+ , pgaAccessToken
43+ , pgaUploadType
44+ , pgaPayload
45+ , pgaBearerToken
46+ , pgaProjectId
47+ , pgaCallback
48+ ) where
49+
50+import Network.Google.Prelude
51+import Network.Google.ResourceManager.Types
52+
53+-- | A resource alias for @cloudresourcemanager.projects.getAncestry@ method which the
54+-- 'ProjectsGetAncestry' request conforms to.
55+type ProjectsGetAncestryResource =
56+ "v1" :>
57+ "projects" :>
58+ CaptureMode "projectId" "getAncestry" Text :>
59+ QueryParam "$.xgafv" Xgafv :>
60+ QueryParam "upload_protocol" Text :>
61+ QueryParam "pp" Bool :>
62+ QueryParam "access_token" Text :>
63+ QueryParam "uploadType" Text :>
64+ QueryParam "bearer_token" Text :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ ReqBody '[JSON] GetAncestryRequest :>
68+ Post '[JSON] GetAncestryResponse
69+
70+-- | Gets a list of ancestors in the resource hierarchy for the Project
71+-- identified by the specified \`project_id\` (for example,
72+-- \`my-project-123\`). The caller must have read permissions for this
73+-- Project.
74+--
75+-- /See:/ 'projectsGetAncestry' smart constructor.
76+data ProjectsGetAncestry = ProjectsGetAncestry'
77+ { _pgaXgafv :: !(Maybe Xgafv)
78+ , _pgaUploadProtocol :: !(Maybe Text)
79+ , _pgaPp :: !Bool
80+ , _pgaAccessToken :: !(Maybe Text)
81+ , _pgaUploadType :: !(Maybe Text)
82+ , _pgaPayload :: !GetAncestryRequest
83+ , _pgaBearerToken :: !(Maybe Text)
84+ , _pgaProjectId :: !Text
85+ , _pgaCallback :: !(Maybe Text)
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'ProjectsGetAncestry' with the minimum fields required to make a request.
89+--
90+-- Use one of the following lenses to modify other fields as desired:
91+--
92+-- * 'pgaXgafv'
93+--
94+-- * 'pgaUploadProtocol'
95+--
96+-- * 'pgaPp'
97+--
98+-- * 'pgaAccessToken'
99+--
100+-- * 'pgaUploadType'
101+--
102+-- * 'pgaPayload'
103+--
104+-- * 'pgaBearerToken'
105+--
106+-- * 'pgaProjectId'
107+--
108+-- * 'pgaCallback'
109+projectsGetAncestry
110+ :: GetAncestryRequest -- ^ 'pgaPayload'
111+ -> Text -- ^ 'pgaProjectId'
112+ -> ProjectsGetAncestry
113+projectsGetAncestry pPgaPayload_ pPgaProjectId_ =
114+ ProjectsGetAncestry'
115+ { _pgaXgafv = Nothing
116+ , _pgaUploadProtocol = Nothing
117+ , _pgaPp = True
118+ , _pgaAccessToken = Nothing
119+ , _pgaUploadType = Nothing
120+ , _pgaPayload = pPgaPayload_
121+ , _pgaBearerToken = Nothing
122+ , _pgaProjectId = pPgaProjectId_
123+ , _pgaCallback = Nothing
124+ }
125+
126+-- | V1 error format.
127+pgaXgafv :: Lens' ProjectsGetAncestry (Maybe Xgafv)
128+pgaXgafv = lens _pgaXgafv (\ s a -> s{_pgaXgafv = a})
129+
130+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
131+pgaUploadProtocol :: Lens' ProjectsGetAncestry (Maybe Text)
132+pgaUploadProtocol
133+ = lens _pgaUploadProtocol
134+ (\ s a -> s{_pgaUploadProtocol = a})
135+
136+-- | Pretty-print response.
137+pgaPp :: Lens' ProjectsGetAncestry Bool
138+pgaPp = lens _pgaPp (\ s a -> s{_pgaPp = a})
139+
140+-- | OAuth access token.
141+pgaAccessToken :: Lens' ProjectsGetAncestry (Maybe Text)
142+pgaAccessToken
143+ = lens _pgaAccessToken
144+ (\ s a -> s{_pgaAccessToken = a})
145+
146+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
147+pgaUploadType :: Lens' ProjectsGetAncestry (Maybe Text)
148+pgaUploadType
149+ = lens _pgaUploadType
150+ (\ s a -> s{_pgaUploadType = a})
151+
152+-- | Multipart request metadata.
153+pgaPayload :: Lens' ProjectsGetAncestry GetAncestryRequest
154+pgaPayload
155+ = lens _pgaPayload (\ s a -> s{_pgaPayload = a})
156+
157+-- | OAuth bearer token.
158+pgaBearerToken :: Lens' ProjectsGetAncestry (Maybe Text)
159+pgaBearerToken
160+ = lens _pgaBearerToken
161+ (\ s a -> s{_pgaBearerToken = a})
162+
163+-- | The Project ID (for example, \`my-project-123\`). Required.
164+pgaProjectId :: Lens' ProjectsGetAncestry Text
165+pgaProjectId
166+ = lens _pgaProjectId (\ s a -> s{_pgaProjectId = a})
167+
168+-- | JSONP
169+pgaCallback :: Lens' ProjectsGetAncestry (Maybe Text)
170+pgaCallback
171+ = lens _pgaCallback (\ s a -> s{_pgaCallback = a})
172+
173+instance GoogleRequest ProjectsGetAncestry where
174+ type Rs ProjectsGetAncestry = GetAncestryResponse
175+ type Scopes ProjectsGetAncestry =
176+ '["https://www.googleapis.com/auth/cloud-platform",
177+ "https://www.googleapis.com/auth/cloud-platform.read-only"]
178+ requestClient ProjectsGetAncestry'{..}
179+ = go _pgaProjectId _pgaXgafv _pgaUploadProtocol
180+ (Just _pgaPp)
181+ _pgaAccessToken
182+ _pgaUploadType
183+ _pgaBearerToken
184+ _pgaCallback
185+ (Just AltJSON)
186+ _pgaPayload
187+ resourceManagerService
188+ where go
189+ = buildClient
190+ (Proxy :: Proxy ProjectsGetAncestryResource)
191+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/GetIAMPolicy.hs+3−3
@@ -54,7 +54,7 @@ type ProjectsGetIAMPolicyResource =
5454 "v1" :>
5555 "projects" :>
5656 CaptureMode "resource" "getIamPolicy" Text :>
57− QueryParam "$.xgafv" Text :>
57+ QueryParam "$.xgafv" Xgafv :>
5858 QueryParam "upload_protocol" Text :>
5959 QueryParam "pp" Bool :>
6060 QueryParam "access_token" Text :>
@@ -70,7 +70,7 @@ type ProjectsGetIAMPolicyResource =
7070--
7171-- /See:/ 'projectsGetIAMPolicy' smart constructor.
7272data ProjectsGetIAMPolicy = ProjectsGetIAMPolicy'
73− { _pgipXgafv :: !(Maybe Text)
73+ { _pgipXgafv :: !(Maybe Xgafv)
7474 , _pgipUploadProtocol :: !(Maybe Text)
7575 , _pgipPp :: !Bool
7676 , _pgipAccessToken :: !(Maybe Text)
@@ -120,7 +120,7 @@ projectsGetIAMPolicy pPgipPayload_ pPgipResource_ =
120120 }
121121
122122-- | V1 error format.
123−pgipXgafv :: Lens' ProjectsGetIAMPolicy (Maybe Text)
123+pgipXgafv :: Lens' ProjectsGetIAMPolicy (Maybe Xgafv)
124124pgipXgafv
125125 = lens _pgipXgafv (\ s a -> s{_pgipXgafv = a})
126126
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/List.hs+5−5
@@ -55,7 +55,7 @@ import Network.Google.ResourceManager.Types
5555type ProjectsListResource =
5656 "v1" :>
5757 "projects" :>
58− QueryParam "$.xgafv" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
5959 QueryParam "upload_protocol" Text :>
6060 QueryParam "pp" Bool :>
6161 QueryParam "access_token" Text :>
@@ -74,7 +74,7 @@ type ProjectsListResource =
7474--
7575-- /See:/ 'projectsList' smart constructor.
7676data ProjectsList = ProjectsList'
77− { _plXgafv :: !(Maybe Text)
77+ { _plXgafv :: !(Maybe Xgafv)
7878 , _plUploadProtocol :: !(Maybe Text)
7979 , _plPp :: !Bool
8080 , _plAccessToken :: !(Maybe Text)
@@ -126,7 +126,7 @@ projectsList =
126126 }
127127
128128-- | V1 error format.
129−plXgafv :: Lens' ProjectsList (Maybe Text)
129+plXgafv :: Lens' ProjectsList (Maybe Xgafv)
130130plXgafv = lens _plXgafv (\ s a -> s{_plXgafv = a})
131131
132132-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
@@ -158,8 +158,8 @@ plBearerToken
158158
159159-- | An expression for filtering the results of the request. Filter rules are
160160-- case insensitive. The fields eligible for filtering are: + \`name\` +
161−-- \`id\` + labels.key where *key* is the name of a label Some examples of
162−-- using labels as filters: |Filter|Description| |------|-----------|
161+-- \`id\` + 'labels.key' where *key* is the name of a label Some examples
162+-- of using labels as filters: |Filter|Description| |------|-----------|
163163-- |name:*|The project has a name.| |name:Howl|The project\'s name is
164164-- \`Howl\` or \`howl\`.| |name:HOWL|Equivalent to above.|
165165-- |NAME:howl|Equivalent to above.| |labels.color:*|The project has the
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/SetIAMPolicy.hs+3−3
@@ -77,7 +77,7 @@ type ProjectsSetIAMPolicyResource =
7777 "v1" :>
7878 "projects" :>
7979 CaptureMode "resource" "setIamPolicy" Text :>
80− QueryParam "$.xgafv" Text :>
80+ QueryParam "$.xgafv" Xgafv :>
8181 QueryParam "upload_protocol" Text :>
8282 QueryParam "pp" Bool :>
8383 QueryParam "access_token" Text :>
@@ -116,7 +116,7 @@ type ProjectsSetIAMPolicyResource =
116116--
117117-- /See:/ 'projectsSetIAMPolicy' smart constructor.
118118data ProjectsSetIAMPolicy = ProjectsSetIAMPolicy'
119− { _psipXgafv :: !(Maybe Text)
119+ { _psipXgafv :: !(Maybe Xgafv)
120120 , _psipUploadProtocol :: !(Maybe Text)
121121 , _psipPp :: !Bool
122122 , _psipAccessToken :: !(Maybe Text)
@@ -166,7 +166,7 @@ projectsSetIAMPolicy pPsipPayload_ pPsipResource_ =
166166 }
167167
168168-- | V1 error format.
169−psipXgafv :: Lens' ProjectsSetIAMPolicy (Maybe Text)
169+psipXgafv :: Lens' ProjectsSetIAMPolicy (Maybe Xgafv)
170170psipXgafv
171171 = lens _psipXgafv (\ s a -> s{_psipXgafv = a})
172172
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/TestIAMPermissions.hs+3−3
@@ -53,7 +53,7 @@ type ProjectsTestIAMPermissionsResource =
5353 "v1" :>
5454 "projects" :>
5555 CaptureMode "resource" "testIamPermissions" Text :>
56− QueryParam "$.xgafv" Text :>
56+ QueryParam "$.xgafv" Xgafv :>
5757 QueryParam "upload_protocol" Text :>
5858 QueryParam "pp" Bool :>
5959 QueryParam "access_token" Text :>
@@ -68,7 +68,7 @@ type ProjectsTestIAMPermissionsResource =
6868--
6969-- /See:/ 'projectsTestIAMPermissions' smart constructor.
7070data ProjectsTestIAMPermissions = ProjectsTestIAMPermissions'
71− { _ptipXgafv :: !(Maybe Text)
71+ { _ptipXgafv :: !(Maybe Xgafv)
7272 , _ptipUploadProtocol :: !(Maybe Text)
7373 , _ptipPp :: !Bool
7474 , _ptipAccessToken :: !(Maybe Text)
@@ -118,7 +118,7 @@ projectsTestIAMPermissions pPtipPayload_ pPtipResource_ =
118118 }
119119
120120-- | V1 error format.
121−ptipXgafv :: Lens' ProjectsTestIAMPermissions (Maybe Text)
121+ptipXgafv :: Lens' ProjectsTestIAMPermissions (Maybe Xgafv)
122122ptipXgafv
123123 = lens _ptipXgafv (\ s a -> s{_ptipXgafv = a})
124124
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Undelete.hs+3−3
@@ -57,7 +57,7 @@ type ProjectsUndeleteResource =
5757 "v1" :>
5858 "projects" :>
5959 CaptureMode "projectId" "undelete" Text :>
60− QueryParam "$.xgafv" Text :>
60+ QueryParam "$.xgafv" Xgafv :>
6161 QueryParam "upload_protocol" Text :>
6262 QueryParam "pp" Bool :>
6363 QueryParam "access_token" Text :>
@@ -76,7 +76,7 @@ type ProjectsUndeleteResource =
7676--
7777-- /See:/ 'projectsUndelete' smart constructor.
7878data ProjectsUndelete = ProjectsUndelete'
79− { _puXgafv :: !(Maybe Text)
79+ { _puXgafv :: !(Maybe Xgafv)
8080 , _puUploadProtocol :: !(Maybe Text)
8181 , _puPp :: !Bool
8282 , _puAccessToken :: !(Maybe Text)
@@ -126,7 +126,7 @@ projectsUndelete pPuPayload_ pPuProjectId_ =
126126 }
127127
128128-- | V1 error format.
129−puXgafv :: Lens' ProjectsUndelete (Maybe Text)
129+puXgafv :: Lens' ProjectsUndelete (Maybe Xgafv)
130130puXgafv = lens _puXgafv (\ s a -> s{_puXgafv = a})
131131
132132-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Update.hs+3−3
@@ -55,7 +55,7 @@ type ProjectsUpdateResource =
5555 "v1" :>
5656 "projects" :>
5757 Capture "projectId" Text :>
58− QueryParam "$.xgafv" Text :>
58+ QueryParam "$.xgafv" Xgafv :>
5959 QueryParam "upload_protocol" Text :>
6060 QueryParam "pp" Bool :>
6161 QueryParam "access_token" Text :>
@@ -71,7 +71,7 @@ type ProjectsUpdateResource =
7171--
7272-- /See:/ 'projectsUpdate' smart constructor.
7373data ProjectsUpdate = ProjectsUpdate'
74− { _proXgafv :: !(Maybe Text)
74+ { _proXgafv :: !(Maybe Xgafv)
7575 , _proUploadProtocol :: !(Maybe Text)
7676 , _proPp :: !Bool
7777 , _proAccessToken :: !(Maybe Text)
@@ -121,7 +121,7 @@ projectsUpdate pProPayload_ pProProjectId_ =
121121 }
122122
123123-- | V1 error format.
124−proXgafv :: Lens' ProjectsUpdate (Maybe Text)
124+proXgafv :: Lens' ProjectsUpdate (Maybe Xgafv)
125125proXgafv = lens _proXgafv (\ s a -> s{_proXgafv = a})
126126
127127-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gogol-resourcemanager/gen/Network/Google/ResourceManager.hs+34
@@ -58,6 +58,9 @@ module Network.Google.ResourceManager
5858 -- ** cloudresourcemanager.projects.get
5959 , module Network.Google.Resource.CloudResourceManager.Projects.Get
6060
61+ -- ** cloudresourcemanager.projects.getAncestry
62+ , module Network.Google.Resource.CloudResourceManager.Projects.GetAncestry
63+
6164 -- ** cloudresourcemanager.projects.getIamPolicy
6265 , module Network.Google.Resource.CloudResourceManager.Projects.GetIAMPolicy
6366
@@ -113,6 +116,9 @@ module Network.Google.ResourceManager
113116 , organizationOwner
114117 , ooDirectoryCustomerId
115118
119+ -- ** OrganizationLifecycleState
120+ , OrganizationLifecycleState (..)
121+
116122 -- ** Project
117123 , Project
118124 , project
@@ -137,6 +143,9 @@ module Network.Google.ResourceManager
137143 , Empty
138144 , empty
139145
146+ -- ** FolderOperationErrorErrorMessageId
147+ , FolderOperationErrorErrorMessageId (..)
148+
140149 -- ** ProjectCreationStatus
141150 , ProjectCreationStatus
142151 , projectCreationStatus
@@ -154,22 +163,40 @@ module Network.Google.ResourceManager
154163 , folderOperationError
155164 , foeErrorMessageId
156165
166+ -- ** FolderOperationOperationType
167+ , FolderOperationOperationType (..)
168+
157169 -- ** SetIAMPolicyRequest
158170 , SetIAMPolicyRequest
159171 , setIAMPolicyRequest
160172 , siprPolicy
161173
174+ -- ** ProjectLifecycleState
175+ , ProjectLifecycleState (..)
176+
177+ -- ** Xgafv
178+ , Xgafv (..)
179+
162180 -- ** TestIAMPermissionsRequest
163181 , TestIAMPermissionsRequest
164182 , testIAMPermissionsRequest
165183 , tiprPermissions
166184
185+ -- ** GetAncestryRequest
186+ , GetAncestryRequest
187+ , getAncestryRequest
188+
167189 -- ** SearchOrganizationsResponse
168190 , SearchOrganizationsResponse
169191 , searchOrganizationsResponse
170192 , sorNextPageToken
171193 , sorOrganizations
172194
195+ -- ** GetAncestryResponse
196+ , GetAncestryResponse
197+ , getAncestryResponse
198+ , garAncestor
199+
173200 -- ** TestIAMPermissionsResponse
174201 , TestIAMPermissionsResponse
175202 , testIAMPermissionsResponse
@@ -209,6 +236,11 @@ module Network.Google.ResourceManager
209236 , orgDisplayName
210237 , orgLifecycleState
211238
239+ -- ** Ancestor
240+ , Ancestor
241+ , ancestor
242+ , aResourceId
243+
212244 -- ** OperationResponse
213245 , OperationResponse
214246 , operationResponse
@@ -235,6 +267,7 @@ import Network.Google.Resource.CloudResourceManager.Organizations.Test
235267import Network.Google.Resource.CloudResourceManager.Projects.Create
236268import Network.Google.Resource.CloudResourceManager.Projects.Delete
237269import Network.Google.Resource.CloudResourceManager.Projects.Get
270+import Network.Google.Resource.CloudResourceManager.Projects.GetAncestry
238271import Network.Google.Resource.CloudResourceManager.Projects.GetIAMPolicy
239272import Network.Google.Resource.CloudResourceManager.Projects.List
240273import Network.Google.Resource.CloudResourceManager.Projects.SetIAMPolicy
@@ -262,5 +295,6 @@ type ResourceManagerAPI =
262295 :<|> ProjectsCreateResource
263296 :<|> ProjectsSetIAMPolicyResource
264297 :<|> ProjectsTestIAMPermissionsResource
298+ :<|> ProjectsGetAncestryResource
265299 :<|> ProjectsDeleteResource
266300 :<|> ProjectsUpdateResource
gogol-resourcemanager/gen/Network/Google/ResourceManager/Types.hs+29
@@ -58,6 +58,9 @@ module Network.Google.ResourceManager.Types
5858 , organizationOwner
5959 , ooDirectoryCustomerId
6060
61+ -- * OrganizationLifecycleState
62+ , OrganizationLifecycleState (..)
63+
6164 -- * Project
6265 , Project
6366 , project
@@ -82,6 +85,9 @@ module Network.Google.ResourceManager.Types
8285 , Empty
8386 , empty
8487
88+ -- * FolderOperationErrorErrorMessageId
89+ , FolderOperationErrorErrorMessageId (..)
90+
8591 -- * ProjectCreationStatus
8692 , ProjectCreationStatus
8793 , projectCreationStatus
@@ -99,22 +105,40 @@ module Network.Google.ResourceManager.Types
99105 , folderOperationError
100106 , foeErrorMessageId
101107
108+ -- * FolderOperationOperationType
109+ , FolderOperationOperationType (..)
110+
102111 -- * SetIAMPolicyRequest
103112 , SetIAMPolicyRequest
104113 , setIAMPolicyRequest
105114 , siprPolicy
106115
116+ -- * ProjectLifecycleState
117+ , ProjectLifecycleState (..)
118+
119+ -- * Xgafv
120+ , Xgafv (..)
121+
107122 -- * TestIAMPermissionsRequest
108123 , TestIAMPermissionsRequest
109124 , testIAMPermissionsRequest
110125 , tiprPermissions
111126
127+ -- * GetAncestryRequest
128+ , GetAncestryRequest
129+ , getAncestryRequest
130+
112131 -- * SearchOrganizationsResponse
113132 , SearchOrganizationsResponse
114133 , searchOrganizationsResponse
115134 , sorNextPageToken
116135 , sorOrganizations
117136
137+ -- * GetAncestryResponse
138+ , GetAncestryResponse
139+ , getAncestryResponse
140+ , garAncestor
141+
118142 -- * TestIAMPermissionsResponse
119143 , TestIAMPermissionsResponse
120144 , testIAMPermissionsResponse
@@ -154,6 +178,11 @@ module Network.Google.ResourceManager.Types
154178 , orgDisplayName
155179 , orgLifecycleState
156180
181+ -- * Ancestor
182+ , Ancestor
183+ , ancestor
184+ , aResourceId
185+
157186 -- * OperationResponse
158187 , OperationResponse
159188 , operationResponse
gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs+126−26
@@ -369,8 +369,8 @@ data Project = Project'
369369 , _pName :: !(Maybe Text)
370370 , _pLabels :: !(Maybe ProjectLabels)
371371 , _pProjectId :: !(Maybe Text)
372− , _pLifecycleState :: !(Maybe Text)
373− , _pCreateTime :: !(Maybe Text)
372+ , _pLifecycleState :: !(Maybe ProjectLifecycleState)
373+ , _pCreateTime :: !(Maybe DateTime')
374374 } deriving (Eq,Show,Data,Typeable,Generic)
375375
376376-- | Creates a value of 'Project' with the minimum fields required to make a request.
@@ -404,12 +404,14 @@ project =
404404 }
405405
406406-- | An optional reference to a parent Resource. The only supported parent
407−-- type is \"organization\". Once set, the parent cannot be modified.
408−-- Read-write.
407+-- type is \"organization\". Once set, the parent cannot be modified. The
408+-- \`parent\` can be set on creation or using the \`UpdateProject\` method;
409+-- the end user must have the \`resourcemanager.projects.create\`
410+-- permission on the parent. Read-write.
409411pParent :: Lens' Project (Maybe ResourceId)
410412pParent = lens _pParent (\ s a -> s{_pParent = a})
411413
412−-- | The number uniquely identifying the project. Example: 415104041262
414+-- | The number uniquely identifying the project. Example: '415104041262'
413415-- Read-only.
414416pProjectNumber :: Lens' Project (Maybe Int64)
415417pProjectNumber
@@ -420,7 +422,7 @@ pProjectNumber
420422-- | The user-assigned display name of the Project. It must be 4 to 30
421423-- characters. Allowed characters are: lowercase and uppercase letters,
422424-- numbers, hyphen, single-quote, double-quote, space, and exclamation
423−-- point. Example: My Project Read-write.
425+-- point. Example: 'My Project' Read-write.
424426pName :: Lens' Project (Maybe Text)
425427pName = lens _pName (\ s a -> s{_pName = a})
426428
@@ -431,29 +433,30 @@ pName = lens _pName (\ s a -> s{_pName = a})
431433-- expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. No more than 256
432434-- labels can be associated with a given resource. Clients should store
433435-- labels in a representation such as JSON that does not depend on specific
434−-- characters being disallowed. Example: \"environment\" : \"dev\"
436+-- characters being disallowed. Example: '\"environment\" : \"dev\"'
435437-- Read-write.
436438pLabels :: Lens' Project (Maybe ProjectLabels)
437439pLabels = lens _pLabels (\ s a -> s{_pLabels = a})
438440
439441-- | The unique, user-assigned ID of the Project. It must be 6 to 30
440442-- lowercase letters, digits, or hyphens. It must start with a letter.
441−-- Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after
442−-- creation.
443+-- Trailing hyphens are prohibited. Example: 'tokyo-rain-123' Read-only
444+-- after creation.
443445pProjectId :: Lens' Project (Maybe Text)
444446pProjectId
445447 = lens _pProjectId (\ s a -> s{_pProjectId = a})
446448
447449-- | The Project lifecycle state. Read-only.
448−pLifecycleState :: Lens' Project (Maybe Text)
450+pLifecycleState :: Lens' Project (Maybe ProjectLifecycleState)
449451pLifecycleState
450452 = lens _pLifecycleState
451453 (\ s a -> s{_pLifecycleState = a})
452454
453455-- | Creation time. Read-only.
454−pCreateTime :: Lens' Project (Maybe Text)
456+pCreateTime :: Lens' Project (Maybe UTCTime)
455457pCreateTime
456− = lens _pCreateTime (\ s a -> s{_pCreateTime = a})
458+ = lens _pCreateTime (\ s a -> s{_pCreateTime = a}) .
459+ mapping _DateTime
457460
458461instance FromJSON Project where
459462 parseJSON
@@ -520,7 +523,7 @@ operation =
520523oDone :: Lens' Operation (Maybe Bool)
521524oDone = lens _oDone (\ s a -> s{_oDone = a})
522525
523−-- | The error result of the operation in case of failure.
526+-- | The error result of the operation in case of failure or cancellation.
524527oError :: Lens' Operation (Maybe Status)
525528oError = lens _oError (\ s a -> s{_oError = a})
526529
@@ -600,7 +603,7 @@ instance ToJSON Empty where
600603data ProjectCreationStatus = ProjectCreationStatus'
601604 { _pcsGettable :: !(Maybe Bool)
602605 , _pcsReady :: !(Maybe Bool)
603− , _pcsCreateTime :: !(Maybe Text)
606+ , _pcsCreateTime :: !(Maybe DateTime')
604607 } deriving (Eq,Show,Data,Typeable,Generic)
605608
606609-- | Creates a value of 'ProjectCreationStatus' with the minimum fields required to make a request.
@@ -633,10 +636,11 @@ pcsReady :: Lens' ProjectCreationStatus (Maybe Bool)
633636pcsReady = lens _pcsReady (\ s a -> s{_pcsReady = a})
634637
635638-- | Creation time of the project creation workflow.
636−pcsCreateTime :: Lens' ProjectCreationStatus (Maybe Text)
639+pcsCreateTime :: Lens' ProjectCreationStatus (Maybe UTCTime)
637640pcsCreateTime
638641 = lens _pcsCreateTime
639642 (\ s a -> s{_pcsCreateTime = a})
643+ . mapping _DateTime
640644
641645instance FromJSON ProjectCreationStatus where
642646 parseJSON
@@ -691,7 +695,7 @@ instance ToJSON StatusDetailsItem where
691695--
692696-- /See:/ 'folderOperationError' smart constructor.
693697newtype FolderOperationError = FolderOperationError'
694− { _foeErrorMessageId :: Maybe Text
698+ { _foeErrorMessageId :: Maybe FolderOperationErrorErrorMessageId
695699 } deriving (Eq,Show,Data,Typeable,Generic)
696700
697701-- | Creates a value of 'FolderOperationError' with the minimum fields required to make a request.
@@ -707,7 +711,7 @@ folderOperationError =
707711 }
708712
709713-- | The type of operation error experienced.
710−foeErrorMessageId :: Lens' FolderOperationError (Maybe Text)
714+foeErrorMessageId :: Lens' FolderOperationError (Maybe FolderOperationErrorErrorMessageId)
711715foeErrorMessageId
712716 = lens _foeErrorMessageId
713717 (\ s a -> s{_foeErrorMessageId = a})
@@ -802,6 +806,27 @@ instance ToJSON TestIAMPermissionsRequest where
802806 = object
803807 (catMaybes [("permissions" .=) <$> _tiprPermissions])
804808
809+-- | The request sent to the GetAncestry method.
810+--
811+-- /See:/ 'getAncestryRequest' smart constructor.
812+data GetAncestryRequest =
813+ GetAncestryRequest'
814+ deriving (Eq,Show,Data,Typeable,Generic)
815+
816+-- | Creates a value of 'GetAncestryRequest' with the minimum fields required to make a request.
817+--
818+getAncestryRequest
819+ :: GetAncestryRequest
820+getAncestryRequest = GetAncestryRequest'
821+
822+instance FromJSON GetAncestryRequest where
823+ parseJSON
824+ = withObject "GetAncestryRequest"
825+ (\ o -> pure GetAncestryRequest')
826+
827+instance ToJSON GetAncestryRequest where
828+ toJSON = const emptyObject
829+
805830-- | The response returned from the \`SearchOrganizations\` method.
806831--
807832-- /See:/ 'searchOrganizationsResponse' smart constructor.
@@ -859,6 +884,46 @@ instance ToJSON SearchOrganizationsResponse where
859884 [("nextPageToken" .=) <$> _sorNextPageToken,
860885 ("organizations" .=) <$> _sorOrganizations])
861886
887+-- | Response from the GetAncestry method.
888+--
889+-- /See:/ 'getAncestryResponse' smart constructor.
890+newtype GetAncestryResponse = GetAncestryResponse'
891+ { _garAncestor :: Maybe [Ancestor]
892+ } deriving (Eq,Show,Data,Typeable,Generic)
893+
894+-- | Creates a value of 'GetAncestryResponse' with the minimum fields required to make a request.
895+--
896+-- Use one of the following lenses to modify other fields as desired:
897+--
898+-- * 'garAncestor'
899+getAncestryResponse
900+ :: GetAncestryResponse
901+getAncestryResponse =
902+ GetAncestryResponse'
903+ { _garAncestor = Nothing
904+ }
905+
906+-- | Ancestors are ordered from bottom to top of the resource hierarchy. The
907+-- first ancestor is the project itself, followed by the project\'s parent,
908+-- etc.
909+garAncestor :: Lens' GetAncestryResponse [Ancestor]
910+garAncestor
911+ = lens _garAncestor (\ s a -> s{_garAncestor = a}) .
912+ _Default
913+ . _Coerce
914+
915+instance FromJSON GetAncestryResponse where
916+ parseJSON
917+ = withObject "GetAncestryResponse"
918+ (\ o ->
919+ GetAncestryResponse' <$>
920+ (o .:? "ancestor" .!= mempty))
921+
922+instance ToJSON GetAncestryResponse where
923+ toJSON GetAncestryResponse'{..}
924+ = object
925+ (catMaybes [("ancestor" .=) <$> _garAncestor])
926+
862927-- | Response message for \`TestIamPermissions\` method.
863928--
864929-- /See:/ 'testIAMPermissionsResponse' smart constructor.
@@ -916,7 +981,7 @@ instance ToJSON TestIAMPermissionsResponse where
916981--
917982-- /See:/ 'policy' smart constructor.
918983data Policy = Policy'
919− { _pEtag :: !(Maybe Base64)
984+ { _pEtag :: !(Maybe Bytes)
920985 , _pVersion :: !(Maybe (Textual Int32))
921986 , _pBindings :: !(Maybe [Binding])
922987 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -951,7 +1016,7 @@ policy =
9511016pEtag :: Lens' Policy (Maybe ByteString)
9521017pEtag
9531018 = lens _pEtag (\ s a -> s{_pEtag = a}) .
954− mapping _Base64
1019+ mapping _Bytes
9551020
9561021-- | Version of the \`Policy\`. The default version is 0.
9571022pVersion :: Lens' Policy (Maybe Int32)
@@ -991,7 +1056,7 @@ instance ToJSON Policy where
9911056-- expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. No more than 256
9921057-- labels can be associated with a given resource. Clients should store
9931058-- labels in a representation such as JSON that does not depend on specific
994−-- characters being disallowed. Example: \"environment\" : \"dev\"
1059+-- characters being disallowed. Example: '\"environment\" : \"dev\"'
9951060-- Read-write.
9961061--
9971062-- /See:/ 'projectLabels' smart constructor.
@@ -1068,7 +1133,7 @@ instance ToJSON OperationMetadata where
10681133data FolderOperation = FolderOperation'
10691134 { _foDestinationParent :: !(Maybe Text)
10701135 , _foDisplayName :: !(Maybe Text)
1071− , _foOperationType :: !(Maybe Text)
1136+ , _foOperationType :: !(Maybe FolderOperationOperationType)
10721137 , _foSourceParent :: !(Maybe Text)
10731138 } deriving (Eq,Show,Data,Typeable,Generic)
10741139
@@ -1107,7 +1172,7 @@ foDisplayName
11071172 (\ s a -> s{_foDisplayName = a})
11081173
11091174-- | The type of this operation.
1110−foOperationType :: Lens' FolderOperation (Maybe Text)
1175+foOperationType :: Lens' FolderOperation (Maybe FolderOperationOperationType)
11111176foOperationType
11121177 = lens _foOperationType
11131178 (\ s a -> s{_foOperationType = a})
@@ -1142,11 +1207,11 @@ instance ToJSON FolderOperation where
11421207--
11431208-- /See:/ 'organization' smart constructor.
11441209data Organization = Organization'
1145− { _orgCreationTime :: !(Maybe Text)
1210+ { _orgCreationTime :: !(Maybe DateTime')
11461211 , _orgOwner :: !(Maybe OrganizationOwner)
11471212 , _orgName :: !(Maybe Text)
11481213 , _orgDisplayName :: !(Maybe Text)
1149− , _orgLifecycleState :: !(Maybe Text)
1214+ , _orgLifecycleState :: !(Maybe OrganizationLifecycleState)
11501215 } deriving (Eq,Show,Data,Typeable,Generic)
11511216
11521217-- | Creates a value of 'Organization' with the minimum fields required to make a request.
@@ -1175,10 +1240,11 @@ organization =
11751240
11761241-- | Timestamp when the Organization was created. Assigned by the server.
11771242-- \'OutputOnly
1178−orgCreationTime :: Lens' Organization (Maybe Text)
1243+orgCreationTime :: Lens' Organization (Maybe UTCTime)
11791244orgCreationTime
11801245 = lens _orgCreationTime
11811246 (\ s a -> s{_orgCreationTime = a})
1247+ . mapping _DateTime
11821248
11831249-- | The owner of this Organization. The owner should be specified on
11841250-- creation. Once set, it cannot be changed. This field is required.
@@ -1202,7 +1268,7 @@ orgDisplayName
12021268
12031269-- | The organization\'s current lifecycle state. Assigned by the server.
12041270-- \'OutputOnly
1205−orgLifecycleState :: Lens' Organization (Maybe Text)
1271+orgLifecycleState :: Lens' Organization (Maybe OrganizationLifecycleState)
12061272orgLifecycleState
12071273 = lens _orgLifecycleState
12081274 (\ s a -> s{_orgLifecycleState = a})
@@ -1226,6 +1292,40 @@ instance ToJSON Organization where
12261292 ("displayName" .=) <$> _orgDisplayName,
12271293 ("lifecycleState" .=) <$> _orgLifecycleState])
12281294
1295+-- | Identifying information for a single ancestor of a project.
1296+--
1297+-- /See:/ 'ancestor' smart constructor.
1298+newtype Ancestor = Ancestor'
1299+ { _aResourceId :: Maybe ResourceId
1300+ } deriving (Eq,Show,Data,Typeable,Generic)
1301+
1302+-- | Creates a value of 'Ancestor' with the minimum fields required to make a request.
1303+--
1304+-- Use one of the following lenses to modify other fields as desired:
1305+--
1306+-- * 'aResourceId'
1307+ancestor
1308+ :: Ancestor
1309+ancestor =
1310+ Ancestor'
1311+ { _aResourceId = Nothing
1312+ }
1313+
1314+-- | Resource id of the ancestor.
1315+aResourceId :: Lens' Ancestor (Maybe ResourceId)
1316+aResourceId
1317+ = lens _aResourceId (\ s a -> s{_aResourceId = a})
1318+
1319+instance FromJSON Ancestor where
1320+ parseJSON
1321+ = withObject "Ancestor"
1322+ (\ o -> Ancestor' <$> (o .:? "resourceId"))
1323+
1324+instance ToJSON Ancestor where
1325+ toJSON Ancestor'{..}
1326+ = object
1327+ (catMaybes [("resourceId" .=) <$> _aResourceId])
1328+
12291329-- | The normal response of the operation in case of success. If the original
12301330-- method returns no data on success, such as \`Delete\`, the response is
12311331-- \`google.protobuf.Empty\`. If the original method is standard
gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Sum.hs+205
@@ -17,3 +17,208 @@
1717module Network.Google.ResourceManager.Types.Sum where
1818
1919import Network.Google.Prelude
20+
21+-- | The organization\'s current lifecycle state. Assigned by the server.
22+-- \'OutputOnly
23+data OrganizationLifecycleState
24+ = LifecycleStateUnspecified
25+ -- ^ @LIFECYCLE_STATE_UNSPECIFIED@
26+ -- Unspecified state. This is only useful for distinguishing unset values.
27+ | Active
28+ -- ^ @ACTIVE@
29+ -- The normal and active state.
30+ | DeleteRequested
31+ -- ^ @DELETE_REQUESTED@
32+ -- The organization has been marked for deletion by the user.
33+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
34+
35+instance Hashable OrganizationLifecycleState
36+
37+instance FromHttpApiData OrganizationLifecycleState where
38+ parseQueryParam = \case
39+ "LIFECYCLE_STATE_UNSPECIFIED" -> Right LifecycleStateUnspecified
40+ "ACTIVE" -> Right Active
41+ "DELETE_REQUESTED" -> Right DeleteRequested
42+ x -> Left ("Unable to parse OrganizationLifecycleState from: " <> x)
43+
44+instance ToHttpApiData OrganizationLifecycleState where
45+ toQueryParam = \case
46+ LifecycleStateUnspecified -> "LIFECYCLE_STATE_UNSPECIFIED"
47+ Active -> "ACTIVE"
48+ DeleteRequested -> "DELETE_REQUESTED"
49+
50+instance FromJSON OrganizationLifecycleState where
51+ parseJSON = parseJSONText "OrganizationLifecycleState"
52+
53+instance ToJSON OrganizationLifecycleState where
54+ toJSON = toJSONText
55+
56+-- | The type of operation error experienced.
57+data FolderOperationErrorErrorMessageId
58+ = ErrorTypeUnspecified
59+ -- ^ @ERROR_TYPE_UNSPECIFIED@
60+ -- The error type was unrecognized or unspecified.
61+ | FolderHeightViolation
62+ -- ^ @FOLDER_HEIGHT_VIOLATION@
63+ -- The attempted action would violate the max folder depth constraint.
64+ | MaxChildFoldersViolation
65+ -- ^ @MAX_CHILD_FOLDERS_VIOLATION@
66+ -- The attempted action would violate the max child folders constraint.
67+ | FolderNameUniquenessViolation
68+ -- ^ @FOLDER_NAME_UNIQUENESS_VIOLATION@
69+ -- The attempted action would violate the locally-unique folder
70+ -- display_name constraint.
71+ | ResourceDeleted
72+ -- ^ @RESOURCE_DELETED@
73+ -- The resource being moved has been deleted.
74+ | ParentDeleted
75+ -- ^ @PARENT_DELETED@
76+ -- The resource a folder was being added to has been deleted.
77+ | CycleIntroducedError
78+ -- ^ @CYCLE_INTRODUCED_ERROR@
79+ -- The attempted action would introduce cycle in resource path.
80+ | FolderAlreadyBeingMoved
81+ -- ^ @FOLDER_ALREADY_BEING_MOVED@
82+ -- The attempted action would move a folder that is already being moved.
83+ | FolderToDeleteNonEmpty
84+ -- ^ @FOLDER_TO_DELETE_NON_EMPTY@
85+ -- The folder the caller is trying to delete contains active resources.
86+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
87+
88+instance Hashable FolderOperationErrorErrorMessageId
89+
90+instance FromHttpApiData FolderOperationErrorErrorMessageId where
91+ parseQueryParam = \case
92+ "ERROR_TYPE_UNSPECIFIED" -> Right ErrorTypeUnspecified
93+ "FOLDER_HEIGHT_VIOLATION" -> Right FolderHeightViolation
94+ "MAX_CHILD_FOLDERS_VIOLATION" -> Right MaxChildFoldersViolation
95+ "FOLDER_NAME_UNIQUENESS_VIOLATION" -> Right FolderNameUniquenessViolation
96+ "RESOURCE_DELETED" -> Right ResourceDeleted
97+ "PARENT_DELETED" -> Right ParentDeleted
98+ "CYCLE_INTRODUCED_ERROR" -> Right CycleIntroducedError
99+ "FOLDER_ALREADY_BEING_MOVED" -> Right FolderAlreadyBeingMoved
100+ "FOLDER_TO_DELETE_NON_EMPTY" -> Right FolderToDeleteNonEmpty
101+ x -> Left ("Unable to parse FolderOperationErrorErrorMessageId from: " <> x)
102+
103+instance ToHttpApiData FolderOperationErrorErrorMessageId where
104+ toQueryParam = \case
105+ ErrorTypeUnspecified -> "ERROR_TYPE_UNSPECIFIED"
106+ FolderHeightViolation -> "FOLDER_HEIGHT_VIOLATION"
107+ MaxChildFoldersViolation -> "MAX_CHILD_FOLDERS_VIOLATION"
108+ FolderNameUniquenessViolation -> "FOLDER_NAME_UNIQUENESS_VIOLATION"
109+ ResourceDeleted -> "RESOURCE_DELETED"
110+ ParentDeleted -> "PARENT_DELETED"
111+ CycleIntroducedError -> "CYCLE_INTRODUCED_ERROR"
112+ FolderAlreadyBeingMoved -> "FOLDER_ALREADY_BEING_MOVED"
113+ FolderToDeleteNonEmpty -> "FOLDER_TO_DELETE_NON_EMPTY"
114+
115+instance FromJSON FolderOperationErrorErrorMessageId where
116+ parseJSON = parseJSONText "FolderOperationErrorErrorMessageId"
117+
118+instance ToJSON FolderOperationErrorErrorMessageId where
119+ toJSON = toJSONText
120+
121+-- | The type of this operation.
122+data FolderOperationOperationType
123+ = OperationTypeUnspecified
124+ -- ^ @OPERATION_TYPE_UNSPECIFIED@
125+ -- Operation type not specified.
126+ | Create
127+ -- ^ @CREATE@
128+ -- A create folder operation.
129+ | Move
130+ -- ^ @MOVE@
131+ -- A move folder operation.
132+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
133+
134+instance Hashable FolderOperationOperationType
135+
136+instance FromHttpApiData FolderOperationOperationType where
137+ parseQueryParam = \case
138+ "OPERATION_TYPE_UNSPECIFIED" -> Right OperationTypeUnspecified
139+ "CREATE" -> Right Create
140+ "MOVE" -> Right Move
141+ x -> Left ("Unable to parse FolderOperationOperationType from: " <> x)
142+
143+instance ToHttpApiData FolderOperationOperationType where
144+ toQueryParam = \case
145+ OperationTypeUnspecified -> "OPERATION_TYPE_UNSPECIFIED"
146+ Create -> "CREATE"
147+ Move -> "MOVE"
148+
149+instance FromJSON FolderOperationOperationType where
150+ parseJSON = parseJSONText "FolderOperationOperationType"
151+
152+instance ToJSON FolderOperationOperationType where
153+ toJSON = toJSONText
154+
155+-- | The Project lifecycle state. Read-only.
156+data ProjectLifecycleState
157+ = PLSLifecycleStateUnspecified
158+ -- ^ @LIFECYCLE_STATE_UNSPECIFIED@
159+ -- Unspecified state. This is only used\/useful for distinguishing unset
160+ -- values.
161+ | PLSActive
162+ -- ^ @ACTIVE@
163+ -- The normal and active state.
164+ | PLSDeleteRequested
165+ -- ^ @DELETE_REQUESTED@
166+ -- The project has been marked for deletion by the user (by invoking
167+ -- DeleteProject) or by the system (Google Cloud Platform). This can
168+ -- generally be reversed by invoking UndeleteProject.
169+ | PLSDeleteInProgress
170+ -- ^ @DELETE_IN_PROGRESS@
171+ -- This lifecycle state is no longer used and not returned by the API.
172+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
173+
174+instance Hashable ProjectLifecycleState
175+
176+instance FromHttpApiData ProjectLifecycleState where
177+ parseQueryParam = \case
178+ "LIFECYCLE_STATE_UNSPECIFIED" -> Right PLSLifecycleStateUnspecified
179+ "ACTIVE" -> Right PLSActive
180+ "DELETE_REQUESTED" -> Right PLSDeleteRequested
181+ "DELETE_IN_PROGRESS" -> Right PLSDeleteInProgress
182+ x -> Left ("Unable to parse ProjectLifecycleState from: " <> x)
183+
184+instance ToHttpApiData ProjectLifecycleState where
185+ toQueryParam = \case
186+ PLSLifecycleStateUnspecified -> "LIFECYCLE_STATE_UNSPECIFIED"
187+ PLSActive -> "ACTIVE"
188+ PLSDeleteRequested -> "DELETE_REQUESTED"
189+ PLSDeleteInProgress -> "DELETE_IN_PROGRESS"
190+
191+instance FromJSON ProjectLifecycleState where
192+ parseJSON = parseJSONText "ProjectLifecycleState"
193+
194+instance ToJSON ProjectLifecycleState where
195+ toJSON = toJSONText
196+
197+-- | V1 error format.
198+data Xgafv
199+ = X1
200+ -- ^ @1@
201+ -- v1 error format
202+ | X2
203+ -- ^ @2@
204+ -- v2 error format
205+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
206+
207+instance Hashable Xgafv
208+
209+instance FromHttpApiData Xgafv where
210+ parseQueryParam = \case
211+ "1" -> Right X1
212+ "2" -> Right X2
213+ x -> Left ("Unable to parse Xgafv from: " <> x)
214+
215+instance ToHttpApiData Xgafv where
216+ toQueryParam = \case
217+ X1 -> "1"
218+ X2 -> "2"
219+
220+instance FromJSON Xgafv where
221+ parseJSON = parseJSONText "Xgafv"
222+
223+instance ToJSON Xgafv where
224+ toJSON = toJSONText
gogol-resourcemanager/gogol-resourcemanager.cabal+1
@@ -43,6 +43,7 @@ library
4343 , Network.Google.Resource.CloudResourceManager.Projects.Create
4444 , Network.Google.Resource.CloudResourceManager.Projects.Delete
4545 , Network.Google.Resource.CloudResourceManager.Projects.Get
46+ , Network.Google.Resource.CloudResourceManager.Projects.GetAncestry
4647 , Network.Google.Resource.CloudResourceManager.Projects.GetIAMPolicy
4748 , Network.Google.Resource.CloudResourceManager.Projects.List
4849 , Network.Google.Resource.CloudResourceManager.Projects.SetIAMPolicy