Class Project (1.36.0)

public class Project extends ProjectInfo

Deprecated. v3 GAPIC client of ResourceManager is now available

A Google Cloud Resource Manager project object.

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. This class' member variables are immutable. Methods that change or update the underlying Project information return a new Project instance. Project adds a layer of service-related functionality over ProjectInfo.

Inheritance

Object > ProjectInfo > Project

Methods

delete() (deprecated)

public void delete()

Marks the project identified by the specified project ID 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 ProjectInfo.State#ACTIVE.

This method changes the project's lifecycle state from ProjectInfo.State#ACTIVE to ProjectInfo.State#DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the lifecycle state changes to ProjectInfo.State#DELETE_IN_PROGRESS. Until the deletion completes, you can check the lifecycle state checked by retrieving the project with ResourceManager#get, and the project remains visible to ResourceManager#list. However, you cannot update the project. After the deletion completes, the project is not retrievable by the ResourceManager#get and ResourceManager#list methods. The caller must have modify permissions for this project. See Also: Cloud Resource Manager delete

equals(Object obj) (deprecated)

public final boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getPolicy() (deprecated)

public Policy getPolicy()

Returns the IAM access control policy for this project. Returns null if the resource does not exist or if you do not have adequate permission to view the project or get the policy. See Also: Resource Manager getIamPolicy

Returns
TypeDescription
com.google.cloud.Policy

the IAM policy for the project

getResourceManager() (deprecated)

public ResourceManager getResourceManager()

Returns the ResourceManager service object associated with this Project.

Returns
TypeDescription
ResourceManager

hashCode() (deprecated)

public final int hashCode()
Returns
TypeDescription
int
Overrides

reload() (deprecated)

public Project reload()

Fetches the project's latest information. Returns null if the project does not exist.

Returns
TypeDescription
Project

Project containing the project's updated metadata or null if not found

replace() (deprecated)

public Project replace()

Replaces the attributes of the project with the attributes of this project.

The caller must have modify permissions for this project. See Also: Cloud Resource Manager update

Returns
TypeDescription
Project

the Project representing the new project metadata

replacePolicy(Policy newPolicy) (deprecated)

public Policy replacePolicy(Policy newPolicy)

Sets the IAM access control policy for this project. Replaces any existing policy. It is recommended that you use the read-modify-write pattern. See code samples and important details of replacing policies in the documentation for ResourceManager#replacePolicy. See Also: Resource Manager setIamPolicy

Parameter
NameDescription
newPolicycom.google.cloud.Policy
Returns
TypeDescription
com.google.cloud.Policy

the newly set IAM policy for this project

toBuilder() (deprecated)

public Project.Builder toBuilder()
Returns
TypeDescription
Project.Builder
Overrides

undelete() (deprecated)

public void undelete()

Restores the project identified by the specified project ID.

You can only use this method for a project that has a lifecycle state of ProjectInfo.State#DELETE_REQUESTED. After deletion starts, as indicated by a lifecycle state of ProjectInfo.State#DELETE_IN_PROGRESS, the project cannot be restored. The caller must have modify permissions for this project. See Also: Cloud Resource Manager undelete