on develop help sign in
Regenerating gogol-resourcemanager from latest service definition
d6b3798Brendan Hay
gen/model/cloudresourcemanager/v1/cloudresourcemanager-api.json+456−72
@@ -1,12 +1,12 @@
1{
1{
2 "kind": "discovery#restDescription",
2 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/808IeaiUvRpH2AAOyroDUDw0WoY\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/KWbv1ck4Hir_ldCgHUUAxKHck4c\"",
4 "discoveryVersion": "v1",
4 "discoveryVersion": "v1",
5 "id": "cloudresourcemanager:v1",
5 "id": "cloudresourcemanager:v1",
6 "name": "cloudresourcemanager",
6 "name": "cloudresourcemanager",
7 "canonicalName": "Cloud Resource Manager",
7 "canonicalName": "Cloud Resource Manager",
8 "version": "v1",
8 "version": "v1",
9− "revision": "20160316",
9+ "revision": "20160927",
10 "title": "Google Cloud Resource Manager API",
10 "title": "Google Cloud Resource Manager API",
11 "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.",
11 "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.",
12 "ownerDomain": "google.com",
12 "ownerDomain": "google.com",
@@ -114,98 +114,159 @@
114 }
114 }
115 },
115 },
116 "schemas": {
116 "schemas": {
117− "Project": {
117+ "Operation": {
118− "id": "Project",
118+ "id": "Operation",
119 "type": "object",
119 "type": "object",
120− "description": "A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.",
120+ "description": "This resource represents a long-running operation that is the result of a network API call.",
121 "properties": {
121 "properties": {
122− "projectNumber": {
122+ "name": {
123− "type": "string",
124− "description": "The number uniquely identifying the project. Example: 415104041262 Read-only.",
125− "format": "int64"
126− },
127− "projectId": {
128 "type": "string",
123 "type": "string",
129− "description": "The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation."
124+ "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`."
130 },
125 },
131− "lifecycleState": {
126+ "metadata": {
132− "type": "string",
127+ "type": "object",
133− "description": "The Project lifecycle state. Read-only.",
128+ "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.",
134− "enum": [
129+ "additionalProperties": {
135− "LIFECYCLE_STATE_UNSPECIFIED",
130+ "type": "any",
136− "ACTIVE",
131+ "description": "Properties of the object. Contains field @type with type URL."
137− "DELETE_REQUESTED",
132+ }
138− "DELETE_IN_PROGRESS"
139− ]
140 },
133 },
141− "name": {
134+ "done": {
142− "type": "string",
135+ "type": "boolean",
143− "description": "The user-assigned name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write."
136+ "description": "If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available."
144 },
137 },
145− "createTime": {
138+ "error": {
146− "type": "string",
139+ "$ref": "Status",
147− "description": "Creation time. Read-only."
140+ "description": "The error result of the operation in case of failure."
148 },
141 },
149− "labels": {
142+ "response": {
150 "type": "object",
143 "type": "object",
151− "description": "The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: \"environment\" : \"dev\" Read-write.",
144+ "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.",
152 "additionalProperties": {
145 "additionalProperties": {
153− "type": "string"
146+ "type": "any",
147+ "description": "Properties of the object. Contains field @type with type URL."
154 }
148 }
149+ }
150+ }
151+ },
152+ "Status": {
153+ "id": "Status",
154+ "type": "object",
155+ "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.",
156+ "properties": {
157+ "code": {
158+ "type": "integer",
159+ "description": "The status code, which should be an enum value of google.rpc.Code.",
160+ "format": "int32"
155 },
161 },
156− "parent": {
162+ "message": {
157− "$ref": "ResourceId",
163+ "type": "string",
158− "description": "An optional reference to a parent Resource. The only supported parent type is \"organization\". Once set, the parent cannot be modified. Read-write."
164+ "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client."
165+ },
166+ "details": {
167+ "type": "array",
168+ "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.",
169+ "items": {
170+ "type": "object",
171+ "additionalProperties": {
172+ "type": "any",
173+ "description": "Properties of the object. Contains field @type with type URL."
174+ }
175+ }
159 }
176 }
160 }
177 }
161 },
178 },
162− "ResourceId": {
179+ "SearchOrganizationsRequest": {
163− "id": "ResourceId",
180+ "id": "SearchOrganizationsRequest",
164 "type": "object",
181 "type": "object",
165− "description": "A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on.",
182+ "description": "The request sent to the `SearchOrganizations` method.",
166 "properties": {
183 "properties": {
184+ "pageSize": {
167− "type": {
185+ "type": "integer",
186+ "description": "The maximum number of Organizations to return in the response. This field is optional.",
187+ "format": "int32"
188+ },
189+ "pageToken": {
168 "type": "string",
190 "type": "string",
169− "description": "Required field representing the resource type this id is for. At present, the only valid type is \"organization\"."
191+ "description": "A pagination token returned from a previous call to `SearchOrganizations` that indicates from where listing should continue. This field is optional."
170 },
192 },
171− "id": {
193+ "filter": {
172 "type": "string",
194 "type": "string",
173− "description": "Required field for the type-specific id. This should correspond to the id used in the type-specific API's."
195+ "description": "An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Organizations may be filtered by `owner.directoryCustomerId` or by `domain`, where the domain is a Google for Work domain, for example: |Filter|Description| |------|-----------| |owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.| |domain:google.com|Organizations corresponding to the domain `google.com`.| This field is optional."
174 }
196 }
175 }
197 }
176 },
198 },
177− "ListProjectsResponse": {
199+ "SearchOrganizationsResponse": {
178− "id": "ListProjectsResponse",
200+ "id": "SearchOrganizationsResponse",
179 "type": "object",
201 "type": "object",
180− "description": "A page of the response received from the ListProjects method. A paginated response where more pages are available has `next_page_token` set. This token can be used in a subsequent request to retrieve the next request page.",
202+ "description": "The response returned from the `SearchOrganizations` method.",
181 "properties": {
203 "properties": {
182− "projects": {
204+ "organizations": {
183 "type": "array",
205 "type": "array",
184− "description": "The list of Projects that matched the list filter. This list can be paginated.",
206+ "description": "The list of Organizations that matched the search query, possibly paginated.",
185 "items": {
207 "items": {
186− "$ref": "Project"
208+ "$ref": "Organization"
187 }
209 }
188 },
210 },
189 "nextPageToken": {
211 "nextPageToken": {
190 "type": "string",
212 "type": "string",
191− "description": "Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime."
213+ "description": "A pagination token to be used to retrieve the next page of results. If the result is too large to fit within the page size specified in the request, this field will be set with a token that can be used to fetch the next page of results. If this field is empty, it indicates that this response contains the last page of results."
192 }
214 }
193 }
215 }
194 },
216 },
195− "Empty": {
217+ "Organization": {
196− "id": "Empty",
218+ "id": "Organization",
197 "type": "object",
219 "type": "object",
198− "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`."
220+ "description": "The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong.",
221+ "properties": {
222+ "name": {
223+ "type": "string",
224+ "description": "Output Only. The resource name of the organization. This is the organization's relative path in the API. Its format is \"organizations/[organization_id]\". For example, \"organizations/1234\"."
225+ },
226+ "displayName": {
227+ "type": "string",
228+ "description": "A friendly string to be used to refer to the Organization in the UI. Assigned by the server, set to the firm name of the Google For Work customer that owns this organization. @OutputOnly"
229+ },
230+ "owner": {
231+ "$ref": "OrganizationOwner",
232+ "description": "The owner of this Organization. The owner should be specified on creation. Once set, it cannot be changed. This field is required."
233+ },
234+ "creationTime": {
235+ "type": "string",
236+ "description": "Timestamp when the Organization was created. Assigned by the server. @OutputOnly"
237+ },
238+ "lifecycleState": {
239+ "type": "string",
240+ "description": "The organization's current lifecycle state. Assigned by the server. @OutputOnly",
241+ "enum": [
242+ "LIFECYCLE_STATE_UNSPECIFIED",
243+ "ACTIVE",
244+ "DELETE_REQUESTED"
245+ ]
246+ }
247+ }
199 },
248 },
200− "UndeleteProjectRequest": {
249+ "OrganizationOwner": {
201− "id": "UndeleteProjectRequest",
250+ "id": "OrganizationOwner",
202 "type": "object",
251 "type": "object",
203− "description": "The request sent to the UndeleteProject method."
252+ "description": "The entity that owns an Organization. The lifetime of the Organization and all of its descendants are bound to the `OrganizationOwner`. If the `OrganizationOwner` is deleted, the Organization and all its descendants will be deleted.",
253+ "properties": {
254+ "directoryCustomerId": {
255+ "type": "string",
256+ "description": "The Google for Work customer id used in the Directory API."
257+ }
258+ }
204 },
259 },
205− "GetIamPolicyRequest": {
260+ "SetIamPolicyRequest": {
206− "id": "GetIamPolicyRequest",
261+ "id": "SetIamPolicyRequest",
207 "type": "object",
262 "type": "object",
208− "description": "Request message for `GetIamPolicy` method."
263+ "description": "Request message for `SetIamPolicy` method.",
264+ "properties": {
265+ "policy": {
266+ "$ref": "Policy",
267+ "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them."
268+ }
269+ }
209 },
270 },
210 "Policy": {
271 "Policy": {
211 "id": "Policy",
272 "id": "Policy",
@@ -249,16 +310,10 @@
249 }
310 }
250 }
311 }
251 },
312 },
252− "SetIamPolicyRequest": {
313+ "GetIamPolicyRequest": {
253− "id": "SetIamPolicyRequest",
314+ "id": "GetIamPolicyRequest",
254 "type": "object",
315 "type": "object",
255− "description": "Request message for `SetIamPolicy` method.",
316+ "description": "Request message for `GetIamPolicy` method."
256− "properties": {
257− "policy": {
258− "$ref": "Policy",
259− "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them."
260− }
261− }
262 },
317 },
263 "TestIamPermissionsRequest": {
318 "TestIamPermissionsRequest": {
264 "id": "TestIamPermissionsRequest",
319 "id": "TestIamPermissionsRequest",
@@ -267,7 +322,7 @@
267 "properties": {
322 "properties": {
268 "permissions": {
323 "permissions": {
269 "type": "array",
324 "type": "array",
270− "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.",
325+ "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).",
271 "items": {
326 "items": {
272 "type": "string"
327 "type": "string"
273 }
328 }
@@ -287,9 +342,323 @@
287 }
342 }
288 }
343 }
289 }
344 }
345+ },
346+ "Project": {
347+ "id": "Project",
348+ "type": "object",
349+ "description": "A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.",
350+ "properties": {
351+ "projectNumber": {
352+ "type": "string",
353+ "description": "The number uniquely identifying the project. Example: 415104041262 Read-only.",
354+ "format": "int64"
355+ },
356+ "projectId": {
357+ "type": "string",
358+ "description": "The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation."
359+ },
360+ "lifecycleState": {
361+ "type": "string",
362+ "description": "The Project lifecycle state. Read-only.",
363+ "enum": [
364+ "LIFECYCLE_STATE_UNSPECIFIED",
365+ "ACTIVE",
366+ "DELETE_REQUESTED",
367+ "DELETE_IN_PROGRESS"
368+ ]
369+ },
370+ "name": {
371+ "type": "string",
372+ "description": "The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write."
373+ },
374+ "createTime": {
375+ "type": "string",
376+ "description": "Creation time. Read-only."
377+ },
378+ "labels": {
379+ "type": "object",
380+ "description": "The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: \"environment\" : \"dev\" Read-write.",
381+ "additionalProperties": {
382+ "type": "string"
383+ }
384+ },
385+ "parent": {
386+ "$ref": "ResourceId",
387+ "description": "An optional reference to a parent Resource. The only supported parent type is \"organization\". Once set, the parent cannot be modified. Read-write."
388+ }
389+ }
390+ },
391+ "ResourceId": {
392+ "id": "ResourceId",
393+ "type": "object",
394+ "description": "A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on.",
395+ "properties": {
396+ "type": {
397+ "type": "string",
398+ "description": "Required field representing the resource type this id is for. At present, the only valid type is \"organization\"."
399+ },
400+ "id": {
401+ "type": "string",
402+ "description": "Required field for the type-specific id. This should correspond to the id used in the type-specific API's."
403+ }
404+ }
405+ },
406+ "ListProjectsResponse": {
407+ "id": "ListProjectsResponse",
408+ "type": "object",
409+ "description": "A page of the response received from the ListProjects method. A paginated response where more pages are available has `next_page_token` set. This token can be used in a subsequent request to retrieve the next request page.",
410+ "properties": {
411+ "projects": {
412+ "type": "array",
413+ "description": "The list of Projects that matched the list filter. This list can be paginated.",
414+ "items": {
415+ "$ref": "Project"
416+ }
417+ },
418+ "nextPageToken": {
419+ "type": "string",
420+ "description": "Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime."
421+ }
422+ }
423+ },
424+ "Empty": {
425+ "id": "Empty",
426+ "type": "object",
427+ "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`."
428+ },
429+ "UndeleteProjectRequest": {
430+ "id": "UndeleteProjectRequest",
431+ "type": "object",
432+ "description": "The request sent to the UndeleteProject method."
433+ },
434+ "ProjectCreationStatus": {
435+ "id": "ProjectCreationStatus",
436+ "type": "object",
437+ "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.",
438+ "properties": {
439+ "createTime": {
440+ "type": "string",
441+ "description": "Creation time of the project creation workflow."
442+ },
443+ "gettable": {
444+ "type": "boolean",
445+ "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete."
446+ },
447+ "ready": {
448+ "type": "boolean",
449+ "description": "True if the project creation process is complete."
450+ }
451+ }
452+ },
453+ "FolderOperation": {
454+ "id": "FolderOperation",
455+ "type": "object",
456+ "description": "Metadata describing a long running folder operation",
457+ "properties": {
458+ "displayName": {
459+ "type": "string",
460+ "description": "The display name of the folder."
461+ },
462+ "operationType": {
463+ "type": "string",
464+ "description": "The type of this operation.",
465+ "enum": [
466+ "OPERATION_TYPE_UNSPECIFIED",
467+ "CREATE",
468+ "MOVE"
469+ ]
470+ },
471+ "sourceParent": {
472+ "type": "string",
473+ "description": "The resource name of the folder's parent. Only applicable when the operation_type is MOVE."
474+ },
475+ "destinationParent": {
476+ "type": "string",
477+ "description": "The resource name of the folder or organization we are either creating the folder under or moving the folder to."
478+ }
479+ }
480+ },
481+ "FolderOperationError": {
482+ "id": "FolderOperationError",
483+ "type": "object",
484+ "description": "A classification of the Folder Operation error.",
485+ "properties": {
486+ "errorMessageId": {
487+ "type": "string",
488+ "description": "The type of operation error experienced.",
489+ "enum": [
490+ "ERROR_TYPE_UNSPECIFIED",
491+ "FOLDER_HEIGHT_VIOLATION",
492+ "MAX_CHILD_FOLDERS_VIOLATION",
493+ "FOLDER_NAME_UNIQUENESS_VIOLATION",
494+ "RESOURCE_DELETED",
495+ "PARENT_DELETED",
496+ "CYCLE_INTRODUCED_ERROR",
497+ "FOLDER_ALREADY_BEING_MOVED",
498+ "FOLDER_TO_DELETE_NON_EMPTY"
499+ ]
500+ }
501+ }
290 }
502 }
291 },
503 },
292 "resources": {
504 "resources": {
505+ "operations": {
506+ "methods": {
507+ "get": {
508+ "id": "cloudresourcemanager.operations.get",
509+ "path": "v1/{+name}",
510+ "httpMethod": "GET",
511+ "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
512+ "parameters": {
513+ "name": {
514+ "type": "string",
515+ "description": "The name of the operation resource.",
516+ "required": true,
517+ "pattern": "^operations/.*$",
518+ "location": "path"
519+ }
520+ },
521+ "parameterOrder": [
522+ "name"
523+ ],
524+ "response": {
525+ "$ref": "Operation"
526+ },
527+ "scopes": [
528+ "https://www.googleapis.com/auth/cloud-platform",
529+ "https://www.googleapis.com/auth/cloud-platform.read-only"
530+ ]
531+ }
532+ }
533+ },
534+ "organizations": {
535+ "methods": {
536+ "search": {
537+ "id": "cloudresourcemanager.organizations.search",
538+ "path": "v1/organizations:search",
539+ "httpMethod": "POST",
540+ "description": "Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results.",
541+ "request": {
542+ "$ref": "SearchOrganizationsRequest"
543+ },
544+ "response": {
545+ "$ref": "SearchOrganizationsResponse"
546+ },
547+ "scopes": [
548+ "https://www.googleapis.com/auth/cloud-platform",
549+ "https://www.googleapis.com/auth/cloud-platform.read-only"
550+ ]
551+ },
552+ "get": {
553+ "id": "cloudresourcemanager.organizations.get",
554+ "path": "v1/{+name}",
555+ "httpMethod": "GET",
556+ "description": "Fetches an Organization resource identified by the specified resource name.",
557+ "parameters": {
558+ "name": {
559+ "type": "string",
560+ "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".",
561+ "required": true,
562+ "pattern": "^organizations/[^/]*$",
563+ "location": "path"
564+ }
565+ },
566+ "parameterOrder": [
567+ "name"
568+ ],
569+ "response": {
570+ "$ref": "Organization"
571+ },
572+ "scopes": [
573+ "https://www.googleapis.com/auth/cloud-platform",
574+ "https://www.googleapis.com/auth/cloud-platform.read-only"
575+ ]
576+ },
577+ "setIamPolicy": {
578+ "id": "cloudresourcemanager.organizations.setIamPolicy",
579+ "path": "v1/{+resource}:setIamPolicy",
580+ "httpMethod": "POST",
581+ "description": "Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".",
582+ "parameters": {
583+ "resource": {
584+ "type": "string",
585+ "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
586+ "required": true,
587+ "pattern": "^organizations/[^/]*$",
588+ "location": "path"
589+ }
590+ },
591+ "parameterOrder": [
592+ "resource"
593+ ],
594+ "request": {
595+ "$ref": "SetIamPolicyRequest"
596+ },
597+ "response": {
598+ "$ref": "Policy"
599+ },
600+ "scopes": [
601+ "https://www.googleapis.com/auth/cloud-platform"
602+ ]
603+ },
604+ "getIamPolicy": {
605+ "id": "cloudresourcemanager.organizations.getIamPolicy",
606+ "path": "v1/{+resource}:getIamPolicy",
607+ "httpMethod": "POST",
608+ "description": "Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".",
609+ "parameters": {
610+ "resource": {
611+ "type": "string",
612+ "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
613+ "required": true,
614+ "pattern": "^organizations/[^/]*$",
615+ "location": "path"
616+ }
617+ },
618+ "parameterOrder": [
619+ "resource"
620+ ],
621+ "request": {
622+ "$ref": "GetIamPolicyRequest"
623+ },
624+ "response": {
625+ "$ref": "Policy"
626+ },
627+ "scopes": [
628+ "https://www.googleapis.com/auth/cloud-platform",
629+ "https://www.googleapis.com/auth/cloud-platform.read-only"
630+ ]
631+ },
632+ "testIamPermissions": {
633+ "id": "cloudresourcemanager.organizations.testIamPermissions",
634+ "path": "v1/{+resource}:testIamPermissions",
635+ "httpMethod": "POST",
636+ "description": "Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".",
637+ "parameters": {
638+ "resource": {
639+ "type": "string",
640+ "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
641+ "required": true,
642+ "pattern": "^organizations/[^/]*$",
643+ "location": "path"
644+ }
645+ },
646+ "parameterOrder": [
647+ "resource"
648+ ],
649+ "request": {
650+ "$ref": "TestIamPermissionsRequest"
651+ },
652+ "response": {
653+ "$ref": "TestIamPermissionsResponse"
654+ },
655+ "scopes": [
656+ "https://www.googleapis.com/auth/cloud-platform",
657+ "https://www.googleapis.com/auth/cloud-platform.read-only"
658+ ]
659+ }
660+ }
661+ },
293 "projects": {
662 "projects": {
294 "methods": {
663 "methods": {
295 "get": {
664 "get": {
@@ -347,6 +716,21 @@
347 "https://www.googleapis.com/auth/cloud-platform.read-only"
716 "https://www.googleapis.com/auth/cloud-platform.read-only"
348 ]
717 ]
349 },
718 },
719+ "create": {
720+ "id": "cloudresourcemanager.projects.create",
721+ "path": "v1/projects",
722+ "httpMethod": "POST",
723+ "description": "Request that a new Project be created. The result is an Operation which can be used to track the creation process. It is automatically deleted after a few hours, so there is no need to call DeleteOperation. Our SLO permits Project creation to take up to 30 seconds at the 90th percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile latency. 95th percentile latency is around 11 seconds. We recommend polling at the 5th second with an exponential backoff.",
724+ "request": {
725+ "$ref": "Project"
726+ },
727+ "response": {
728+ "$ref": "Operation"
729+ },
730+ "scopes": [
731+ "https://www.googleapis.com/auth/cloud-platform"
732+ ]
733+ },
350 "update": {
734 "update": {
351 "id": "cloudresourcemanager.projects.update",
735 "id": "cloudresourcemanager.projects.update",
352 "path": "v1/projects/{projectId}",
736 "path": "v1/projects/{projectId}",
@@ -377,7 +761,7 @@
377 "id": "cloudresourcemanager.projects.delete",
761 "id": "cloudresourcemanager.projects.delete",
378 "path": "v1/projects/{projectId}",
762 "path": "v1/projects/{projectId}",
379 "httpMethod": "DELETE",
763 "httpMethod": "DELETE",
380− "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the lifecycle state changes to DELETE_IN_PROGRESS. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.",
764+ "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.",
381 "parameters": {
765 "parameters": {
382 "projectId": {
766 "projectId": {
383 "type": "string",
767 "type": "string",
@@ -400,7 +784,7 @@
400 "id": "cloudresourcemanager.projects.undelete",
784 "id": "cloudresourcemanager.projects.undelete",
401 "path": "v1/projects/{projectId}:undelete",
785 "path": "v1/projects/{projectId}:undelete",
402 "httpMethod": "POST",
786 "httpMethod": "POST",
403− "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The caller must have modify permissions for this Project.",
787+ "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.",
404 "parameters": {
788 "parameters": {
405 "projectId": {
789 "projectId": {
406 "type": "string",
790 "type": "string",
@@ -430,7 +814,7 @@
430 "parameters": {
814 "parameters": {
431 "resource": {
815 "resource": {
432 "type": "string",
816 "type": "string",
433− "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.",
817+ "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
434 "required": true,
818 "required": true,
435 "location": "path"
819 "location": "path"
436 }
820 }
@@ -453,11 +837,11 @@
453 "id": "cloudresourcemanager.projects.setIamPolicy",
837 "id": "cloudresourcemanager.projects.setIamPolicy",
454 "path": "v1/projects/{resource}:setIamPolicy",
838 "path": "v1/projects/{resource}:setIamPolicy",
455 "httpMethod": "POST",
839 "httpMethod": "POST",
456− "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project currently supports only `user:{emailid}` and `serviceAccount:{emailid}` members in a `Binding` of a `Policy`. + To be added as an `owner`, a user must be invited via Cloud Platform console and must accept the invitation. + Members cannot be added to more than one role in the same policy. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.",
840+ "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted only to `user` and `serviceAccount`. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.",
457 "parameters": {
841 "parameters": {
458 "resource": {
842 "resource": {
459 "type": "string",
843 "type": "string",
460− "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.",
844+ "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
461 "required": true,
845 "required": true,
462 "location": "path"
846 "location": "path"
463 }
847 }
@@ -483,7 +867,7 @@
483 "parameters": {
867 "parameters": {
484 "resource": {
868 "resource": {
485 "type": "string",
869 "type": "string",
486− "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.",
870+ "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
487 "required": true,
871 "required": true,
488 "location": "path"
872 "location": "path"
489 }
873 }
gen/model/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json+131−32
@@ -1,12 +1,12 @@
1{
1{
2 "kind": "discovery#restDescription",
2 "kind": "discovery#restDescription",
3− "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/GkqtFEkXnBYAQROql86wY5QBIFo\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/LEsmfjb1rYEGIEL137RcSgOD86w\"",
4 "discoveryVersion": "v1",
4 "discoveryVersion": "v1",
5 "id": "cloudresourcemanager:v1beta1",
5 "id": "cloudresourcemanager:v1beta1",
6 "name": "cloudresourcemanager",
6 "name": "cloudresourcemanager",
7 "canonicalName": "Cloud Resource Manager",
7 "canonicalName": "Cloud Resource Manager",
8 "version": "v1beta1",
8 "version": "v1beta1",
9− "revision": "20160518",
9+ "revision": "20160927",
10 "title": "Google Cloud Resource Manager API",
10 "title": "Google Cloud Resource Manager API",
11 "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.",
11 "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.",
12 "ownerDomain": "google.com",
12 "ownerDomain": "google.com",
@@ -140,7 +140,7 @@
140 },
140 },
141 "name": {
141 "name": {
142 "type": "string",
142 "type": "string",
143− "description": "The user-assigned name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write."
143+ "description": "The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write."
144 },
144 },
145 "createTime": {
145 "createTime": {
146 "type": "string",
146 "type": "string",
@@ -166,7 +166,7 @@
166 "properties": {
166 "properties": {
167 "type": {
167 "type": {
168 "type": "string",
168 "type": "string",
169− "description": "Required field representing the resource type this id is for. At present, the only valid type is \"organization\"."
169+ "description": "Required field representing the resource type this id is for. At present, the valid types are \"project\" and \"organization\"."
170 },
170 },
171 "id": {
171 "id": {
172 "type": "string",
172 "type": "string",
@@ -297,7 +297,7 @@
297 "properties": {
297 "properties": {
298 "permissions": {
298 "permissions": {
299 "type": "array",
299 "type": "array",
300− "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.",
300+ "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).",
301 "items": {
301 "items": {
302 "type": "string"
302 "type": "string"
303 }
303 }
@@ -341,13 +341,17 @@
341 "type": "object",
341 "type": "object",
342 "description": "The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong.",
342 "description": "The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong.",
343 "properties": {
343 "properties": {
344+ "name": {
345+ "type": "string",
346+ "description": "Output Only. The resource name of the organization. This is the organization's relative path in the API. Its format is \"organizations/[organization_id]\". For example, \"organizations/1234\"."
347+ },
344 "organizationId": {
348 "organizationId": {
345 "type": "string",
349 "type": "string",
346− "description": "An immutable id for the Organization that is assigned on creation. This should be omitted when creating a new Organization. This field is read-only."
350+ "description": "An immutable id for the Organization that is assigned on creation. This should be omitted when creating a new Organization. This field is read-only. This field is deprecated and will be removed in v1. Use name instead."
347 },
351 },
348 "displayName": {
352 "displayName": {
349 "type": "string",
353 "type": "string",
350− "description": "A friendly string to be used to refer to the Organization in the UI. This field is required."
354+ "description": "A friendly string to be used to refer to the Organization in the UI. Assigned by the server, set to the firm name of the Google For Work customer that owns this organization. @OutputOnly"
351 },
355 },
352 "owner": {
356 "owner": {
353 "$ref": "OrganizationOwner",
357 "$ref": "OrganizationOwner",
@@ -356,6 +360,15 @@
356 "creationTime": {
360 "creationTime": {
357 "type": "string",
361 "type": "string",
358 "description": "Timestamp when the Organization was created. Assigned by the server. @OutputOnly"
362 "description": "Timestamp when the Organization was created. Assigned by the server. @OutputOnly"
363+ },
364+ "lifecycleState": {
365+ "type": "string",
366+ "description": "The organization's current lifecycle state. Assigned by the server. @OutputOnly",
367+ "enum": [
368+ "LIFECYCLE_STATE_UNSPECIFIED",
369+ "ACTIVE",
370+ "DELETE_REQUESTED"
371+ ]
359 }
372 }
360 }
373 }
361 },
374 },
@@ -369,6 +382,75 @@
369 "description": "The Google for Work customer id used in the Directory API."
382 "description": "The Google for Work customer id used in the Directory API."
370 }
383 }
371 }
384 }
385+ },
386+ "ProjectCreationStatus": {
387+ "id": "ProjectCreationStatus",
388+ "type": "object",
389+ "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.",
390+ "properties": {
391+ "createTime": {
392+ "type": "string",
393+ "description": "Creation time of the project creation workflow."
394+ },
395+ "gettable": {
396+ "type": "boolean",
397+ "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete."
398+ },
399+ "ready": {
400+ "type": "boolean",
401+ "description": "True if the project creation process is complete."
402+ }
403+ }
404+ },
405+ "FolderOperation": {
406+ "id": "FolderOperation",
407+ "type": "object",
408+ "description": "Metadata describing a long running folder operation",
409+ "properties": {
410+ "displayName": {
411+ "type": "string",
412+ "description": "The display name of the folder."
413+ },
414+ "operationType": {
415+ "type": "string",
416+ "description": "The type of this operation.",
417+ "enum": [
418+ "OPERATION_TYPE_UNSPECIFIED",
419+ "CREATE",
420+ "MOVE"
421+ ]
422+ },
423+ "sourceParent": {
424+ "type": "string",
425+ "description": "The resource name of the folder's parent. Only applicable when the operation_type is MOVE."
426+ },
427+ "destinationParent": {
428+ "type": "string",
429+ "description": "The resource name of the folder or organization we are either creating the folder under or moving the folder to."
430+ }
431+ }
432+ },
433+ "FolderOperationError": {
434+ "id": "FolderOperationError",
435+ "type": "object",
436+ "description": "A classification of the Folder Operation error.",
437+ "properties": {
438+ "errorMessageId": {
439+ "type": "string",
440+ "description": "The type of operation error experienced.",
441+ "enum": [
442+ "ERROR_TYPE_UNSPECIFIED",
443+ "FOLDER_HEIGHT_VIOLATION",
444+ "MAX_CHILD_FOLDERS_VIOLATION",
445+ "FOLDER_NAME_UNIQUENESS_VIOLATION",
446+ "RESOURCE_DELETED",
447+ "PARENT_DELETED",
448+ "CYCLE_INTRODUCED_ERROR",
449+ "FOLDER_ALREADY_BEING_MOVED",
450+ "FOLDER_TO_DELETE_NON_EMPTY"
451+ ]
452+ }
453+ }
372 }
454 }
373 },
455 },
374 "resources": {
456 "resources": {
@@ -379,6 +461,13 @@
379 "path": "v1beta1/projects",
461 "path": "v1beta1/projects",
380 "httpMethod": "POST",
462 "httpMethod": "POST",
381 "description": "Creates a Project resource. Initially, the Project resource is owned by its creator exclusively. The creator can later grant permission to others to read or update the Project. Several APIs are activated automatically for the Project, including Google Cloud Storage.",
463 "description": "Creates a Project resource. Initially, the Project resource is owned by its creator exclusively. The creator can later grant permission to others to read or update the Project. Several APIs are activated automatically for the Project, including Google Cloud Storage.",
464+ "parameters": {
465+ "useLegacyStack": {
466+ "type": "boolean",
467+ "description": "A safety hatch to opt out of the new reliable project creation process.",
468+ "location": "query"
469+ }
470+ },
382 "request": {
471 "request": {
383 "$ref": "Project"
472 "$ref": "Project"
384 },
473 },
@@ -474,7 +563,7 @@
474 "id": "cloudresourcemanager.projects.delete",
563 "id": "cloudresourcemanager.projects.delete",
475 "path": "v1beta1/projects/{projectId}",
564 "path": "v1beta1/projects/{projectId}",
476 "httpMethod": "DELETE",
565 "httpMethod": "DELETE",
477− "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the lifecycle state changes to DELETE_IN_PROGRESS. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.",
566+ "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.",
478 "parameters": {
567 "parameters": {
479 "projectId": {
568 "projectId": {
480 "type": "string",
569 "type": "string",
@@ -497,7 +586,7 @@
497 "id": "cloudresourcemanager.projects.undelete",
586 "id": "cloudresourcemanager.projects.undelete",
498 "path": "v1beta1/projects/{projectId}:undelete",
587 "path": "v1beta1/projects/{projectId}:undelete",
499 "httpMethod": "POST",
588 "httpMethod": "POST",
500− "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The caller must have modify permissions for this Project.",
589+ "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.",
501 "parameters": {
590 "parameters": {
502 "projectId": {
591 "projectId": {
503 "type": "string",
592 "type": "string",
@@ -554,7 +643,7 @@
554 "parameters": {
643 "parameters": {
555 "resource": {
644 "resource": {
556 "type": "string",
645 "type": "string",
557− "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.",
646+ "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
558 "required": true,
647 "required": true,
559 "location": "path"
648 "location": "path"
560 }
649 }
@@ -577,11 +666,11 @@
577 "id": "cloudresourcemanager.projects.setIamPolicy",
666 "id": "cloudresourcemanager.projects.setIamPolicy",
578 "path": "v1beta1/projects/{resource}:setIamPolicy",
667 "path": "v1beta1/projects/{resource}:setIamPolicy",
579 "httpMethod": "POST",
668 "httpMethod": "POST",
580− "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project currently supports only `user:{emailid}` and `serviceAccount:{emailid}` members in a `Binding` of a `Policy`. + To be added as an `owner`, a user must be invited via Cloud Platform console and must accept the invitation. + Members cannot be added to more than one role in the same policy. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.",
669+ "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted only to `user` and `serviceAccount`. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.",
581 "parameters": {
670 "parameters": {
582 "resource": {
671 "resource": {
583 "type": "string",
672 "type": "string",
584− "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.",
673+ "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
585 "required": true,
674 "required": true,
586 "location": "path"
675 "location": "path"
587 }
676 }
@@ -607,7 +696,7 @@
607 "parameters": {
696 "parameters": {
608 "resource": {
697 "resource": {
609 "type": "string",
698 "type": "string",
610− "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.",
699+ "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
611 "required": true,
700 "required": true,
612 "location": "path"
701 "location": "path"
613 }
702 }
@@ -663,19 +752,25 @@
663 },
752 },
664 "get": {
753 "get": {
665 "id": "cloudresourcemanager.organizations.get",
754 "id": "cloudresourcemanager.organizations.get",
666− "path": "v1beta1/organizations/{organizationId}",
755+ "path": "v1beta1/{+name}",
667 "httpMethod": "GET",
756 "httpMethod": "GET",
668− "description": "Fetches an Organization resource identified by the specified `organization_id`.",
757+ "description": "Fetches an Organization resource identified by the specified resource name.",
669 "parameters": {
758 "parameters": {
670− "organizationId": {
759+ "name": {
671 "type": "string",
760 "type": "string",
672− "description": "The id of the Organization resource to fetch.",
761+ "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".",
673 "required": true,
762 "required": true,
763+ "pattern": "^organizations/[^/]*$",
674 "location": "path"
764 "location": "path"
765+ },
766+ "organizationId": {
767+ "type": "string",
768+ "description": "The id of the Organization resource to fetch. This field is deprecated and will be removed in v1. Use name instead.",
769+ "location": "query"
675 }
770 }
676 },
771 },
677 "parameterOrder": [
772 "parameterOrder": [
678− "organizationId"
773+ "name"
679 ],
774 ],
680 "response": {
775 "response": {
681 "$ref": "Organization"
776 "$ref": "Organization"
@@ -687,19 +782,20 @@
687 },
782 },
688 "update": {
783 "update": {
689 "id": "cloudresourcemanager.organizations.update",
784 "id": "cloudresourcemanager.organizations.update",
690− "path": "v1beta1/organizations/{organizationId}",
785+ "path": "v1beta1/{+name}",
691 "httpMethod": "PUT",
786 "httpMethod": "PUT",
692− "description": "Updates an Organization resource identified by the specified `organization_id`.",
787+ "description": "Updates an Organization resource identified by the specified resource name.",
693 "parameters": {
788 "parameters": {
694− "organizationId": {
789+ "name": {
695 "type": "string",
790 "type": "string",
696− "description": "An immutable id for the Organization that is assigned on creation. This should be omitted when creating a new Organization. This field is read-only.",
791+ "description": "Output Only. The resource name of the organization. This is the organization's relative path in the API. Its format is \"organizations/[organization_id]\". For example, \"organizations/1234\".",
697 "required": true,
792 "required": true,
793+ "pattern": "^organizations/[^/]*$",
698 "location": "path"
794 "location": "path"
699 }
795 }
700 },
796 },
701 "parameterOrder": [
797 "parameterOrder": [
702− "organizationId"
798+ "name"
703 ],
799 ],
704 "request": {
800 "request": {
705 "$ref": "Organization"
801 "$ref": "Organization"
@@ -713,14 +809,15 @@
713 },
809 },
714 "setIamPolicy": {
810 "setIamPolicy": {
715 "id": "cloudresourcemanager.organizations.setIamPolicy",
811 "id": "cloudresourcemanager.organizations.setIamPolicy",
716− "path": "v1beta1/organizations/{resource}:setIamPolicy",
812+ "path": "v1beta1/{+resource}:setIamPolicy",
717 "httpMethod": "POST",
813 "httpMethod": "POST",
718− "description": "Sets the access control policy on an Organization resource. Replaces any existing policy.",
814+ "description": "Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".",
719 "parameters": {
815 "parameters": {
720 "resource": {
816 "resource": {
721 "type": "string",
817 "type": "string",
722− "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.",
818+ "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
723 "required": true,
819 "required": true,
820+ "pattern": "^organizations/[^/]*$",
724 "location": "path"
821 "location": "path"
725 }
822 }
726 },
823 },
@@ -739,14 +836,15 @@
739 },
836 },
740 "getIamPolicy": {
837 "getIamPolicy": {
741 "id": "cloudresourcemanager.organizations.getIamPolicy",
838 "id": "cloudresourcemanager.organizations.getIamPolicy",
742− "path": "v1beta1/organizations/{resource}:getIamPolicy",
839+ "path": "v1beta1/{+resource}:getIamPolicy",
743 "httpMethod": "POST",
840 "httpMethod": "POST",
744− "description": "Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists.",
841+ "description": "Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".",
745 "parameters": {
842 "parameters": {
746 "resource": {
843 "resource": {
747 "type": "string",
844 "type": "string",
748− "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.",
845+ "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
749 "required": true,
846 "required": true,
847+ "pattern": "^organizations/[^/]*$",
750 "location": "path"
848 "location": "path"
751 }
849 }
752 },
850 },
@@ -766,14 +864,15 @@
766 },
864 },
767 "testIamPermissions": {
865 "testIamPermissions": {
768 "id": "cloudresourcemanager.organizations.testIamPermissions",
866 "id": "cloudresourcemanager.organizations.testIamPermissions",
769− "path": "v1beta1/organizations/{resource}:testIamPermissions",
867+ "path": "v1beta1/{+resource}:testIamPermissions",
770 "httpMethod": "POST",
868 "httpMethod": "POST",
771− "description": "Returns permissions that a caller has on the specified Organization.",
869+ "description": "Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".",
772 "parameters": {
870 "parameters": {
773 "resource": {
871 "resource": {
774 "type": "string",
872 "type": "string",
775− "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.",
873+ "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.",
776 "required": true,
874 "required": true,
875+ "pattern": "^organizations/[^/]*$",
777 "location": "path"
876 "location": "path"
778 }
877 }
779 },
878 },
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Operations/Get.hsnew file+170
@@ -0,0 +1,170 @@
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.Operations.Get
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 the latest state of a long-running operation. Clients can use this
24+-- method to poll the operation result at intervals as recommended by the
25+-- API service.
26+--
27+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.operations.get@.
28+module Network.Google.Resource.CloudResourceManager.Operations.Get
29+ (
30+ -- * REST Resource
31+ OperationsGetResource
32+
33+ -- * Creating a Request
34+ , operationsGet
35+ , OperationsGet
36+
37+ -- * Request Lenses
38+ , ogXgafv
39+ , ogUploadProtocol
40+ , ogPp
41+ , ogAccessToken
42+ , ogUploadType
43+ , ogBearerToken
44+ , ogName
45+ , ogCallback
46+ ) where
47+
48+import Network.Google.Prelude
49+import Network.Google.ResourceManager.Types
50+
51+-- | A resource alias for @cloudresourcemanager.operations.get@ method which the
52+-- 'OperationsGet' request conforms to.
53+type OperationsGetResource =
54+ "v1" :>
55+ Capture "name" Text :>
56+ QueryParam "$.xgafv" Text :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "pp" Bool :>
59+ QueryParam "access_token" Text :>
60+ QueryParam "uploadType" Text :>
61+ QueryParam "bearer_token" Text :>
62+ QueryParam "callback" Text :>
63+ QueryParam "alt" AltJSON :> Get '[JSON] Operation
64+
65+-- | Gets the latest state of a long-running operation. Clients can use this
66+-- method to poll the operation result at intervals as recommended by the
67+-- API service.
68+--
69+-- /See:/ 'operationsGet' smart constructor.
70+data OperationsGet = OperationsGet'
71+ { _ogXgafv :: !(Maybe Text)
72+ , _ogUploadProtocol :: !(Maybe Text)
73+ , _ogPp :: !Bool
74+ , _ogAccessToken :: !(Maybe Text)
75+ , _ogUploadType :: !(Maybe Text)
76+ , _ogBearerToken :: !(Maybe Text)
77+ , _ogName :: !Text
78+ , _ogCallback :: !(Maybe Text)
79+ } deriving (Eq,Show,Data,Typeable,Generic)
80+
81+-- | Creates a value of 'OperationsGet' with the minimum fields required to make a request.
82+--
83+-- Use one of the following lenses to modify other fields as desired:
84+--
85+-- * 'ogXgafv'
86+--
87+-- * 'ogUploadProtocol'
88+--
89+-- * 'ogPp'
90+--
91+-- * 'ogAccessToken'
92+--
93+-- * 'ogUploadType'
94+--
95+-- * 'ogBearerToken'
96+--
97+-- * 'ogName'
98+--
99+-- * 'ogCallback'
100+operationsGet
101+ :: Text -- ^ 'ogName'
102+ -> OperationsGet
103+operationsGet pOgName_ =
104+ OperationsGet'
105+ { _ogXgafv = Nothing
106+ , _ogUploadProtocol = Nothing
107+ , _ogPp = True
108+ , _ogAccessToken = Nothing
109+ , _ogUploadType = Nothing
110+ , _ogBearerToken = Nothing
111+ , _ogName = pOgName_
112+ , _ogCallback = Nothing
113+ }
114+
115+-- | V1 error format.
116+ogXgafv :: Lens' OperationsGet (Maybe Text)
117+ogXgafv = lens _ogXgafv (\ s a -> s{_ogXgafv = a})
118+
119+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
120+ogUploadProtocol :: Lens' OperationsGet (Maybe Text)
121+ogUploadProtocol
122+ = lens _ogUploadProtocol
123+ (\ s a -> s{_ogUploadProtocol = a})
124+
125+-- | Pretty-print response.
126+ogPp :: Lens' OperationsGet Bool
127+ogPp = lens _ogPp (\ s a -> s{_ogPp = a})
128+
129+-- | OAuth access token.
130+ogAccessToken :: Lens' OperationsGet (Maybe Text)
131+ogAccessToken
132+ = lens _ogAccessToken
133+ (\ s a -> s{_ogAccessToken = a})
134+
135+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
136+ogUploadType :: Lens' OperationsGet (Maybe Text)
137+ogUploadType
138+ = lens _ogUploadType (\ s a -> s{_ogUploadType = a})
139+
140+-- | OAuth bearer token.
141+ogBearerToken :: Lens' OperationsGet (Maybe Text)
142+ogBearerToken
143+ = lens _ogBearerToken
144+ (\ s a -> s{_ogBearerToken = a})
145+
146+-- | The name of the operation resource.
147+ogName :: Lens' OperationsGet Text
148+ogName = lens _ogName (\ s a -> s{_ogName = a})
149+
150+-- | JSONP
151+ogCallback :: Lens' OperationsGet (Maybe Text)
152+ogCallback
153+ = lens _ogCallback (\ s a -> s{_ogCallback = a})
154+
155+instance GoogleRequest OperationsGet where
156+ type Rs OperationsGet = Operation
157+ type Scopes OperationsGet =
158+ '["https://www.googleapis.com/auth/cloud-platform",
159+ "https://www.googleapis.com/auth/cloud-platform.read-only"]
160+ requestClient OperationsGet'{..}
161+ = go _ogName _ogXgafv _ogUploadProtocol (Just _ogPp)
162+ _ogAccessToken
163+ _ogUploadType
164+ _ogBearerToken
165+ _ogCallback
166+ (Just AltJSON)
167+ resourceManagerService
168+ where go
169+ = buildClient (Proxy :: Proxy OperationsGetResource)
170+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/Get.hsnew file+172
@@ -0,0 +1,172 @@
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.Organizations.Get
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+-- Fetches an Organization resource identified by the specified resource
24+-- name.
25+--
26+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.organizations.get@.
27+module Network.Google.Resource.CloudResourceManager.Organizations.Get
28+ (
29+ -- * REST Resource
30+ OrganizationsGetResource
31+
32+ -- * Creating a Request
33+ , organizationsGet
34+ , OrganizationsGet
35+
36+ -- * Request Lenses
37+ , oggXgafv
38+ , oggUploadProtocol
39+ , oggPp
40+ , oggAccessToken
41+ , oggUploadType
42+ , oggBearerToken
43+ , oggName
44+ , oggCallback
45+ ) where
46+
47+import Network.Google.Prelude
48+import Network.Google.ResourceManager.Types
49+
50+-- | A resource alias for @cloudresourcemanager.organizations.get@ method which the
51+-- 'OrganizationsGet' request conforms to.
52+type OrganizationsGetResource =
53+ "v1" :>
54+ Capture "name" Text :>
55+ QueryParam "$.xgafv" Text :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :> Get '[JSON] Organization
63+
64+-- | Fetches an Organization resource identified by the specified resource
65+-- name.
66+--
67+-- /See:/ 'organizationsGet' smart constructor.
68+data OrganizationsGet = OrganizationsGet'
69+ { _oggXgafv :: !(Maybe Text)
70+ , _oggUploadProtocol :: !(Maybe Text)
71+ , _oggPp :: !Bool
72+ , _oggAccessToken :: !(Maybe Text)
73+ , _oggUploadType :: !(Maybe Text)
74+ , _oggBearerToken :: !(Maybe Text)
75+ , _oggName :: !Text
76+ , _oggCallback :: !(Maybe Text)
77+ } deriving (Eq,Show,Data,Typeable,Generic)
78+
79+-- | Creates a value of 'OrganizationsGet' with the minimum fields required to make a request.
80+--
81+-- Use one of the following lenses to modify other fields as desired:
82+--
83+-- * 'oggXgafv'
84+--
85+-- * 'oggUploadProtocol'
86+--
87+-- * 'oggPp'
88+--
89+-- * 'oggAccessToken'
90+--
91+-- * 'oggUploadType'
92+--
93+-- * 'oggBearerToken'
94+--
95+-- * 'oggName'
96+--
97+-- * 'oggCallback'
98+organizationsGet
99+ :: Text -- ^ 'oggName'
100+ -> OrganizationsGet
101+organizationsGet pOggName_ =
102+ OrganizationsGet'
103+ { _oggXgafv = Nothing
104+ , _oggUploadProtocol = Nothing
105+ , _oggPp = True
106+ , _oggAccessToken = Nothing
107+ , _oggUploadType = Nothing
108+ , _oggBearerToken = Nothing
109+ , _oggName = pOggName_
110+ , _oggCallback = Nothing
111+ }
112+
113+-- | V1 error format.
114+oggXgafv :: Lens' OrganizationsGet (Maybe Text)
115+oggXgafv = lens _oggXgafv (\ s a -> s{_oggXgafv = a})
116+
117+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
118+oggUploadProtocol :: Lens' OrganizationsGet (Maybe Text)
119+oggUploadProtocol
120+ = lens _oggUploadProtocol
121+ (\ s a -> s{_oggUploadProtocol = a})
122+
123+-- | Pretty-print response.
124+oggPp :: Lens' OrganizationsGet Bool
125+oggPp = lens _oggPp (\ s a -> s{_oggPp = a})
126+
127+-- | OAuth access token.
128+oggAccessToken :: Lens' OrganizationsGet (Maybe Text)
129+oggAccessToken
130+ = lens _oggAccessToken
131+ (\ s a -> s{_oggAccessToken = a})
132+
133+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
134+oggUploadType :: Lens' OrganizationsGet (Maybe Text)
135+oggUploadType
136+ = lens _oggUploadType
137+ (\ s a -> s{_oggUploadType = a})
138+
139+-- | OAuth bearer token.
140+oggBearerToken :: Lens' OrganizationsGet (Maybe Text)
141+oggBearerToken
142+ = lens _oggBearerToken
143+ (\ s a -> s{_oggBearerToken = a})
144+
145+-- | The resource name of the Organization to fetch, e.g.
146+-- \"organizations\/1234\".
147+oggName :: Lens' OrganizationsGet Text
148+oggName = lens _oggName (\ s a -> s{_oggName = a})
149+
150+-- | JSONP
151+oggCallback :: Lens' OrganizationsGet (Maybe Text)
152+oggCallback
153+ = lens _oggCallback (\ s a -> s{_oggCallback = a})
154+
155+instance GoogleRequest OrganizationsGet where
156+ type Rs OrganizationsGet = Organization
157+ type Scopes OrganizationsGet =
158+ '["https://www.googleapis.com/auth/cloud-platform",
159+ "https://www.googleapis.com/auth/cloud-platform.read-only"]
160+ requestClient OrganizationsGet'{..}
161+ = go _oggName _oggXgafv _oggUploadProtocol
162+ (Just _oggPp)
163+ _oggAccessToken
164+ _oggUploadType
165+ _oggBearerToken
166+ _oggCallback
167+ (Just AltJSON)
168+ resourceManagerService
169+ where go
170+ = buildClient
171+ (Proxy :: Proxy OrganizationsGetResource)
172+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/GetIAMPolicy.hsnew file+194
@@ -0,0 +1,194 @@
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.Organizations.GetIAMPolicy
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 the access control policy for an Organization resource. May be
24+-- empty if no such policy or resource exists. The \`resource\` field
25+-- should be the organization\'s resource name, e.g.
26+-- \"organizations\/123\".
27+--
28+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.organizations.getIamPolicy@.
29+module Network.Google.Resource.CloudResourceManager.Organizations.GetIAMPolicy
30+ (
31+ -- * REST Resource
32+ OrganizationsGetIAMPolicyResource
33+
34+ -- * Creating a Request
35+ , organizationsGetIAMPolicy
36+ , OrganizationsGetIAMPolicy
37+
38+ -- * Request Lenses
39+ , ogipXgafv
40+ , ogipUploadProtocol
41+ , ogipPp
42+ , ogipAccessToken
43+ , ogipUploadType
44+ , ogipPayload
45+ , ogipBearerToken
46+ , ogipResource
47+ , ogipCallback
48+ ) where
49+
50+import Network.Google.Prelude
51+import Network.Google.ResourceManager.Types
52+
53+-- | A resource alias for @cloudresourcemanager.organizations.getIamPolicy@ method which the
54+-- 'OrganizationsGetIAMPolicy' request conforms to.
55+type OrganizationsGetIAMPolicyResource =
56+ "v1" :>
57+ CaptureMode "resource" "getIamPolicy" Text :>
58+ QueryParam "$.xgafv" Text :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "callback" Text :>
65+ QueryParam "alt" AltJSON :>
66+ ReqBody '[JSON] GetIAMPolicyRequest :>
67+ Post '[JSON] Policy
68+
69+-- | Gets the access control policy for an Organization resource. May be
70+-- empty if no such policy or resource exists. The \`resource\` field
71+-- should be the organization\'s resource name, e.g.
72+-- \"organizations\/123\".
73+--
74+-- /See:/ 'organizationsGetIAMPolicy' smart constructor.
75+data OrganizationsGetIAMPolicy = OrganizationsGetIAMPolicy'
76+ { _ogipXgafv :: !(Maybe Text)
77+ , _ogipUploadProtocol :: !(Maybe Text)
78+ , _ogipPp :: !Bool
79+ , _ogipAccessToken :: !(Maybe Text)
80+ , _ogipUploadType :: !(Maybe Text)
81+ , _ogipPayload :: !GetIAMPolicyRequest
82+ , _ogipBearerToken :: !(Maybe Text)
83+ , _ogipResource :: !Text
84+ , _ogipCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'OrganizationsGetIAMPolicy' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'ogipXgafv'
92+--
93+-- * 'ogipUploadProtocol'
94+--
95+-- * 'ogipPp'
96+--
97+-- * 'ogipAccessToken'
98+--
99+-- * 'ogipUploadType'
100+--
101+-- * 'ogipPayload'
102+--
103+-- * 'ogipBearerToken'
104+--
105+-- * 'ogipResource'
106+--
107+-- * 'ogipCallback'
108+organizationsGetIAMPolicy
109+ :: GetIAMPolicyRequest -- ^ 'ogipPayload'
110+ -> Text -- ^ 'ogipResource'
111+ -> OrganizationsGetIAMPolicy
112+organizationsGetIAMPolicy pOgipPayload_ pOgipResource_ =
113+ OrganizationsGetIAMPolicy'
114+ { _ogipXgafv = Nothing
115+ , _ogipUploadProtocol = Nothing
116+ , _ogipPp = True
117+ , _ogipAccessToken = Nothing
118+ , _ogipUploadType = Nothing
119+ , _ogipPayload = pOgipPayload_
120+ , _ogipBearerToken = Nothing
121+ , _ogipResource = pOgipResource_
122+ , _ogipCallback = Nothing
123+ }
124+
125+-- | V1 error format.
126+ogipXgafv :: Lens' OrganizationsGetIAMPolicy (Maybe Text)
127+ogipXgafv
128+ = lens _ogipXgafv (\ s a -> s{_ogipXgafv = a})
129+
130+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
131+ogipUploadProtocol :: Lens' OrganizationsGetIAMPolicy (Maybe Text)
132+ogipUploadProtocol
133+ = lens _ogipUploadProtocol
134+ (\ s a -> s{_ogipUploadProtocol = a})
135+
136+-- | Pretty-print response.
137+ogipPp :: Lens' OrganizationsGetIAMPolicy Bool
138+ogipPp = lens _ogipPp (\ s a -> s{_ogipPp = a})
139+
140+-- | OAuth access token.
141+ogipAccessToken :: Lens' OrganizationsGetIAMPolicy (Maybe Text)
142+ogipAccessToken
143+ = lens _ogipAccessToken
144+ (\ s a -> s{_ogipAccessToken = a})
145+
146+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
147+ogipUploadType :: Lens' OrganizationsGetIAMPolicy (Maybe Text)
148+ogipUploadType
149+ = lens _ogipUploadType
150+ (\ s a -> s{_ogipUploadType = a})
151+
152+-- | Multipart request metadata.
153+ogipPayload :: Lens' OrganizationsGetIAMPolicy GetIAMPolicyRequest
154+ogipPayload
155+ = lens _ogipPayload (\ s a -> s{_ogipPayload = a})
156+
157+-- | OAuth bearer token.
158+ogipBearerToken :: Lens' OrganizationsGetIAMPolicy (Maybe Text)
159+ogipBearerToken
160+ = lens _ogipBearerToken
161+ (\ s a -> s{_ogipBearerToken = a})
162+
163+-- | REQUIRED: The resource for which the policy is being requested.
164+-- \`resource\` is usually specified as a path. For example, a Project
165+-- resource is specified as \`projects\/{project}\`.
166+ogipResource :: Lens' OrganizationsGetIAMPolicy Text
167+ogipResource
168+ = lens _ogipResource (\ s a -> s{_ogipResource = a})
169+
170+-- | JSONP
171+ogipCallback :: Lens' OrganizationsGetIAMPolicy (Maybe Text)
172+ogipCallback
173+ = lens _ogipCallback (\ s a -> s{_ogipCallback = a})
174+
175+instance GoogleRequest OrganizationsGetIAMPolicy
176+ where
177+ type Rs OrganizationsGetIAMPolicy = Policy
178+ type Scopes OrganizationsGetIAMPolicy =
179+ '["https://www.googleapis.com/auth/cloud-platform",
180+ "https://www.googleapis.com/auth/cloud-platform.read-only"]
181+ requestClient OrganizationsGetIAMPolicy'{..}
182+ = go _ogipResource _ogipXgafv _ogipUploadProtocol
183+ (Just _ogipPp)
184+ _ogipAccessToken
185+ _ogipUploadType
186+ _ogipBearerToken
187+ _ogipCallback
188+ (Just AltJSON)
189+ _ogipPayload
190+ resourceManagerService
191+ where go
192+ = buildClient
193+ (Proxy :: Proxy OrganizationsGetIAMPolicyResource)
194+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/Search.hsnew file+178
@@ -0,0 +1,178 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.CloudResourceManager.Organizations.Search
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+-- Searches Organization resources that are visible to the user and satisfy
24+-- the specified filter. This method returns Organizations in an
25+-- unspecified order. New Organizations do not necessarily appear at the
26+-- end of the results.
27+--
28+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.organizations.search@.
29+module Network.Google.Resource.CloudResourceManager.Organizations.Search
30+ (
31+ -- * REST Resource
32+ OrganizationsSearchResource
33+
34+ -- * Creating a Request
35+ , organizationsSearch
36+ , OrganizationsSearch
37+
38+ -- * Request Lenses
39+ , osXgafv
40+ , osUploadProtocol
41+ , osPp
42+ , osAccessToken
43+ , osUploadType
44+ , osPayload
45+ , osBearerToken
46+ , osCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ResourceManager.Types
51+
52+-- | A resource alias for @cloudresourcemanager.organizations.search@ method which the
53+-- 'OrganizationsSearch' request conforms to.
54+type OrganizationsSearchResource =
55+ "v1" :>
56+ "organizations:search" :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ ReqBody '[JSON] SearchOrganizationsRequest :>
66+ Post '[JSON] SearchOrganizationsResponse
67+
68+-- | Searches Organization resources that are visible to the user and satisfy
69+-- the specified filter. This method returns Organizations in an
70+-- unspecified order. New Organizations do not necessarily appear at the
71+-- end of the results.
72+--
73+-- /See:/ 'organizationsSearch' smart constructor.
74+data OrganizationsSearch = OrganizationsSearch'
75+ { _osXgafv :: !(Maybe Text)
76+ , _osUploadProtocol :: !(Maybe Text)
77+ , _osPp :: !Bool
78+ , _osAccessToken :: !(Maybe Text)
79+ , _osUploadType :: !(Maybe Text)
80+ , _osPayload :: !SearchOrganizationsRequest
81+ , _osBearerToken :: !(Maybe Text)
82+ , _osCallback :: !(Maybe Text)
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'OrganizationsSearch' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'osXgafv'
90+--
91+-- * 'osUploadProtocol'
92+--
93+-- * 'osPp'
94+--
95+-- * 'osAccessToken'
96+--
97+-- * 'osUploadType'
98+--
99+-- * 'osPayload'
100+--
101+-- * 'osBearerToken'
102+--
103+-- * 'osCallback'
104+organizationsSearch
105+ :: SearchOrganizationsRequest -- ^ 'osPayload'
106+ -> OrganizationsSearch
107+organizationsSearch pOsPayload_ =
108+ OrganizationsSearch'
109+ { _osXgafv = Nothing
110+ , _osUploadProtocol = Nothing
111+ , _osPp = True
112+ , _osAccessToken = Nothing
113+ , _osUploadType = Nothing
114+ , _osPayload = pOsPayload_
115+ , _osBearerToken = Nothing
116+ , _osCallback = Nothing
117+ }
118+
119+-- | V1 error format.
120+osXgafv :: Lens' OrganizationsSearch (Maybe Text)
121+osXgafv = lens _osXgafv (\ s a -> s{_osXgafv = a})
122+
123+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
124+osUploadProtocol :: Lens' OrganizationsSearch (Maybe Text)
125+osUploadProtocol
126+ = lens _osUploadProtocol
127+ (\ s a -> s{_osUploadProtocol = a})
128+
129+-- | Pretty-print response.
130+osPp :: Lens' OrganizationsSearch Bool
131+osPp = lens _osPp (\ s a -> s{_osPp = a})
132+
133+-- | OAuth access token.
134+osAccessToken :: Lens' OrganizationsSearch (Maybe Text)
135+osAccessToken
136+ = lens _osAccessToken
137+ (\ s a -> s{_osAccessToken = a})
138+
139+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
140+osUploadType :: Lens' OrganizationsSearch (Maybe Text)
141+osUploadType
142+ = lens _osUploadType (\ s a -> s{_osUploadType = a})
143+
144+-- | Multipart request metadata.
145+osPayload :: Lens' OrganizationsSearch SearchOrganizationsRequest
146+osPayload
147+ = lens _osPayload (\ s a -> s{_osPayload = a})
148+
149+-- | OAuth bearer token.
150+osBearerToken :: Lens' OrganizationsSearch (Maybe Text)
151+osBearerToken
152+ = lens _osBearerToken
153+ (\ s a -> s{_osBearerToken = a})
154+
155+-- | JSONP
156+osCallback :: Lens' OrganizationsSearch (Maybe Text)
157+osCallback
158+ = lens _osCallback (\ s a -> s{_osCallback = a})
159+
160+instance GoogleRequest OrganizationsSearch where
161+ type Rs OrganizationsSearch =
162+ SearchOrganizationsResponse
163+ type Scopes OrganizationsSearch =
164+ '["https://www.googleapis.com/auth/cloud-platform",
165+ "https://www.googleapis.com/auth/cloud-platform.read-only"]
166+ requestClient OrganizationsSearch'{..}
167+ = go _osXgafv _osUploadProtocol (Just _osPp)
168+ _osAccessToken
169+ _osUploadType
170+ _osBearerToken
171+ _osCallback
172+ (Just AltJSON)
173+ _osPayload
174+ resourceManagerService
175+ where go
176+ = buildClient
177+ (Proxy :: Proxy OrganizationsSearchResource)
178+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/SetIAMPolicy.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.Organizations.SetIAMPolicy
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+-- Sets the access control policy on an Organization resource. Replaces any
24+-- existing policy. The \`resource\` field should be the organization\'s
25+-- resource name, e.g. \"organizations\/123\".
26+--
27+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.organizations.setIamPolicy@.
28+module Network.Google.Resource.CloudResourceManager.Organizations.SetIAMPolicy
29+ (
30+ -- * REST Resource
31+ OrganizationsSetIAMPolicyResource
32+
33+ -- * Creating a Request
34+ , organizationsSetIAMPolicy
35+ , OrganizationsSetIAMPolicy
36+
37+ -- * Request Lenses
38+ , osipXgafv
39+ , osipUploadProtocol
40+ , osipPp
41+ , osipAccessToken
42+ , osipUploadType
43+ , osipPayload
44+ , osipBearerToken
45+ , osipResource
46+ , osipCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ResourceManager.Types
51+
52+-- | A resource alias for @cloudresourcemanager.organizations.setIamPolicy@ method which the
53+-- 'OrganizationsSetIAMPolicy' request conforms to.
54+type OrganizationsSetIAMPolicyResource =
55+ "v1" :>
56+ CaptureMode "resource" "setIamPolicy" Text :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ ReqBody '[JSON] SetIAMPolicyRequest :>
66+ Post '[JSON] Policy
67+
68+-- | Sets the access control policy on an Organization resource. Replaces any
69+-- existing policy. The \`resource\` field should be the organization\'s
70+-- resource name, e.g. \"organizations\/123\".
71+--
72+-- /See:/ 'organizationsSetIAMPolicy' smart constructor.
73+data OrganizationsSetIAMPolicy = OrganizationsSetIAMPolicy'
74+ { _osipXgafv :: !(Maybe Text)
75+ , _osipUploadProtocol :: !(Maybe Text)
76+ , _osipPp :: !Bool
77+ , _osipAccessToken :: !(Maybe Text)
78+ , _osipUploadType :: !(Maybe Text)
79+ , _osipPayload :: !SetIAMPolicyRequest
80+ , _osipBearerToken :: !(Maybe Text)
81+ , _osipResource :: !Text
82+ , _osipCallback :: !(Maybe Text)
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'OrganizationsSetIAMPolicy' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'osipXgafv'
90+--
91+-- * 'osipUploadProtocol'
92+--
93+-- * 'osipPp'
94+--
95+-- * 'osipAccessToken'
96+--
97+-- * 'osipUploadType'
98+--
99+-- * 'osipPayload'
100+--
101+-- * 'osipBearerToken'
102+--
103+-- * 'osipResource'
104+--
105+-- * 'osipCallback'
106+organizationsSetIAMPolicy
107+ :: SetIAMPolicyRequest -- ^ 'osipPayload'
108+ -> Text -- ^ 'osipResource'
109+ -> OrganizationsSetIAMPolicy
110+organizationsSetIAMPolicy pOsipPayload_ pOsipResource_ =
111+ OrganizationsSetIAMPolicy'
112+ { _osipXgafv = Nothing
113+ , _osipUploadProtocol = Nothing
114+ , _osipPp = True
115+ , _osipAccessToken = Nothing
116+ , _osipUploadType = Nothing
117+ , _osipPayload = pOsipPayload_
118+ , _osipBearerToken = Nothing
119+ , _osipResource = pOsipResource_
120+ , _osipCallback = Nothing
121+ }
122+
123+-- | V1 error format.
124+osipXgafv :: Lens' OrganizationsSetIAMPolicy (Maybe Text)
125+osipXgafv
126+ = lens _osipXgafv (\ s a -> s{_osipXgafv = a})
127+
128+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
129+osipUploadProtocol :: Lens' OrganizationsSetIAMPolicy (Maybe Text)
130+osipUploadProtocol
131+ = lens _osipUploadProtocol
132+ (\ s a -> s{_osipUploadProtocol = a})
133+
134+-- | Pretty-print response.
135+osipPp :: Lens' OrganizationsSetIAMPolicy Bool
136+osipPp = lens _osipPp (\ s a -> s{_osipPp = a})
137+
138+-- | OAuth access token.
139+osipAccessToken :: Lens' OrganizationsSetIAMPolicy (Maybe Text)
140+osipAccessToken
141+ = lens _osipAccessToken
142+ (\ s a -> s{_osipAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+osipUploadType :: Lens' OrganizationsSetIAMPolicy (Maybe Text)
146+osipUploadType
147+ = lens _osipUploadType
148+ (\ s a -> s{_osipUploadType = a})
149+
150+-- | Multipart request metadata.
151+osipPayload :: Lens' OrganizationsSetIAMPolicy SetIAMPolicyRequest
152+osipPayload
153+ = lens _osipPayload (\ s a -> s{_osipPayload = a})
154+
155+-- | OAuth bearer token.
156+osipBearerToken :: Lens' OrganizationsSetIAMPolicy (Maybe Text)
157+osipBearerToken
158+ = lens _osipBearerToken
159+ (\ s a -> s{_osipBearerToken = a})
160+
161+-- | REQUIRED: The resource for which the policy is being specified.
162+-- \`resource\` is usually specified as a path. For example, a Project
163+-- resource is specified as \`projects\/{project}\`.
164+osipResource :: Lens' OrganizationsSetIAMPolicy Text
165+osipResource
166+ = lens _osipResource (\ s a -> s{_osipResource = a})
167+
168+-- | JSONP
169+osipCallback :: Lens' OrganizationsSetIAMPolicy (Maybe Text)
170+osipCallback
171+ = lens _osipCallback (\ s a -> s{_osipCallback = a})
172+
173+instance GoogleRequest OrganizationsSetIAMPolicy
174+ where
175+ type Rs OrganizationsSetIAMPolicy = Policy
176+ type Scopes OrganizationsSetIAMPolicy =
177+ '["https://www.googleapis.com/auth/cloud-platform"]
178+ requestClient OrganizationsSetIAMPolicy'{..}
179+ = go _osipResource _osipXgafv _osipUploadProtocol
180+ (Just _osipPp)
181+ _osipAccessToken
182+ _osipUploadType
183+ _osipBearerToken
184+ _osipCallback
185+ (Just AltJSON)
186+ _osipPayload
187+ resourceManagerService
188+ where go
189+ = buildClient
190+ (Proxy :: Proxy OrganizationsSetIAMPolicyResource)
191+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/TestIAMPermissions.hsnew file+194
@@ -0,0 +1,194 @@
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.Organizations.TestIAMPermissions
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+-- Returns permissions that a caller has on the specified Organization. The
24+-- \`resource\` field should be the organization\'s resource name, e.g.
25+-- \"organizations\/123\".
26+--
27+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.organizations.testIamPermissions@.
28+module Network.Google.Resource.CloudResourceManager.Organizations.TestIAMPermissions
29+ (
30+ -- * REST Resource
31+ OrganizationsTestIAMPermissionsResource
32+
33+ -- * Creating a Request
34+ , organizationsTestIAMPermissions
35+ , OrganizationsTestIAMPermissions
36+
37+ -- * Request Lenses
38+ , otipXgafv
39+ , otipUploadProtocol
40+ , otipPp
41+ , otipAccessToken
42+ , otipUploadType
43+ , otipPayload
44+ , otipBearerToken
45+ , otipResource
46+ , otipCallback
47+ ) where
48+
49+import Network.Google.Prelude
50+import Network.Google.ResourceManager.Types
51+
52+-- | A resource alias for @cloudresourcemanager.organizations.testIamPermissions@ method which the
53+-- 'OrganizationsTestIAMPermissions' request conforms to.
54+type OrganizationsTestIAMPermissionsResource =
55+ "v1" :>
56+ CaptureMode "resource" "testIamPermissions" Text :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :>
65+ ReqBody '[JSON] TestIAMPermissionsRequest :>
66+ Post '[JSON] TestIAMPermissionsResponse
67+
68+-- | Returns permissions that a caller has on the specified Organization. The
69+-- \`resource\` field should be the organization\'s resource name, e.g.
70+-- \"organizations\/123\".
71+--
72+-- /See:/ 'organizationsTestIAMPermissions' smart constructor.
73+data OrganizationsTestIAMPermissions = OrganizationsTestIAMPermissions'
74+ { _otipXgafv :: !(Maybe Text)
75+ , _otipUploadProtocol :: !(Maybe Text)
76+ , _otipPp :: !Bool
77+ , _otipAccessToken :: !(Maybe Text)
78+ , _otipUploadType :: !(Maybe Text)
79+ , _otipPayload :: !TestIAMPermissionsRequest
80+ , _otipBearerToken :: !(Maybe Text)
81+ , _otipResource :: !Text
82+ , _otipCallback :: !(Maybe Text)
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'OrganizationsTestIAMPermissions' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'otipXgafv'
90+--
91+-- * 'otipUploadProtocol'
92+--
93+-- * 'otipPp'
94+--
95+-- * 'otipAccessToken'
96+--
97+-- * 'otipUploadType'
98+--
99+-- * 'otipPayload'
100+--
101+-- * 'otipBearerToken'
102+--
103+-- * 'otipResource'
104+--
105+-- * 'otipCallback'
106+organizationsTestIAMPermissions
107+ :: TestIAMPermissionsRequest -- ^ 'otipPayload'
108+ -> Text -- ^ 'otipResource'
109+ -> OrganizationsTestIAMPermissions
110+organizationsTestIAMPermissions pOtipPayload_ pOtipResource_ =
111+ OrganizationsTestIAMPermissions'
112+ { _otipXgafv = Nothing
113+ , _otipUploadProtocol = Nothing
114+ , _otipPp = True
115+ , _otipAccessToken = Nothing
116+ , _otipUploadType = Nothing
117+ , _otipPayload = pOtipPayload_
118+ , _otipBearerToken = Nothing
119+ , _otipResource = pOtipResource_
120+ , _otipCallback = Nothing
121+ }
122+
123+-- | V1 error format.
124+otipXgafv :: Lens' OrganizationsTestIAMPermissions (Maybe Text)
125+otipXgafv
126+ = lens _otipXgafv (\ s a -> s{_otipXgafv = a})
127+
128+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
129+otipUploadProtocol :: Lens' OrganizationsTestIAMPermissions (Maybe Text)
130+otipUploadProtocol
131+ = lens _otipUploadProtocol
132+ (\ s a -> s{_otipUploadProtocol = a})
133+
134+-- | Pretty-print response.
135+otipPp :: Lens' OrganizationsTestIAMPermissions Bool
136+otipPp = lens _otipPp (\ s a -> s{_otipPp = a})
137+
138+-- | OAuth access token.
139+otipAccessToken :: Lens' OrganizationsTestIAMPermissions (Maybe Text)
140+otipAccessToken
141+ = lens _otipAccessToken
142+ (\ s a -> s{_otipAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+otipUploadType :: Lens' OrganizationsTestIAMPermissions (Maybe Text)
146+otipUploadType
147+ = lens _otipUploadType
148+ (\ s a -> s{_otipUploadType = a})
149+
150+-- | Multipart request metadata.
151+otipPayload :: Lens' OrganizationsTestIAMPermissions TestIAMPermissionsRequest
152+otipPayload
153+ = lens _otipPayload (\ s a -> s{_otipPayload = a})
154+
155+-- | OAuth bearer token.
156+otipBearerToken :: Lens' OrganizationsTestIAMPermissions (Maybe Text)
157+otipBearerToken
158+ = lens _otipBearerToken
159+ (\ s a -> s{_otipBearerToken = a})
160+
161+-- | REQUIRED: The resource for which the policy detail is being requested.
162+-- \`resource\` is usually specified as a path. For example, a Project
163+-- resource is specified as \`projects\/{project}\`.
164+otipResource :: Lens' OrganizationsTestIAMPermissions Text
165+otipResource
166+ = lens _otipResource (\ s a -> s{_otipResource = a})
167+
168+-- | JSONP
169+otipCallback :: Lens' OrganizationsTestIAMPermissions (Maybe Text)
170+otipCallback
171+ = lens _otipCallback (\ s a -> s{_otipCallback = a})
172+
173+instance GoogleRequest
174+ OrganizationsTestIAMPermissions where
175+ type Rs OrganizationsTestIAMPermissions =
176+ TestIAMPermissionsResponse
177+ type Scopes OrganizationsTestIAMPermissions =
178+ '["https://www.googleapis.com/auth/cloud-platform",
179+ "https://www.googleapis.com/auth/cloud-platform.read-only"]
180+ requestClient OrganizationsTestIAMPermissions'{..}
181+ = go _otipResource _otipXgafv _otipUploadProtocol
182+ (Just _otipPp)
183+ _otipAccessToken
184+ _otipUploadType
185+ _otipBearerToken
186+ _otipCallback
187+ (Just AltJSON)
188+ _otipPayload
189+ resourceManagerService
190+ where go
191+ = buildClient
192+ (Proxy ::
193+ Proxy OrganizationsTestIAMPermissionsResource)
194+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Create.hsnew file+180
@@ -0,0 +1,180 @@
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.Create
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Request that a new Project be created. The result is an Operation which
24+-- can be used to track the creation process. It is automatically deleted
25+-- after a few hours, so there is no need to call DeleteOperation. Our SLO
26+-- permits Project creation to take up to 30 seconds at the 90th
27+-- percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
28+-- latency. 95th percentile latency is around 11 seconds. We recommend
29+-- polling at the 5th second with an exponential backoff.
30+--
31+-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.create@.
32+module Network.Google.Resource.CloudResourceManager.Projects.Create
33+ (
34+ -- * REST Resource
35+ ProjectsCreateResource
36+
37+ -- * Creating a Request
38+ , projectsCreate
39+ , ProjectsCreate
40+
41+ -- * Request Lenses
42+ , pcXgafv
43+ , pcUploadProtocol
44+ , pcPp
45+ , pcAccessToken
46+ , pcUploadType
47+ , pcPayload
48+ , pcBearerToken
49+ , pcCallback
50+ ) where
51+
52+import Network.Google.Prelude
53+import Network.Google.ResourceManager.Types
54+
55+-- | A resource alias for @cloudresourcemanager.projects.create@ method which the
56+-- 'ProjectsCreate' request conforms to.
57+type ProjectsCreateResource =
58+ "v1" :>
59+ "projects" :>
60+ QueryParam "$.xgafv" Text :>
61+ QueryParam "upload_protocol" Text :>
62+ QueryParam "pp" Bool :>
63+ QueryParam "access_token" Text :>
64+ QueryParam "uploadType" Text :>
65+ QueryParam "bearer_token" Text :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ ReqBody '[JSON] Project :> Post '[JSON] Operation
69+
70+-- | Request that a new Project be created. The result is an Operation which
71+-- can be used to track the creation process. It is automatically deleted
72+-- after a few hours, so there is no need to call DeleteOperation. Our SLO
73+-- permits Project creation to take up to 30 seconds at the 90th
74+-- percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
75+-- latency. 95th percentile latency is around 11 seconds. We recommend
76+-- polling at the 5th second with an exponential backoff.
77+--
78+-- /See:/ 'projectsCreate' smart constructor.
79+data ProjectsCreate = ProjectsCreate'
80+ { _pcXgafv :: !(Maybe Text)
81+ , _pcUploadProtocol :: !(Maybe Text)
82+ , _pcPp :: !Bool
83+ , _pcAccessToken :: !(Maybe Text)
84+ , _pcUploadType :: !(Maybe Text)
85+ , _pcPayload :: !Project
86+ , _pcBearerToken :: !(Maybe Text)
87+ , _pcCallback :: !(Maybe Text)
88+ } deriving (Eq,Show,Data,Typeable,Generic)
89+
90+-- | Creates a value of 'ProjectsCreate' with the minimum fields required to make a request.
91+--
92+-- Use one of the following lenses to modify other fields as desired:
93+--
94+-- * 'pcXgafv'
95+--
96+-- * 'pcUploadProtocol'
97+--
98+-- * 'pcPp'
99+--
100+-- * 'pcAccessToken'
101+--
102+-- * 'pcUploadType'
103+--
104+-- * 'pcPayload'
105+--
106+-- * 'pcBearerToken'
107+--
108+-- * 'pcCallback'
109+projectsCreate
110+ :: Project -- ^ 'pcPayload'
111+ -> ProjectsCreate
112+projectsCreate pPcPayload_ =
113+ ProjectsCreate'
114+ { _pcXgafv = Nothing
115+ , _pcUploadProtocol = Nothing
116+ , _pcPp = True
117+ , _pcAccessToken = Nothing
118+ , _pcUploadType = Nothing
119+ , _pcPayload = pPcPayload_
120+ , _pcBearerToken = Nothing
121+ , _pcCallback = Nothing
122+ }
123+
124+-- | V1 error format.
125+pcXgafv :: Lens' ProjectsCreate (Maybe Text)
126+pcXgafv = lens _pcXgafv (\ s a -> s{_pcXgafv = a})
127+
128+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
129+pcUploadProtocol :: Lens' ProjectsCreate (Maybe Text)
130+pcUploadProtocol
131+ = lens _pcUploadProtocol
132+ (\ s a -> s{_pcUploadProtocol = a})
133+
134+-- | Pretty-print response.
135+pcPp :: Lens' ProjectsCreate Bool
136+pcPp = lens _pcPp (\ s a -> s{_pcPp = a})
137+
138+-- | OAuth access token.
139+pcAccessToken :: Lens' ProjectsCreate (Maybe Text)
140+pcAccessToken
141+ = lens _pcAccessToken
142+ (\ s a -> s{_pcAccessToken = a})
143+
144+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
145+pcUploadType :: Lens' ProjectsCreate (Maybe Text)
146+pcUploadType
147+ = lens _pcUploadType (\ s a -> s{_pcUploadType = a})
148+
149+-- | Multipart request metadata.
150+pcPayload :: Lens' ProjectsCreate Project
151+pcPayload
152+ = lens _pcPayload (\ s a -> s{_pcPayload = a})
153+
154+-- | OAuth bearer token.
155+pcBearerToken :: Lens' ProjectsCreate (Maybe Text)
156+pcBearerToken
157+ = lens _pcBearerToken
158+ (\ s a -> s{_pcBearerToken = a})
159+
160+-- | JSONP
161+pcCallback :: Lens' ProjectsCreate (Maybe Text)
162+pcCallback
163+ = lens _pcCallback (\ s a -> s{_pcCallback = a})
164+
165+instance GoogleRequest ProjectsCreate where
166+ type Rs ProjectsCreate = Operation
167+ type Scopes ProjectsCreate =
168+ '["https://www.googleapis.com/auth/cloud-platform"]
169+ requestClient ProjectsCreate'{..}
170+ = go _pcXgafv _pcUploadProtocol (Just _pcPp)
171+ _pcAccessToken
172+ _pcUploadType
173+ _pcBearerToken
174+ _pcCallback
175+ (Just AltJSON)
176+ _pcPayload
177+ resourceManagerService
178+ where go
179+ = buildClient (Proxy :: Proxy ProjectsCreateResource)
180+ mempty
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Delete.hs+10−10
@@ -26,11 +26,11 @@
26-- have a billing account associated with it. + The Project has a lifecycle
26-- have a billing account associated with it. + The Project has a lifecycle
27-- state of ACTIVE. This method changes the Project\'s lifecycle state from
27-- state of ACTIVE. This method changes the Project\'s lifecycle state from
28-- ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time,
28-- ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time,
29−-- at which point the lifecycle state changes to DELETE_IN_PROGRESS. Until
29+-- at which point the Project is no longer accessible. Until the deletion
30−-- the deletion completes, you can check the lifecycle state checked by
30+-- completes, you can check the lifecycle state checked by retrieving the
31−-- retrieving the Project with GetProject, and the Project remains visible
31+-- Project with GetProject, and the Project remains visible to
32−-- to ListProjects. However, you cannot update the project. After the
32+-- ListProjects. However, you cannot update the project. After the deletion
33−-- deletion completes, the Project is not retrievable by the GetProject and
33+-- completes, the Project is not retrievable by the GetProject and
34-- ListProjects methods. The caller must have modify permissions for this
34-- ListProjects methods. The caller must have modify permissions for this
35-- Project.
35-- Project.
36--
36--
@@ -79,11 +79,11 @@ type ProjectsDeleteResource =
79-- have a billing account associated with it. + The Project has a lifecycle
79-- have a billing account associated with it. + The Project has a lifecycle
80-- state of ACTIVE. This method changes the Project\'s lifecycle state from
80-- state of ACTIVE. This method changes the Project\'s lifecycle state from
81-- ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time,
81-- ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time,
82−-- at which point the lifecycle state changes to DELETE_IN_PROGRESS. Until
82+-- at which point the Project is no longer accessible. Until the deletion
83−-- the deletion completes, you can check the lifecycle state checked by
83+-- completes, you can check the lifecycle state checked by retrieving the
84−-- retrieving the Project with GetProject, and the Project remains visible
84+-- Project with GetProject, and the Project remains visible to
85−-- to ListProjects. However, you cannot update the project. After the
85+-- ListProjects. However, you cannot update the project. After the deletion
86−-- deletion completes, the Project is not retrievable by the GetProject and
86+-- completes, the Project is not retrievable by the GetProject and
87-- ListProjects methods. The caller must have modify permissions for this
87-- ListProjects methods. The caller must have modify permissions for this
88-- Project.
88-- Project.
89--
89--
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/GetIAMPolicy.hs+2−4
@@ -158,10 +158,8 @@ pgipBearerToken
158 (\ s a -> s{_pgipBearerToken = a})
158 (\ s a -> s{_pgipBearerToken = a})
159
159
160-- | REQUIRED: The resource for which the policy is being requested.
160-- | REQUIRED: The resource for which the policy is being requested.
161−-- \`resource\` is usually specified as a path, such as
161+-- \`resource\` is usually specified as a path. For example, a Project
162−-- \`projects\/*project*\/zones\/*zone*\/disks\/*disk*\`. The format for
162+-- resource is specified as \`projects\/{project}\`.
163−-- the path specified in this value is resource specific and is specified
164−-- in the \`getIamPolicy\` documentation.
165pgipResource :: Lens' ProjectsGetIAMPolicy Text
163pgipResource :: Lens' ProjectsGetIAMPolicy Text
166pgipResource
164pgipResource
167 = lens _pgipResource (\ s a -> s{_pgipResource = a})
165 = lens _pgipResource (\ s a -> s{_pgipResource = a})
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/SetIAMPolicy.hs+48−28
@@ -22,18 +22,29 @@
22--
22--
23-- Sets the IAM access control policy for the specified Project. Replaces
23-- Sets the IAM access control policy for the specified Project. Replaces
24-- any existing policy. The following constraints apply when using
24-- any existing policy. The following constraints apply when using
25−-- \`setIamPolicy()\`: + Project currently supports only \`user:{emailid}\`
25+-- \`setIamPolicy()\`: + Project does not support \`allUsers\` and
26−-- and \`serviceAccount:{emailid}\` members in a \`Binding\` of a
26+-- \`allAuthenticatedUsers\` as \`members\` in a \`Binding\` of a
27−-- \`Policy\`. + To be added as an \`owner\`, a user must be invited via
27+-- \`Policy\`. + The owner role can be granted only to \`user\` and
28+-- \`serviceAccount\`. + Service accounts can be made owners of a project
29+-- directly without any restrictions. However, to be added as an owner, a
28−-- Cloud Platform console and must accept the invitation. + Members cannot
30+-- user must be invited via Cloud Platform console and must accept the
29−-- be added to more than one role in the same policy. + There must be at
31+-- invitation. + A user cannot be granted the owner role using
32+-- \`setIamPolicy()\`. The user must be granted the owner role using the
33+-- Cloud Platform Console and must explicitly accept the invitation. +
34+-- Invitations to grant the owner role cannot be sent using
35+-- \`setIamPolicy()\`; they must be sent only using the Cloud Platform
36+-- Console. + Membership changes that leave the project without any owners
37+-- that have accepted the Terms of Service (ToS) will be rejected. + There
30−-- least one owner who has accepted the Terms of Service (ToS) agreement in
38+-- must be at least one owner who has accepted the Terms of Service (ToS)
31−-- the policy. Calling \`setIamPolicy()\` to to remove the last
39+-- agreement in the policy. Calling \`setIamPolicy()\` to to remove the
32−-- ToS-accepted owner from the policy will fail. + Calling this method
40+-- last ToS-accepted owner from the policy will fail. This restriction also
41+-- applies to legacy projects that no longer have owners who have accepted
42+-- the ToS. Edits to IAM policies will be rejected until the lack of a
43+-- ToS-accepting owner is rectified. + Calling this method requires
33−-- requires enabling the App Engine Admin API. Note: Removing service
44+-- enabling the App Engine Admin API. Note: Removing service accounts from
34−-- accounts from policies or changing their roles can render services
45+-- policies or changing their roles can render services completely
35−-- completely inoperable. It is important to understand how the service
46+-- inoperable. It is important to understand how the service account is
36−-- account is being used before removing or updating its roles.
47+-- being used before removing or updating its roles.
37--
48--
38-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.setIamPolicy@.
49-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.setIamPolicy@.
39module Network.Google.Resource.CloudResourceManager.Projects.SetIAMPolicy
50module Network.Google.Resource.CloudResourceManager.Projects.SetIAMPolicy
@@ -79,18 +90,29 @@ type ProjectsSetIAMPolicyResource =
79
90
80-- | Sets the IAM access control policy for the specified Project. Replaces
91-- | Sets the IAM access control policy for the specified Project. Replaces
81-- any existing policy. The following constraints apply when using
92-- any existing policy. The following constraints apply when using
82−-- \`setIamPolicy()\`: + Project currently supports only \`user:{emailid}\`
93+-- \`setIamPolicy()\`: + Project does not support \`allUsers\` and
83−-- and \`serviceAccount:{emailid}\` members in a \`Binding\` of a
94+-- \`allAuthenticatedUsers\` as \`members\` in a \`Binding\` of a
84−-- \`Policy\`. + To be added as an \`owner\`, a user must be invited via
95+-- \`Policy\`. + The owner role can be granted only to \`user\` and
96+-- \`serviceAccount\`. + Service accounts can be made owners of a project
97+-- directly without any restrictions. However, to be added as an owner, a
85−-- Cloud Platform console and must accept the invitation. + Members cannot
98+-- user must be invited via Cloud Platform console and must accept the
86−-- be added to more than one role in the same policy. + There must be at
99+-- invitation. + A user cannot be granted the owner role using
100+-- \`setIamPolicy()\`. The user must be granted the owner role using the
101+-- Cloud Platform Console and must explicitly accept the invitation. +
102+-- Invitations to grant the owner role cannot be sent using
103+-- \`setIamPolicy()\`; they must be sent only using the Cloud Platform
104+-- Console. + Membership changes that leave the project without any owners
105+-- that have accepted the Terms of Service (ToS) will be rejected. + There
87−-- least one owner who has accepted the Terms of Service (ToS) agreement in
106+-- must be at least one owner who has accepted the Terms of Service (ToS)
88−-- the policy. Calling \`setIamPolicy()\` to to remove the last
107+-- agreement in the policy. Calling \`setIamPolicy()\` to to remove the
89−-- ToS-accepted owner from the policy will fail. + Calling this method
108+-- last ToS-accepted owner from the policy will fail. This restriction also
109+-- applies to legacy projects that no longer have owners who have accepted
110+-- the ToS. Edits to IAM policies will be rejected until the lack of a
111+-- ToS-accepting owner is rectified. + Calling this method requires
90−-- requires enabling the App Engine Admin API. Note: Removing service
112+-- enabling the App Engine Admin API. Note: Removing service accounts from
91−-- accounts from policies or changing their roles can render services
113+-- policies or changing their roles can render services completely
92−-- completely inoperable. It is important to understand how the service
114+-- inoperable. It is important to understand how the service account is
93−-- account is being used before removing or updating its roles.
115+-- being used before removing or updating its roles.
94--
116--
95-- /See:/ 'projectsSetIAMPolicy' smart constructor.
117-- /See:/ 'projectsSetIAMPolicy' smart constructor.
96data ProjectsSetIAMPolicy = ProjectsSetIAMPolicy'
118data ProjectsSetIAMPolicy = ProjectsSetIAMPolicy'
@@ -182,10 +204,8 @@ psipBearerToken
182 (\ s a -> s{_psipBearerToken = a})
204 (\ s a -> s{_psipBearerToken = a})
183
205
184-- | REQUIRED: The resource for which the policy is being specified.
206-- | REQUIRED: The resource for which the policy is being specified.
185−-- \`resource\` is usually specified as a path, such as
207+-- \`resource\` is usually specified as a path. For example, a Project
186−-- \`projects\/*project*\/zones\/*zone*\/disks\/*disk*\`. The format for
208+-- resource is specified as \`projects\/{project}\`.
187−-- the path specified in this value is resource specific and is specified
188−-- in the \`setIamPolicy\` documentation.
189psipResource :: Lens' ProjectsSetIAMPolicy Text
209psipResource :: Lens' ProjectsSetIAMPolicy Text
190psipResource
210psipResource
191 = lens _psipResource (\ s a -> s{_psipResource = a})
211 = lens _psipResource (\ s a -> s{_psipResource = a})
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/TestIAMPermissions.hs+2−4
@@ -156,10 +156,8 @@ ptipBearerToken
156 (\ s a -> s{_ptipBearerToken = a})
156 (\ s a -> s{_ptipBearerToken = a})
157
157
158-- | REQUIRED: The resource for which the policy detail is being requested.
158-- | REQUIRED: The resource for which the policy detail is being requested.
159−-- \`resource\` is usually specified as a path, such as
159+-- \`resource\` is usually specified as a path. For example, a Project
160−-- \`projects\/*project*\/zones\/*zone*\/disks\/*disk*\`. The format for
160+-- resource is specified as \`projects\/{project}\`.
161−-- the path specified in this value is resource specific and is specified
162−-- in the \`testIamPermissions\` documentation.
163ptipResource :: Lens' ProjectsTestIAMPermissions Text
161ptipResource :: Lens' ProjectsTestIAMPermissions Text
164ptipResource
162ptipResource
165 = lens _ptipResource (\ s a -> s{_ptipResource = a})
163 = lens _ptipResource (\ s a -> s{_ptipResource = a})
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/Undelete.hs+4−6
@@ -23,9 +23,8 @@
23-- Restores the Project identified by the specified \`project_id\` (for
23-- Restores the Project identified by the specified \`project_id\` (for
24-- example, \`my-project-123\`). You can only use this method for a Project
24-- example, \`my-project-123\`). You can only use this method for a Project
25-- that has a lifecycle state of DELETE_REQUESTED. After deletion starts,
25-- that has a lifecycle state of DELETE_REQUESTED. After deletion starts,
26−-- as indicated by a lifecycle state of DELETE_IN_PROGRESS, the Project
27−-- cannot be restored. The caller must have modify permissions for this
26+-- the Project cannot be restored. The caller must have modify permissions
28−-- Project.
27+-- for this Project.
29--
28--
30-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.undelete@.
29-- /See:/ <https://cloud.google.com/resource-manager Google Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.undelete@.
31module Network.Google.Resource.CloudResourceManager.Projects.Undelete
30module Network.Google.Resource.CloudResourceManager.Projects.Undelete
@@ -72,9 +71,8 @@ type ProjectsUndeleteResource =
72-- | Restores the Project identified by the specified \`project_id\` (for
71-- | Restores the Project identified by the specified \`project_id\` (for
73-- example, \`my-project-123\`). You can only use this method for a Project
72-- example, \`my-project-123\`). You can only use this method for a Project
74-- that has a lifecycle state of DELETE_REQUESTED. After deletion starts,
73-- that has a lifecycle state of DELETE_REQUESTED. After deletion starts,
75−-- as indicated by a lifecycle state of DELETE_IN_PROGRESS, the Project
76−-- cannot be restored. The caller must have modify permissions for this
74+-- the Project cannot be restored. The caller must have modify permissions
77−-- Project.
75+-- for this Project.
78--
76--
79-- /See:/ 'projectsUndelete' smart constructor.
77-- /See:/ 'projectsUndelete' smart constructor.
80data ProjectsUndelete = ProjectsUndelete'
78data ProjectsUndelete = ProjectsUndelete'
gogol-resourcemanager/gen/Network/Google/ResourceManager.hs+115−1
@@ -31,6 +31,27 @@ module Network.Google.ResourceManager
31
31
32 -- * Resources
32 -- * Resources
33
33
34+ -- ** cloudresourcemanager.operations.get
35+ , module Network.Google.Resource.CloudResourceManager.Operations.Get
36+
37+ -- ** cloudresourcemanager.organizations.get
38+ , module Network.Google.Resource.CloudResourceManager.Organizations.Get
39+
40+ -- ** cloudresourcemanager.organizations.getIamPolicy
41+ , module Network.Google.Resource.CloudResourceManager.Organizations.GetIAMPolicy
42+
43+ -- ** cloudresourcemanager.organizations.search
44+ , module Network.Google.Resource.CloudResourceManager.Organizations.Search
45+
46+ -- ** cloudresourcemanager.organizations.setIamPolicy
47+ , module Network.Google.Resource.CloudResourceManager.Organizations.SetIAMPolicy
48+
49+ -- ** cloudresourcemanager.organizations.testIamPermissions
50+ , module Network.Google.Resource.CloudResourceManager.Organizations.TestIAMPermissions
51+
52+ -- ** cloudresourcemanager.projects.create
53+ , module Network.Google.Resource.CloudResourceManager.Projects.Create
54+
34 -- ** cloudresourcemanager.projects.delete
55 -- ** cloudresourcemanager.projects.delete
35 , module Network.Google.Resource.CloudResourceManager.Projects.Delete
56 , module Network.Google.Resource.CloudResourceManager.Projects.Delete
36
57
@@ -57,6 +78,20 @@ module Network.Google.ResourceManager
57
78
58 -- * Types
79 -- * Types
59
80
81+ -- ** Status
82+ , Status
83+ , status
84+ , sDetails
85+ , sCode
86+ , sMessage
87+
88+ -- ** SearchOrganizationsRequest
89+ , SearchOrganizationsRequest
90+ , searchOrganizationsRequest
91+ , sorFilter
92+ , sorPageToken
93+ , sorPageSize
94+
60 -- ** ResourceId
95 -- ** ResourceId
61 , ResourceId
96 , ResourceId
62 , resourceId
97 , resourceId
@@ -73,6 +108,11 @@ module Network.Google.ResourceManager
73 , GetIAMPolicyRequest
108 , GetIAMPolicyRequest
74 , getIAMPolicyRequest
109 , getIAMPolicyRequest
75
110
111+ -- ** OrganizationOwner
112+ , OrganizationOwner
113+ , organizationOwner
114+ , ooDirectoryCustomerId
115+
76 -- ** Project
116 -- ** Project
77 , Project
117 , Project
78 , project
118 , project
@@ -84,10 +124,36 @@ module Network.Google.ResourceManager
84 , pLifecycleState
124 , pLifecycleState
85 , pCreateTime
125 , pCreateTime
86
126
127+ -- ** Operation
128+ , Operation
129+ , operation
130+ , oDone
131+ , oError
132+ , oResponse
133+ , oName
134+ , oMetadata
135+
87 -- ** Empty
136 -- ** Empty
88 , Empty
137 , Empty
89 , empty
138 , empty
90
139
140+ -- ** ProjectCreationStatus
141+ , ProjectCreationStatus
142+ , projectCreationStatus
143+ , pcsGettable
144+ , pcsReady
145+ , pcsCreateTime
146+
147+ -- ** StatusDetailsItem
148+ , StatusDetailsItem
149+ , statusDetailsItem
150+ , sdiAddtional
151+
152+ -- ** FolderOperationError
153+ , FolderOperationError
154+ , folderOperationError
155+ , foeErrorMessageId
156+
91 -- ** SetIAMPolicyRequest
157 -- ** SetIAMPolicyRequest
92 , SetIAMPolicyRequest
158 , SetIAMPolicyRequest
93 , setIAMPolicyRequest
159 , setIAMPolicyRequest
@@ -98,6 +164,12 @@ module Network.Google.ResourceManager
98 , testIAMPermissionsRequest
164 , testIAMPermissionsRequest
99 , tiprPermissions
165 , tiprPermissions
100
166
167+ -- ** SearchOrganizationsResponse
168+ , SearchOrganizationsResponse
169+ , searchOrganizationsResponse
170+ , sorNextPageToken
171+ , sorOrganizations
172+
101 -- ** TestIAMPermissionsResponse
173 -- ** TestIAMPermissionsResponse
102 , TestIAMPermissionsResponse
174 , TestIAMPermissionsResponse
103 , testIAMPermissionsResponse
175 , testIAMPermissionsResponse
@@ -115,6 +187,33 @@ module Network.Google.ResourceManager
115 , projectLabels
187 , projectLabels
116 , plAddtional
188 , plAddtional
117
189
190+ -- ** OperationMetadata
191+ , OperationMetadata
192+ , operationMetadata
193+ , omAddtional
194+
195+ -- ** FolderOperation
196+ , FolderOperation
197+ , folderOperation
198+ , foDestinationParent
199+ , foDisplayName
200+ , foOperationType
201+ , foSourceParent
202+
203+ -- ** Organization
204+ , Organization
205+ , organization
206+ , orgCreationTime
207+ , orgOwner
208+ , orgName
209+ , orgDisplayName
210+ , orgLifecycleState
211+
212+ -- ** OperationResponse
213+ , OperationResponse
214+ , operationResponse
215+ , orAddtional
216+
118 -- ** UndeleteProjectRequest
217 -- ** UndeleteProjectRequest
119 , UndeleteProjectRequest
218 , UndeleteProjectRequest
120 , undeleteProjectRequest
219 , undeleteProjectRequest
@@ -127,6 +226,13 @@ module Network.Google.ResourceManager
127 ) where
226 ) where
128
227
129import Network.Google.Prelude
228import Network.Google.Prelude
229+import Network.Google.Resource.CloudResourceManager.Operations.Get
230+import Network.Google.Resource.CloudResourceManager.Organizations.Get
231+import Network.Google.Resource.CloudResourceManager.Organizations.GetIAMPolicy
232+import Network.Google.Resource.CloudResourceManager.Organizations.Search
233+import Network.Google.Resource.CloudResourceManager.Organizations.SetIAMPolicy
234+import Network.Google.Resource.CloudResourceManager.Organizations.TestIAMPermissions
235+import Network.Google.Resource.CloudResourceManager.Projects.Create
130import Network.Google.Resource.CloudResourceManager.Projects.Delete
236import Network.Google.Resource.CloudResourceManager.Projects.Delete
131import Network.Google.Resource.CloudResourceManager.Projects.Get
237import Network.Google.Resource.CloudResourceManager.Projects.Get
132import Network.Google.Resource.CloudResourceManager.Projects.GetIAMPolicy
238import Network.Google.Resource.CloudResourceManager.Projects.GetIAMPolicy
@@ -143,9 +249,17 @@ TODO
143
249
144-- | Represents the entirety of the methods and resources available for the Google Cloud Resource Manager API service.
250-- | Represents the entirety of the methods and resources available for the Google Cloud Resource Manager API service.
145type ResourceManagerAPI =
251type ResourceManagerAPI =
252+ OrganizationsGetIAMPolicyResource :<|>
253+ OrganizationsGetResource
254+ :<|> OrganizationsSetIAMPolicyResource
255+ :<|> OrganizationsTestIAMPermissionsResource
256+ :<|> OrganizationsSearchResource
257+ :<|> OperationsGetResource
258+ :<|> ProjectsListResource
146− ProjectsListResource :<|> ProjectsUndeleteResource
259+ :<|> ProjectsUndeleteResource
147 :<|> ProjectsGetIAMPolicyResource
260 :<|> ProjectsGetIAMPolicyResource
148 :<|> ProjectsGetResource
261 :<|> ProjectsGetResource
262+ :<|> ProjectsCreateResource
149 :<|> ProjectsSetIAMPolicyResource
263 :<|> ProjectsSetIAMPolicyResource
150 :<|> ProjectsTestIAMPermissionsResource
264 :<|> ProjectsTestIAMPermissionsResource
151 :<|> ProjectsDeleteResource
265 :<|> ProjectsDeleteResource
gogol-resourcemanager/gen/Network/Google/ResourceManager/Types.hs+78
@@ -23,6 +23,20 @@ module Network.Google.ResourceManager.Types
23 , cloudPlatformReadOnlyScope
23 , cloudPlatformReadOnlyScope
24 , cloudPlatformScope
24 , cloudPlatformScope
25
25
26+ -- * Status
27+ , Status
28+ , status
29+ , sDetails
30+ , sCode
31+ , sMessage
32+
33+ -- * SearchOrganizationsRequest
34+ , SearchOrganizationsRequest
35+ , searchOrganizationsRequest
36+ , sorFilter
37+ , sorPageToken
38+ , sorPageSize
39+
26 -- * ResourceId
40 -- * ResourceId
27 , ResourceId
41 , ResourceId
28 , resourceId
42 , resourceId
@@ -39,6 +53,11 @@ module Network.Google.ResourceManager.Types
39 , GetIAMPolicyRequest
53 , GetIAMPolicyRequest
40 , getIAMPolicyRequest
54 , getIAMPolicyRequest
41
55
56+ -- * OrganizationOwner
57+ , OrganizationOwner
58+ , organizationOwner
59+ , ooDirectoryCustomerId
60+
42 -- * Project
61 -- * Project
43 , Project
62 , Project
44 , project
63 , project
@@ -50,10 +69,36 @@ module Network.Google.ResourceManager.Types
50 , pLifecycleState
69 , pLifecycleState
51 , pCreateTime
70 , pCreateTime
52
71
72+ -- * Operation
73+ , Operation
74+ , operation
75+ , oDone
76+ , oError
77+ , oResponse
78+ , oName
79+ , oMetadata
80+
53 -- * Empty
81 -- * Empty
54 , Empty
82 , Empty
55 , empty
83 , empty
56
84
85+ -- * ProjectCreationStatus
86+ , ProjectCreationStatus
87+ , projectCreationStatus
88+ , pcsGettable
89+ , pcsReady
90+ , pcsCreateTime
91+
92+ -- * StatusDetailsItem
93+ , StatusDetailsItem
94+ , statusDetailsItem
95+ , sdiAddtional
96+
97+ -- * FolderOperationError
98+ , FolderOperationError
99+ , folderOperationError
100+ , foeErrorMessageId
101+
57 -- * SetIAMPolicyRequest
102 -- * SetIAMPolicyRequest
58 , SetIAMPolicyRequest
103 , SetIAMPolicyRequest
59 , setIAMPolicyRequest
104 , setIAMPolicyRequest
@@ -64,6 +109,12 @@ module Network.Google.ResourceManager.Types
64 , testIAMPermissionsRequest
109 , testIAMPermissionsRequest
65 , tiprPermissions
110 , tiprPermissions
66
111
112+ -- * SearchOrganizationsResponse
113+ , SearchOrganizationsResponse
114+ , searchOrganizationsResponse
115+ , sorNextPageToken
116+ , sorOrganizations
117+
67 -- * TestIAMPermissionsResponse
118 -- * TestIAMPermissionsResponse
68 , TestIAMPermissionsResponse
119 , TestIAMPermissionsResponse
69 , testIAMPermissionsResponse
120 , testIAMPermissionsResponse
@@ -81,6 +132,33 @@ module Network.Google.ResourceManager.Types
81 , projectLabels
132 , projectLabels
82 , plAddtional
133 , plAddtional
83
134
135+ -- * OperationMetadata
136+ , OperationMetadata
137+ , operationMetadata
138+ , omAddtional
139+
140+ -- * FolderOperation
141+ , FolderOperation
142+ , folderOperation
143+ , foDestinationParent
144+ , foDisplayName
145+ , foOperationType
146+ , foSourceParent
147+
148+ -- * Organization
149+ , Organization
150+ , organization
151+ , orgCreationTime
152+ , orgOwner
153+ , orgName
154+ , orgDisplayName
155+ , orgLifecycleState
156+
157+ -- * OperationResponse
158+ , OperationResponse
159+ , operationResponse
160+ , orAddtional
161+
84 -- * UndeleteProjectRequest
162 -- * UndeleteProjectRequest
85 , UndeleteProjectRequest
163 , UndeleteProjectRequest
86 , undeleteProjectRequest
164 , undeleteProjectRequest
gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs+735−5
@@ -20,6 +20,172 @@ module Network.Google.ResourceManager.Types.Product where
20import Network.Google.Prelude
20import Network.Google.Prelude
21import Network.Google.ResourceManager.Types.Sum
21import Network.Google.ResourceManager.Types.Sum
22
22
23+-- | The \`Status\` type defines a logical error model that is suitable for
24+-- different programming environments, including REST APIs and RPC APIs. It
25+-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
26+-- designed to be: - Simple to use and understand for most users - Flexible
27+-- enough to meet unexpected needs # Overview The \`Status\` message
28+-- contains three pieces of data: error code, error message, and error
29+-- details. The error code should be an enum value of google.rpc.Code, but
30+-- it may accept additional error codes if needed. The error message should
31+-- be a developer-facing English message that helps developers *understand*
32+-- and *resolve* the error. If a localized user-facing error message is
33+-- needed, put the localized message in the error details or localize it in
34+-- the client. The optional error details may contain arbitrary information
35+-- about the error. There is a predefined set of error detail types in the
36+-- package \`google.rpc\` which can be used for common error conditions. #
37+-- Language mapping The \`Status\` message is the logical representation of
38+-- the error model, but it is not necessarily the actual wire format. When
39+-- the \`Status\` message is exposed in different client libraries and
40+-- different wire protocols, it can be mapped differently. For example, it
41+-- will likely be mapped to some exceptions in Java, but more likely mapped
42+-- to some error codes in C. # Other uses The error model and the
43+-- \`Status\` message can be used in a variety of environments, either with
44+-- or without APIs, to provide a consistent developer experience across
45+-- different environments. Example uses of this error model include: -
46+-- Partial errors. If a service needs to return partial errors to the
47+-- client, it may embed the \`Status\` in the normal response to indicate
48+-- the partial errors. - Workflow errors. A typical workflow has multiple
49+-- steps. Each step may have a \`Status\` message for error reporting
50+-- purpose. - Batch operations. If a client uses batch request and batch
51+-- response, the \`Status\` message should be used directly inside batch
52+-- response, one for each error sub-response. - Asynchronous operations. If
53+-- an API call embeds asynchronous operation results in its response, the
54+-- status of those operations should be represented directly using the
55+-- \`Status\` message. - Logging. If some API errors are stored in logs,
56+-- the message \`Status\` could be used directly after any stripping needed
57+-- for security\/privacy reasons.
58+--
59+-- /See:/ 'status' smart constructor.
60+data Status = Status'
61+ { _sDetails :: !(Maybe [StatusDetailsItem])
62+ , _sCode :: !(Maybe (Textual Int32))
63+ , _sMessage :: !(Maybe Text)
64+ } deriving (Eq,Show,Data,Typeable,Generic)
65+
66+-- | Creates a value of 'Status' with the minimum fields required to make a request.
67+--
68+-- Use one of the following lenses to modify other fields as desired:
69+--
70+-- * 'sDetails'
71+--
72+-- * 'sCode'
73+--
74+-- * 'sMessage'
75+status
76+ :: Status
77+status =
78+ Status'
79+ { _sDetails = Nothing
80+ , _sCode = Nothing
81+ , _sMessage = Nothing
82+ }
83+
84+-- | A list of messages that carry the error details. There will be a common
85+-- set of message types for APIs to use.
86+sDetails :: Lens' Status [StatusDetailsItem]
87+sDetails
88+ = lens _sDetails (\ s a -> s{_sDetails = a}) .
89+ _Default
90+ . _Coerce
91+
92+-- | The status code, which should be an enum value of google.rpc.Code.
93+sCode :: Lens' Status (Maybe Int32)
94+sCode
95+ = lens _sCode (\ s a -> s{_sCode = a}) .
96+ mapping _Coerce
97+
98+-- | A developer-facing error message, which should be in English. Any
99+-- user-facing error message should be localized and sent in the
100+-- google.rpc.Status.details field, or localized by the client.
101+sMessage :: Lens' Status (Maybe Text)
102+sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
103+
104+instance FromJSON Status where
105+ parseJSON
106+ = withObject "Status"
107+ (\ o ->
108+ Status' <$>
109+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
110+ (o .:? "message"))
111+
112+instance ToJSON Status where
113+ toJSON Status'{..}
114+ = object
115+ (catMaybes
116+ [("details" .=) <$> _sDetails,
117+ ("code" .=) <$> _sCode,
118+ ("message" .=) <$> _sMessage])
119+
120+-- | The request sent to the \`SearchOrganizations\` method.
121+--
122+-- /See:/ 'searchOrganizationsRequest' smart constructor.
123+data SearchOrganizationsRequest = SearchOrganizationsRequest'
124+ { _sorFilter :: !(Maybe Text)
125+ , _sorPageToken :: !(Maybe Text)
126+ , _sorPageSize :: !(Maybe (Textual Int32))
127+ } deriving (Eq,Show,Data,Typeable,Generic)
128+
129+-- | Creates a value of 'SearchOrganizationsRequest' with the minimum fields required to make a request.
130+--
131+-- Use one of the following lenses to modify other fields as desired:
132+--
133+-- * 'sorFilter'
134+--
135+-- * 'sorPageToken'
136+--
137+-- * 'sorPageSize'
138+searchOrganizationsRequest
139+ :: SearchOrganizationsRequest
140+searchOrganizationsRequest =
141+ SearchOrganizationsRequest'
142+ { _sorFilter = Nothing
143+ , _sorPageToken = Nothing
144+ , _sorPageSize = Nothing
145+ }
146+
147+-- | An optional query string used to filter the Organizations to return in
148+-- the response. Filter rules are case-insensitive. Organizations may be
149+-- filtered by \`owner.directoryCustomerId\` or by \`domain\`, where the
150+-- domain is a Google for Work domain, for example: |Filter|Description|
151+-- |------|-----------| |owner.directorycustomerid:123456789|Organizations
152+-- with \`owner.directory_customer_id\` equal to \`123456789\`.|
153+-- |domain:google.com|Organizations corresponding to the domain
154+-- \`google.com\`.| This field is optional.
155+sorFilter :: Lens' SearchOrganizationsRequest (Maybe Text)
156+sorFilter
157+ = lens _sorFilter (\ s a -> s{_sorFilter = a})
158+
159+-- | A pagination token returned from a previous call to
160+-- \`SearchOrganizations\` that indicates from where listing should
161+-- continue. This field is optional.
162+sorPageToken :: Lens' SearchOrganizationsRequest (Maybe Text)
163+sorPageToken
164+ = lens _sorPageToken (\ s a -> s{_sorPageToken = a})
165+
166+-- | The maximum number of Organizations to return in the response. This
167+-- field is optional.
168+sorPageSize :: Lens' SearchOrganizationsRequest (Maybe Int32)
169+sorPageSize
170+ = lens _sorPageSize (\ s a -> s{_sorPageSize = a}) .
171+ mapping _Coerce
172+
173+instance FromJSON SearchOrganizationsRequest where
174+ parseJSON
175+ = withObject "SearchOrganizationsRequest"
176+ (\ o ->
177+ SearchOrganizationsRequest' <$>
178+ (o .:? "filter") <*> (o .:? "pageToken") <*>
179+ (o .:? "pageSize"))
180+
181+instance ToJSON SearchOrganizationsRequest where
182+ toJSON SearchOrganizationsRequest'{..}
183+ = object
184+ (catMaybes
185+ [("filter" .=) <$> _sorFilter,
186+ ("pageToken" .=) <$> _sorPageToken,
187+ ("pageSize" .=) <$> _sorPageSize])
188+
23-- | A container to reference an id for any resource type. A \`resource\` in
189-- | A container to reference an id for any resource type. A \`resource\` in
24-- Google Cloud Platform is a generic term for something you (a developer)
190-- Google Cloud Platform is a generic term for something you (a developer)
25-- may want to interact with through one of our API\'s. Some examples are
191-- may want to interact with through one of our API\'s. Some examples are
@@ -151,6 +317,47 @@ instance FromJSON GetIAMPolicyRequest where
151instance ToJSON GetIAMPolicyRequest where
317instance ToJSON GetIAMPolicyRequest where
152 toJSON = const emptyObject
318 toJSON = const emptyObject
153
319
320+-- | The entity that owns an Organization. The lifetime of the Organization
321+-- and all of its descendants are bound to the \`OrganizationOwner\`. If
322+-- the \`OrganizationOwner\` is deleted, the Organization and all its
323+-- descendants will be deleted.
324+--
325+-- /See:/ 'organizationOwner' smart constructor.
326+newtype OrganizationOwner = OrganizationOwner'
327+ { _ooDirectoryCustomerId :: Maybe Text
328+ } deriving (Eq,Show,Data,Typeable,Generic)
329+
330+-- | Creates a value of 'OrganizationOwner' with the minimum fields required to make a request.
331+--
332+-- Use one of the following lenses to modify other fields as desired:
333+--
334+-- * 'ooDirectoryCustomerId'
335+organizationOwner
336+ :: OrganizationOwner
337+organizationOwner =
338+ OrganizationOwner'
339+ { _ooDirectoryCustomerId = Nothing
340+ }
341+
342+-- | The Google for Work customer id used in the Directory API.
343+ooDirectoryCustomerId :: Lens' OrganizationOwner (Maybe Text)
344+ooDirectoryCustomerId
345+ = lens _ooDirectoryCustomerId
346+ (\ s a -> s{_ooDirectoryCustomerId = a})
347+
348+instance FromJSON OrganizationOwner where
349+ parseJSON
350+ = withObject "OrganizationOwner"
351+ (\ o ->
352+ OrganizationOwner' <$> (o .:? "directoryCustomerId"))
353+
354+instance ToJSON OrganizationOwner where
355+ toJSON OrganizationOwner'{..}
356+ = object
357+ (catMaybes
358+ [("directoryCustomerId" .=) <$>
359+ _ooDirectoryCustomerId])
360+
154-- | A Project is a high-level Google Cloud Platform entity. It is a
361-- | A Project is a high-level Google Cloud Platform entity. It is a
155-- container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud
362-- container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud
156-- Platform resources.
363-- Platform resources.
@@ -210,10 +417,10 @@ pProjectNumber
210 (\ s a -> s{_pProjectNumber = a})
417 (\ s a -> s{_pProjectNumber = a})
211 . mapping _Coerce
418 . mapping _Coerce
212
419
213−-- | The user-assigned name of the Project. It must be 4 to 30 characters.
420+-- | The user-assigned display name of the Project. It must be 4 to 30
214−-- Allowed characters are: lowercase and uppercase letters, numbers,
421+-- characters. Allowed characters are: lowercase and uppercase letters,
215−-- hyphen, single-quote, double-quote, space, and exclamation point.
422+-- numbers, hyphen, single-quote, double-quote, space, and exclamation
216−-- Example: My Project Read-write.
423+-- point. Example: My Project Read-write.
217pName :: Lens' Project (Maybe Text)
424pName :: Lens' Project (Maybe Text)
218pName = lens _pName (\ s a -> s{_pName = a})
425pName = lens _pName (\ s a -> s{_pName = a})
219
426
@@ -271,6 +478,97 @@ instance ToJSON Project where
271 ("lifecycleState" .=) <$> _pLifecycleState,
478 ("lifecycleState" .=) <$> _pLifecycleState,
272 ("createTime" .=) <$> _pCreateTime])
479 ("createTime" .=) <$> _pCreateTime])
273
480
481+-- | This resource represents a long-running operation that is the result of
482+-- a network API call.
483+--
484+-- /See:/ 'operation' smart constructor.
485+data Operation = Operation'
486+ { _oDone :: !(Maybe Bool)
487+ , _oError :: !(Maybe Status)
488+ , _oResponse :: !(Maybe OperationResponse)
489+ , _oName :: !(Maybe Text)
490+ , _oMetadata :: !(Maybe OperationMetadata)
491+ } deriving (Eq,Show,Data,Typeable,Generic)
492+
493+-- | Creates a value of 'Operation' with the minimum fields required to make a request.
494+--
495+-- Use one of the following lenses to modify other fields as desired:
496+--
497+-- * 'oDone'
498+--
499+-- * 'oError'
500+--
501+-- * 'oResponse'
502+--
503+-- * 'oName'
504+--
505+-- * 'oMetadata'
506+operation
507+ :: Operation
508+operation =
509+ Operation'
510+ { _oDone = Nothing
511+ , _oError = Nothing
512+ , _oResponse = Nothing
513+ , _oName = Nothing
514+ , _oMetadata = Nothing
515+ }
516+
517+-- | If the value is \`false\`, it means the operation is still in progress.
518+-- If true, the operation is completed, and either \`error\` or
519+-- \`response\` is available.
520+oDone :: Lens' Operation (Maybe Bool)
521+oDone = lens _oDone (\ s a -> s{_oDone = a})
522+
523+-- | The error result of the operation in case of failure.
524+oError :: Lens' Operation (Maybe Status)
525+oError = lens _oError (\ s a -> s{_oError = a})
526+
527+-- | The normal response of the operation in case of success. If the original
528+-- method returns no data on success, such as \`Delete\`, the response is
529+-- \`google.protobuf.Empty\`. If the original method is standard
530+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
531+-- For other methods, the response should have the type \`XxxResponse\`,
532+-- where \`Xxx\` is the original method name. For example, if the original
533+-- method name is \`TakeSnapshot()\`, the inferred response type is
534+-- \`TakeSnapshotResponse\`.
535+oResponse :: Lens' Operation (Maybe OperationResponse)
536+oResponse
537+ = lens _oResponse (\ s a -> s{_oResponse = a})
538+
539+-- | The server-assigned name, which is only unique within the same service
540+-- that originally returns it. If you use the default HTTP mapping, the
541+-- \`name\` should have the format of \`operations\/some\/unique\/name\`.
542+oName :: Lens' Operation (Maybe Text)
543+oName = lens _oName (\ s a -> s{_oName = a})
544+
545+-- | Service-specific metadata associated with the operation. It typically
546+-- contains progress information and common metadata such as create time.
547+-- Some services might not provide such metadata. Any method that returns a
548+-- long-running operation should document the metadata type, if any.
549+oMetadata :: Lens' Operation (Maybe OperationMetadata)
550+oMetadata
551+ = lens _oMetadata (\ s a -> s{_oMetadata = a})
552+
553+instance FromJSON Operation where
554+ parseJSON
555+ = withObject "Operation"
556+ (\ o ->
557+ Operation' <$>
558+ (o .:? "done") <*> (o .:? "error") <*>
559+ (o .:? "response")
560+ <*> (o .:? "name")
561+ <*> (o .:? "metadata"))
562+
563+instance ToJSON Operation where
564+ toJSON Operation'{..}
565+ = object
566+ (catMaybes
567+ [("done" .=) <$> _oDone, ("error" .=) <$> _oError,
568+ ("response" .=) <$> _oResponse,
569+ ("name" .=) <$> _oName,
570+ ("metadata" .=) <$> _oMetadata])
571+
274-- | A generic empty message that you can re-use to avoid defining duplicated
572-- | A generic empty message that you can re-use to avoid defining duplicated
275-- empty messages in your APIs. A typical example is to use it as the
573-- empty messages in your APIs. A typical example is to use it as the
276-- request or the response type of an API method. For instance: service Foo
574-- request or the response type of an API method. For instance: service Foo
@@ -294,6 +592,138 @@ instance FromJSON Empty where
294instance ToJSON Empty where
592instance ToJSON Empty where
295 toJSON = const emptyObject
593 toJSON = const emptyObject
296
594
595+-- | A status object which is used as the \`metadata\` field for the
596+-- Operation returned by CreateProject. It provides insight for when
597+-- significant phases of Project creation have completed.
598+--
599+-- /See:/ 'projectCreationStatus' smart constructor.
600+data ProjectCreationStatus = ProjectCreationStatus'
601+ { _pcsGettable :: !(Maybe Bool)
602+ , _pcsReady :: !(Maybe Bool)
603+ , _pcsCreateTime :: !(Maybe Text)
604+ } deriving (Eq,Show,Data,Typeable,Generic)
605+
606+-- | Creates a value of 'ProjectCreationStatus' with the minimum fields required to make a request.
607+--
608+-- Use one of the following lenses to modify other fields as desired:
609+--
610+-- * 'pcsGettable'
611+--
612+-- * 'pcsReady'
613+--
614+-- * 'pcsCreateTime'
615+projectCreationStatus
616+ :: ProjectCreationStatus
617+projectCreationStatus =
618+ ProjectCreationStatus'
619+ { _pcsGettable = Nothing
620+ , _pcsReady = Nothing
621+ , _pcsCreateTime = Nothing
622+ }
623+
624+-- | True if the project can be retrieved using GetProject. No other
625+-- operations on the project are guaranteed to work until the project
626+-- creation is complete.
627+pcsGettable :: Lens' ProjectCreationStatus (Maybe Bool)
628+pcsGettable
629+ = lens _pcsGettable (\ s a -> s{_pcsGettable = a})
630+
631+-- | True if the project creation process is complete.
632+pcsReady :: Lens' ProjectCreationStatus (Maybe Bool)
633+pcsReady = lens _pcsReady (\ s a -> s{_pcsReady = a})
634+
635+-- | Creation time of the project creation workflow.
636+pcsCreateTime :: Lens' ProjectCreationStatus (Maybe Text)
637+pcsCreateTime
638+ = lens _pcsCreateTime
639+ (\ s a -> s{_pcsCreateTime = a})
640+
641+instance FromJSON ProjectCreationStatus where
642+ parseJSON
643+ = withObject "ProjectCreationStatus"
644+ (\ o ->
645+ ProjectCreationStatus' <$>
646+ (o .:? "gettable") <*> (o .:? "ready") <*>
647+ (o .:? "createTime"))
648+
649+instance ToJSON ProjectCreationStatus where
650+ toJSON ProjectCreationStatus'{..}
651+ = object
652+ (catMaybes
653+ [("gettable" .=) <$> _pcsGettable,
654+ ("ready" .=) <$> _pcsReady,
655+ ("createTime" .=) <$> _pcsCreateTime])
656+
657+--
658+-- /See:/ 'statusDetailsItem' smart constructor.
659+newtype StatusDetailsItem = StatusDetailsItem'
660+ { _sdiAddtional :: HashMap Text JSONValue
661+ } deriving (Eq,Show,Data,Typeable,Generic)
662+
663+-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.
664+--
665+-- Use one of the following lenses to modify other fields as desired:
666+--
667+-- * 'sdiAddtional'
668+statusDetailsItem
669+ :: HashMap Text JSONValue -- ^ 'sdiAddtional'
670+ -> StatusDetailsItem
671+statusDetailsItem pSdiAddtional_ =
672+ StatusDetailsItem'
673+ { _sdiAddtional = _Coerce # pSdiAddtional_
674+ }
675+
676+-- | Properties of the object. Contains field \'type with type URL.
677+sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
678+sdiAddtional
679+ = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
680+ . _Coerce
681+
682+instance FromJSON StatusDetailsItem where
683+ parseJSON
684+ = withObject "StatusDetailsItem"
685+ (\ o -> StatusDetailsItem' <$> (parseJSONObject o))
686+
687+instance ToJSON StatusDetailsItem where
688+ toJSON = toJSON . _sdiAddtional
689+
690+-- | A classification of the Folder Operation error.
691+--
692+-- /See:/ 'folderOperationError' smart constructor.
693+newtype FolderOperationError = FolderOperationError'
694+ { _foeErrorMessageId :: Maybe Text
695+ } deriving (Eq,Show,Data,Typeable,Generic)
696+
697+-- | Creates a value of 'FolderOperationError' with the minimum fields required to make a request.
698+--
699+-- Use one of the following lenses to modify other fields as desired:
700+--
701+-- * 'foeErrorMessageId'
702+folderOperationError
703+ :: FolderOperationError
704+folderOperationError =
705+ FolderOperationError'
706+ { _foeErrorMessageId = Nothing
707+ }
708+
709+-- | The type of operation error experienced.
710+foeErrorMessageId :: Lens' FolderOperationError (Maybe Text)
711+foeErrorMessageId
712+ = lens _foeErrorMessageId
713+ (\ s a -> s{_foeErrorMessageId = a})
714+
715+instance FromJSON FolderOperationError where
716+ parseJSON
717+ = withObject "FolderOperationError"
718+ (\ o ->
719+ FolderOperationError' <$> (o .:? "errorMessageId"))
720+
721+instance ToJSON FolderOperationError where
722+ toJSON FolderOperationError'{..}
723+ = object
724+ (catMaybes
725+ [("errorMessageId" .=) <$> _foeErrorMessageId])
726+
297-- | Request message for \`SetIamPolicy\` method.
727-- | Request message for \`SetIamPolicy\` method.
298--
728--
299-- /See:/ 'setIAMPolicyRequest' smart constructor.
729-- /See:/ 'setIAMPolicyRequest' smart constructor.
@@ -351,7 +781,8 @@ testIAMPermissionsRequest =
351
781
352-- | The set of permissions to check for the \`resource\`. Permissions with
782-- | The set of permissions to check for the \`resource\`. Permissions with
353-- wildcards (such as \'*\' or \'storage.*\') are not allowed. For more
783-- wildcards (such as \'*\' or \'storage.*\') are not allowed. For more
354−-- information see IAM Overview.
784+-- information see [IAM
785+-- Overview](https:\/\/cloud.google.com\/iam\/docs\/overview#permissions).
355tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
786tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
356tiprPermissions
787tiprPermissions
357 = lens _tiprPermissions
788 = lens _tiprPermissions
@@ -371,6 +802,63 @@ instance ToJSON TestIAMPermissionsRequest where
371 = object
802 = object
372 (catMaybes [("permissions" .=) <$> _tiprPermissions])
803 (catMaybes [("permissions" .=) <$> _tiprPermissions])
373
804
805+-- | The response returned from the \`SearchOrganizations\` method.
806+--
807+-- /See:/ 'searchOrganizationsResponse' smart constructor.
808+data SearchOrganizationsResponse = SearchOrganizationsResponse'
809+ { _sorNextPageToken :: !(Maybe Text)
810+ , _sorOrganizations :: !(Maybe [Organization])
811+ } deriving (Eq,Show,Data,Typeable,Generic)
812+
813+-- | Creates a value of 'SearchOrganizationsResponse' with the minimum fields required to make a request.
814+--
815+-- Use one of the following lenses to modify other fields as desired:
816+--
817+-- * 'sorNextPageToken'
818+--
819+-- * 'sorOrganizations'
820+searchOrganizationsResponse
821+ :: SearchOrganizationsResponse
822+searchOrganizationsResponse =
823+ SearchOrganizationsResponse'
824+ { _sorNextPageToken = Nothing
825+ , _sorOrganizations = Nothing
826+ }
827+
828+-- | A pagination token to be used to retrieve the next page of results. If
829+-- the result is too large to fit within the page size specified in the
830+-- request, this field will be set with a token that can be used to fetch
831+-- the next page of results. If this field is empty, it indicates that this
832+-- response contains the last page of results.
833+sorNextPageToken :: Lens' SearchOrganizationsResponse (Maybe Text)
834+sorNextPageToken
835+ = lens _sorNextPageToken
836+ (\ s a -> s{_sorNextPageToken = a})
837+
838+-- | The list of Organizations that matched the search query, possibly
839+-- paginated.
840+sorOrganizations :: Lens' SearchOrganizationsResponse [Organization]
841+sorOrganizations
842+ = lens _sorOrganizations
843+ (\ s a -> s{_sorOrganizations = a})
844+ . _Default
845+ . _Coerce
846+
847+instance FromJSON SearchOrganizationsResponse where
848+ parseJSON
849+ = withObject "SearchOrganizationsResponse"
850+ (\ o ->
851+ SearchOrganizationsResponse' <$>
852+ (o .:? "nextPageToken") <*>
853+ (o .:? "organizations" .!= mempty))
854+
855+instance ToJSON SearchOrganizationsResponse where
856+ toJSON SearchOrganizationsResponse'{..}
857+ = object
858+ (catMaybes
859+ [("nextPageToken" .=) <$> _sorNextPageToken,
860+ ("organizations" .=) <$> _sorOrganizations])
861+
374-- | Response message for \`TestIamPermissions\` method.
862-- | Response message for \`TestIamPermissions\` method.
375--
863--
376-- /See:/ 'testIAMPermissionsResponse' smart constructor.
864-- /See:/ 'testIAMPermissionsResponse' smart constructor.
@@ -537,6 +1025,248 @@ instance FromJSON ProjectLabels where
537instance ToJSON ProjectLabels where
1025instance ToJSON ProjectLabels where
538 toJSON = toJSON . _plAddtional
1026 toJSON = toJSON . _plAddtional
539
1027
1028+-- | Service-specific metadata associated with the operation. It typically
1029+-- contains progress information and common metadata such as create time.
1030+-- Some services might not provide such metadata. Any method that returns a
1031+-- long-running operation should document the metadata type, if any.
1032+--
1033+-- /See:/ 'operationMetadata' smart constructor.
1034+newtype OperationMetadata = OperationMetadata'
1035+ { _omAddtional :: HashMap Text JSONValue
1036+ } deriving (Eq,Show,Data,Typeable,Generic)
1037+
1038+-- | Creates a value of 'OperationMetadata' with the minimum fields required to make a request.
1039+--
1040+-- Use one of the following lenses to modify other fields as desired:
1041+--
1042+-- * 'omAddtional'
1043+operationMetadata
1044+ :: HashMap Text JSONValue -- ^ 'omAddtional'
1045+ -> OperationMetadata
1046+operationMetadata pOmAddtional_ =
1047+ OperationMetadata'
1048+ { _omAddtional = _Coerce # pOmAddtional_
1049+ }
1050+
1051+-- | Properties of the object. Contains field \'type with type URL.
1052+omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
1053+omAddtional
1054+ = lens _omAddtional (\ s a -> s{_omAddtional = a}) .
1055+ _Coerce
1056+
1057+instance FromJSON OperationMetadata where
1058+ parseJSON
1059+ = withObject "OperationMetadata"
1060+ (\ o -> OperationMetadata' <$> (parseJSONObject o))
1061+
1062+instance ToJSON OperationMetadata where
1063+ toJSON = toJSON . _omAddtional
1064+
1065+-- | Metadata describing a long running folder operation
1066+--
1067+-- /See:/ 'folderOperation' smart constructor.
1068+data FolderOperation = FolderOperation'
1069+ { _foDestinationParent :: !(Maybe Text)
1070+ , _foDisplayName :: !(Maybe Text)
1071+ , _foOperationType :: !(Maybe Text)
1072+ , _foSourceParent :: !(Maybe Text)
1073+ } deriving (Eq,Show,Data,Typeable,Generic)
1074+
1075+-- | Creates a value of 'FolderOperation' with the minimum fields required to make a request.
1076+--
1077+-- Use one of the following lenses to modify other fields as desired:
1078+--
1079+-- * 'foDestinationParent'
1080+--
1081+-- * 'foDisplayName'
1082+--
1083+-- * 'foOperationType'
1084+--
1085+-- * 'foSourceParent'
1086+folderOperation
1087+ :: FolderOperation
1088+folderOperation =
1089+ FolderOperation'
1090+ { _foDestinationParent = Nothing
1091+ , _foDisplayName = Nothing
1092+ , _foOperationType = Nothing
1093+ , _foSourceParent = Nothing
1094+ }
1095+
1096+-- | The resource name of the folder or organization we are either creating
1097+-- the folder under or moving the folder to.
1098+foDestinationParent :: Lens' FolderOperation (Maybe Text)
1099+foDestinationParent
1100+ = lens _foDestinationParent
1101+ (\ s a -> s{_foDestinationParent = a})
1102+
1103+-- | The display name of the folder.
1104+foDisplayName :: Lens' FolderOperation (Maybe Text)
1105+foDisplayName
1106+ = lens _foDisplayName
1107+ (\ s a -> s{_foDisplayName = a})
1108+
1109+-- | The type of this operation.
1110+foOperationType :: Lens' FolderOperation (Maybe Text)
1111+foOperationType
1112+ = lens _foOperationType
1113+ (\ s a -> s{_foOperationType = a})
1114+
1115+-- | The resource name of the folder\'s parent. Only applicable when the
1116+-- operation_type is MOVE.
1117+foSourceParent :: Lens' FolderOperation (Maybe Text)
1118+foSourceParent
1119+ = lens _foSourceParent
1120+ (\ s a -> s{_foSourceParent = a})
1121+
1122+instance FromJSON FolderOperation where
1123+ parseJSON
1124+ = withObject "FolderOperation"
1125+ (\ o ->
1126+ FolderOperation' <$>
1127+ (o .:? "destinationParent") <*> (o .:? "displayName")
1128+ <*> (o .:? "operationType")
1129+ <*> (o .:? "sourceParent"))
1130+
1131+instance ToJSON FolderOperation where
1132+ toJSON FolderOperation'{..}
1133+ = object
1134+ (catMaybes
1135+ [("destinationParent" .=) <$> _foDestinationParent,
1136+ ("displayName" .=) <$> _foDisplayName,
1137+ ("operationType" .=) <$> _foOperationType,
1138+ ("sourceParent" .=) <$> _foSourceParent])
1139+
1140+-- | The root node in the resource hierarchy to which a particular entity\'s
1141+-- (e.g., company) resources belong.
1142+--
1143+-- /See:/ 'organization' smart constructor.
1144+data Organization = Organization'
1145+ { _orgCreationTime :: !(Maybe Text)
1146+ , _orgOwner :: !(Maybe OrganizationOwner)
1147+ , _orgName :: !(Maybe Text)
1148+ , _orgDisplayName :: !(Maybe Text)
1149+ , _orgLifecycleState :: !(Maybe Text)
1150+ } deriving (Eq,Show,Data,Typeable,Generic)
1151+
1152+-- | Creates a value of 'Organization' with the minimum fields required to make a request.
1153+--
1154+-- Use one of the following lenses to modify other fields as desired:
1155+--
1156+-- * 'orgCreationTime'
1157+--
1158+-- * 'orgOwner'
1159+--
1160+-- * 'orgName'
1161+--
1162+-- * 'orgDisplayName'
1163+--
1164+-- * 'orgLifecycleState'
1165+organization
1166+ :: Organization
1167+organization =
1168+ Organization'
1169+ { _orgCreationTime = Nothing
1170+ , _orgOwner = Nothing
1171+ , _orgName = Nothing
1172+ , _orgDisplayName = Nothing
1173+ , _orgLifecycleState = Nothing
1174+ }
1175+
1176+-- | Timestamp when the Organization was created. Assigned by the server.
1177+-- \'OutputOnly
1178+orgCreationTime :: Lens' Organization (Maybe Text)
1179+orgCreationTime
1180+ = lens _orgCreationTime
1181+ (\ s a -> s{_orgCreationTime = a})
1182+
1183+-- | The owner of this Organization. The owner should be specified on
1184+-- creation. Once set, it cannot be changed. This field is required.
1185+orgOwner :: Lens' Organization (Maybe OrganizationOwner)
1186+orgOwner = lens _orgOwner (\ s a -> s{_orgOwner = a})
1187+
1188+-- | Output Only. The resource name of the organization. This is the
1189+-- organization\'s relative path in the API. Its format is
1190+-- \"organizations\/[organization_id]\". For example,
1191+-- \"organizations\/1234\".
1192+orgName :: Lens' Organization (Maybe Text)
1193+orgName = lens _orgName (\ s a -> s{_orgName = a})
1194+
1195+-- | A friendly string to be used to refer to the Organization in the UI.
1196+-- Assigned by the server, set to the firm name of the Google For Work
1197+-- customer that owns this organization. \'OutputOnly
1198+orgDisplayName :: Lens' Organization (Maybe Text)
1199+orgDisplayName
1200+ = lens _orgDisplayName
1201+ (\ s a -> s{_orgDisplayName = a})
1202+
1203+-- | The organization\'s current lifecycle state. Assigned by the server.
1204+-- \'OutputOnly
1205+orgLifecycleState :: Lens' Organization (Maybe Text)
1206+orgLifecycleState
1207+ = lens _orgLifecycleState
1208+ (\ s a -> s{_orgLifecycleState = a})
1209+
1210+instance FromJSON Organization where
1211+ parseJSON
1212+ = withObject "Organization"
1213+ (\ o ->
1214+ Organization' <$>
1215+ (o .:? "creationTime") <*> (o .:? "owner") <*>
1216+ (o .:? "name")
1217+ <*> (o .:? "displayName")
1218+ <*> (o .:? "lifecycleState"))
1219+
1220+instance ToJSON Organization where
1221+ toJSON Organization'{..}
1222+ = object
1223+ (catMaybes
1224+ [("creationTime" .=) <$> _orgCreationTime,
1225+ ("owner" .=) <$> _orgOwner, ("name" .=) <$> _orgName,
1226+ ("displayName" .=) <$> _orgDisplayName,
1227+ ("lifecycleState" .=) <$> _orgLifecycleState])
1228+
1229+-- | The normal response of the operation in case of success. If the original
1230+-- method returns no data on success, such as \`Delete\`, the response is
1231+-- \`google.protobuf.Empty\`. If the original method is standard
1232+-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
1233+-- For other methods, the response should have the type \`XxxResponse\`,
1234+-- where \`Xxx\` is the original method name. For example, if the original
1235+-- method name is \`TakeSnapshot()\`, the inferred response type is
1236+-- \`TakeSnapshotResponse\`.
1237+--
1238+-- /See:/ 'operationResponse' smart constructor.
1239+newtype OperationResponse = OperationResponse'
1240+ { _orAddtional :: HashMap Text JSONValue
1241+ } deriving (Eq,Show,Data,Typeable,Generic)
1242+
1243+-- | Creates a value of 'OperationResponse' with the minimum fields required to make a request.
1244+--
1245+-- Use one of the following lenses to modify other fields as desired:
1246+--
1247+-- * 'orAddtional'
1248+operationResponse
1249+ :: HashMap Text JSONValue -- ^ 'orAddtional'
1250+ -> OperationResponse
1251+operationResponse pOrAddtional_ =
1252+ OperationResponse'
1253+ { _orAddtional = _Coerce # pOrAddtional_
1254+ }
1255+
1256+-- | Properties of the object. Contains field \'type with type URL.
1257+orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
1258+orAddtional
1259+ = lens _orAddtional (\ s a -> s{_orAddtional = a}) .
1260+ _Coerce
1261+
1262+instance FromJSON OperationResponse where
1263+ parseJSON
1264+ = withObject "OperationResponse"
1265+ (\ o -> OperationResponse' <$> (parseJSONObject o))
1266+
1267+instance ToJSON OperationResponse where
1268+ toJSON = toJSON . _orAddtional
1269+
540-- | The request sent to the UndeleteProject method.
1270-- | The request sent to the UndeleteProject method.
541--
1271--
542-- /See:/ 'undeleteProjectRequest' smart constructor.
1272-- /See:/ 'undeleteProjectRequest' smart constructor.
gogol-resourcemanager/gogol-resourcemanager.cabal+8−1
@@ -34,7 +34,14 @@ library
34 ghc-options: -Wall
34 ghc-options: -Wall
35
35
36 exposed-modules:
36 exposed-modules:
37− Network.Google.Resource.CloudResourceManager.Projects.Delete
37+ Network.Google.Resource.CloudResourceManager.Operations.Get
38+ , Network.Google.Resource.CloudResourceManager.Organizations.Get
39+ , Network.Google.Resource.CloudResourceManager.Organizations.GetIAMPolicy
40+ , Network.Google.Resource.CloudResourceManager.Organizations.Search
41+ , Network.Google.Resource.CloudResourceManager.Organizations.SetIAMPolicy
42+ , Network.Google.Resource.CloudResourceManager.Organizations.TestIAMPermissions
43+ , Network.Google.Resource.CloudResourceManager.Projects.Create
44+ , Network.Google.Resource.CloudResourceManager.Projects.Delete
38 , Network.Google.Resource.CloudResourceManager.Projects.Get
45 , Network.Google.Resource.CloudResourceManager.Projects.Get
39 , Network.Google.Resource.CloudResourceManager.Projects.GetIAMPolicy
46 , Network.Google.Resource.CloudResourceManager.Projects.GetIAMPolicy
40 , Network.Google.Resource.CloudResourceManager.Projects.List
47 , Network.Google.Resource.CloudResourceManager.Projects.List