Do executes the "cloudresourcemanager.projects.testIamPermissions" call. Exactly one of *TestIamPermissionsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *TestIamPermissionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

Do is referenced in 0 repositories


	//   "response": {
	//     "$ref": "ListProjectsResponse"
	//   },
	//   "scopes": [
	//     "",
	//     ""
	//   ]
	// }


// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ListProjectsResponse) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
	for {
		x, err := c.Do()
		if err != nil {
			return err
		if err := f(x); err != nil {
			return err
		if x.NextPageToken == "" {
			return nil

// method id "cloudresourcemanager.projects.setIamPolicy":

type ProjectsSetIamPolicyCall struct {
	s                   *Service
	resource            string
	setiampolicyrequest *SetIamPolicyRequest
	urlParams_          gensupport.URLParams
	ctx_                context.Context

// SetIamPolicy: 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