Skip to content
Ona Docs

Projects

CreateProjects
projects.bulk_create(ProjectBulkCreateParams**kwargs) -> ProjectBulkCreateResponse
POST/gitpod.v1.ProjectService/CreateProjects
DeleteProjects
projects.bulk_delete(ProjectBulkDeleteParams**kwargs) -> ProjectBulkDeleteResponse
POST/gitpod.v1.ProjectService/DeleteProjects
UpdateProjects
projects.bulk_update(ProjectBulkUpdateParams**kwargs) -> ProjectBulkUpdateResponse
POST/gitpod.v1.ProjectService/UpdateProjects
CreateProject
projects.create(ProjectCreateParams**kwargs) -> ProjectCreateResponse
POST/gitpod.v1.ProjectService/CreateProject
CreateProjectFromEnvironment
projects.create_from_environment(ProjectCreateFromEnvironmentParams**kwargs) -> ProjectCreateFromEnvironmentResponse
POST/gitpod.v1.ProjectService/CreateProjectFromEnvironment
DeleteProject
projects.delete(ProjectDeleteParams**kwargs) -> object
POST/gitpod.v1.ProjectService/DeleteProject
ListProjects
projects.list(ProjectListParams**kwargs) -> SyncProjectsPage[Project]
POST/gitpod.v1.ProjectService/ListProjects
GetProject
projects.retrieve(ProjectRetrieveParams**kwargs) -> ProjectRetrieveResponse
POST/gitpod.v1.ProjectService/GetProject
UpdateProject
projects.update(ProjectUpdateParams**kwargs) -> ProjectUpdateResponse
POST/gitpod.v1.ProjectService/UpdateProject
ModelsExpand Collapse
class EnvironmentInitializer:

EnvironmentInitializer specifies how an environment is to be initialized

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

class Project:
Deprecatedenvironment_class: ProjectEnvironmentClass

Use environment_classes instead.

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
id: Optional[str]

id is the unique identifier for the project

formatuuid
automations_file_path: Optional[str]

automations_file_path is the path to the automations file relative to the repo root

desired_phase: Optional[ProjectPhase]

desired_phase is the desired phase of the project When set to DELETED, the project is pending deletion

One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
devcontainer_file_path: Optional[str]

devcontainer_file_path is the path to the devcontainer file relative to the repo root

environment_classes: Optional[List[ProjectEnvironmentClass]]

environment_classes is the list of environment classes for the project

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
initializer: Optional[EnvironmentInitializer]

initializer is the content initializer

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

metadata: Optional[ProjectMetadata]
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
prebuild_configuration: Optional[ProjectPrebuildConfiguration]

prebuild_configuration defines how prebuilds are created for this project.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
recommended_editors: Optional[RecommendedEditors]

recommended_editors specifies the editors recommended for this project.

technical_description: Optional[str]

technical_description is a detailed technical description of the project This field is not returned by default in GetProject or ListProjects responses

used_by: Optional[UsedBy]
subjects: Optional[List[Subject]]

Subjects are the 10 most recent subjects who have used the project to create an environment

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
total_subjects: Optional[int]

Total number of unique subjects who have used the project

formatint32
class ProjectMetadata:
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
Literal["PROJECT_PHASE_UNSPECIFIED", "PROJECT_PHASE_ACTIVE", "PROJECT_PHASE_DELETED"]
One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
class ProjectPrebuildConfiguration:

ProjectPrebuildConfiguration defines how prebuilds are created for a project. Prebuilds create environment snapshots that enable faster environment startup times.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
class ProjectBulkCreateResponse:
created_projects: Optional[List[Project]]

created_projects contains the successfully created projects

Deprecatedenvironment_class: ProjectEnvironmentClass

Use environment_classes instead.

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
id: Optional[str]

id is the unique identifier for the project

formatuuid
automations_file_path: Optional[str]

automations_file_path is the path to the automations file relative to the repo root

desired_phase: Optional[ProjectPhase]

desired_phase is the desired phase of the project When set to DELETED, the project is pending deletion

One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
devcontainer_file_path: Optional[str]

devcontainer_file_path is the path to the devcontainer file relative to the repo root

environment_classes: Optional[List[ProjectEnvironmentClass]]

environment_classes is the list of environment classes for the project

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
initializer: Optional[EnvironmentInitializer]

initializer is the content initializer

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

metadata: Optional[ProjectMetadata]
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
prebuild_configuration: Optional[ProjectPrebuildConfiguration]

prebuild_configuration defines how prebuilds are created for this project.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
recommended_editors: Optional[RecommendedEditors]

recommended_editors specifies the editors recommended for this project.

technical_description: Optional[str]

technical_description is a detailed technical description of the project This field is not returned by default in GetProject or ListProjects responses

used_by: Optional[UsedBy]
subjects: Optional[List[Subject]]

Subjects are the 10 most recent subjects who have used the project to create an environment

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
total_subjects: Optional[int]

Total number of unique subjects who have used the project

formatint32
failed_projects: Optional[List[FailedProject]]

failed_projects contains details about projects that failed to create

error: Optional[str]

error describes why the project creation failed

index: Optional[int]

index is the position in the request array (0-based)

formatint32
name: Optional[str]

name is the project name that failed

class ProjectBulkDeleteResponse:
deleted_project_ids: Optional[List[str]]

deleted_project_ids contains the IDs of successfully deleted projects

failed_projects: Optional[List[FailedProject]]

failed_projects contains details about projects that failed to delete

error: Optional[str]

error describes why the project deletion failed

index: Optional[int]

index is the position in the request array (0-based)

formatint32
project_id: Optional[str]

project_id is the project ID that failed

class ProjectBulkUpdateResponse:
failed_projects: Optional[List[FailedProject]]

failed_projects contains details about projects that failed to update

error: Optional[str]

error describes why the project update failed

index: Optional[int]

index is the position in the request array (0-based)

formatint32
project_id: Optional[str]

project_id is the project ID that failed

updated_projects: Optional[List[Project]]

updated_projects contains the successfully updated projects

Deprecatedenvironment_class: ProjectEnvironmentClass

Use environment_classes instead.

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
id: Optional[str]

id is the unique identifier for the project

formatuuid
automations_file_path: Optional[str]

automations_file_path is the path to the automations file relative to the repo root

desired_phase: Optional[ProjectPhase]

desired_phase is the desired phase of the project When set to DELETED, the project is pending deletion

One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
devcontainer_file_path: Optional[str]

devcontainer_file_path is the path to the devcontainer file relative to the repo root

environment_classes: Optional[List[ProjectEnvironmentClass]]

environment_classes is the list of environment classes for the project

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
initializer: Optional[EnvironmentInitializer]

initializer is the content initializer

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

metadata: Optional[ProjectMetadata]
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
prebuild_configuration: Optional[ProjectPrebuildConfiguration]

prebuild_configuration defines how prebuilds are created for this project.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
recommended_editors: Optional[RecommendedEditors]

recommended_editors specifies the editors recommended for this project.

technical_description: Optional[str]

technical_description is a detailed technical description of the project This field is not returned by default in GetProject or ListProjects responses

used_by: Optional[UsedBy]
subjects: Optional[List[Subject]]

Subjects are the 10 most recent subjects who have used the project to create an environment

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
total_subjects: Optional[int]

Total number of unique subjects who have used the project

formatint32
class ProjectCreateResponse:
project: Optional[Project]
Deprecatedenvironment_class: ProjectEnvironmentClass

Use environment_classes instead.

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
id: Optional[str]

id is the unique identifier for the project

formatuuid
automations_file_path: Optional[str]

automations_file_path is the path to the automations file relative to the repo root

desired_phase: Optional[ProjectPhase]

desired_phase is the desired phase of the project When set to DELETED, the project is pending deletion

One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
devcontainer_file_path: Optional[str]

devcontainer_file_path is the path to the devcontainer file relative to the repo root

environment_classes: Optional[List[ProjectEnvironmentClass]]

environment_classes is the list of environment classes for the project

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
initializer: Optional[EnvironmentInitializer]

initializer is the content initializer

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

metadata: Optional[ProjectMetadata]
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
prebuild_configuration: Optional[ProjectPrebuildConfiguration]

prebuild_configuration defines how prebuilds are created for this project.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
recommended_editors: Optional[RecommendedEditors]

recommended_editors specifies the editors recommended for this project.

technical_description: Optional[str]

technical_description is a detailed technical description of the project This field is not returned by default in GetProject or ListProjects responses

used_by: Optional[UsedBy]
subjects: Optional[List[Subject]]

Subjects are the 10 most recent subjects who have used the project to create an environment

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
total_subjects: Optional[int]

Total number of unique subjects who have used the project

formatint32
class ProjectCreateFromEnvironmentResponse:
project: Optional[Project]
Deprecatedenvironment_class: ProjectEnvironmentClass

Use environment_classes instead.

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
id: Optional[str]

id is the unique identifier for the project

formatuuid
automations_file_path: Optional[str]

automations_file_path is the path to the automations file relative to the repo root

desired_phase: Optional[ProjectPhase]

desired_phase is the desired phase of the project When set to DELETED, the project is pending deletion

One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
devcontainer_file_path: Optional[str]

devcontainer_file_path is the path to the devcontainer file relative to the repo root

environment_classes: Optional[List[ProjectEnvironmentClass]]

environment_classes is the list of environment classes for the project

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
initializer: Optional[EnvironmentInitializer]

initializer is the content initializer

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

metadata: Optional[ProjectMetadata]
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
prebuild_configuration: Optional[ProjectPrebuildConfiguration]

prebuild_configuration defines how prebuilds are created for this project.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
recommended_editors: Optional[RecommendedEditors]

recommended_editors specifies the editors recommended for this project.

technical_description: Optional[str]

technical_description is a detailed technical description of the project This field is not returned by default in GetProject or ListProjects responses

used_by: Optional[UsedBy]
subjects: Optional[List[Subject]]

Subjects are the 10 most recent subjects who have used the project to create an environment

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
total_subjects: Optional[int]

Total number of unique subjects who have used the project

formatint32
class ProjectRetrieveResponse:
project: Optional[Project]
Deprecatedenvironment_class: ProjectEnvironmentClass

Use environment_classes instead.

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
id: Optional[str]

id is the unique identifier for the project

formatuuid
automations_file_path: Optional[str]

automations_file_path is the path to the automations file relative to the repo root

desired_phase: Optional[ProjectPhase]

desired_phase is the desired phase of the project When set to DELETED, the project is pending deletion

One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
devcontainer_file_path: Optional[str]

devcontainer_file_path is the path to the devcontainer file relative to the repo root

environment_classes: Optional[List[ProjectEnvironmentClass]]

environment_classes is the list of environment classes for the project

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
initializer: Optional[EnvironmentInitializer]

initializer is the content initializer

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

metadata: Optional[ProjectMetadata]
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
prebuild_configuration: Optional[ProjectPrebuildConfiguration]

prebuild_configuration defines how prebuilds are created for this project.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
recommended_editors: Optional[RecommendedEditors]

recommended_editors specifies the editors recommended for this project.

technical_description: Optional[str]

technical_description is a detailed technical description of the project This field is not returned by default in GetProject or ListProjects responses

used_by: Optional[UsedBy]
subjects: Optional[List[Subject]]

Subjects are the 10 most recent subjects who have used the project to create an environment

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
total_subjects: Optional[int]

Total number of unique subjects who have used the project

formatint32
class ProjectUpdateResponse:
project: Optional[Project]
Deprecatedenvironment_class: ProjectEnvironmentClass

Use environment_classes instead.

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
id: Optional[str]

id is the unique identifier for the project

formatuuid
automations_file_path: Optional[str]

automations_file_path is the path to the automations file relative to the repo root

desired_phase: Optional[ProjectPhase]

desired_phase is the desired phase of the project When set to DELETED, the project is pending deletion

One of the following:
"PROJECT_PHASE_UNSPECIFIED"
"PROJECT_PHASE_ACTIVE"
"PROJECT_PHASE_DELETED"
devcontainer_file_path: Optional[str]

devcontainer_file_path is the path to the devcontainer file relative to the repo root

environment_classes: Optional[List[ProjectEnvironmentClass]]

environment_classes is the list of environment classes for the project

environment_class_id: Optional[str]

Use a fixed environment class on a given Runner. This cannot be a local runner’s environment class.

formatuuid
local_runner: Optional[bool]

Use a local runner for the user

order: Optional[int]

order is the priority of this entry

formatint32
initializer: Optional[EnvironmentInitializer]

initializer is the content initializer

specs: Optional[List[Spec]]
context_url: Optional[SpecContextURL]
url: Optional[str]

url is the URL from which the environment is created

formaturi
git: Optional[SpecGit]
checkout_location: Optional[str]

a path relative to the environment root in which the code will be checked out to

clone_target: Optional[str]

the value for the clone target mode - use depends on the target mode

remote_uri: Optional[str]

remote_uri is the Git remote origin

target_mode: Optional[Literal["CLONE_TARGET_MODE_UNSPECIFIED", "CLONE_TARGET_MODE_REMOTE_HEAD", "CLONE_TARGET_MODE_REMOTE_COMMIT", 3 more]]

the target mode determines what gets checked out

One of the following:
"CLONE_TARGET_MODE_UNSPECIFIED"
"CLONE_TARGET_MODE_REMOTE_HEAD"
"CLONE_TARGET_MODE_REMOTE_COMMIT"
"CLONE_TARGET_MODE_REMOTE_BRANCH"
"CLONE_TARGET_MODE_LOCAL_BRANCH"
"CLONE_TARGET_MODE_REMOTE_TAG"
upstream_remote_uri: Optional[str]

upstream_Remote_uri is the fork upstream of a repository

metadata: Optional[ProjectMetadata]
created_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
creator: Optional[Subject]

creator is the identity of the project creator

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]

name is the human readable name of the project

maxLength80
minLength1
organization_id: Optional[str]

organization_id is the ID of the organization that contains the environment

formatuuid
updated_at: Optional[datetime]

A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.

All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.

The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.

Examples

Example 1: Compute Timestamp from POSIX time().

 Timestamp timestamp;
 timestamp.set_seconds(time(NULL));
 timestamp.set_nanos(0);

Example 2: Compute Timestamp from POSIX gettimeofday().

 struct timeval tv;
 gettimeofday(&tv, NULL);

 Timestamp timestamp;
 timestamp.set_seconds(tv.tv_sec);
 timestamp.set_nanos(tv.tv_usec * 1000);

Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().

 FILETIME ft;
 GetSystemTimeAsFileTime(&ft);
 UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

 // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 Timestamp timestamp;
 timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

Example 4: Compute Timestamp from Java System.currentTimeMillis().

 long millis = System.currentTimeMillis();

 Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
     .setNanos((int) ((millis % 1000) * 1000000)).build();

Example 5: Compute Timestamp from Java Instant.now().

 Instant now = Instant.now();

 Timestamp timestamp =
     Timestamp.newBuilder().setSeconds(now.getEpochSecond())
         .setNanos(now.getNano()).build();

Example 6: Compute Timestamp from current time in Python.

 timestamp = Timestamp()
 timestamp.GetCurrentTime()

JSON Mapping

In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).

For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.

In JavaScript, one can convert a Date object to this format using the standard toISOString() method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
prebuild_configuration: Optional[ProjectPrebuildConfiguration]

prebuild_configuration defines how prebuilds are created for this project.

enabled: Optional[bool]

enabled controls whether prebuilds are created for this project. When disabled, no automatic prebuilds will be triggered.

enable_jetbrains_warmup: Optional[bool]

enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during prebuilds.

environment_class_ids: Optional[List[str]]

environment_class_ids specifies which environment classes should have prebuilds created. If empty, no prebuilds are created.

executor: Optional[Subject]

executor specifies who runs prebuilds for this project. The executor’s SCM credentials are used to clone the repository. If not set, defaults to the project creator.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
timeout: Optional[str]

timeout is the maximum duration allowed for a prebuild to complete. If not specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.

formatregex
trigger: Optional[Trigger]

trigger defines when prebuilds should be created.

daily_schedule: TriggerDailySchedule

daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.

hour_utc: Optional[int]

hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The actual start time may be adjusted by a few minutes to balance system load.

formatint32
maximum23
recommended_editors: Optional[RecommendedEditors]

recommended_editors specifies the editors recommended for this project.

technical_description: Optional[str]

technical_description is a detailed technical description of the project This field is not returned by default in GetProject or ListProjects responses

used_by: Optional[UsedBy]
subjects: Optional[List[Subject]]

Subjects are the 10 most recent subjects who have used the project to create an environment

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
total_subjects: Optional[int]

Total number of unique subjects who have used the project

formatint32

ProjectsEnvironment Clases

ListProjectEnvironmentClasses
projects.environment_clases.list(EnvironmentClaseListParams**kwargs) -> SyncProjectEnvironmentClassesPage[ProjectEnvironmentClass]
POST/gitpod.v1.ProjectService/ListProjectEnvironmentClasses
UpdateProjectEnvironmentClasses
projects.environment_clases.update(EnvironmentClaseUpdateParams**kwargs) -> object
POST/gitpod.v1.ProjectService/UpdateProjectEnvironmentClasses

ProjectsPolicies

CreateProjectPolicy
projects.policies.create(PolicyCreateParams**kwargs) -> PolicyCreateResponse
POST/gitpod.v1.ProjectService/CreateProjectPolicy
DeleteProjectPolicy
projects.policies.delete(PolicyDeleteParams**kwargs) -> object
POST/gitpod.v1.ProjectService/DeleteProjectPolicy
ListProjectPolicies
projects.policies.list(PolicyListParams**kwargs) -> SyncPoliciesPage[ProjectPolicy]
POST/gitpod.v1.ProjectService/ListProjectPolicies
UpdateProjectPolicy
projects.policies.update(PolicyUpdateParams**kwargs) -> PolicyUpdateResponse
POST/gitpod.v1.ProjectService/UpdateProjectPolicy
ModelsExpand Collapse
class ProjectPolicy:
group_id: Optional[str]
formatuuid
role: Optional[ProjectRole]

role is the role assigned to the group

One of the following:
"PROJECT_ROLE_UNSPECIFIED"
"PROJECT_ROLE_ADMIN"
"PROJECT_ROLE_USER"
"PROJECT_ROLE_EDITOR"
Literal["PROJECT_ROLE_UNSPECIFIED", "PROJECT_ROLE_ADMIN", "PROJECT_ROLE_USER", "PROJECT_ROLE_EDITOR"]
One of the following:
"PROJECT_ROLE_UNSPECIFIED"
"PROJECT_ROLE_ADMIN"
"PROJECT_ROLE_USER"
"PROJECT_ROLE_EDITOR"
class PolicyCreateResponse:
policy: Optional[ProjectPolicy]
group_id: Optional[str]
formatuuid
role: Optional[ProjectRole]

role is the role assigned to the group

One of the following:
"PROJECT_ROLE_UNSPECIFIED"
"PROJECT_ROLE_ADMIN"
"PROJECT_ROLE_USER"
"PROJECT_ROLE_EDITOR"
class PolicyUpdateResponse:
policy: Optional[ProjectPolicy]
group_id: Optional[str]
formatuuid
role: Optional[ProjectRole]

role is the role assigned to the group

One of the following:
"PROJECT_ROLE_UNSPECIFIED"
"PROJECT_ROLE_ADMIN"
"PROJECT_ROLE_USER"
"PROJECT_ROLE_EDITOR"