gitpod

package module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

README

Gitpod Go API Library

Go Reference

The Gitpod Go library provides convenient access to the Gitpod REST API from applications written in Go. The full API of this library can be found in api.md.

It is generated with Stainless.

Installation

import (
	"github.com/gitpod-io/gitpod-sdk-go" // imported as gitpod
)

Or to pin the version:

go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.4.0'

Requirements

This library requires Go 1.18+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/gitpod-io/gitpod-sdk-go"
	"github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
	client := gitpod.NewClient(
		option.WithBearerToken("My Bearer Token"), // defaults to os.LookupEnv("GITPOD_API_KEY")
	)
	response, err := client.Identity.GetAuthenticatedIdentity(context.TODO(), gitpod.IdentityGetAuthenticatedIdentityParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response.OrganizationID)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: gitpod.F("hello"),

	// Explicitly send `"description": null`
	Description: gitpod.Null[string](),

	Point: gitpod.F(gitpod.Point{
		X: gitpod.Int(0),
		Y: gitpod.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: gitpod.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the response JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := gitpod.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Identity.GetAuthenticatedIdentity(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

iter := client.Environments.ListAutoPaging(context.TODO(), gitpod.EnvironmentListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
	environment := iter.Current()
	fmt.Printf("%+v\n", environment)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

page, err := client.Environments.List(context.TODO(), gitpod.EnvironmentListParams{})
for page != nil {
	for _, environment := range page.Environments {
		fmt.Printf("%+v\n", environment)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *gitpod.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Identity.GetAuthenticatedIdentity(context.TODO(), gitpod.IdentityGetAuthenticatedIdentityParams{})
if err != nil {
	var apierr *gitpod.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/gitpod.v1.IdentityService/GetAuthenticatedIdentity": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Identity.GetAuthenticatedIdentity(
	ctx,
	gitpod.IdentityGetAuthenticatedIdentityParams{},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as param.Field[io.Reader]. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper gitpod.FileParam(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := gitpod.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Identity.GetAuthenticatedIdentity(
	context.TODO(),
	gitpod.IdentityGetAuthenticatedIdentityParams{},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
response, err := client.Identity.GetAuthenticatedIdentity(
	context.TODO(),
	gitpod.IdentityGetAuthenticatedIdentityParams{},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", response)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]interface{}

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   gitpod.F("id_xxxx"),
    Data: gitpod.F(FooNewParamsData{
        FirstName: gitpod.F("John"),
    }),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := gitpod.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

View Source
const ErrorCodeAborted = apierror.ErrorCodeAborted
View Source
const ErrorCodeAlreadyExists = apierror.ErrorCodeAlreadyExists
View Source
const ErrorCodeCanceled = apierror.ErrorCodeCanceled
View Source
const ErrorCodeDataLoss = apierror.ErrorCodeDataLoss
View Source
const ErrorCodeDeadlineExceeded = apierror.ErrorCodeDeadlineExceeded
View Source
const ErrorCodeFailedPrecondition = apierror.ErrorCodeFailedPrecondition
View Source
const ErrorCodeInternal = apierror.ErrorCodeInternal
View Source
const ErrorCodeInvalidArgument = apierror.ErrorCodeInvalidArgument
View Source
const ErrorCodeNotFound = apierror.ErrorCodeNotFound
View Source
const ErrorCodeOutOfRange = apierror.ErrorCodeOutOfRange
View Source
const ErrorCodePermissionDenied = apierror.ErrorCodePermissionDenied
View Source
const ErrorCodeResourceExhausted = apierror.ErrorCodeResourceExhausted
View Source
const ErrorCodeUnauthenticated = apierror.ErrorCodeUnauthenticated
View Source
const ErrorCodeUnavailable = apierror.ErrorCodeUnavailable
View Source
const ErrorCodeUnimplemented = apierror.ErrorCodeUnimplemented
View Source
const ErrorCodeUnknown = apierror.ErrorCodeUnknown
View Source
const OrganizationRoleAdmin = shared.OrganizationRoleAdmin

This is an alias to an internal value.

View Source
const OrganizationRoleMember = shared.OrganizationRoleMember

This is an alias to an internal value.

View Source
const OrganizationRoleUnspecified = shared.OrganizationRoleUnspecified

This is an alias to an internal value.

View Source
const PrincipalAccount = shared.PrincipalAccount

This is an alias to an internal value.

View Source
const PrincipalEnvironment = shared.PrincipalEnvironment

This is an alias to an internal value.

View Source
const PrincipalRunner = shared.PrincipalRunner

This is an alias to an internal value.

View Source
const PrincipalServiceAccount = shared.PrincipalServiceAccount

This is an alias to an internal value.

View Source
const PrincipalUnspecified = shared.PrincipalUnspecified

This is an alias to an internal value.

View Source
const PrincipalUser = shared.PrincipalUser

This is an alias to an internal value.

View Source
const TaskExecutionPhaseFailed = shared.TaskExecutionPhaseFailed

This is an alias to an internal value.

View Source
const TaskExecutionPhasePending = shared.TaskExecutionPhasePending

This is an alias to an internal value.

View Source
const TaskExecutionPhaseRunning = shared.TaskExecutionPhaseRunning

This is an alias to an internal value.

View Source
const TaskExecutionPhaseStopped = shared.TaskExecutionPhaseStopped

This is an alias to an internal value.

View Source
const TaskExecutionPhaseSucceeded = shared.TaskExecutionPhaseSucceeded

This is an alias to an internal value.

View Source
const TaskExecutionPhaseUnspecified = shared.TaskExecutionPhaseUnspecified

This is an alias to an internal value.

View Source
const UserStatusActive = shared.UserStatusActive

This is an alias to an internal value.

View Source
const UserStatusLeft = shared.UserStatusLeft

This is an alias to an internal value.

View Source
const UserStatusSuspended = shared.UserStatusSuspended

This is an alias to an internal value.

View Source
const UserStatusUnspecified = shared.UserStatusUnspecified

This is an alias to an internal value.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

func F

func F[T any](value T) param.Field[T]

F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.

func FileParam

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type Account

type Account struct {
	ID string `json:"id,required" format:"uuid"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
	Email     string    `json:"email,required"`
	Name      string    `json:"name,required"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	UpdatedAt   time.Time              `json:"updatedAt,required" format:"date-time"`
	AvatarURL   string                 `json:"avatarUrl"`
	Joinables   []JoinableOrganization `json:"joinables"`
	Memberships []AccountMembership    `json:"memberships"`
	// organization_id is the ID of the organization the account is owned by if it's
	// created through custom SSO
	OrganizationID string `json:"organizationId,nullable"`
	// public_email_provider is true if the email for the Account matches a known
	// public email provider
	PublicEmailProvider bool        `json:"publicEmailProvider"`
	JSON                accountJSON `json:"-"`
}

func (*Account) UnmarshalJSON

func (r *Account) UnmarshalJSON(data []byte) (err error)

type AccountDeleteParams

type AccountDeleteParams struct {
	AccountID param.Field[string] `json:"accountId,required" format:"uuid"`
}

func (AccountDeleteParams) MarshalJSON

func (r AccountDeleteParams) MarshalJSON() (data []byte, err error)

type AccountDeleteResponse

type AccountDeleteResponse = interface{}

type AccountGetParams

type AccountGetParams struct {
	Empty param.Field[bool] `json:"empty"`
}

func (AccountGetParams) MarshalJSON

func (r AccountGetParams) MarshalJSON() (data []byte, err error)

type AccountGetResponse

type AccountGetResponse struct {
	Account Account                `json:"account,required"`
	JSON    accountGetResponseJSON `json:"-"`
}

func (*AccountGetResponse) UnmarshalJSON

func (r *AccountGetResponse) UnmarshalJSON(data []byte) (err error)

type AccountGetSSOLoginURLParams

type AccountGetSSOLoginURLParams struct {
	// email is the email the user wants to login with
	Email param.Field[string] `json:"email,required" format:"email"`
	// return_to is the URL the user will be redirected to after login
	ReturnTo param.Field[string] `json:"returnTo" format:"uri"`
}

func (AccountGetSSOLoginURLParams) MarshalJSON

func (r AccountGetSSOLoginURLParams) MarshalJSON() (data []byte, err error)

type AccountGetSSOLoginURLResponse

type AccountGetSSOLoginURLResponse struct {
	// login_url is the URL to redirect the user to for SSO login
	LoginURL string                            `json:"loginUrl,required"`
	JSON     accountGetSSOLoginURLResponseJSON `json:"-"`
}

func (*AccountGetSSOLoginURLResponse) UnmarshalJSON

func (r *AccountGetSSOLoginURLResponse) UnmarshalJSON(data []byte) (err error)

type AccountListLoginProvidersParams

type AccountListLoginProvidersParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// filter contains the filter options for listing login methods
	Filter param.Field[AccountListLoginProvidersParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing login methods
	Pagination param.Field[AccountListLoginProvidersParamsPagination] `json:"pagination"`
}

func (AccountListLoginProvidersParams) MarshalJSON

func (r AccountListLoginProvidersParams) MarshalJSON() (data []byte, err error)

func (AccountListLoginProvidersParams) URLQuery

func (r AccountListLoginProvidersParams) URLQuery() (v url.Values)

URLQuery serializes AccountListLoginProvidersParams's query parameters as `url.Values`.

type AccountListLoginProvidersParamsFilter

type AccountListLoginProvidersParamsFilter struct {
	// invite_id is the ID of the invite URL the user wants to login with
	InviteID param.Field[string] `json:"inviteId" format:"uuid"`
}

filter contains the filter options for listing login methods

func (AccountListLoginProvidersParamsFilter) MarshalJSON

func (r AccountListLoginProvidersParamsFilter) MarshalJSON() (data []byte, err error)

type AccountListLoginProvidersParamsPagination

type AccountListLoginProvidersParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing login methods

func (AccountListLoginProvidersParamsPagination) MarshalJSON

func (r AccountListLoginProvidersParamsPagination) MarshalJSON() (data []byte, err error)

type AccountMembership

type AccountMembership struct {
	// organization_id is the id of the organization the user is a member of
	OrganizationID string `json:"organizationId,required" format:"uuid"`
	// organization_name is the name of the organization the user is a member of
	OrganizationName string `json:"organizationName,required"`
	// user_id is the ID the user has in the organization
	UserID string `json:"userId,required" format:"uuid"`
	// user_role is the role the user has in the organization
	UserRole shared.OrganizationRole `json:"userRole,required"`
	// organization_name is the member count of the organization the user is a member
	// of
	OrganizationMemberCount int64                 `json:"organizationMemberCount"`
	JSON                    accountMembershipJSON `json:"-"`
}

func (*AccountMembership) UnmarshalJSON

func (r *AccountMembership) UnmarshalJSON(data []byte) (err error)

type AccountService

type AccountService struct {
	Options []option.RequestOption
}

AccountService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.

func NewAccountService

func NewAccountService(opts ...option.RequestOption) (r *AccountService)

NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AccountService) Delete

Deletes an account permanently.

Use this method to:

- Remove unused accounts - Clean up test accounts - Complete account deletion requests

The account must not be an active member of any organization.

### Examples

- Delete account:

Permanently removes an account.

```yaml
accountId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
```

func (*AccountService) Get

Gets information about the currently authenticated account.

Use this method to:

- Retrieve account profile information - Check organization memberships - View account settings - Get joinable organizations

### Examples

- Get account details:

Retrieves information about the authenticated account.

```yaml
{}
```

func (*AccountService) GetSSOLoginURL

Gets the SSO login URL for a specific email domain.

Use this method to:

- Initiate SSO authentication - Get organization-specific login URLs - Handle SSO redirects

### Examples

- Get login URL:

Retrieves SSO URL for email domain.

```yaml
email: "user@company.com"
```

- Get URL with return path:

Gets SSO URL with specific return location.

```yaml
email: "user@company.com"
returnTo: "https://gitpod.io/workspaces"
```

func (*AccountService) ListLoginProviders

Lists available login providers with optional filtering.

Use this method to:

- View supported authentication methods - Get provider-specific login URLs - Filter providers by invite

### Examples

- List all providers:

Shows all available login providers.

```yaml
pagination:
  pageSize: 20
```

- List for specific invite:

Shows providers available for an invite.

```yaml
filter:
  inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
pagination:
  pageSize: 20
```

func (*AccountService) ListLoginProvidersAutoPaging

Lists available login providers with optional filtering.

Use this method to:

- View supported authentication methods - Get provider-specific login URLs - Filter providers by invite

### Examples

- List all providers:

Shows all available login providers.

```yaml
pagination:
  pageSize: 20
```

- List for specific invite:

Shows providers available for an invite.

```yaml
filter:
  inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
pagination:
  pageSize: 20
```

type AdmissionLevel

type AdmissionLevel string

Admission level describes who can access an environment instance and its ports.

const (
	AdmissionLevelUnspecified AdmissionLevel = "ADMISSION_LEVEL_UNSPECIFIED"
	AdmissionLevelOwnerOnly   AdmissionLevel = "ADMISSION_LEVEL_OWNER_ONLY"
	AdmissionLevelEveryone    AdmissionLevel = "ADMISSION_LEVEL_EVERYONE"
)

func (AdmissionLevel) IsKnown

func (r AdmissionLevel) IsKnown() bool

type AutomationTrigger

type AutomationTrigger = shared.AutomationTrigger

An AutomationTrigger represents a trigger for an automation action. The `post_environment_start` field indicates that the automation should be triggered after the environment has started. The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started.

This is an alias to an internal type.

type AutomationTriggerParam

type AutomationTriggerParam = shared.AutomationTriggerParam

An AutomationTrigger represents a trigger for an automation action. The `post_environment_start` field indicates that the automation should be triggered after the environment has started. The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started.

This is an alias to an internal type.

type AutomationsFileParam

type AutomationsFileParam struct {
	Services param.Field[map[string]AutomationsFileServiceParam] `json:"services"`
	Tasks    param.Field[map[string]AutomationsFileTaskParam]    `json:"tasks"`
}

WARN: Do not remove any field here, as it will break reading automation yaml files. We error if there are any unknown fields in the yaml (to ensure the yaml is correct), but would break if we removed any fields. This includes marking a field as "reserved" in the proto file, this will also break reading the yaml.

func (AutomationsFileParam) MarshalJSON

func (r AutomationsFileParam) MarshalJSON() (data []byte, err error)

type AutomationsFileServiceParam

type AutomationsFileServiceParam struct {
	Commands    param.Field[AutomationsFileServicesCommandsParam] `json:"commands"`
	Description param.Field[string]                               `json:"description"`
	Name        param.Field[string]                               `json:"name"`
	RunsOn      param.Field[shared.RunsOnParam]                   `json:"runsOn"`
	TriggeredBy param.Field[[]AutomationsFileServicesTriggeredBy] `json:"triggeredBy"`
}

func (AutomationsFileServiceParam) MarshalJSON

func (r AutomationsFileServiceParam) MarshalJSON() (data []byte, err error)

type AutomationsFileServicesCommandsParam

type AutomationsFileServicesCommandsParam struct {
	// ready is an optional command that is run repeatedly until it exits with a zero
	// exit code. If set, the service will first go into a Starting phase, and then
	// into a Running phase once the ready command exits with a zero exit code.
	Ready param.Field[string] `json:"ready"`
	// start is the command to start and run the service. If start exits, the service
	// will transition to the following phase:
	//
	//   - Stopped: if the exit code is 0
	//   - Failed: if the exit code is not 0 If the stop command is not set, the start
	//     command will receive a SIGTERM signal when the service is requested to stop.
	//     If it does not exit within 2 minutes, it will receive a SIGKILL signal.
	Start param.Field[string] `json:"start"`
	// stop is an optional command that runs when the service is requested to stop. If
	// set, instead of sending a SIGTERM signal to the start command, the stop command
	// will be run. Once the stop command exits, the start command will receive a
	// SIGKILL signal. If the stop command exits with a non-zero exit code, the service
	// will transition to the Failed phase. If the stop command does not exit within 2
	// minutes, a SIGKILL signal will be sent to both the start and stop commands.
	Stop param.Field[string] `json:"stop"`
}

func (AutomationsFileServicesCommandsParam) MarshalJSON

func (r AutomationsFileServicesCommandsParam) MarshalJSON() (data []byte, err error)

type AutomationsFileServicesTriggeredBy

type AutomationsFileServicesTriggeredBy string
const (
	AutomationsFileServicesTriggeredByManual                AutomationsFileServicesTriggeredBy = "manual"
	AutomationsFileServicesTriggeredByPostEnvironmentStart  AutomationsFileServicesTriggeredBy = "postEnvironmentStart"
	AutomationsFileServicesTriggeredByPostDevcontainerStart AutomationsFileServicesTriggeredBy = "postDevcontainerStart"
)

func (AutomationsFileServicesTriggeredBy) IsKnown

type AutomationsFileTaskParam

type AutomationsFileTaskParam struct {
	Command     param.Field[string]                            `json:"command"`
	DependsOn   param.Field[[]string]                          `json:"dependsOn"`
	Description param.Field[string]                            `json:"description"`
	Name        param.Field[string]                            `json:"name"`
	RunsOn      param.Field[shared.RunsOnParam]                `json:"runsOn"`
	TriggeredBy param.Field[[]AutomationsFileTasksTriggeredBy] `json:"triggeredBy"`
}

func (AutomationsFileTaskParam) MarshalJSON

func (r AutomationsFileTaskParam) MarshalJSON() (data []byte, err error)

type AutomationsFileTasksTriggeredBy

type AutomationsFileTasksTriggeredBy string
const (
	AutomationsFileTasksTriggeredByManual                AutomationsFileTasksTriggeredBy = "manual"
	AutomationsFileTasksTriggeredByPostEnvironmentStart  AutomationsFileTasksTriggeredBy = "postEnvironmentStart"
	AutomationsFileTasksTriggeredByPostDevcontainerStart AutomationsFileTasksTriggeredBy = "postDevcontainerStart"
)

func (AutomationsFileTasksTriggeredBy) IsKnown

type Client

type Client struct {
	Options       []option.RequestOption
	Accounts      *AccountService
	Editors       *EditorService
	Environments  *EnvironmentService
	Events        *EventService
	Groups        *GroupService
	Identity      *IdentityService
	Organizations *OrganizationService
	Projects      *ProjectService
	Runners       *RunnerService
	Secrets       *SecretService
	Users         *UserService
}

Client creates a struct with services and top level methods that help with interacting with the gitpod API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r *Client)

NewClient generates a new client with the default option read from the environment (GITPOD_API_KEY). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type DomainVerification

type DomainVerification struct {
	ID             string                  `json:"id,required" format:"uuid"`
	Domain         string                  `json:"domain,required"`
	OrganizationID string                  `json:"organizationId,required" format:"uuid"`
	State          DomainVerificationState `json:"state,required"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt         time.Time `json:"createdAt" format:"date-time"`
	VerificationToken string    `json:"verificationToken"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	VerifiedAt time.Time              `json:"verifiedAt" format:"date-time"`
	JSON       domainVerificationJSON `json:"-"`
}

func (*DomainVerification) UnmarshalJSON

func (r *DomainVerification) UnmarshalJSON(data []byte) (err error)

type DomainVerificationState

type DomainVerificationState string
const (
	DomainVerificationStateUnspecified DomainVerificationState = "DOMAIN_VERIFICATION_STATE_UNSPECIFIED"
	DomainVerificationStatePending     DomainVerificationState = "DOMAIN_VERIFICATION_STATE_PENDING"
	DomainVerificationStateVerified    DomainVerificationState = "DOMAIN_VERIFICATION_STATE_VERIFIED"
)

func (DomainVerificationState) IsKnown

func (r DomainVerificationState) IsKnown() bool

type Editor

type Editor struct {
	ID                       string     `json:"id,required" format:"uuid"`
	InstallationInstructions string     `json:"installationInstructions,required"`
	Name                     string     `json:"name,required"`
	URLTemplate              string     `json:"urlTemplate,required"`
	Alias                    string     `json:"alias"`
	IconURL                  string     `json:"iconUrl"`
	ShortDescription         string     `json:"shortDescription"`
	JSON                     editorJSON `json:"-"`
}

func (*Editor) UnmarshalJSON

func (r *Editor) UnmarshalJSON(data []byte) (err error)

type EditorGetParams

type EditorGetParams struct {
	// id is the ID of the editor to get
	ID param.Field[string] `json:"id,required"`
}

func (EditorGetParams) MarshalJSON

func (r EditorGetParams) MarshalJSON() (data []byte, err error)

type EditorGetResponse

type EditorGetResponse struct {
	// editor contains the editor
	Editor Editor                `json:"editor,required"`
	JSON   editorGetResponseJSON `json:"-"`
}

func (*EditorGetResponse) UnmarshalJSON

func (r *EditorGetResponse) UnmarshalJSON(data []byte) (err error)

type EditorListParams

type EditorListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// pagination contains the pagination options for listing environments
	Pagination param.Field[EditorListParamsPagination] `json:"pagination"`
}

func (EditorListParams) MarshalJSON

func (r EditorListParams) MarshalJSON() (data []byte, err error)

func (EditorListParams) URLQuery

func (r EditorListParams) URLQuery() (v url.Values)

URLQuery serializes EditorListParams's query parameters as `url.Values`.

type EditorListParamsPagination

type EditorListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing environments

func (EditorListParamsPagination) MarshalJSON

func (r EditorListParamsPagination) MarshalJSON() (data []byte, err error)

type EditorResolveURLParams

type EditorResolveURLParams struct {
	// editorId is the ID of the editor to resolve the URL for
	EditorID param.Field[string] `json:"editorId,required" format:"uuid"`
	// environmentId is the ID of the environment to resolve the URL for
	EnvironmentID param.Field[string] `json:"environmentId,required" format:"uuid"`
	// organizationId is the ID of the organization to resolve the URL for
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}

func (EditorResolveURLParams) MarshalJSON

func (r EditorResolveURLParams) MarshalJSON() (data []byte, err error)

type EditorResolveURLResponse

type EditorResolveURLResponse struct {
	// url is the resolved editor URL
	URL  string                       `json:"url,required"`
	JSON editorResolveURLResponseJSON `json:"-"`
}

func (*EditorResolveURLResponse) UnmarshalJSON

func (r *EditorResolveURLResponse) UnmarshalJSON(data []byte) (err error)

type EditorService

type EditorService struct {
	Options []option.RequestOption
}

EditorService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEditorService method instead.

func NewEditorService

func NewEditorService(opts ...option.RequestOption) (r *EditorService)

NewEditorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EditorService) Get

Gets details about a specific editor.

Use this method to:

- View editor information - Get editor configuration

### Examples

- Get editor details:

Retrieves information about a specific editor.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EditorService) List

Lists all available code editors.

Use this method to:

- View supported editors - Get editor capabilities - Browse editor options - Check editor availability

### Examples

- List editors:

Shows all available editors with pagination.

```yaml
pagination:
  pageSize: 20
```

func (*EditorService) ListAutoPaging

Lists all available code editors.

Use this method to:

- View supported editors - Get editor capabilities - Browse editor options - Check editor availability

### Examples

- List editors:

Shows all available editors with pagination.

```yaml
pagination:
  pageSize: 20
```

func (*EditorService) ResolveURL

Resolves the URL for accessing an editor in a specific environment.

Use this method to:

- Get editor access URLs - Launch editors for environments - Set up editor connections - Configure editor access

### Examples

- Resolve editor URL:

Gets the URL for accessing an editor in an environment.

```yaml
editorId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

type Environment

type Environment struct {
	// ID is a unique identifier of this environment. No other environment with the
	// same name must be managed by this environment manager
	ID string `json:"id,required"`
	// Metadata is data associated with this environment that's required for other
	// parts of Gitpod to function
	Metadata EnvironmentMetadata `json:"metadata"`
	// Spec is the configuration of the environment that's required for the runner to
	// start the environment
	Spec EnvironmentSpec `json:"spec"`
	// Status is the current status of the environment
	Status EnvironmentStatus `json:"status"`
	JSON   environmentJSON   `json:"-"`
}

+resource get environment

func (*Environment) UnmarshalJSON

func (r *Environment) UnmarshalJSON(data []byte) (err error)

type EnvironmentActivitySignal

type EnvironmentActivitySignal struct {
	// source of the activity signal, such as "VS Code", "SSH", or "Automations". It
	// should be a human-readable string that describes the source of the activity
	// signal.
	Source string `json:"source"`
	// timestamp of when the activity was observed by the source. Only reported every 5
	// minutes. Zero value means no activity was observed.
	Timestamp time.Time                     `json:"timestamp" format:"date-time"`
	JSON      environmentActivitySignalJSON `json:"-"`
}

EnvironmentActivitySignal used to signal activity for an environment.

func (*EnvironmentActivitySignal) UnmarshalJSON

func (r *EnvironmentActivitySignal) UnmarshalJSON(data []byte) (err error)

type EnvironmentActivitySignalParam

type EnvironmentActivitySignalParam struct {
	// source of the activity signal, such as "VS Code", "SSH", or "Automations". It
	// should be a human-readable string that describes the source of the activity
	// signal.
	Source param.Field[string] `json:"source"`
	// timestamp of when the activity was observed by the source. Only reported every 5
	// minutes. Zero value means no activity was observed.
	Timestamp param.Field[time.Time] `json:"timestamp" format:"date-time"`
}

EnvironmentActivitySignal used to signal activity for an environment.

func (EnvironmentActivitySignalParam) MarshalJSON

func (r EnvironmentActivitySignalParam) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationService

type EnvironmentAutomationService struct {
	Options  []option.RequestOption
	Services *EnvironmentAutomationServiceService
	Tasks    *EnvironmentAutomationTaskService
}

EnvironmentAutomationService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationService method instead.

func NewEnvironmentAutomationService

func NewEnvironmentAutomationService(opts ...option.RequestOption) (r *EnvironmentAutomationService)

NewEnvironmentAutomationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentAutomationService) Upsert

Upserts the automations file for the given environment.

Use this method to:

- Configure environment automations - Update automation settings - Manage automation files

### Examples

- Update automations file:

Updates or creates the automations configuration.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
automationsFile:
  services:
    web-server:
      name: "Web Server"
      description: "Development web server"
      commands:
        start: "npm run dev"
        ready: "curl -s http://localhost:3000"
      triggeredBy:
        - postDevcontainerStart
  tasks:
    build:
      name: "Build Project"
      description: "Builds the project artifacts"
      command: "npm run build"
      triggeredBy:
        - postEnvironmentStart
```

type EnvironmentAutomationServiceDeleteParams

type EnvironmentAutomationServiceDeleteParams struct {
	ID    param.Field[string] `json:"id" format:"uuid"`
	Force param.Field[bool]   `json:"force"`
}

func (EnvironmentAutomationServiceDeleteParams) MarshalJSON

func (r EnvironmentAutomationServiceDeleteParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceDeleteResponse

type EnvironmentAutomationServiceDeleteResponse = interface{}

type EnvironmentAutomationServiceGetParams

type EnvironmentAutomationServiceGetParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationServiceGetParams) MarshalJSON

func (r EnvironmentAutomationServiceGetParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceGetResponse

type EnvironmentAutomationServiceGetResponse struct {
	Service Service                                     `json:"service,required"`
	JSON    environmentAutomationServiceGetResponseJSON `json:"-"`
}

func (*EnvironmentAutomationServiceGetResponse) UnmarshalJSON

func (r *EnvironmentAutomationServiceGetResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentAutomationServiceListParams

type EnvironmentAutomationServiceListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// filter contains the filter options for listing services
	Filter param.Field[EnvironmentAutomationServiceListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing services
	Pagination param.Field[EnvironmentAutomationServiceListParamsPagination] `json:"pagination"`
}

func (EnvironmentAutomationServiceListParams) MarshalJSON

func (r EnvironmentAutomationServiceListParams) MarshalJSON() (data []byte, err error)

func (EnvironmentAutomationServiceListParams) URLQuery

URLQuery serializes EnvironmentAutomationServiceListParams's query parameters as `url.Values`.

type EnvironmentAutomationServiceListParamsFilter

type EnvironmentAutomationServiceListParamsFilter struct {
	// environment_ids filters the response to only services of these environments
	EnvironmentIDs param.Field[[]string] `json:"environmentIds" format:"uuid"`
	// references filters the response to only services with these references
	References param.Field[[]string] `json:"references"`
	// service_ids filters the response to only services with these IDs
	ServiceIDs param.Field[[]string] `json:"serviceIds" format:"uuid"`
}

filter contains the filter options for listing services

func (EnvironmentAutomationServiceListParamsFilter) MarshalJSON

func (r EnvironmentAutomationServiceListParamsFilter) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceListParamsPagination

type EnvironmentAutomationServiceListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing services

func (EnvironmentAutomationServiceListParamsPagination) MarshalJSON

func (r EnvironmentAutomationServiceListParamsPagination) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceNewParams

type EnvironmentAutomationServiceNewParams struct {
	EnvironmentID param.Field[string]               `json:"environmentId" format:"uuid"`
	Metadata      param.Field[ServiceMetadataParam] `json:"metadata"`
	Spec          param.Field[ServiceSpecParam]     `json:"spec"`
}

func (EnvironmentAutomationServiceNewParams) MarshalJSON

func (r EnvironmentAutomationServiceNewParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceNewResponse

type EnvironmentAutomationServiceNewResponse struct {
	Service Service                                     `json:"service,required"`
	JSON    environmentAutomationServiceNewResponseJSON `json:"-"`
}

func (*EnvironmentAutomationServiceNewResponse) UnmarshalJSON

func (r *EnvironmentAutomationServiceNewResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentAutomationServiceService

type EnvironmentAutomationServiceService struct {
	Options []option.RequestOption
}

EnvironmentAutomationServiceService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationServiceService method instead.

func NewEnvironmentAutomationServiceService

func NewEnvironmentAutomationServiceService(opts ...option.RequestOption) (r *EnvironmentAutomationServiceService)

NewEnvironmentAutomationServiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentAutomationServiceService) Delete

Deletes an automation service. This call does not block until the service is deleted. If the service is not stopped it will be stopped before deletion.

Use this method to:

- Remove unused services - Clean up service configurations - Stop and delete services

### Examples

- Delete service:

Removes a service after stopping it.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
force: false
```

- Force delete:

Immediately removes a service.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
force: true
```

func (*EnvironmentAutomationServiceService) Get

Gets details about a specific automation service.

Use this method to:

- Check service status - View service configuration - Monitor service health - Retrieve service metadata

### Examples

- Get service details:

Retrieves information about a specific service.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EnvironmentAutomationServiceService) List

Lists automation services with optional filtering.

Use this method to:

- View all services in an environment - Filter services by reference - Monitor service status

### Examples

- List environment services:

Shows all services for an environment.

```yaml
filter:
  environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"]
pagination:
  pageSize: 20
```

- Filter by reference:

Lists services matching specific references.

```yaml
filter:
  references: ["web-server", "database"]
pagination:
  pageSize: 20
```

func (*EnvironmentAutomationServiceService) ListAutoPaging

Lists automation services with optional filtering.

Use this method to:

- View all services in an environment - Filter services by reference - Monitor service status

### Examples

- List environment services:

Shows all services for an environment.

```yaml
filter:
  environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"]
pagination:
  pageSize: 20
```

- Filter by reference:

Lists services matching specific references.

```yaml
filter:
  references: ["web-server", "database"]
pagination:
  pageSize: 20
```

func (*EnvironmentAutomationServiceService) New

Creates a new automation service for an environment.

Use this method to:

- Set up long-running services - Configure service triggers - Define service dependencies - Specify runtime environments

### Examples

- Create basic service:

Creates a simple service with start command.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
metadata:
  reference: "web-server"
  name: "Web Server"
  description: "Runs the development web server"
  triggeredBy:
    - postDevcontainerStart: true
spec:
  commands:
    start: "npm run dev"
    ready: "curl -s http://localhost:3000"
```

- Create Docker-based service:

Creates a service running in a specific container.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
metadata:
  reference: "redis"
  name: "Redis Server"
  description: "Redis cache service"
spec:
  commands:
    start: "redis-server"
  runsOn:
    docker:
      image: "redis:7"
```

func (*EnvironmentAutomationServiceService) Start

Starts an automation service. This call does not block until the service is started. This call will not error if the service is already running or has been started.

Use this method to:

- Start stopped services - Resume service operations - Trigger service initialization

### Examples

- Start service:

Starts a previously stopped service.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EnvironmentAutomationServiceService) Stop

Stops an automation service. This call does not block until the service is stopped. This call will not error if the service is already stopped or has been stopped.

Use this method to:

- Pause service operations - Gracefully stop services - Prepare for updates

### Examples

- Stop service:

Gracefully stops a running service.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EnvironmentAutomationServiceService) Update

Updates an automation service configuration.

Use this method to:

- Modify service commands - Update triggers - Change runtime settings - Adjust dependencies

### Examples

- Update commands:

Changes service start and ready commands.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
spec:
  commands:
    start: "npm run start:dev"
    ready: "curl -s http://localhost:8080"
```

- Update triggers:

Modifies when the service starts.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
metadata:
  triggeredBy:
    trigger:
      - postDevcontainerStart: true
      - manual: true
```

type EnvironmentAutomationServiceStartParams

type EnvironmentAutomationServiceStartParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationServiceStartParams) MarshalJSON

func (r EnvironmentAutomationServiceStartParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceStartResponse

type EnvironmentAutomationServiceStartResponse = interface{}

type EnvironmentAutomationServiceStopParams

type EnvironmentAutomationServiceStopParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationServiceStopParams) MarshalJSON

func (r EnvironmentAutomationServiceStopParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceStopResponse

type EnvironmentAutomationServiceStopResponse = interface{}

type EnvironmentAutomationServiceUpdateParams

type EnvironmentAutomationServiceUpdateParams struct {
	ID       param.Field[string]                                           `json:"id" format:"uuid"`
	Metadata param.Field[EnvironmentAutomationServiceUpdateParamsMetadata] `json:"metadata"`
	// Changing the spec of a service is a complex operation. The spec of a service can
	// only be updated if the service is in a stopped state. If the service is running,
	// it must be stopped first.
	Spec param.Field[EnvironmentAutomationServiceUpdateParamsSpec] `json:"spec"`
	// Service status updates are only expected from the executing environment. As a
	// client of this API you are not expected to provide this field. Updating this
	// field requires the `environmentservice:update_status` permission.
	Status param.Field[EnvironmentAutomationServiceUpdateParamsStatus] `json:"status"`
}

func (EnvironmentAutomationServiceUpdateParams) MarshalJSON

func (r EnvironmentAutomationServiceUpdateParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceUpdateParamsMetadata

type EnvironmentAutomationServiceUpdateParamsMetadata struct {
	Description param.Field[string]                                                      `json:"description"`
	Name        param.Field[string]                                                      `json:"name"`
	TriggeredBy param.Field[EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy] `json:"triggeredBy"`
}

func (EnvironmentAutomationServiceUpdateParamsMetadata) MarshalJSON

func (r EnvironmentAutomationServiceUpdateParamsMetadata) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy

type EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy struct {
	Trigger param.Field[[]shared.AutomationTriggerParam] `json:"trigger"`
}

func (EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy) MarshalJSON

type EnvironmentAutomationServiceUpdateParamsSpec

type EnvironmentAutomationServiceUpdateParamsSpec struct {
	Commands param.Field[EnvironmentAutomationServiceUpdateParamsSpecCommands] `json:"commands"`
	RunsOn   param.Field[shared.RunsOnParam]                                   `json:"runsOn"`
}

Changing the spec of a service is a complex operation. The spec of a service can only be updated if the service is in a stopped state. If the service is running, it must be stopped first.

func (EnvironmentAutomationServiceUpdateParamsSpec) MarshalJSON

func (r EnvironmentAutomationServiceUpdateParamsSpec) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceUpdateParamsSpecCommands

type EnvironmentAutomationServiceUpdateParamsSpecCommands struct {
	Ready param.Field[string] `json:"ready"`
	Start param.Field[string] `json:"start"`
	Stop  param.Field[string] `json:"stop"`
}

func (EnvironmentAutomationServiceUpdateParamsSpecCommands) MarshalJSON

func (r EnvironmentAutomationServiceUpdateParamsSpecCommands) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceUpdateParamsStatus

type EnvironmentAutomationServiceUpdateParamsStatus struct {
	FailureMessage param.Field[string]       `json:"failureMessage"`
	LogURL         param.Field[string]       `json:"logUrl"`
	Phase          param.Field[ServicePhase] `json:"phase"`
	Session        param.Field[string]       `json:"session"`
}

Service status updates are only expected from the executing environment. As a client of this API you are not expected to provide this field. Updating this field requires the `environmentservice:update_status` permission.

func (EnvironmentAutomationServiceUpdateParamsStatus) MarshalJSON

func (r EnvironmentAutomationServiceUpdateParamsStatus) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationServiceUpdateResponse

type EnvironmentAutomationServiceUpdateResponse = interface{}

type EnvironmentAutomationTaskDeleteParams

type EnvironmentAutomationTaskDeleteParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationTaskDeleteParams) MarshalJSON

func (r EnvironmentAutomationTaskDeleteParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskDeleteResponse

type EnvironmentAutomationTaskDeleteResponse = interface{}

type EnvironmentAutomationTaskExecutionGetParams

type EnvironmentAutomationTaskExecutionGetParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationTaskExecutionGetParams) MarshalJSON

func (r EnvironmentAutomationTaskExecutionGetParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskExecutionGetResponse

type EnvironmentAutomationTaskExecutionGetResponse struct {
	TaskExecution shared.TaskExecution                              `json:"taskExecution,required"`
	JSON          environmentAutomationTaskExecutionGetResponseJSON `json:"-"`
}

func (*EnvironmentAutomationTaskExecutionGetResponse) UnmarshalJSON

func (r *EnvironmentAutomationTaskExecutionGetResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentAutomationTaskExecutionListParams

type EnvironmentAutomationTaskExecutionListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// filter contains the filter options for listing task runs
	Filter param.Field[EnvironmentAutomationTaskExecutionListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing task runs
	Pagination param.Field[EnvironmentAutomationTaskExecutionListParamsPagination] `json:"pagination"`
}

func (EnvironmentAutomationTaskExecutionListParams) MarshalJSON

func (r EnvironmentAutomationTaskExecutionListParams) MarshalJSON() (data []byte, err error)

func (EnvironmentAutomationTaskExecutionListParams) URLQuery

URLQuery serializes EnvironmentAutomationTaskExecutionListParams's query parameters as `url.Values`.

type EnvironmentAutomationTaskExecutionListParamsFilter

type EnvironmentAutomationTaskExecutionListParamsFilter struct {
	// environment_ids filters the response to only task runs of these environments
	EnvironmentIDs param.Field[[]string] `json:"environmentIds" format:"uuid"`
	// phases filters the response to only task runs in these phases
	Phases param.Field[[]shared.TaskExecutionPhase] `json:"phases"`
	// task_ids filters the response to only task runs of these tasks
	TaskIDs param.Field[[]string] `json:"taskIds" format:"uuid"`
	// task_references filters the response to only task runs with this reference
	TaskReferences param.Field[[]string] `json:"taskReferences"`
}

filter contains the filter options for listing task runs

func (EnvironmentAutomationTaskExecutionListParamsFilter) MarshalJSON

func (r EnvironmentAutomationTaskExecutionListParamsFilter) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskExecutionListParamsPagination

type EnvironmentAutomationTaskExecutionListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing task runs

func (EnvironmentAutomationTaskExecutionListParamsPagination) MarshalJSON

type EnvironmentAutomationTaskExecutionService

type EnvironmentAutomationTaskExecutionService struct {
	Options []option.RequestOption
}

EnvironmentAutomationTaskExecutionService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationTaskExecutionService method instead.

func NewEnvironmentAutomationTaskExecutionService

func NewEnvironmentAutomationTaskExecutionService(opts ...option.RequestOption) (r *EnvironmentAutomationTaskExecutionService)

NewEnvironmentAutomationTaskExecutionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentAutomationTaskExecutionService) Get

Gets details about a specific task execution.

Use this method to:

- Monitor execution progress - View execution logs - Check execution status - Debug failed executions

### Examples

- Get execution details:

Retrieves information about a specific task execution.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EnvironmentAutomationTaskExecutionService) List

Lists executions of automation tasks.

Use this method to:

- View task execution history - Monitor running tasks - Track task completion status

### Examples

- List all executions:

Shows execution history for all tasks.

```yaml
filter:
  environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"]
pagination:
  pageSize: 20
```

- Filter by phase:

Lists executions in specific phases.

```yaml
filter:
  phases: ["TASK_EXECUTION_PHASE_RUNNING", "TASK_EXECUTION_PHASE_FAILED"]
pagination:
  pageSize: 20
```

func (*EnvironmentAutomationTaskExecutionService) ListAutoPaging

Lists executions of automation tasks.

Use this method to:

- View task execution history - Monitor running tasks - Track task completion status

### Examples

- List all executions:

Shows execution history for all tasks.

```yaml
filter:
  environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"]
pagination:
  pageSize: 20
```

- Filter by phase:

Lists executions in specific phases.

```yaml
filter:
  phases: ["TASK_EXECUTION_PHASE_RUNNING", "TASK_EXECUTION_PHASE_FAILED"]
pagination:
  pageSize: 20
```

func (*EnvironmentAutomationTaskExecutionService) Stop

Stops a running task execution.

Use this method to:

- Cancel long-running tasks - Stop failed executions - Interrupt task processing

### Examples

- Stop execution:

Stops a running task execution.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

type EnvironmentAutomationTaskExecutionStopParams

type EnvironmentAutomationTaskExecutionStopParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationTaskExecutionStopParams) MarshalJSON

func (r EnvironmentAutomationTaskExecutionStopParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskExecutionStopResponse

type EnvironmentAutomationTaskExecutionStopResponse = interface{}

type EnvironmentAutomationTaskGetParams

type EnvironmentAutomationTaskGetParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationTaskGetParams) MarshalJSON

func (r EnvironmentAutomationTaskGetParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskGetResponse

type EnvironmentAutomationTaskGetResponse struct {
	Task shared.Task                              `json:"task,required"`
	JSON environmentAutomationTaskGetResponseJSON `json:"-"`
}

func (*EnvironmentAutomationTaskGetResponse) UnmarshalJSON

func (r *EnvironmentAutomationTaskGetResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentAutomationTaskListParams

type EnvironmentAutomationTaskListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// filter contains the filter options for listing tasks
	Filter param.Field[EnvironmentAutomationTaskListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing tasks
	Pagination param.Field[EnvironmentAutomationTaskListParamsPagination] `json:"pagination"`
}

func (EnvironmentAutomationTaskListParams) MarshalJSON

func (r EnvironmentAutomationTaskListParams) MarshalJSON() (data []byte, err error)

func (EnvironmentAutomationTaskListParams) URLQuery

URLQuery serializes EnvironmentAutomationTaskListParams's query parameters as `url.Values`.

type EnvironmentAutomationTaskListParamsFilter

type EnvironmentAutomationTaskListParamsFilter struct {
	// environment_ids filters the response to only tasks of these environments
	EnvironmentIDs param.Field[[]string] `json:"environmentIds" format:"uuid"`
	// references filters the response to only services with these references
	References param.Field[[]string] `json:"references"`
	// task_ids filters the response to only tasks with these IDs
	TaskIDs param.Field[[]string] `json:"taskIds" format:"uuid"`
}

filter contains the filter options for listing tasks

func (EnvironmentAutomationTaskListParamsFilter) MarshalJSON

func (r EnvironmentAutomationTaskListParamsFilter) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskListParamsPagination

type EnvironmentAutomationTaskListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing tasks

func (EnvironmentAutomationTaskListParamsPagination) MarshalJSON

func (r EnvironmentAutomationTaskListParamsPagination) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskNewParams

type EnvironmentAutomationTaskNewParams struct {
	DependsOn     param.Field[[]string]                 `json:"dependsOn" format:"uuid"`
	EnvironmentID param.Field[string]                   `json:"environmentId" format:"uuid"`
	Metadata      param.Field[shared.TaskMetadataParam] `json:"metadata"`
	Spec          param.Field[shared.TaskSpecParam]     `json:"spec"`
}

func (EnvironmentAutomationTaskNewParams) MarshalJSON

func (r EnvironmentAutomationTaskNewParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskNewResponse

type EnvironmentAutomationTaskNewResponse struct {
	Task shared.Task                              `json:"task,required"`
	JSON environmentAutomationTaskNewResponseJSON `json:"-"`
}

func (*EnvironmentAutomationTaskNewResponse) UnmarshalJSON

func (r *EnvironmentAutomationTaskNewResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentAutomationTaskService

type EnvironmentAutomationTaskService struct {
	Options    []option.RequestOption
	Executions *EnvironmentAutomationTaskExecutionService
}

EnvironmentAutomationTaskService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationTaskService method instead.

func NewEnvironmentAutomationTaskService

func NewEnvironmentAutomationTaskService(opts ...option.RequestOption) (r *EnvironmentAutomationTaskService)

NewEnvironmentAutomationTaskService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentAutomationTaskService) Delete

Deletes an automation task.

Use this method to:

- Remove unused tasks - Clean up task configurations - Delete obsolete automations

### Examples

- Delete task:

Removes a task and its configuration.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EnvironmentAutomationTaskService) Get

Gets details about a specific automation task.

Use this method to:

- Check task configuration - View task dependencies - Monitor task status

### Examples

- Get task details:

Retrieves information about a specific task.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EnvironmentAutomationTaskService) List

Lists automation tasks with optional filtering.

Use this method to:

- View all tasks in an environment - Filter tasks by reference - Monitor task status

### Examples

- List environment tasks:

Shows all tasks for an environment.

```yaml
filter:
  environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"]
pagination:
  pageSize: 20
```

- Filter by reference:

Lists tasks matching specific references.

```yaml
filter:
  references: ["build", "test"]
pagination:
  pageSize: 20
```

func (*EnvironmentAutomationTaskService) ListAutoPaging

Lists automation tasks with optional filtering.

Use this method to:

- View all tasks in an environment - Filter tasks by reference - Monitor task status

### Examples

- List environment tasks:

Shows all tasks for an environment.

```yaml
filter:
  environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"]
pagination:
  pageSize: 20
```

- Filter by reference:

Lists tasks matching specific references.

```yaml
filter:
  references: ["build", "test"]
pagination:
  pageSize: 20
```

func (*EnvironmentAutomationTaskService) New

Creates a new automation task.

Use this method to:

- Define one-off or scheduled tasks - Set up build or test automation - Configure task dependencies - Specify execution environments

### Examples

- Create basic task:

Creates a simple build task.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
metadata:
  reference: "build"
  name: "Build Project"
  description: "Builds the project artifacts"
  triggeredBy:
    - postEnvironmentStart: true
spec:
  command: "npm run build"
```

- Create task with dependencies:

Creates a task that depends on other services.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
metadata:
  reference: "test"
  name: "Run Tests"
  description: "Runs the test suite"
spec:
  command: "npm test"
dependsOn: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
```

func (*EnvironmentAutomationTaskService) Start

Starts a task by creating a new task execution. This call does not block until the task is started; the task will be started asynchronously.

Use this method to:

- Trigger task execution - Run one-off tasks - Start scheduled tasks immediately

### Examples

- Start task:

Creates a new execution of a task.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*EnvironmentAutomationTaskService) Update

Updates an automation task configuration.

Use this method to:

- Modify task commands - Update task triggers - Change dependencies - Adjust execution settings

### Examples

- Update command:

Changes the task's command.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
spec:
  command: "npm run test:coverage"
```

- Update triggers:

Modifies when the task runs.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
metadata:
  triggeredBy:
    trigger:
      - postEnvironmentStart: true
```

type EnvironmentAutomationTaskStartParams

type EnvironmentAutomationTaskStartParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (EnvironmentAutomationTaskStartParams) MarshalJSON

func (r EnvironmentAutomationTaskStartParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskStartResponse

type EnvironmentAutomationTaskStartResponse struct {
	TaskExecution shared.TaskExecution                       `json:"taskExecution,required"`
	JSON          environmentAutomationTaskStartResponseJSON `json:"-"`
}

func (*EnvironmentAutomationTaskStartResponse) UnmarshalJSON

func (r *EnvironmentAutomationTaskStartResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentAutomationTaskUpdateParams

type EnvironmentAutomationTaskUpdateParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
	// dependencies specifies the IDs of the automations this task depends on.
	DependsOn param.Field[[]string]                                      `json:"dependsOn" format:"uuid"`
	Metadata  param.Field[EnvironmentAutomationTaskUpdateParamsMetadata] `json:"metadata"`
	Spec      param.Field[EnvironmentAutomationTaskUpdateParamsSpec]     `json:"spec"`
}

func (EnvironmentAutomationTaskUpdateParams) MarshalJSON

func (r EnvironmentAutomationTaskUpdateParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskUpdateParamsMetadata

type EnvironmentAutomationTaskUpdateParamsMetadata struct {
	Description param.Field[string]                                                   `json:"description"`
	Name        param.Field[string]                                                   `json:"name"`
	TriggeredBy param.Field[EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy] `json:"triggeredBy"`
}

func (EnvironmentAutomationTaskUpdateParamsMetadata) MarshalJSON

func (r EnvironmentAutomationTaskUpdateParamsMetadata) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy

type EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy struct {
	Trigger param.Field[[]shared.AutomationTriggerParam] `json:"trigger"`
}

func (EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy) MarshalJSON

type EnvironmentAutomationTaskUpdateParamsSpec

type EnvironmentAutomationTaskUpdateParamsSpec struct {
	Command param.Field[string]             `json:"command"`
	RunsOn  param.Field[shared.RunsOnParam] `json:"runsOn"`
}

func (EnvironmentAutomationTaskUpdateParamsSpec) MarshalJSON

func (r EnvironmentAutomationTaskUpdateParamsSpec) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationTaskUpdateResponse

type EnvironmentAutomationTaskUpdateResponse = interface{}

type EnvironmentAutomationUpsertParams

type EnvironmentAutomationUpsertParams struct {
	// WARN: Do not remove any field here, as it will break reading automation yaml
	// files. We error if there are any unknown fields in the yaml (to ensure the yaml
	// is correct), but would break if we removed any fields. This includes marking a
	// field as "reserved" in the proto file, this will also break reading the yaml.
	AutomationsFile param.Field[AutomationsFileParam] `json:"automationsFile"`
	EnvironmentID   param.Field[string]               `json:"environmentId" format:"uuid"`
}

func (EnvironmentAutomationUpsertParams) MarshalJSON

func (r EnvironmentAutomationUpsertParams) MarshalJSON() (data []byte, err error)

type EnvironmentAutomationUpsertResponse

type EnvironmentAutomationUpsertResponse struct {
	UpdatedServiceIDs []string                                `json:"updatedServiceIds"`
	UpdatedTaskIDs    []string                                `json:"updatedTaskIds"`
	JSON              environmentAutomationUpsertResponseJSON `json:"-"`
}

func (*EnvironmentAutomationUpsertResponse) UnmarshalJSON

func (r *EnvironmentAutomationUpsertResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentClass

type EnvironmentClass = shared.EnvironmentClass

This is an alias to an internal type.

type EnvironmentClassListParams

type EnvironmentClassListParams struct {
	Token    param.Field[string]                           `query:"token"`
	PageSize param.Field[int64]                            `query:"pageSize"`
	Filter   param.Field[EnvironmentClassListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing environment classes
	Pagination param.Field[EnvironmentClassListParamsPagination] `json:"pagination"`
}

func (EnvironmentClassListParams) MarshalJSON

func (r EnvironmentClassListParams) MarshalJSON() (data []byte, err error)

func (EnvironmentClassListParams) URLQuery

func (r EnvironmentClassListParams) URLQuery() (v url.Values)

URLQuery serializes EnvironmentClassListParams's query parameters as `url.Values`.

type EnvironmentClassListParamsFilter

type EnvironmentClassListParamsFilter struct {
	// can_create_environments filters the response to only environment classes that
	// can be used to create new environments by the caller. Unlike enabled, which
	// indicates general availability, this ensures the caller only sees environment
	// classes they are allowed to use.
	CanCreateEnvironments param.Field[bool] `json:"canCreateEnvironments"`
	// enabled filters the response to only enabled or disabled environment classes. If
	// not set, all environment classes are returned.
	Enabled param.Field[bool] `json:"enabled"`
	// runner_ids filters the response to only EnvironmentClasses of these Runner IDs
	RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"`
	// runner_kind filters the response to only environment classes from runners of
	// these kinds.
	RunnerKinds param.Field[[]RunnerKind] `json:"runnerKinds"`
	// runner_providers filters the response to only environment classes from runners
	// of these providers.
	RunnerProviders param.Field[[]RunnerProvider] `json:"runnerProviders"`
}

func (EnvironmentClassListParamsFilter) MarshalJSON

func (r EnvironmentClassListParamsFilter) MarshalJSON() (data []byte, err error)

type EnvironmentClassListParamsPagination

type EnvironmentClassListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing environment classes

func (EnvironmentClassListParamsPagination) MarshalJSON

func (r EnvironmentClassListParamsPagination) MarshalJSON() (data []byte, err error)

type EnvironmentClassParam

type EnvironmentClassParam = shared.EnvironmentClassParam

This is an alias to an internal type.

type EnvironmentClassService

type EnvironmentClassService struct {
	Options []option.RequestOption
}

EnvironmentClassService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentClassService method instead.

func NewEnvironmentClassService

func NewEnvironmentClassService(opts ...option.RequestOption) (r *EnvironmentClassService)

NewEnvironmentClassService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentClassService) List

Lists available environment classes with their specifications and resource limits.

Use this method to understand what types of environments you can create and their capabilities. Environment classes define the compute resources and features available to your environments.

### Examples

- List all available classes:

Retrieves a list of all environment classes with their specifications.

```yaml
{}
```

buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE

func (*EnvironmentClassService) ListAutoPaging

Lists available environment classes with their specifications and resource limits.

Use this method to understand what types of environments you can create and their capabilities. Environment classes define the compute resources and features available to your environments.

### Examples

- List all available classes:

Retrieves a list of all environment classes with their specifications.

```yaml
{}
```

buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE

type EnvironmentClassValidationResult

type EnvironmentClassValidationResult struct {
	ConfigurationErrors []FieldValidationError               `json:"configurationErrors"`
	DescriptionError    string                               `json:"descriptionError,nullable"`
	DisplayNameError    string                               `json:"displayNameError,nullable"`
	Valid               bool                                 `json:"valid"`
	JSON                environmentClassValidationResultJSON `json:"-"`
}

func (*EnvironmentClassValidationResult) UnmarshalJSON

func (r *EnvironmentClassValidationResult) UnmarshalJSON(data []byte) (err error)

type EnvironmentDeleteParams

type EnvironmentDeleteParams struct {
	// environment_id specifies the environment that is going to delete.
	//
	// +required
	EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
	// force indicates whether the environment should be deleted forcefully When force
	// deleting an Environment, the Environment is removed immediately and environment
	// lifecycle is not respected. Force deleting can result in data loss on the
	// environment.
	Force param.Field[bool] `json:"force"`
}

func (EnvironmentDeleteParams) MarshalJSON

func (r EnvironmentDeleteParams) MarshalJSON() (data []byte, err error)

type EnvironmentDeleteResponse

type EnvironmentDeleteResponse = interface{}

type EnvironmentGetParams

type EnvironmentGetParams struct {
	// environment_id specifies the environment to get
	EnvironmentID param.Field[string] `json:"environmentId,required" format:"uuid"`
}

func (EnvironmentGetParams) MarshalJSON

func (r EnvironmentGetParams) MarshalJSON() (data []byte, err error)

type EnvironmentGetResponse

type EnvironmentGetResponse struct {
	// +resource get environment
	Environment Environment                `json:"environment,required"`
	JSON        environmentGetResponseJSON `json:"-"`
}

func (*EnvironmentGetResponse) UnmarshalJSON

func (r *EnvironmentGetResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentInitializer

type EnvironmentInitializer struct {
	Specs []EnvironmentInitializerSpec `json:"specs"`
	JSON  environmentInitializerJSON   `json:"-"`
}

EnvironmentInitializer specifies how an environment is to be initialized

func (*EnvironmentInitializer) UnmarshalJSON

func (r *EnvironmentInitializer) UnmarshalJSON(data []byte) (err error)

type EnvironmentInitializerParam

type EnvironmentInitializerParam struct {
	Specs param.Field[[]EnvironmentInitializerSpecParam] `json:"specs"`
}

EnvironmentInitializer specifies how an environment is to be initialized

func (EnvironmentInitializerParam) MarshalJSON

func (r EnvironmentInitializerParam) MarshalJSON() (data []byte, err error)

type EnvironmentInitializerSpec

type EnvironmentInitializerSpec struct {
	ContextURL EnvironmentInitializerSpecsContextURL `json:"contextUrl"`
	Git        EnvironmentInitializerSpecsGit        `json:"git"`
	JSON       environmentInitializerSpecJSON        `json:"-"`
}

func (*EnvironmentInitializerSpec) UnmarshalJSON

func (r *EnvironmentInitializerSpec) UnmarshalJSON(data []byte) (err error)

type EnvironmentInitializerSpecParam

type EnvironmentInitializerSpecParam struct {
	ContextURL param.Field[EnvironmentInitializerSpecsContextURLParam] `json:"contextUrl"`
	Git        param.Field[EnvironmentInitializerSpecsGitParam]        `json:"git"`
}

func (EnvironmentInitializerSpecParam) MarshalJSON

func (r EnvironmentInitializerSpecParam) MarshalJSON() (data []byte, err error)

type EnvironmentInitializerSpecsContextURL

type EnvironmentInitializerSpecsContextURL struct {
	// url is the URL from which the environment is created
	URL  string                                    `json:"url" format:"uri"`
	JSON environmentInitializerSpecsContextURLJSON `json:"-"`
}

func (*EnvironmentInitializerSpecsContextURL) UnmarshalJSON

func (r *EnvironmentInitializerSpecsContextURL) UnmarshalJSON(data []byte) (err error)

type EnvironmentInitializerSpecsContextURLParam

type EnvironmentInitializerSpecsContextURLParam struct {
	// url is the URL from which the environment is created
	URL param.Field[string] `json:"url" format:"uri"`
}

func (EnvironmentInitializerSpecsContextURLParam) MarshalJSON

func (r EnvironmentInitializerSpecsContextURLParam) MarshalJSON() (data []byte, err error)

type EnvironmentInitializerSpecsGit

type EnvironmentInitializerSpecsGit struct {
	// a path relative to the environment root in which the code will be checked out to
	CheckoutLocation string `json:"checkoutLocation"`
	// the value for the clone target mode - use depends on the target mode
	CloneTarget string `json:"cloneTarget"`
	// remote_uri is the Git remote origin
	RemoteUri string `json:"remoteUri"`
	// the target mode determines what gets checked out
	TargetMode EnvironmentInitializerSpecsGitTargetMode `json:"targetMode"`
	// upstream_Remote_uri is the fork upstream of a repository
	UpstreamRemoteUri string                             `json:"upstreamRemoteUri"`
	JSON              environmentInitializerSpecsGitJSON `json:"-"`
}

func (*EnvironmentInitializerSpecsGit) UnmarshalJSON

func (r *EnvironmentInitializerSpecsGit) UnmarshalJSON(data []byte) (err error)

type EnvironmentInitializerSpecsGitParam

type EnvironmentInitializerSpecsGitParam struct {
	// a path relative to the environment root in which the code will be checked out to
	CheckoutLocation param.Field[string] `json:"checkoutLocation"`
	// the value for the clone target mode - use depends on the target mode
	CloneTarget param.Field[string] `json:"cloneTarget"`
	// remote_uri is the Git remote origin
	RemoteUri param.Field[string] `json:"remoteUri"`
	// the target mode determines what gets checked out
	TargetMode param.Field[EnvironmentInitializerSpecsGitTargetMode] `json:"targetMode"`
	// upstream_Remote_uri is the fork upstream of a repository
	UpstreamRemoteUri param.Field[string] `json:"upstreamRemoteUri"`
}

func (EnvironmentInitializerSpecsGitParam) MarshalJSON

func (r EnvironmentInitializerSpecsGitParam) MarshalJSON() (data []byte, err error)

type EnvironmentInitializerSpecsGitTargetMode

type EnvironmentInitializerSpecsGitTargetMode string

the target mode determines what gets checked out

const (
	EnvironmentInitializerSpecsGitTargetModeCloneTargetModeUnspecified  EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_UNSPECIFIED"
	EnvironmentInitializerSpecsGitTargetModeCloneTargetModeRemoteHead   EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_REMOTE_HEAD"
	EnvironmentInitializerSpecsGitTargetModeCloneTargetModeRemoteCommit EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_REMOTE_COMMIT"
	EnvironmentInitializerSpecsGitTargetModeCloneTargetModeRemoteBranch EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_REMOTE_BRANCH"
	EnvironmentInitializerSpecsGitTargetModeCloneTargetModeLocalBranch  EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_LOCAL_BRANCH"
)

func (EnvironmentInitializerSpecsGitTargetMode) IsKnown

type EnvironmentListParams

type EnvironmentListParams struct {
	Token    param.Field[string]                      `query:"token"`
	PageSize param.Field[int64]                       `query:"pageSize"`
	Filter   param.Field[EnvironmentListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing environments
	Pagination param.Field[EnvironmentListParamsPagination] `json:"pagination"`
}

func (EnvironmentListParams) MarshalJSON

func (r EnvironmentListParams) MarshalJSON() (data []byte, err error)

func (EnvironmentListParams) URLQuery

func (r EnvironmentListParams) URLQuery() (v url.Values)

URLQuery serializes EnvironmentListParams's query parameters as `url.Values`.

type EnvironmentListParamsFilter

type EnvironmentListParamsFilter struct {
	// creator_ids filters the response to only Environments created by specified
	// members
	CreatorIDs param.Field[[]string] `json:"creatorIds" format:"uuid"`
	// project_ids filters the response to only Environments associated with the
	// specified projects
	ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"`
	// runner_ids filters the response to only Environments running on these Runner IDs
	RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"`
	// runner_kinds filters the response to only Environments running on these Runner
	// Kinds
	RunnerKinds param.Field[[]RunnerKind] `json:"runnerKinds"`
	// actual_phases is a list of phases the environment must be in for it to be
	// returned in the API call
	StatusPhases param.Field[[]EnvironmentPhase] `json:"statusPhases"`
}

func (EnvironmentListParamsFilter) MarshalJSON

func (r EnvironmentListParamsFilter) MarshalJSON() (data []byte, err error)

type EnvironmentListParamsPagination

type EnvironmentListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing environments

func (EnvironmentListParamsPagination) MarshalJSON

func (r EnvironmentListParamsPagination) MarshalJSON() (data []byte, err error)

type EnvironmentMarkActiveParams

type EnvironmentMarkActiveParams struct {
	// activity_signal specifies the activity.
	ActivitySignal param.Field[EnvironmentActivitySignalParam] `json:"activitySignal"`
	// The ID of the environment to update activity for.
	EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
}

func (EnvironmentMarkActiveParams) MarshalJSON

func (r EnvironmentMarkActiveParams) MarshalJSON() (data []byte, err error)

type EnvironmentMarkActiveResponse

type EnvironmentMarkActiveResponse = interface{}

type EnvironmentMetadata

type EnvironmentMetadata struct {
	// annotations are key/value pairs that gets attached to the environment.
	// +internal - not yet implemented
	Annotations map[string]string `json:"annotations"`
	// Time when the Environment was created.
	CreatedAt time.Time `json:"createdAt" format:"date-time"`
	// creator is the identity of the creator of the environment
	Creator shared.Subject `json:"creator"`
	// Time when the Environment was last started (i.e. CreateEnvironment or
	// StartEnvironment were called).
	LastStartedAt time.Time `json:"lastStartedAt" format:"date-time"`
	// name is the name of the environment as specified by the user
	Name string `json:"name"`
	// organization_id is the ID of the organization that contains the environment
	OrganizationID string `json:"organizationId" format:"uuid"`
	// original_context_url is the normalized URL from which the environment was
	// created
	OriginalContextURL string `json:"originalContextUrl"`
	// If the Environment was started from a project, the project_id will reference the
	// project.
	ProjectID string `json:"projectId"`
	// Runner is the ID of the runner that runs this environment.
	RunnerID string                  `json:"runnerId"`
	JSON     environmentMetadataJSON `json:"-"`
}

EnvironmentMetadata is data associated with an environment that's required for other parts of the system to function

func (*EnvironmentMetadata) UnmarshalJSON

func (r *EnvironmentMetadata) UnmarshalJSON(data []byte) (err error)

type EnvironmentNewFromProjectParams

type EnvironmentNewFromProjectParams struct {
	ProjectID param.Field[string] `json:"projectId" format:"uuid"`
	// Spec is the configuration of the environment that's required for the runner to
	// start the environment Configuration already defined in the Project will override
	// parts of the spec, if set
	Spec param.Field[EnvironmentSpecParam] `json:"spec"`
}

func (EnvironmentNewFromProjectParams) MarshalJSON

func (r EnvironmentNewFromProjectParams) MarshalJSON() (data []byte, err error)

type EnvironmentNewFromProjectResponse

type EnvironmentNewFromProjectResponse struct {
	// +resource get environment
	Environment Environment                           `json:"environment,required"`
	JSON        environmentNewFromProjectResponseJSON `json:"-"`
}

func (*EnvironmentNewFromProjectResponse) UnmarshalJSON

func (r *EnvironmentNewFromProjectResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentNewLogsTokenParams

type EnvironmentNewLogsTokenParams struct {
	// environment_id specifies the environment for which the logs token should be
	// created.
	//
	// +required
	EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
}

func (EnvironmentNewLogsTokenParams) MarshalJSON

func (r EnvironmentNewLogsTokenParams) MarshalJSON() (data []byte, err error)

type EnvironmentNewLogsTokenResponse

type EnvironmentNewLogsTokenResponse struct {
	// access_token is the token that can be used to access the logs of the environment
	AccessToken string                              `json:"accessToken,required"`
	JSON        environmentNewLogsTokenResponseJSON `json:"-"`
}

func (*EnvironmentNewLogsTokenResponse) UnmarshalJSON

func (r *EnvironmentNewLogsTokenResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentNewParams

type EnvironmentNewParams struct {
	// spec is the configuration of the environment that's required for the to start
	// the environment
	Spec param.Field[EnvironmentSpecParam] `json:"spec"`
}

func (EnvironmentNewParams) MarshalJSON

func (r EnvironmentNewParams) MarshalJSON() (data []byte, err error)

type EnvironmentNewResponse

type EnvironmentNewResponse struct {
	// +resource get environment
	Environment Environment                `json:"environment,required"`
	JSON        environmentNewResponseJSON `json:"-"`
}

func (*EnvironmentNewResponse) UnmarshalJSON

func (r *EnvironmentNewResponse) UnmarshalJSON(data []byte) (err error)

type EnvironmentPhase

type EnvironmentPhase string
const (
	EnvironmentPhaseUnspecified EnvironmentPhase = "ENVIRONMENT_PHASE_UNSPECIFIED"
	EnvironmentPhaseCreating    EnvironmentPhase = "ENVIRONMENT_PHASE_CREATING"
	EnvironmentPhaseStarting    EnvironmentPhase = "ENVIRONMENT_PHASE_STARTING"
	EnvironmentPhaseRunning     EnvironmentPhase = "ENVIRONMENT_PHASE_RUNNING"
	EnvironmentPhaseUpdating    EnvironmentPhase = "ENVIRONMENT_PHASE_UPDATING"
	EnvironmentPhaseStopping    EnvironmentPhase = "ENVIRONMENT_PHASE_STOPPING"
	EnvironmentPhaseStopped     EnvironmentPhase = "ENVIRONMENT_PHASE_STOPPED"
	EnvironmentPhaseDeleting    EnvironmentPhase = "ENVIRONMENT_PHASE_DELETING"
	EnvironmentPhaseDeleted     EnvironmentPhase = "ENVIRONMENT_PHASE_DELETED"
)

func (EnvironmentPhase) IsKnown

func (r EnvironmentPhase) IsKnown() bool

type EnvironmentService

type EnvironmentService struct {
	Options     []option.RequestOption
	Automations *EnvironmentAutomationService
	Classes     *EnvironmentClassService
}

EnvironmentService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentService method instead.

func NewEnvironmentService

func NewEnvironmentService(opts ...option.RequestOption) (r *EnvironmentService)

NewEnvironmentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentService) Delete

Permanently deletes an environment.

Running environments are automatically stopped before deletion. If force is true, the environment is deleted immediately without graceful shutdown.

### Examples

- Delete with graceful shutdown:

Deletes an environment after gracefully stopping it.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
force: false
```

- Force delete:

Immediately deletes an environment without waiting for graceful shutdown.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
force: true
```

func (*EnvironmentService) Get

Gets details about a specific environment including its status, configuration, and context URL.

Use this method to:

- Check if an environment is ready to use - Get connection details for IDE and exposed ports - Monitor environment health and resource usage - Debug environment setup issues

### Examples

- Get environment details:

Retrieves detailed information about a specific environment using its unique
identifier.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
```

func (*EnvironmentService) List

Lists all environments matching the specified criteria.

Use this method to find and monitor environments across your organization. Results are ordered by creation time with newest environments first.

### Examples

- List running environments for a project:

Retrieves all running environments for a specific project with pagination.

```yaml
filter:
  statusPhases: ["ENVIRONMENT_PHASE_RUNNING"]
  projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]
pagination:
  pageSize: 10
```

- List all environments for a specific runner:

Filters environments by runner ID and creator ID.

```yaml
filter:
  runnerIds: ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"]
  creatorIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"]
```

- List stopped and deleted environments:

Retrieves all environments in stopped or deleted state.

```yaml
filter:
  statusPhases: ["ENVIRONMENT_PHASE_STOPPED", "ENVIRONMENT_PHASE_DELETED"]
```

func (*EnvironmentService) ListAutoPaging

Lists all environments matching the specified criteria.

Use this method to find and monitor environments across your organization. Results are ordered by creation time with newest environments first.

### Examples

- List running environments for a project:

Retrieves all running environments for a specific project with pagination.

```yaml
filter:
  statusPhases: ["ENVIRONMENT_PHASE_RUNNING"]
  projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]
pagination:
  pageSize: 10
```

- List all environments for a specific runner:

Filters environments by runner ID and creator ID.

```yaml
filter:
  runnerIds: ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"]
  creatorIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"]
```

- List stopped and deleted environments:

Retrieves all environments in stopped or deleted state.

```yaml
filter:
  statusPhases: ["ENVIRONMENT_PHASE_STOPPED", "ENVIRONMENT_PHASE_DELETED"]
```

func (*EnvironmentService) MarkActive

Records environment activity to prevent automatic shutdown.

Activity signals should be sent every 5 minutes while the environment is actively being used. The source must be between 3-80 characters.

### Examples

- Signal VS Code activity:

Records VS Code editor activity to prevent environment shutdown.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
activitySignal:
  source: "VS Code"
  timestamp: "2025-02-12T14:30:00Z"
```

func (*EnvironmentService) New

Creates a development environment from a context URL (e.g. Git repository) and starts it.

The `class` field must be a valid environment class ID. You can find a list of available environment classes with the `ListEnvironmentClasses` method.

### Examples

- Create from context URL:

Creates an environment from a Git repository URL with default settings.

```yaml
spec:
  machine:
    class: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
  content:
    initializer:
      specs:
        - contextUrl:
            url: "https://github.com/gitpod-io/gitpod"
```

- Create from Git repository:

Creates an environment from a Git repository with specific branch targeting.

```yaml
spec:
  machine:
    class: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
  content:
    initializer:
      specs:
        - git:
            remoteUri: "https://github.com/gitpod-io/gitpod"
            cloneTarget: "main"
            targetMode: "CLONE_TARGET_MODE_REMOTE_BRANCH"
```

- Create with custom timeout and ports:

Creates an environment with custom inactivity timeout and exposed port
configuration.

```yaml
spec:
  machine:
    class: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
  content:
    initializer:
      specs:
        - contextUrl:
            url: "https://github.com/gitpod-io/gitpod"
  timeout:
    disconnected: "7200s" # 2 hours in seconds
  ports:
    - port: 3000
      admission: "ADMISSION_LEVEL_EVERYONE"
      name: "Web App"
```

func (*EnvironmentService) NewFromProject

Creates an environment from an existing project configuration and starts it.

This method uses project settings as defaults but allows overriding specific configurations. Project settings take precedence over default configurations, while custom specifications in the request override project settings.

### Examples

- Create with project defaults:

Creates an environment using all default settings from the project
configuration.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

- Create with custom compute resources:

Creates an environment from project with custom machine class and timeout
settings.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
spec:
  machine:
    class: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
  timeout:
    disconnected: "14400s" # 4 hours in seconds
```

func (*EnvironmentService) NewLogsToken

Creates an access token for retrieving environment logs.

Generated tokens are valid for one hour and provide read-only access to the environment's logs.

### Examples

- Generate logs token:

Creates a temporary access token for retrieving environment logs.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
```

func (*EnvironmentService) Start

Starts a stopped environment.

Use this method to resume work on a previously stopped environment. The environment retains its configuration and workspace content from when it was stopped.

### Examples

- Start an environment:

Resumes a previously stopped environment with its existing configuration.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
```

func (*EnvironmentService) Stop

Stops a running environment.

Use this method to pause work while preserving the environment's state. The environment can be resumed later using StartEnvironment.

### Examples

- Stop an environment:

Gracefully stops a running environment while preserving its state.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
```

func (*EnvironmentService) Update

Updates an environment's configuration while it is running.

Updates are limited to:

- Git credentials (username, email) - SSH public keys - Content initialization - Port configurations - Automation files - Environment timeouts

### Examples

- Update Git credentials:

Updates the Git configuration for the environment.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
spec:
  content:
    gitUsername: "example-user"
    gitEmail: "user@example.com"
```

- Add SSH public key:

Adds a new SSH public key for authentication.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
spec:
  sshPublicKeys:
    - id: "0194b7c1-c954-718d-91a4-9a742aa5fc11"
      value: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..."
```

- Update content session:

Updates the content session identifier for the environment.

```yaml
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
spec:
  content:
    session: "0194b7c1-c954-718d-91a4-9a742aa5fc11"
```

Note: Machine class changes require stopping the environment and creating a new one.

type EnvironmentSpec

type EnvironmentSpec struct {
	// admission controlls who can access the environment and its ports.
	Admission AdmissionLevel `json:"admission"`
	// automations_file is the automations file spec of the environment
	AutomationsFile EnvironmentSpecAutomationsFile `json:"automationsFile"`
	// content is the content spec of the environment
	Content EnvironmentSpecContent `json:"content"`
	// Phase is the desired phase of the environment
	DesiredPhase EnvironmentPhase `json:"desiredPhase"`
	// devcontainer is the devcontainer spec of the environment
	Devcontainer EnvironmentSpecDevcontainer `json:"devcontainer"`
	// machine is the machine spec of the environment
	Machine EnvironmentSpecMachine `json:"machine"`
	// ports is the set of ports which ought to be exposed to the internet
	Ports []EnvironmentSpecPort `json:"ports"`
	// secrets are confidential data that is mounted into the environment
	Secrets []EnvironmentSpecSecret `json:"secrets"`
	// version of the spec. The value of this field has no semantic meaning (e.g. don't
	// interpret it as as a timestamp), but it can be used to impose a partial order.
	// If a.spec_version < b.spec_version then a was the spec before b.
	SpecVersion string `json:"specVersion"`
	// ssh_public_keys are the public keys used to ssh into the environment
	SSHPublicKeys []EnvironmentSpecSSHPublicKey `json:"sshPublicKeys"`
	// Timeout configures the environment timeout
	Timeout EnvironmentSpecTimeout `json:"timeout"`
	JSON    environmentSpecJSON    `json:"-"`
}

EnvironmentSpec specifies the configuration of an environment for an environment start

func (*EnvironmentSpec) UnmarshalJSON

func (r *EnvironmentSpec) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecAutomationsFile

type EnvironmentSpecAutomationsFile struct {
	// automations_file_path is the path to the automations file that is applied in the
	// environment, relative to the repo root. path must not be absolute (start with a
	// /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	AutomationsFilePath string                             `json:"automationsFilePath"`
	Session             string                             `json:"session"`
	JSON                environmentSpecAutomationsFileJSON `json:"-"`
}

automations_file is the automations file spec of the environment

func (*EnvironmentSpecAutomationsFile) UnmarshalJSON

func (r *EnvironmentSpecAutomationsFile) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecAutomationsFileParam

type EnvironmentSpecAutomationsFileParam struct {
	// automations_file_path is the path to the automations file that is applied in the
	// environment, relative to the repo root. path must not be absolute (start with a
	// /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	AutomationsFilePath param.Field[string] `json:"automationsFilePath"`
	Session             param.Field[string] `json:"session"`
}

automations_file is the automations file spec of the environment

func (EnvironmentSpecAutomationsFileParam) MarshalJSON

func (r EnvironmentSpecAutomationsFileParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecContent

type EnvironmentSpecContent struct {
	// The Git email address
	GitEmail string `json:"gitEmail"`
	// The Git username
	GitUsername string `json:"gitUsername"`
	// initializer configures how the environment is to be initialized
	Initializer EnvironmentInitializer     `json:"initializer"`
	Session     string                     `json:"session"`
	JSON        environmentSpecContentJSON `json:"-"`
}

content is the content spec of the environment

func (*EnvironmentSpecContent) UnmarshalJSON

func (r *EnvironmentSpecContent) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecContentParam

type EnvironmentSpecContentParam struct {
	// The Git email address
	GitEmail param.Field[string] `json:"gitEmail"`
	// The Git username
	GitUsername param.Field[string] `json:"gitUsername"`
	// initializer configures how the environment is to be initialized
	Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"`
	Session     param.Field[string]                      `json:"session"`
}

content is the content spec of the environment

func (EnvironmentSpecContentParam) MarshalJSON

func (r EnvironmentSpecContentParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecDevcontainer

type EnvironmentSpecDevcontainer struct {
	// devcontainer_file_path is the path to the devcontainer file relative to the repo
	// root path must not be absolute (start with a /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	DevcontainerFilePath string `json:"devcontainerFilePath"`
	// Experimental: dotfiles is the dotfiles configuration of the devcontainer
	Dotfiles EnvironmentSpecDevcontainerDotfiles `json:"dotfiles"`
	Session  string                              `json:"session"`
	JSON     environmentSpecDevcontainerJSON     `json:"-"`
}

devcontainer is the devcontainer spec of the environment

func (*EnvironmentSpecDevcontainer) UnmarshalJSON

func (r *EnvironmentSpecDevcontainer) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecDevcontainerDotfiles added in v0.3.0

type EnvironmentSpecDevcontainerDotfiles struct {
	// URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
	Repository string                                  `json:"repository,required" format:"uri"`
	JSON       environmentSpecDevcontainerDotfilesJSON `json:"-"`
}

Experimental: dotfiles is the dotfiles configuration of the devcontainer

func (*EnvironmentSpecDevcontainerDotfiles) UnmarshalJSON added in v0.3.0

func (r *EnvironmentSpecDevcontainerDotfiles) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecDevcontainerDotfilesParam added in v0.3.0

type EnvironmentSpecDevcontainerDotfilesParam struct {
	// URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
	Repository param.Field[string] `json:"repository,required" format:"uri"`
}

Experimental: dotfiles is the dotfiles configuration of the devcontainer

func (EnvironmentSpecDevcontainerDotfilesParam) MarshalJSON added in v0.3.0

func (r EnvironmentSpecDevcontainerDotfilesParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecDevcontainerParam

type EnvironmentSpecDevcontainerParam struct {
	// devcontainer_file_path is the path to the devcontainer file relative to the repo
	// root path must not be absolute (start with a /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"`
	// Experimental: dotfiles is the dotfiles configuration of the devcontainer
	Dotfiles param.Field[EnvironmentSpecDevcontainerDotfilesParam] `json:"dotfiles"`
	Session  param.Field[string]                                   `json:"session"`
}

devcontainer is the devcontainer spec of the environment

func (EnvironmentSpecDevcontainerParam) MarshalJSON

func (r EnvironmentSpecDevcontainerParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecMachine

type EnvironmentSpecMachine struct {
	// Class denotes the class of the environment we ought to start
	Class   string                     `json:"class"`
	Session string                     `json:"session"`
	JSON    environmentSpecMachineJSON `json:"-"`
}

machine is the machine spec of the environment

func (*EnvironmentSpecMachine) UnmarshalJSON

func (r *EnvironmentSpecMachine) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecMachineParam

type EnvironmentSpecMachineParam struct {
	// Class denotes the class of the environment we ought to start
	Class   param.Field[string] `json:"class"`
	Session param.Field[string] `json:"session"`
}

machine is the machine spec of the environment

func (EnvironmentSpecMachineParam) MarshalJSON

func (r EnvironmentSpecMachineParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecParam

type EnvironmentSpecParam struct {
	// admission controlls who can access the environment and its ports.
	Admission param.Field[AdmissionLevel] `json:"admission"`
	// automations_file is the automations file spec of the environment
	AutomationsFile param.Field[EnvironmentSpecAutomationsFileParam] `json:"automationsFile"`
	// content is the content spec of the environment
	Content param.Field[EnvironmentSpecContentParam] `json:"content"`
	// Phase is the desired phase of the environment
	DesiredPhase param.Field[EnvironmentPhase] `json:"desiredPhase"`
	// devcontainer is the devcontainer spec of the environment
	Devcontainer param.Field[EnvironmentSpecDevcontainerParam] `json:"devcontainer"`
	// machine is the machine spec of the environment
	Machine param.Field[EnvironmentSpecMachineParam] `json:"machine"`
	// ports is the set of ports which ought to be exposed to the internet
	Ports param.Field[[]EnvironmentSpecPortParam] `json:"ports"`
	// secrets are confidential data that is mounted into the environment
	Secrets param.Field[[]EnvironmentSpecSecretParam] `json:"secrets"`
	// version of the spec. The value of this field has no semantic meaning (e.g. don't
	// interpret it as as a timestamp), but it can be used to impose a partial order.
	// If a.spec_version < b.spec_version then a was the spec before b.
	SpecVersion param.Field[string] `json:"specVersion"`
	// ssh_public_keys are the public keys used to ssh into the environment
	SSHPublicKeys param.Field[[]EnvironmentSpecSSHPublicKeyParam] `json:"sshPublicKeys"`
	// Timeout configures the environment timeout
	Timeout param.Field[EnvironmentSpecTimeoutParam] `json:"timeout"`
}

EnvironmentSpec specifies the configuration of an environment for an environment start

func (EnvironmentSpecParam) MarshalJSON

func (r EnvironmentSpecParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecPort

type EnvironmentSpecPort struct {
	// policy of this port
	Admission AdmissionLevel `json:"admission"`
	// name of this port
	Name string `json:"name"`
	// port number
	Port int64                   `json:"port"`
	JSON environmentSpecPortJSON `json:"-"`
}

func (*EnvironmentSpecPort) UnmarshalJSON

func (r *EnvironmentSpecPort) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecPortParam

type EnvironmentSpecPortParam struct {
	// policy of this port
	Admission param.Field[AdmissionLevel] `json:"admission"`
	// name of this port
	Name param.Field[string] `json:"name"`
	// port number
	Port param.Field[int64] `json:"port"`
}

func (EnvironmentSpecPortParam) MarshalJSON

func (r EnvironmentSpecPortParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecSSHPublicKey

type EnvironmentSpecSSHPublicKey struct {
	// id is the unique identifier of the public key
	ID string `json:"id"`
	// value is the actual public key in the public key file format
	Value string                          `json:"value"`
	JSON  environmentSpecSSHPublicKeyJSON `json:"-"`
}

func (*EnvironmentSpecSSHPublicKey) UnmarshalJSON

func (r *EnvironmentSpecSSHPublicKey) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecSSHPublicKeyParam

type EnvironmentSpecSSHPublicKeyParam struct {
	// id is the unique identifier of the public key
	ID param.Field[string] `json:"id"`
	// value is the actual public key in the public key file format
	Value param.Field[string] `json:"value"`
}

func (EnvironmentSpecSSHPublicKeyParam) MarshalJSON

func (r EnvironmentSpecSSHPublicKeyParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecSecret

type EnvironmentSpecSecret struct {
	// container_registry_basic_auth_host is the hostname of the container registry
	// that supports basic auth
	ContainerRegistryBasicAuthHost string `json:"containerRegistryBasicAuthHost"`
	EnvironmentVariable            string `json:"environmentVariable"`
	// file_path is the path inside the devcontainer where the secret is mounted
	FilePath          string `json:"filePath"`
	GitCredentialHost string `json:"gitCredentialHost"`
	// name is the human readable description of the secret
	Name string `json:"name"`
	// session indicated the current session of the secret. When the session does not
	// change, secrets are not reloaded in the environment.
	Session string `json:"session"`
	// source is the source of the secret, for now control-plane or runner
	Source string `json:"source"`
	// source_ref into the source, in case of control-plane this is uuid of the secret
	SourceRef string                    `json:"sourceRef"`
	JSON      environmentSpecSecretJSON `json:"-"`
}

func (*EnvironmentSpecSecret) UnmarshalJSON

func (r *EnvironmentSpecSecret) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecSecretParam

type EnvironmentSpecSecretParam struct {
	// container_registry_basic_auth_host is the hostname of the container registry
	// that supports basic auth
	ContainerRegistryBasicAuthHost param.Field[string] `json:"containerRegistryBasicAuthHost"`
	EnvironmentVariable            param.Field[string] `json:"environmentVariable"`
	// file_path is the path inside the devcontainer where the secret is mounted
	FilePath          param.Field[string] `json:"filePath"`
	GitCredentialHost param.Field[string] `json:"gitCredentialHost"`
	// name is the human readable description of the secret
	Name param.Field[string] `json:"name"`
	// session indicated the current session of the secret. When the session does not
	// change, secrets are not reloaded in the environment.
	Session param.Field[string] `json:"session"`
	// source is the source of the secret, for now control-plane or runner
	Source param.Field[string] `json:"source"`
	// source_ref into the source, in case of control-plane this is uuid of the secret
	SourceRef param.Field[string] `json:"sourceRef"`
}

func (EnvironmentSpecSecretParam) MarshalJSON

func (r EnvironmentSpecSecretParam) MarshalJSON() (data []byte, err error)

type EnvironmentSpecTimeout

type EnvironmentSpecTimeout struct {
	// inacitivity is the maximum time of disconnection before the environment is
	// stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable.
	Disconnected string                     `json:"disconnected" format:"regex"`
	JSON         environmentSpecTimeoutJSON `json:"-"`
}

Timeout configures the environment timeout

func (*EnvironmentSpecTimeout) UnmarshalJSON

func (r *EnvironmentSpecTimeout) UnmarshalJSON(data []byte) (err error)

type EnvironmentSpecTimeoutParam

type EnvironmentSpecTimeoutParam struct {
	// inacitivity is the maximum time of disconnection before the environment is
	// stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable.
	Disconnected param.Field[string] `json:"disconnected" format:"regex"`
}

Timeout configures the environment timeout

func (EnvironmentSpecTimeoutParam) MarshalJSON

func (r EnvironmentSpecTimeoutParam) MarshalJSON() (data []byte, err error)

type EnvironmentStartParams

type EnvironmentStartParams struct {
	// environment_id specifies which environment should be started.
	EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
}

func (EnvironmentStartParams) MarshalJSON

func (r EnvironmentStartParams) MarshalJSON() (data []byte, err error)

type EnvironmentStartResponse

type EnvironmentStartResponse = interface{}

type EnvironmentStatus

type EnvironmentStatus struct {
	// activity_signal is the last activity signal for the environment.
	ActivitySignal EnvironmentActivitySignal `json:"activitySignal"`
	// automations_file contains the status of the automations file.
	AutomationsFile EnvironmentStatusAutomationsFile `json:"automationsFile"`
	// content contains the status of the environment content.
	Content EnvironmentStatusContent `json:"content"`
	// devcontainer contains the status of the devcontainer.
	Devcontainer EnvironmentStatusDevcontainer `json:"devcontainer"`
	// environment_url contains the URL at which the environment can be accessed. This
	// field is only set if the environment is running.
	EnvironmentURLs EnvironmentStatusEnvironmentURLs `json:"environmentUrls"`
	// failure_message summarises why the environment failed to operate. If this is
	// non-empty the environment has failed to operate and will likely transition to a
	// stopped state.
	FailureMessage []string `json:"failureMessage"`
	// machine contains the status of the environment machine
	Machine EnvironmentStatusMachine `json:"machine"`
	// the phase of an environment is a simple, high-level summary of where the
	// environment is in its lifecycle
	Phase EnvironmentPhase `json:"phase"`
	// runner_ack contains the acknowledgement from the runner that is has received the
	// environment spec.
	RunnerAck EnvironmentStatusRunnerAck `json:"runnerAck"`
	// secrets contains the status of the environment secrets
	Secrets []EnvironmentStatusSecret `json:"secrets"`
	// ssh_public_keys contains the status of the environment ssh public keys
	SSHPublicKeys []EnvironmentStatusSSHPublicKey `json:"sshPublicKeys"`
	// version of the status update. Environment instances themselves are unversioned,
	// but their status has different versions. The value of this field has no semantic
	// meaning (e.g. don't interpret it as as a timestamp), but it can be used to
	// impose a partial order. If a.status_version < b.status_version then a was the
	// status before b.
	StatusVersion string `json:"statusVersion"`
	// warning_message contains warnings, e.g. when the environment is present but not
	// in the expected state.
	WarningMessage []string              `json:"warningMessage"`
	JSON           environmentStatusJSON `json:"-"`
}

EnvironmentStatus describes an environment status

func (*EnvironmentStatus) UnmarshalJSON

func (r *EnvironmentStatus) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusAutomationsFile

type EnvironmentStatusAutomationsFile struct {
	// automations_file_path is the path to the automations file relative to the repo
	// root.
	AutomationsFilePath string `json:"automationsFilePath"`
	// automations_file_presence indicates how an automations file is present in the
	// environment.
	AutomationsFilePresence EnvironmentStatusAutomationsFileAutomationsFilePresence `json:"automationsFilePresence"`
	// failure_message contains the reason the automations file failed to be applied.
	// This is only set if the phase is FAILED.
	FailureMessage string `json:"failureMessage"`
	// phase is the current phase of the automations file.
	Phase EnvironmentStatusAutomationsFilePhase `json:"phase"`
	// session is the automations file session that is currently applied in the
	// environment.
	Session string                               `json:"session"`
	JSON    environmentStatusAutomationsFileJSON `json:"-"`
}

automations_file contains the status of the automations file.

func (*EnvironmentStatusAutomationsFile) UnmarshalJSON

func (r *EnvironmentStatusAutomationsFile) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusAutomationsFileAutomationsFilePresence

type EnvironmentStatusAutomationsFileAutomationsFilePresence string

automations_file_presence indicates how an automations file is present in the environment.

const (
	EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceUnspecified EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_UNSPECIFIED"
	EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceAbsent      EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_ABSENT"
	EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceDiscovered  EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_DISCOVERED"
	EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceSpecified   EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_SPECIFIED"
)

func (EnvironmentStatusAutomationsFileAutomationsFilePresence) IsKnown

type EnvironmentStatusAutomationsFilePhase

type EnvironmentStatusAutomationsFilePhase string

phase is the current phase of the automations file.

const (
	EnvironmentStatusAutomationsFilePhaseContentPhaseUnspecified  EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_UNSPECIFIED"
	EnvironmentStatusAutomationsFilePhaseContentPhaseCreating     EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_CREATING"
	EnvironmentStatusAutomationsFilePhaseContentPhaseInitializing EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_INITIALIZING"
	EnvironmentStatusAutomationsFilePhaseContentPhaseReady        EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_READY"
	EnvironmentStatusAutomationsFilePhaseContentPhaseUpdating     EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_UPDATING"
	EnvironmentStatusAutomationsFilePhaseContentPhaseFailed       EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_FAILED"
)

func (EnvironmentStatusAutomationsFilePhase) IsKnown

type EnvironmentStatusContent

type EnvironmentStatusContent struct {
	// content_location_in_machine is the location of the content in the machine
	ContentLocationInMachine string `json:"contentLocationInMachine"`
	// failure_message contains the reason the content initialization failed.
	FailureMessage string `json:"failureMessage"`
	// git is the Git working copy status of the environment. Note: this is a
	// best-effort field and more often than not will not be present. Its absence does
	// not indicate the absence of a working copy.
	Git EnvironmentStatusContentGit `json:"git"`
	// phase is the current phase of the environment content
	Phase EnvironmentStatusContentPhase `json:"phase"`
	// session is the session that is currently active in the environment.
	Session string `json:"session"`
	// warning_message contains warnings, e.g. when the content is present but not in
	// the expected state.
	WarningMessage string                       `json:"warningMessage"`
	JSON           environmentStatusContentJSON `json:"-"`
}

content contains the status of the environment content.

func (*EnvironmentStatusContent) UnmarshalJSON

func (r *EnvironmentStatusContent) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusContentGit

type EnvironmentStatusContentGit struct {
	// branch is branch we're currently on
	Branch string `json:"branch"`
	// changed_files is an array of changed files in the environment, possibly
	// truncated
	ChangedFiles []EnvironmentStatusContentGitChangedFile `json:"changedFiles"`
	// clone_url is the repository url as you would pass it to "git clone". Only HTTPS
	// clone URLs are supported.
	CloneURL string `json:"cloneUrl"`
	// latest_commit is the most recent commit on the current branch
	LatestCommit      string `json:"latestCommit"`
	TotalChangedFiles int64  `json:"totalChangedFiles"`
	// the total number of unpushed changes
	TotalUnpushedCommits int64 `json:"totalUnpushedCommits"`
	// unpushed_commits is an array of unpushed changes in the environment, possibly
	// truncated
	UnpushedCommits []string                        `json:"unpushedCommits"`
	JSON            environmentStatusContentGitJSON `json:"-"`
}

git is the Git working copy status of the environment. Note: this is a best-effort field and more often than not will not be present. Its absence does not indicate the absence of a working copy.

func (*EnvironmentStatusContentGit) UnmarshalJSON

func (r *EnvironmentStatusContentGit) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusContentGitChangedFile

type EnvironmentStatusContentGitChangedFile struct {
	// ChangeType is the type of change that happened to the file
	ChangeType EnvironmentStatusContentGitChangedFilesChangeType `json:"changeType"`
	// path is the path of the file
	Path string                                     `json:"path"`
	JSON environmentStatusContentGitChangedFileJSON `json:"-"`
}

func (*EnvironmentStatusContentGitChangedFile) UnmarshalJSON

func (r *EnvironmentStatusContentGitChangedFile) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusContentGitChangedFilesChangeType

type EnvironmentStatusContentGitChangedFilesChangeType string

ChangeType is the type of change that happened to the file

const (
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeUnspecified        EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_UNSPECIFIED"
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeAdded              EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_ADDED"
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeModified           EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_MODIFIED"
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeDeleted            EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_DELETED"
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeRenamed            EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_RENAMED"
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeCopied             EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_COPIED"
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeUpdatedButUnmerged EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_UPDATED_BUT_UNMERGED"
	EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeUntracked          EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_UNTRACKED"
)

func (EnvironmentStatusContentGitChangedFilesChangeType) IsKnown

type EnvironmentStatusContentPhase

type EnvironmentStatusContentPhase string

phase is the current phase of the environment content

const (
	EnvironmentStatusContentPhaseContentPhaseUnspecified  EnvironmentStatusContentPhase = "CONTENT_PHASE_UNSPECIFIED"
	EnvironmentStatusContentPhaseContentPhaseCreating     EnvironmentStatusContentPhase = "CONTENT_PHASE_CREATING"
	EnvironmentStatusContentPhaseContentPhaseInitializing EnvironmentStatusContentPhase = "CONTENT_PHASE_INITIALIZING"
	EnvironmentStatusContentPhaseContentPhaseReady        EnvironmentStatusContentPhase = "CONTENT_PHASE_READY"
	EnvironmentStatusContentPhaseContentPhaseUpdating     EnvironmentStatusContentPhase = "CONTENT_PHASE_UPDATING"
	EnvironmentStatusContentPhaseContentPhaseFailed       EnvironmentStatusContentPhase = "CONTENT_PHASE_FAILED"
)

func (EnvironmentStatusContentPhase) IsKnown

func (r EnvironmentStatusContentPhase) IsKnown() bool

type EnvironmentStatusDevcontainer

type EnvironmentStatusDevcontainer struct {
	// container_id is the ID of the container.
	ContainerID string `json:"containerId"`
	// container_name is the name of the container that is used to connect to the
	// devcontainer
	ContainerName string `json:"containerName"`
	// devcontainerconfig_in_sync indicates if the devcontainer is up to date w.r.t.
	// the devcontainer config file.
	DevcontainerconfigInSync bool `json:"devcontainerconfigInSync"`
	// devcontainer_file_path is the path to the devcontainer file relative to the repo
	// root
	DevcontainerFilePath string `json:"devcontainerFilePath"`
	// devcontainer_file_presence indicates how the devcontainer file is present in the
	// repo.
	DevcontainerFilePresence EnvironmentStatusDevcontainerDevcontainerFilePresence `json:"devcontainerFilePresence"`
	// failure_message contains the reason the devcontainer failed to operate.
	FailureMessage string `json:"failureMessage"`
	// phase is the current phase of the devcontainer
	Phase EnvironmentStatusDevcontainerPhase `json:"phase"`
	// remote_user is the user that is used to connect to the devcontainer
	RemoteUser string `json:"remoteUser"`
	// remote_workspace_folder is the folder that is used to connect to the
	// devcontainer
	RemoteWorkspaceFolder string `json:"remoteWorkspaceFolder"`
	// secrets_in_sync indicates if the secrets are up to date w.r.t. the running
	// devcontainer.
	SecretsInSync bool `json:"secretsInSync"`
	// session is the session that is currently active in the devcontainer.
	Session string `json:"session"`
	// warning_message contains warnings, e.g. when the devcontainer is present but not
	// in the expected state.
	WarningMessage string                            `json:"warningMessage"`
	JSON           environmentStatusDevcontainerJSON `json:"-"`
}

devcontainer contains the status of the devcontainer.

func (*EnvironmentStatusDevcontainer) UnmarshalJSON

func (r *EnvironmentStatusDevcontainer) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusDevcontainerDevcontainerFilePresence

type EnvironmentStatusDevcontainerDevcontainerFilePresence string

devcontainer_file_presence indicates how the devcontainer file is present in the repo.

const (
	EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceUnspecified EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_UNSPECIFIED"
	EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceGenerated   EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_GENERATED"
	EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceDiscovered  EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_DISCOVERED"
	EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceSpecified   EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_SPECIFIED"
)

func (EnvironmentStatusDevcontainerDevcontainerFilePresence) IsKnown

type EnvironmentStatusDevcontainerPhase

type EnvironmentStatusDevcontainerPhase string

phase is the current phase of the devcontainer

const (
	EnvironmentStatusDevcontainerPhasePhaseUnspecified EnvironmentStatusDevcontainerPhase = "PHASE_UNSPECIFIED"
	EnvironmentStatusDevcontainerPhasePhaseCreating    EnvironmentStatusDevcontainerPhase = "PHASE_CREATING"
	EnvironmentStatusDevcontainerPhasePhaseRunning     EnvironmentStatusDevcontainerPhase = "PHASE_RUNNING"
	EnvironmentStatusDevcontainerPhasePhaseStopped     EnvironmentStatusDevcontainerPhase = "PHASE_STOPPED"
	EnvironmentStatusDevcontainerPhasePhaseFailed      EnvironmentStatusDevcontainerPhase = "PHASE_FAILED"
)

func (EnvironmentStatusDevcontainerPhase) IsKnown

type EnvironmentStatusEnvironmentURLs

type EnvironmentStatusEnvironmentURLs struct {
	// logs is the URL at which the environment logs can be accessed.
	Logs  string                                 `json:"logs"`
	Ports []EnvironmentStatusEnvironmentURLsPort `json:"ports"`
	// SSH is the URL at which the environment can be accessed via SSH.
	SSH  EnvironmentStatusEnvironmentURLsSSH  `json:"ssh"`
	JSON environmentStatusEnvironmentURLsJSON `json:"-"`
}

environment_url contains the URL at which the environment can be accessed. This field is only set if the environment is running.

func (*EnvironmentStatusEnvironmentURLs) UnmarshalJSON

func (r *EnvironmentStatusEnvironmentURLs) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusEnvironmentURLsPort

type EnvironmentStatusEnvironmentURLsPort struct {
	// port is the port number of the environment port
	Port int64 `json:"port"`
	// url is the URL at which the environment port can be accessed
	URL  string                                   `json:"url"`
	JSON environmentStatusEnvironmentURLsPortJSON `json:"-"`
}

func (*EnvironmentStatusEnvironmentURLsPort) UnmarshalJSON

func (r *EnvironmentStatusEnvironmentURLsPort) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusEnvironmentURLsSSH

type EnvironmentStatusEnvironmentURLsSSH struct {
	URL  string                                  `json:"url"`
	JSON environmentStatusEnvironmentURLsSSHJSON `json:"-"`
}

SSH is the URL at which the environment can be accessed via SSH.

func (*EnvironmentStatusEnvironmentURLsSSH) UnmarshalJSON

func (r *EnvironmentStatusEnvironmentURLsSSH) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusMachine

type EnvironmentStatusMachine struct {
	// failure_message contains the reason the machine failed to operate.
	FailureMessage string `json:"failureMessage"`
	// phase is the current phase of the environment machine
	Phase EnvironmentStatusMachinePhase `json:"phase"`
	// session is the session that is currently active in the machine.
	Session string `json:"session"`
	// timeout contains the reason the environment has timed out. If this field is
	// empty, the environment has not timed out.
	Timeout string `json:"timeout"`
	// versions contains the versions of components in the machine.
	Versions EnvironmentStatusMachineVersions `json:"versions"`
	// warning_message contains warnings, e.g. when the machine is present but not in
	// the expected state.
	WarningMessage string                       `json:"warningMessage"`
	JSON           environmentStatusMachineJSON `json:"-"`
}

machine contains the status of the environment machine

func (*EnvironmentStatusMachine) UnmarshalJSON

func (r *EnvironmentStatusMachine) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusMachinePhase

type EnvironmentStatusMachinePhase string

phase is the current phase of the environment machine

const (
	EnvironmentStatusMachinePhasePhaseUnspecified EnvironmentStatusMachinePhase = "PHASE_UNSPECIFIED"
	EnvironmentStatusMachinePhasePhaseCreating    EnvironmentStatusMachinePhase = "PHASE_CREATING"
	EnvironmentStatusMachinePhasePhaseStarting    EnvironmentStatusMachinePhase = "PHASE_STARTING"
	EnvironmentStatusMachinePhasePhaseRunning     EnvironmentStatusMachinePhase = "PHASE_RUNNING"
	EnvironmentStatusMachinePhasePhaseStopping    EnvironmentStatusMachinePhase = "PHASE_STOPPING"
	EnvironmentStatusMachinePhasePhaseStopped     EnvironmentStatusMachinePhase = "PHASE_STOPPED"
	EnvironmentStatusMachinePhasePhaseDeleting    EnvironmentStatusMachinePhase = "PHASE_DELETING"
	EnvironmentStatusMachinePhasePhaseDeleted     EnvironmentStatusMachinePhase = "PHASE_DELETED"
)

func (EnvironmentStatusMachinePhase) IsKnown

func (r EnvironmentStatusMachinePhase) IsKnown() bool

type EnvironmentStatusMachineVersions

type EnvironmentStatusMachineVersions struct {
	SupervisorCommit  string                               `json:"supervisorCommit"`
	SupervisorVersion string                               `json:"supervisorVersion"`
	JSON              environmentStatusMachineVersionsJSON `json:"-"`
}

versions contains the versions of components in the machine.

func (*EnvironmentStatusMachineVersions) UnmarshalJSON

func (r *EnvironmentStatusMachineVersions) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusRunnerAck

type EnvironmentStatusRunnerAck struct {
	Message     string                               `json:"message"`
	SpecVersion string                               `json:"specVersion"`
	StatusCode  EnvironmentStatusRunnerAckStatusCode `json:"statusCode"`
	JSON        environmentStatusRunnerAckJSON       `json:"-"`
}

runner_ack contains the acknowledgement from the runner that is has received the environment spec.

func (*EnvironmentStatusRunnerAck) UnmarshalJSON

func (r *EnvironmentStatusRunnerAck) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusRunnerAckStatusCode

type EnvironmentStatusRunnerAckStatusCode string
const (
	EnvironmentStatusRunnerAckStatusCodeStatusCodeUnspecified        EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_UNSPECIFIED"
	EnvironmentStatusRunnerAckStatusCodeStatusCodeOk                 EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_OK"
	EnvironmentStatusRunnerAckStatusCodeStatusCodeInvalidResource    EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_INVALID_RESOURCE"
	EnvironmentStatusRunnerAckStatusCodeStatusCodeFailedPrecondition EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_FAILED_PRECONDITION"
)

func (EnvironmentStatusRunnerAckStatusCode) IsKnown

type EnvironmentStatusSSHPublicKey

type EnvironmentStatusSSHPublicKey struct {
	// id is the unique identifier of the public key
	ID string `json:"id"`
	// phase is the current phase of the public key
	Phase EnvironmentStatusSSHPublicKeysPhase `json:"phase"`
	JSON  environmentStatusSSHPublicKeyJSON   `json:"-"`
}

func (*EnvironmentStatusSSHPublicKey) UnmarshalJSON

func (r *EnvironmentStatusSSHPublicKey) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusSSHPublicKeysPhase

type EnvironmentStatusSSHPublicKeysPhase string

phase is the current phase of the public key

const (
	EnvironmentStatusSSHPublicKeysPhaseContentPhaseUnspecified  EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_UNSPECIFIED"
	EnvironmentStatusSSHPublicKeysPhaseContentPhaseCreating     EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_CREATING"
	EnvironmentStatusSSHPublicKeysPhaseContentPhaseInitializing EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_INITIALIZING"
	EnvironmentStatusSSHPublicKeysPhaseContentPhaseReady        EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_READY"
	EnvironmentStatusSSHPublicKeysPhaseContentPhaseUpdating     EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_UPDATING"
	EnvironmentStatusSSHPublicKeysPhaseContentPhaseFailed       EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_FAILED"
)

func (EnvironmentStatusSSHPublicKeysPhase) IsKnown

type EnvironmentStatusSecret

type EnvironmentStatusSecret struct {
	// failure_message contains the reason the secret failed to be materialize.
	FailureMessage string                        `json:"failureMessage"`
	Phase          EnvironmentStatusSecretsPhase `json:"phase"`
	SecretName     string                        `json:"secretName"`
	// session is the session that is currently active in the environment.
	Session string `json:"session"`
	// warning_message contains warnings, e.g. when the secret is present but not in
	// the expected state.
	WarningMessage string                      `json:"warningMessage"`
	JSON           environmentStatusSecretJSON `json:"-"`
}

func (*EnvironmentStatusSecret) UnmarshalJSON

func (r *EnvironmentStatusSecret) UnmarshalJSON(data []byte) (err error)

type EnvironmentStatusSecretsPhase

type EnvironmentStatusSecretsPhase string
const (
	EnvironmentStatusSecretsPhaseContentPhaseUnspecified  EnvironmentStatusSecretsPhase = "CONTENT_PHASE_UNSPECIFIED"
	EnvironmentStatusSecretsPhaseContentPhaseCreating     EnvironmentStatusSecretsPhase = "CONTENT_PHASE_CREATING"
	EnvironmentStatusSecretsPhaseContentPhaseInitializing EnvironmentStatusSecretsPhase = "CONTENT_PHASE_INITIALIZING"
	EnvironmentStatusSecretsPhaseContentPhaseReady        EnvironmentStatusSecretsPhase = "CONTENT_PHASE_READY"
	EnvironmentStatusSecretsPhaseContentPhaseUpdating     EnvironmentStatusSecretsPhase = "CONTENT_PHASE_UPDATING"
	EnvironmentStatusSecretsPhaseContentPhaseFailed       EnvironmentStatusSecretsPhase = "CONTENT_PHASE_FAILED"
)

func (EnvironmentStatusSecretsPhase) IsKnown

func (r EnvironmentStatusSecretsPhase) IsKnown() bool

type EnvironmentStopParams

type EnvironmentStopParams struct {
	// environment_id specifies which environment should be stopped.
	//
	// +required
	EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
}

func (EnvironmentStopParams) MarshalJSON

func (r EnvironmentStopParams) MarshalJSON() (data []byte, err error)

type EnvironmentStopResponse

type EnvironmentStopResponse = interface{}

type EnvironmentUpdateParams

type EnvironmentUpdateParams struct {
	// environment_id specifies which environment should be updated.
	//
	// +required
	EnvironmentID param.Field[string]                      `json:"environmentId" format:"uuid"`
	Metadata      param.Field[interface{}]                 `json:"metadata"`
	Spec          param.Field[EnvironmentUpdateParamsSpec] `json:"spec"`
}

func (EnvironmentUpdateParams) MarshalJSON

func (r EnvironmentUpdateParams) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateParamsSpec

type EnvironmentUpdateParamsSpec struct {
	// automations_file is the automations file spec of the environment
	AutomationsFile param.Field[EnvironmentUpdateParamsSpecAutomationsFile] `json:"automationsFile"`
	Content         param.Field[EnvironmentUpdateParamsSpecContent]         `json:"content"`
	Devcontainer    param.Field[EnvironmentUpdateParamsSpecDevcontainer]    `json:"devcontainer"`
	// ports controls port sharing
	Ports param.Field[[]EnvironmentUpdateParamsSpecPort] `json:"ports"`
	// ssh_public_keys are the public keys to update empty array means nothing to
	// update
	SSHPublicKeys param.Field[[]EnvironmentUpdateParamsSpecSSHPublicKey] `json:"sshPublicKeys"`
	// Timeout configures the environment timeout
	Timeout param.Field[EnvironmentUpdateParamsSpecTimeout] `json:"timeout"`
}

func (EnvironmentUpdateParamsSpec) MarshalJSON

func (r EnvironmentUpdateParamsSpec) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateParamsSpecAutomationsFile

type EnvironmentUpdateParamsSpecAutomationsFile struct {
	// automations_file_path is the path to the automations file that is applied in the
	// environment, relative to the repo root. path must not be absolute (start with a
	// /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	AutomationsFilePath param.Field[string] `json:"automationsFilePath"`
	Session             param.Field[string] `json:"session"`
}

automations_file is the automations file spec of the environment

func (EnvironmentUpdateParamsSpecAutomationsFile) MarshalJSON

func (r EnvironmentUpdateParamsSpecAutomationsFile) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateParamsSpecContent

type EnvironmentUpdateParamsSpecContent struct {
	// The Git email address
	GitEmail param.Field[string] `json:"gitEmail"`
	// The Git username
	GitUsername param.Field[string] `json:"gitUsername"`
	// initializer configures how the environment is to be initialized
	Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"`
	// session should be changed to trigger a content reinitialization
	Session param.Field[string] `json:"session"`
}

func (EnvironmentUpdateParamsSpecContent) MarshalJSON

func (r EnvironmentUpdateParamsSpecContent) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateParamsSpecDevcontainer

type EnvironmentUpdateParamsSpecDevcontainer struct {
	// devcontainer_file_path is the path to the devcontainer file relative to the repo
	// root path must not be absolute (start with a /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"`
	// session should be changed to trigger a devcontainer rebuild
	Session param.Field[string] `json:"session"`
}

func (EnvironmentUpdateParamsSpecDevcontainer) MarshalJSON

func (r EnvironmentUpdateParamsSpecDevcontainer) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateParamsSpecPort

type EnvironmentUpdateParamsSpecPort struct {
	// policy of this port
	Admission param.Field[AdmissionLevel] `json:"admission"`
	// name of this port
	Name param.Field[string] `json:"name"`
	// port number
	Port param.Field[int64] `json:"port"`
}

func (EnvironmentUpdateParamsSpecPort) MarshalJSON

func (r EnvironmentUpdateParamsSpecPort) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateParamsSpecSSHPublicKey

type EnvironmentUpdateParamsSpecSSHPublicKey struct {
	// id is the unique identifier of the public key
	ID param.Field[string] `json:"id"`
	// value is the actual public key in the public key file format if not provided,
	// the public key will be removed
	Value param.Field[string] `json:"value"`
}

func (EnvironmentUpdateParamsSpecSSHPublicKey) MarshalJSON

func (r EnvironmentUpdateParamsSpecSSHPublicKey) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateParamsSpecTimeout

type EnvironmentUpdateParamsSpecTimeout struct {
	// inacitivity is the maximum time of disconnection before the environment is
	// stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable.
	Disconnected param.Field[string] `json:"disconnected" format:"regex"`
}

Timeout configures the environment timeout

func (EnvironmentUpdateParamsSpecTimeout) MarshalJSON

func (r EnvironmentUpdateParamsSpecTimeout) MarshalJSON() (data []byte, err error)

type EnvironmentUpdateResponse

type EnvironmentUpdateResponse = interface{}

type Error

type Error = apierror.Error

type ErrorCode added in v0.2.0

type ErrorCode = apierror.ErrorCode

type EventListParams

type EventListParams struct {
	Token    param.Field[string]                `query:"token"`
	PageSize param.Field[int64]                 `query:"pageSize"`
	Filter   param.Field[EventListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing environments
	Pagination param.Field[EventListParamsPagination] `json:"pagination"`
}

func (EventListParams) MarshalJSON

func (r EventListParams) MarshalJSON() (data []byte, err error)

func (EventListParams) URLQuery

func (r EventListParams) URLQuery() (v url.Values)

URLQuery serializes EventListParams's query parameters as `url.Values`.

type EventListParamsFilter

type EventListParamsFilter struct {
	ActorIDs        param.Field[[]string]           `json:"actorIds" format:"uuid"`
	ActorPrincipals param.Field[[]shared.Principal] `json:"actorPrincipals"`
	SubjectIDs      param.Field[[]string]           `json:"subjectIds" format:"uuid"`
	SubjectTypes    param.Field[[]ResourceType]     `json:"subjectTypes"`
}

func (EventListParamsFilter) MarshalJSON

func (r EventListParamsFilter) MarshalJSON() (data []byte, err error)

type EventListParamsPagination

type EventListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing environments

func (EventListParamsPagination) MarshalJSON

func (r EventListParamsPagination) MarshalJSON() (data []byte, err error)

type EventListResponse

type EventListResponse struct {
	ID             string           `json:"id"`
	Action         string           `json:"action"`
	ActorID        string           `json:"actorId"`
	ActorPrincipal shared.Principal `json:"actorPrincipal"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt   time.Time             `json:"createdAt" format:"date-time"`
	SubjectID   string                `json:"subjectId"`
	SubjectType ResourceType          `json:"subjectType"`
	JSON        eventListResponseJSON `json:"-"`
}

func (*EventListResponse) UnmarshalJSON

func (r *EventListResponse) UnmarshalJSON(data []byte) (err error)

type EventService

type EventService struct {
	Options []option.RequestOption
}

EventService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventService method instead.

func NewEventService

func NewEventService(opts ...option.RequestOption) (r *EventService)

NewEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EventService) List

Lists audit logs with filtering and pagination options.

Use this method to:

- View audit history - Track user actions - Monitor system changes

### Examples

- List all logs:

```yaml
pagination:
  pageSize: 20
```

- Filter by actor:

```yaml
filter:
  actorIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
  actorPrincipals: ["PRINCIPAL_USER"]
pagination:
  pageSize: 20
```

func (*EventService) ListAutoPaging

Lists audit logs with filtering and pagination options.

Use this method to:

- View audit history - Track user actions - Monitor system changes

### Examples

- List all logs:

```yaml
pagination:
  pageSize: 20
```

- Filter by actor:

```yaml
filter:
  actorIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
  actorPrincipals: ["PRINCIPAL_USER"]
pagination:
  pageSize: 20
```

func (*EventService) WatchStreaming

func (r *EventService) WatchStreaming(ctx context.Context, body EventWatchParams, opts ...option.RequestOption) (stream *jsonl.Stream[EventWatchResponse])

Streams events for all projects, runners, environments, tasks, and services based on the specified scope.

Use this method to:

- Monitor resource changes in real-time - Track system events - Receive notifications

The scope parameter determines which events to watch:

  • Organization scope (default): Watch all organization-wide events including projects, runners and environments. Task and service events are not included. Use by setting organization=true or omitting the scope.
  • Environment scope: Watch events for a specific environment, including its tasks, task executions, and services. Use by setting environment_id to the UUID of the environment to watch.

type EventWatchParams

type EventWatchParams struct {
	// Environment scope produces events for the environment itself, all tasks, task
	// executions, and services associated with that environment.
	EnvironmentID param.Field[string] `json:"environmentId"`
	// Organization scope produces events for all projects, runners and environments
	// the caller can see within their organization. No task, task execution or service
	// events are produed.
	Organization param.Field[bool] `json:"organization"`
}

func (EventWatchParams) MarshalJSON

func (r EventWatchParams) MarshalJSON() (data []byte, err error)

type EventWatchResponse

type EventWatchResponse struct {
	Operation    ResourceOperation      `json:"operation"`
	ResourceID   string                 `json:"resourceId" format:"uuid"`
	ResourceType ResourceType           `json:"resourceType"`
	JSON         eventWatchResponseJSON `json:"-"`
}

func (*EventWatchResponse) UnmarshalJSON

func (r *EventWatchResponse) UnmarshalJSON(data []byte) (err error)

type FieldValidationError

type FieldValidationError struct {
	Error string                   `json:"error"`
	Key   string                   `json:"key"`
	JSON  fieldValidationErrorJSON `json:"-"`
}

func (*FieldValidationError) UnmarshalJSON

func (r *FieldValidationError) UnmarshalJSON(data []byte) (err error)

type FieldValue

type FieldValue = shared.FieldValue

This is an alias to an internal type.

type FieldValueParam

type FieldValueParam = shared.FieldValueParam

This is an alias to an internal type.

type Group

type Group struct {
	ID string `json:"id" format:"uuid"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt      time.Time `json:"createdAt" format:"date-time"`
	Name           string    `json:"name"`
	OrganizationID string    `json:"organizationId" format:"uuid"`
	// system_managed indicates that this group is created by the system automatically
	SystemManaged bool `json:"systemManaged"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
	JSON      groupJSON `json:"-"`
}

func (*Group) UnmarshalJSON

func (r *Group) UnmarshalJSON(data []byte) (err error)

type GroupListParams

type GroupListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// pagination contains the pagination options for listing groups
	Pagination param.Field[GroupListParamsPagination] `json:"pagination"`
}

func (GroupListParams) MarshalJSON

func (r GroupListParams) MarshalJSON() (data []byte, err error)

func (GroupListParams) URLQuery

func (r GroupListParams) URLQuery() (v url.Values)

URLQuery serializes GroupListParams's query parameters as `url.Values`.

type GroupListParamsPagination

type GroupListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing groups

func (GroupListParamsPagination) MarshalJSON

func (r GroupListParamsPagination) MarshalJSON() (data []byte, err error)

type GroupService

type GroupService struct {
	Options []option.RequestOption
}

GroupService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGroupService method instead.

func NewGroupService

func NewGroupService(opts ...option.RequestOption) (r *GroupService)

NewGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*GroupService) List

func (r *GroupService) List(ctx context.Context, params GroupListParams, opts ...option.RequestOption) (res *pagination.GroupsPage[Group], err error)

Lists groups with optional pagination.

Use this method to:

- View all groups - Check group memberships - Monitor group configurations - Audit group access

### Examples

- List all groups:

Shows all groups with pagination.

```yaml
pagination:
  pageSize: 20
```

- List with custom page size:

Shows groups with specified page size.

```yaml
pagination:
  pageSize: 50
  token: "next-page-token-from-previous-response"
```

func (*GroupService) ListAutoPaging

Lists groups with optional pagination.

Use this method to:

- View all groups - Check group memberships - Monitor group configurations - Audit group access

### Examples

- List all groups:

Shows all groups with pagination.

```yaml
pagination:
  pageSize: 20
```

- List with custom page size:

Shows groups with specified page size.

```yaml
pagination:
  pageSize: 50
  token: "next-page-token-from-previous-response"
```

type HostAuthenticationToken

type HostAuthenticationToken struct {
	ID string `json:"id,required"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	ExpiresAt time.Time                     `json:"expiresAt" format:"date-time"`
	Host      string                        `json:"host"`
	RunnerID  string                        `json:"runnerId"`
	Source    HostAuthenticationTokenSource `json:"source"`
	UserID    string                        `json:"userId"`
	JSON      hostAuthenticationTokenJSON   `json:"-"`
}

func (*HostAuthenticationToken) UnmarshalJSON

func (r *HostAuthenticationToken) UnmarshalJSON(data []byte) (err error)

type HostAuthenticationTokenSource

type HostAuthenticationTokenSource string
const (
	HostAuthenticationTokenSourceUnspecified HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED"
	HostAuthenticationTokenSourceOAuth       HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH"
	HostAuthenticationTokenSourcePat         HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_PAT"
)

func (HostAuthenticationTokenSource) IsKnown

func (r HostAuthenticationTokenSource) IsKnown() bool

type IdentityExchangeTokenParams

type IdentityExchangeTokenParams struct {
	// exchange_token is the token to exchange
	ExchangeToken param.Field[string] `json:"exchangeToken"`
}

func (IdentityExchangeTokenParams) MarshalJSON

func (r IdentityExchangeTokenParams) MarshalJSON() (data []byte, err error)

type IdentityExchangeTokenResponse

type IdentityExchangeTokenResponse struct {
	// access_token is the new access token
	AccessToken string                            `json:"accessToken"`
	JSON        identityExchangeTokenResponseJSON `json:"-"`
}

func (*IdentityExchangeTokenResponse) UnmarshalJSON

func (r *IdentityExchangeTokenResponse) UnmarshalJSON(data []byte) (err error)

type IdentityGetAuthenticatedIdentityParams

type IdentityGetAuthenticatedIdentityParams struct {
	Empty param.Field[bool] `json:"empty"`
}

func (IdentityGetAuthenticatedIdentityParams) MarshalJSON

func (r IdentityGetAuthenticatedIdentityParams) MarshalJSON() (data []byte, err error)

type IdentityGetAuthenticatedIdentityResponse

type IdentityGetAuthenticatedIdentityResponse struct {
	OrganizationID string `json:"organizationId"`
	// subject is the identity of the current user
	Subject shared.Subject                               `json:"subject"`
	JSON    identityGetAuthenticatedIdentityResponseJSON `json:"-"`
}

func (*IdentityGetAuthenticatedIdentityResponse) UnmarshalJSON

func (r *IdentityGetAuthenticatedIdentityResponse) UnmarshalJSON(data []byte) (err error)

type IdentityGetIDTokenParams

type IdentityGetIDTokenParams struct {
	Audience param.Field[[]string] `json:"audience"`
}

func (IdentityGetIDTokenParams) MarshalJSON

func (r IdentityGetIDTokenParams) MarshalJSON() (data []byte, err error)

type IdentityGetIDTokenResponse

type IdentityGetIDTokenResponse struct {
	Token string                         `json:"token"`
	JSON  identityGetIDTokenResponseJSON `json:"-"`
}

func (*IdentityGetIDTokenResponse) UnmarshalJSON

func (r *IdentityGetIDTokenResponse) UnmarshalJSON(data []byte) (err error)

type IdentityService

type IdentityService struct {
	Options []option.RequestOption
}

IdentityService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIdentityService method instead.

func NewIdentityService

func NewIdentityService(opts ...option.RequestOption) (r *IdentityService)

NewIdentityService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*IdentityService) ExchangeToken

Exchanges an exchange token for a new access token.

Use this method to:

- Convert exchange tokens to access tokens - Obtain new access credentials - Complete token exchange flows

### Examples

- Exchange token:

Trades an exchange token for an access token.

```yaml
exchangeToken: "exchange-token-value"
```

func (*IdentityService) GetAuthenticatedIdentity

Retrieves information about the currently authenticated identity.

Use this method to:

- Get current user information - Check authentication status - Retrieve organization context - Validate authentication principal

### Examples

- Get current identity:

Retrieves details about the authenticated user.

```yaml
{}
```

func (*IdentityService) GetIDToken

Gets an ID token for authenticating with other services.

Use this method to:

- Obtain authentication tokens for service-to-service calls - Access protected resources - Generate scoped access tokens

### Examples

- Get token for single service:

Retrieves a token for authenticating with one service.

```yaml
audience:
  - "https://api.gitpod.io"
```

- Get token for multiple services:

Retrieves a token valid for multiple services.

```yaml
audience:
  - "https://api.gitpod.io"
  - "https://ws.gitpod.io"
```

type InviteDomains

type InviteDomains struct {
	// domains is the list of domains that are allowed to join the organization
	Domains []string          `json:"domains"`
	JSON    inviteDomainsJSON `json:"-"`
}

func (*InviteDomains) UnmarshalJSON

func (r *InviteDomains) UnmarshalJSON(data []byte) (err error)

type InviteDomainsParam

type InviteDomainsParam struct {
	// domains is the list of domains that are allowed to join the organization
	Domains param.Field[[]string] `json:"domains"`
}

func (InviteDomainsParam) MarshalJSON

func (r InviteDomainsParam) MarshalJSON() (data []byte, err error)

type JoinableOrganization

type JoinableOrganization struct {
	// organization_id is the id of the organization the user can join
	OrganizationID string `json:"organizationId,required" format:"uuid"`
	// organization_name is the name of the organization the user can join
	OrganizationName string `json:"organizationName,required"`
	// organization_member_count is the member count of the organization the user can
	// join
	OrganizationMemberCount int64                    `json:"organizationMemberCount"`
	JSON                    joinableOrganizationJSON `json:"-"`
}

func (*JoinableOrganization) UnmarshalJSON

func (r *JoinableOrganization) UnmarshalJSON(data []byte) (err error)

type LoginProvider

type LoginProvider struct {
	// provider is the provider used by this login method, e.g. "github", "google",
	// "custom"
	Provider string `json:"provider,required"`
	// login_url is the URL to redirect the browser agent to for login, when provider
	// is "custom"
	LoginURL string            `json:"loginUrl"`
	JSON     loginProviderJSON `json:"-"`
}

func (*LoginProvider) UnmarshalJSON

func (r *LoginProvider) UnmarshalJSON(data []byte) (err error)

type Organization

type Organization struct {
	ID string `json:"id,required" format:"uuid"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
	Name      string    `json:"name,required"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	UpdatedAt     time.Time        `json:"updatedAt,required" format:"date-time"`
	InviteDomains InviteDomains    `json:"inviteDomains"`
	JSON          organizationJSON `json:"-"`
}

func (*Organization) UnmarshalJSON

func (r *Organization) UnmarshalJSON(data []byte) (err error)

type OrganizationDeleteParams

type OrganizationDeleteParams struct {
	// organization_id is the ID of the organization to delete
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}

func (OrganizationDeleteParams) MarshalJSON

func (r OrganizationDeleteParams) MarshalJSON() (data []byte, err error)

type OrganizationDeleteResponse

type OrganizationDeleteResponse = interface{}

type OrganizationDomainVerificationDeleteParams

type OrganizationDomainVerificationDeleteParams struct {
	DomainVerificationID param.Field[string] `json:"domainVerificationId,required" format:"uuid"`
}

func (OrganizationDomainVerificationDeleteParams) MarshalJSON

func (r OrganizationDomainVerificationDeleteParams) MarshalJSON() (data []byte, err error)

type OrganizationDomainVerificationDeleteResponse

type OrganizationDomainVerificationDeleteResponse = interface{}

type OrganizationDomainVerificationGetParams

type OrganizationDomainVerificationGetParams struct {
	DomainVerificationID param.Field[string] `json:"domainVerificationId,required" format:"uuid"`
}

func (OrganizationDomainVerificationGetParams) MarshalJSON

func (r OrganizationDomainVerificationGetParams) MarshalJSON() (data []byte, err error)

type OrganizationDomainVerificationGetResponse

type OrganizationDomainVerificationGetResponse struct {
	DomainVerification DomainVerification                            `json:"domainVerification,required"`
	JSON               organizationDomainVerificationGetResponseJSON `json:"-"`
}

func (*OrganizationDomainVerificationGetResponse) UnmarshalJSON

func (r *OrganizationDomainVerificationGetResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationDomainVerificationListParams

type OrganizationDomainVerificationListParams struct {
	OrganizationID param.Field[string]                                             `json:"organizationId,required" format:"uuid"`
	Token          param.Field[string]                                             `query:"token"`
	PageSize       param.Field[int64]                                              `query:"pageSize"`
	Pagination     param.Field[OrganizationDomainVerificationListParamsPagination] `json:"pagination"`
}

func (OrganizationDomainVerificationListParams) MarshalJSON

func (r OrganizationDomainVerificationListParams) MarshalJSON() (data []byte, err error)

func (OrganizationDomainVerificationListParams) URLQuery

URLQuery serializes OrganizationDomainVerificationListParams's query parameters as `url.Values`.

type OrganizationDomainVerificationListParamsPagination

type OrganizationDomainVerificationListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

func (OrganizationDomainVerificationListParamsPagination) MarshalJSON

func (r OrganizationDomainVerificationListParamsPagination) MarshalJSON() (data []byte, err error)

type OrganizationDomainVerificationNewParams

type OrganizationDomainVerificationNewParams struct {
	Domain         param.Field[string] `json:"domain,required"`
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}

func (OrganizationDomainVerificationNewParams) MarshalJSON

func (r OrganizationDomainVerificationNewParams) MarshalJSON() (data []byte, err error)

type OrganizationDomainVerificationNewResponse

type OrganizationDomainVerificationNewResponse struct {
	DomainVerification DomainVerification                            `json:"domainVerification,required"`
	JSON               organizationDomainVerificationNewResponseJSON `json:"-"`
}

func (*OrganizationDomainVerificationNewResponse) UnmarshalJSON

func (r *OrganizationDomainVerificationNewResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationDomainVerificationService

type OrganizationDomainVerificationService struct {
	Options []option.RequestOption
}

OrganizationDomainVerificationService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationDomainVerificationService method instead.

func NewOrganizationDomainVerificationService

func NewOrganizationDomainVerificationService(opts ...option.RequestOption) (r *OrganizationDomainVerificationService)

NewOrganizationDomainVerificationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationDomainVerificationService) Delete

Removes a domain verification request.

Use this method to:

- Cancel pending verifications - Remove verified domains - Clean up unused domain records

### Examples

- Delete verification:

Removes a domain verification request.

```yaml
domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*OrganizationDomainVerificationService) Get

Retrieves the status of a domain verification request.

Use this method to:

- Check verification progress - View verification requirements - Monitor domain status

### Examples

- Get verification status:

Checks the current state of a domain verification.

```yaml
domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*OrganizationDomainVerificationService) List

Lists and monitors domain verification status across an organization.

Use this method to:

- Track verification progress - View all verified domains - Monitor pending verifications - Audit domain settings

### Examples

- List all verifications:

Shows all domain verifications regardless of status.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

- List with pagination:

Retrieves next page of verifications.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
  token: "next-page-token-from-previous-response"
```

func (*OrganizationDomainVerificationService) ListAutoPaging

Lists and monitors domain verification status across an organization.

Use this method to:

- Track verification progress - View all verified domains - Monitor pending verifications - Audit domain settings

### Examples

- List all verifications:

Shows all domain verifications regardless of status.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

- List with pagination:

Retrieves next page of verifications.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
  token: "next-page-token-from-previous-response"
```

func (*OrganizationDomainVerificationService) New

Initiates domain verification process to enable organization features.

Use this method to:

- Start domain ownership verification - Enable automatic team joining - Set up SSO restrictions - Configure email-based policies

### Examples

- Verify primary domain:

Starts verification for main company domain.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
domain: "acme-corp.com"
```

- Verify subsidiary domain:

Adds verification for additional company domain.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
domain: "acme-subsidiary.com"
```

func (*OrganizationDomainVerificationService) Verify

Verifies domain ownership for an organization.

Use this method to:

- Complete domain verification process - Enable domain-based features - Validate DNS configuration

### Examples

- Verify domain ownership:

Verifies ownership after DNS records are configured.

```yaml
domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

type OrganizationDomainVerificationVerifyParams

type OrganizationDomainVerificationVerifyParams struct {
	DomainVerificationID param.Field[string] `json:"domainVerificationId,required" format:"uuid"`
}

func (OrganizationDomainVerificationVerifyParams) MarshalJSON

func (r OrganizationDomainVerificationVerifyParams) MarshalJSON() (data []byte, err error)

type OrganizationDomainVerificationVerifyResponse

type OrganizationDomainVerificationVerifyResponse struct {
	DomainVerification DomainVerification                               `json:"domainVerification,required"`
	JSON               organizationDomainVerificationVerifyResponseJSON `json:"-"`
}

func (*OrganizationDomainVerificationVerifyResponse) UnmarshalJSON

func (r *OrganizationDomainVerificationVerifyResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationGetParams

type OrganizationGetParams struct {
	// organization_id is the unique identifier of the Organization to retreive.
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}

func (OrganizationGetParams) MarshalJSON

func (r OrganizationGetParams) MarshalJSON() (data []byte, err error)

type OrganizationGetResponse

type OrganizationGetResponse struct {
	// organization is the requested organization
	Organization Organization                `json:"organization,required"`
	JSON         organizationGetResponseJSON `json:"-"`
}

func (*OrganizationGetResponse) UnmarshalJSON

func (r *OrganizationGetResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationInvite

type OrganizationInvite struct {
	// invite_id is the unique identifier of the invite to join the organization. Use
	// JoinOrganization with this ID to join the organization.
	InviteID string                 `json:"inviteId,required" format:"uuid"`
	JSON     organizationInviteJSON `json:"-"`
}

func (*OrganizationInvite) UnmarshalJSON

func (r *OrganizationInvite) UnmarshalJSON(data []byte) (err error)

type OrganizationInviteGetParams

type OrganizationInviteGetParams struct {
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}

func (OrganizationInviteGetParams) MarshalJSON

func (r OrganizationInviteGetParams) MarshalJSON() (data []byte, err error)

type OrganizationInviteGetResponse

type OrganizationInviteGetResponse struct {
	Invite OrganizationInvite                `json:"invite,required"`
	JSON   organizationInviteGetResponseJSON `json:"-"`
}

func (*OrganizationInviteGetResponse) UnmarshalJSON

func (r *OrganizationInviteGetResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationInviteGetSummaryParams

type OrganizationInviteGetSummaryParams struct {
	InviteID param.Field[string] `json:"inviteId,required" format:"uuid"`
}

func (OrganizationInviteGetSummaryParams) MarshalJSON

func (r OrganizationInviteGetSummaryParams) MarshalJSON() (data []byte, err error)

type OrganizationInviteGetSummaryResponse

type OrganizationInviteGetSummaryResponse struct {
	OrganizationID          string                                   `json:"organizationId,required" format:"uuid"`
	OrganizationMemberCount int64                                    `json:"organizationMemberCount"`
	OrganizationName        string                                   `json:"organizationName"`
	JSON                    organizationInviteGetSummaryResponseJSON `json:"-"`
}

func (*OrganizationInviteGetSummaryResponse) UnmarshalJSON

func (r *OrganizationInviteGetSummaryResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationInviteNewParams

type OrganizationInviteNewParams struct {
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}

func (OrganizationInviteNewParams) MarshalJSON

func (r OrganizationInviteNewParams) MarshalJSON() (data []byte, err error)

type OrganizationInviteNewResponse

type OrganizationInviteNewResponse struct {
	Invite OrganizationInvite                `json:"invite,required"`
	JSON   organizationInviteNewResponseJSON `json:"-"`
}

func (*OrganizationInviteNewResponse) UnmarshalJSON

func (r *OrganizationInviteNewResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationInviteService

type OrganizationInviteService struct {
	Options []option.RequestOption
}

OrganizationInviteService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationInviteService method instead.

func NewOrganizationInviteService

func NewOrganizationInviteService(opts ...option.RequestOption) (r *OrganizationInviteService)

NewOrganizationInviteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationInviteService) Get

GetOrganizationInvite

func (*OrganizationInviteService) GetSummary

Retrieves organization details and membership info based on an invite link.

Use this method to:

- Preview organization details before joining - Validate invite link authenticity - Check organization size and activity - View team information before accepting

### Examples

- Get invite summary:

Retrieves organization information from an invite.

```yaml
inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*OrganizationInviteService) New

Creates an invite link for joining an organization. Any existing OrganizationInvites are invalidated and can no longer be used.

Use this method to:

- Generate shareable invite links - Manage team growth - Control organization access

### Examples

- Create organization invite:

Generates a new invite link for the organization.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

type OrganizationJoinParams

type OrganizationJoinParams struct {
	// invite_id is the unique identifier of the invite to join the organization.
	InviteID param.Field[string] `json:"inviteId" format:"uuid"`
	// organization_id is the unique identifier of the Organization to join.
	OrganizationID param.Field[string] `json:"organizationId" format:"uuid"`
}

func (OrganizationJoinParams) MarshalJSON

func (r OrganizationJoinParams) MarshalJSON() (data []byte, err error)

type OrganizationJoinResponse

type OrganizationJoinResponse struct {
	// member is the member that was created by joining the organization.
	Member OrganizationMember           `json:"member,required"`
	JSON   organizationJoinResponseJSON `json:"-"`
}

func (*OrganizationJoinResponse) UnmarshalJSON

func (r *OrganizationJoinResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationLeaveParams

type OrganizationLeaveParams struct {
	UserID param.Field[string] `json:"userId,required" format:"uuid"`
}

func (OrganizationLeaveParams) MarshalJSON

func (r OrganizationLeaveParams) MarshalJSON() (data []byte, err error)

type OrganizationLeaveResponse

type OrganizationLeaveResponse = interface{}

type OrganizationListMembersParams

type OrganizationListMembersParams struct {
	// organization_id is the ID of the organization to list members for
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
	Token          param.Field[string] `query:"token"`
	PageSize       param.Field[int64]  `query:"pageSize"`
	// pagination contains the pagination options for listing members
	Pagination param.Field[OrganizationListMembersParamsPagination] `json:"pagination"`
}

func (OrganizationListMembersParams) MarshalJSON

func (r OrganizationListMembersParams) MarshalJSON() (data []byte, err error)

func (OrganizationListMembersParams) URLQuery

func (r OrganizationListMembersParams) URLQuery() (v url.Values)

URLQuery serializes OrganizationListMembersParams's query parameters as `url.Values`.

type OrganizationListMembersParamsPagination

type OrganizationListMembersParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing members

func (OrganizationListMembersParamsPagination) MarshalJSON

func (r OrganizationListMembersParamsPagination) MarshalJSON() (data []byte, err error)

type OrganizationListParams

type OrganizationListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// pagination contains the pagination options for listing organizations
	Pagination param.Field[OrganizationListParamsPagination] `json:"pagination"`
	// scope is the scope of the organizations to list
	Scope param.Field[Scope] `json:"scope"`
}

func (OrganizationListParams) MarshalJSON

func (r OrganizationListParams) MarshalJSON() (data []byte, err error)

func (OrganizationListParams) URLQuery

func (r OrganizationListParams) URLQuery() (v url.Values)

URLQuery serializes OrganizationListParams's query parameters as `url.Values`.

type OrganizationListParamsPagination

type OrganizationListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing organizations

func (OrganizationListParamsPagination) MarshalJSON

func (r OrganizationListParamsPagination) MarshalJSON() (data []byte, err error)

type OrganizationMember

type OrganizationMember struct {
	Email    string `json:"email,required"`
	FullName string `json:"fullName,required"`
	// login_provider is the login provider the user uses to sign in
	LoginProvider string `json:"loginProvider,required"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	MemberSince time.Time               `json:"memberSince,required" format:"date-time"`
	Role        shared.OrganizationRole `json:"role,required"`
	Status      shared.UserStatus       `json:"status,required"`
	UserID      string                  `json:"userId,required" format:"uuid"`
	AvatarURL   string                  `json:"avatarUrl"`
	JSON        organizationMemberJSON  `json:"-"`
}

func (*OrganizationMember) UnmarshalJSON

func (r *OrganizationMember) UnmarshalJSON(data []byte) (err error)

type OrganizationNewParams

type OrganizationNewParams struct {
	// name is the organization name
	Name param.Field[string] `json:"name,required"`
	// Should other Accounts with the same domain be automatically invited to the
	// organization?
	InviteAccountsWithMatchingDomain param.Field[bool] `json:"inviteAccountsWithMatchingDomain"`
	// join_organization decides whether the Identity issuing this request joins the
	// org on creation
	JoinOrganization param.Field[bool] `json:"joinOrganization"`
}

func (OrganizationNewParams) MarshalJSON

func (r OrganizationNewParams) MarshalJSON() (data []byte, err error)

type OrganizationNewResponse

type OrganizationNewResponse struct {
	// organization is the created organization
	Organization Organization `json:"organization,required"`
	// member is the member that joined the org on creation. Only set if specified
	// "join_organization" is "true" in the request.
	Member OrganizationMember          `json:"member"`
	JSON   organizationNewResponseJSON `json:"-"`
}

func (*OrganizationNewResponse) UnmarshalJSON

func (r *OrganizationNewResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationRole

type OrganizationRole = shared.OrganizationRole

This is an alias to an internal type.

type OrganizationSSOConfigurationDeleteParams

type OrganizationSSOConfigurationDeleteParams struct {
	SSOConfigurationID param.Field[string] `json:"ssoConfigurationId,required" format:"uuid"`
}

func (OrganizationSSOConfigurationDeleteParams) MarshalJSON

func (r OrganizationSSOConfigurationDeleteParams) MarshalJSON() (data []byte, err error)

type OrganizationSSOConfigurationDeleteResponse

type OrganizationSSOConfigurationDeleteResponse = interface{}

type OrganizationSSOConfigurationGetParams

type OrganizationSSOConfigurationGetParams struct {
	// sso_configuration_id is the ID of the SSO configuration to get
	SSOConfigurationID param.Field[string] `json:"ssoConfigurationId,required" format:"uuid"`
}

func (OrganizationSSOConfigurationGetParams) MarshalJSON

func (r OrganizationSSOConfigurationGetParams) MarshalJSON() (data []byte, err error)

type OrganizationSSOConfigurationGetResponse

type OrganizationSSOConfigurationGetResponse struct {
	// sso_configuration is the SSO configuration identified by the ID
	SSOConfiguration SSOConfiguration                            `json:"ssoConfiguration,required"`
	JSON             organizationSSOConfigurationGetResponseJSON `json:"-"`
}

func (*OrganizationSSOConfigurationGetResponse) UnmarshalJSON

func (r *OrganizationSSOConfigurationGetResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationSSOConfigurationListParams

type OrganizationSSOConfigurationListParams struct {
	// organization_id is the ID of the organization to list SSO configurations for.
	OrganizationID param.Field[string]                                           `json:"organizationId,required" format:"uuid"`
	Token          param.Field[string]                                           `query:"token"`
	PageSize       param.Field[int64]                                            `query:"pageSize"`
	Pagination     param.Field[OrganizationSSOConfigurationListParamsPagination] `json:"pagination"`
}

func (OrganizationSSOConfigurationListParams) MarshalJSON

func (r OrganizationSSOConfigurationListParams) MarshalJSON() (data []byte, err error)

func (OrganizationSSOConfigurationListParams) URLQuery

URLQuery serializes OrganizationSSOConfigurationListParams's query parameters as `url.Values`.

type OrganizationSSOConfigurationListParamsPagination

type OrganizationSSOConfigurationListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

func (OrganizationSSOConfigurationListParamsPagination) MarshalJSON

func (r OrganizationSSOConfigurationListParamsPagination) MarshalJSON() (data []byte, err error)

type OrganizationSSOConfigurationNewParams

type OrganizationSSOConfigurationNewParams struct {
	// client_id is the client ID of the OIDC application set on the IdP
	ClientID param.Field[string] `json:"clientId,required"`
	// client_secret is the client secret of the OIDC application set on the IdP
	ClientSecret param.Field[string] `json:"clientSecret,required"`
	// email_domain is the domain that is allowed to sign in to the organization
	EmailDomain param.Field[string] `json:"emailDomain,required"`
	// issuer_url is the URL of the IdP issuer
	IssuerURL      param.Field[string] `json:"issuerUrl,required" format:"uri"`
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}

func (OrganizationSSOConfigurationNewParams) MarshalJSON

func (r OrganizationSSOConfigurationNewParams) MarshalJSON() (data []byte, err error)

type OrganizationSSOConfigurationNewResponse

type OrganizationSSOConfigurationNewResponse struct {
	// sso_configuration is the created SSO configuration
	SSOConfiguration SSOConfiguration                            `json:"ssoConfiguration,required"`
	JSON             organizationSSOConfigurationNewResponseJSON `json:"-"`
}

func (*OrganizationSSOConfigurationNewResponse) UnmarshalJSON

func (r *OrganizationSSOConfigurationNewResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationSSOConfigurationService

type OrganizationSSOConfigurationService struct {
	Options []option.RequestOption
}

OrganizationSSOConfigurationService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationSSOConfigurationService method instead.

func NewOrganizationSSOConfigurationService

func NewOrganizationSSOConfigurationService(opts ...option.RequestOption) (r *OrganizationSSOConfigurationService)

NewOrganizationSSOConfigurationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationSSOConfigurationService) Delete

Removes an SSO configuration from an organization.

Use this method to:

- Disable SSO authentication - Remove outdated providers - Clean up unused configurations

### Examples

- Delete SSO configuration:

Removes a specific SSO configuration.

```yaml
ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*OrganizationSSOConfigurationService) Get

Retrieves a specific SSO configuration.

Use this method to:

- View SSO provider details - Check configuration status - Verify SSO settings

### Examples

- Get SSO configuration:

Retrieves details of a specific SSO configuration.

```yaml
ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*OrganizationSSOConfigurationService) List

Lists and filters SSO configurations for an organization.

Use this method to:

- View all SSO providers - Monitor authentication status - Audit security settings - Manage provider configurations

### Examples

- List active configurations:

Shows all active SSO providers.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

- List by provider type:

Shows custom SSO configurations.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
  token: "next-page-token-from-previous-response"
```

func (*OrganizationSSOConfigurationService) ListAutoPaging

Lists and filters SSO configurations for an organization.

Use this method to:

- View all SSO providers - Monitor authentication status - Audit security settings - Manage provider configurations

### Examples

- List active configurations:

Shows all active SSO providers.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

- List by provider type:

Shows custom SSO configurations.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
  token: "next-page-token-from-previous-response"
```

func (*OrganizationSSOConfigurationService) New

Creates or updates SSO configuration for organizational authentication.

Use this method to:

- Configure OIDC-based SSO providers - Set up built-in providers (Google, GitHub, etc.) - Define custom identity providers - Manage authentication policies

### Examples

- Configure built-in Google SSO:

Sets up SSO using Google Workspace.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
clientId: "012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com"
clientSecret: "GOCSPX-abcdefghijklmnopqrstuvwxyz123456"
issuerUrl: "https://accounts.google.com"
emailDomain: "acme-corp.com"
```

- Configure custom OIDC provider:

Sets up SSO with a custom identity provider.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
clientId: "acme-corp-gitpod"
clientSecret: "secret-token-value"
issuerUrl: "https://sso.acme-corp.com"
emailDomain: "acme-corp.com"
```

func (*OrganizationSSOConfigurationService) Update

Updates SSO provider settings and authentication rules.

Use this method to:

- Rotate client credentials - Update provider endpoints - Modify claim mappings - Change authentication policies - Toggle SSO enforcement

### Examples

- Update credentials:

Rotates client ID and secret.

```yaml
ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
clientId: "new-client-id"
clientSecret: "new-client-secret"
```

- Update provider status:

Activates or deactivates SSO provider.

```yaml
ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
state: SSO_CONFIGURATION_STATE_ACTIVE
```

type OrganizationSSOConfigurationUpdateParams

type OrganizationSSOConfigurationUpdateParams struct {
	// sso_configuration_id is the ID of the SSO configuration to update
	SSOConfigurationID param.Field[string] `json:"ssoConfigurationId,required" format:"uuid"`
	// claims are key/value pairs that defines a mapping of claims issued by the IdP.
	Claims param.Field[map[string]string] `json:"claims"`
	// client_id is the client ID of the SSO provider
	ClientID param.Field[string] `json:"clientId"`
	// client_secret is the client secret of the SSO provider
	ClientSecret param.Field[string] `json:"clientSecret"`
	EmailDomain  param.Field[string] `json:"emailDomain"`
	// issuer_url is the URL of the IdP issuer
	IssuerURL param.Field[string] `json:"issuerUrl" format:"uri"`
	// state is the state of the SSO configuration
	State param.Field[SSOConfigurationState] `json:"state"`
}

func (OrganizationSSOConfigurationUpdateParams) MarshalJSON

func (r OrganizationSSOConfigurationUpdateParams) MarshalJSON() (data []byte, err error)

type OrganizationSSOConfigurationUpdateResponse

type OrganizationSSOConfigurationUpdateResponse = interface{}

type OrganizationService

type OrganizationService struct {
	Options             []option.RequestOption
	DomainVerifications *OrganizationDomainVerificationService
	Invites             *OrganizationInviteService
	SSOConfigurations   *OrganizationSSOConfigurationService
}

OrganizationService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.

func NewOrganizationService

func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)

NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationService) Delete

Permanently deletes an organization.

Use this method to:

- Remove unused organizations - Clean up test organizations - Complete organization migration

### Examples

- Delete organization:

Permanently removes an organization and all its data.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

func (*OrganizationService) Get

Gets details about a specific organization.

Use this method to:

- Retrieve organization settings and configuration - Check organization membership status - View domain verification settings

### Examples

- Get organization details:

Retrieves information about a specific organization.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

func (*OrganizationService) Join

Allows users to join an organization through direct ID, invite link, or domain-based auto-join.

Use this method to:

- Join an organization via direct ID or invite - Join automatically based on email domain - Accept organization invitations

### Examples

- Join via organization ID:

Joins an organization directly when you have the ID.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

- Join via invite:

Accepts an organization invitation link.

```yaml
inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*OrganizationService) Leave

Removes a user from an organization while preserving organization data.

Use this method to:

- Remove yourself from an organization - Clean up inactive memberships - Transfer project ownership before leaving - Manage team transitions

### Examples

- Leave organization:

Removes user from organization membership.

```yaml
userId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
```

Note: Ensure all projects and resources are transferred before leaving.

func (*OrganizationService) List

Lists all organizations the caller has access to with optional filtering.

Use this method to:

- View organizations you're a member of - Browse all available organizations - Paginate through organization results

### Examples

- List member organizations:

Shows organizations where the caller is a member.

```yaml
pagination:
  pageSize: 20
scope: SCOPE_MEMBER
```

- List all organizations:

Shows all organizations visible to the caller.

```yaml
pagination:
  pageSize: 50
scope: SCOPE_ALL
```

func (*OrganizationService) ListAutoPaging

Lists all organizations the caller has access to with optional filtering.

Use this method to:

- View organizations you're a member of - Browse all available organizations - Paginate through organization results

### Examples

- List member organizations:

Shows organizations where the caller is a member.

```yaml
pagination:
  pageSize: 20
scope: SCOPE_MEMBER
```

- List all organizations:

Shows all organizations visible to the caller.

```yaml
pagination:
  pageSize: 50
scope: SCOPE_ALL
```

func (*OrganizationService) ListMembers

Lists and filters organization members with optional pagination.

Use this method to:

- View all organization members - Monitor member activity - Manage team membership

### Examples

- List active members:

Retrieves active members with pagination.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

- List with pagination:

Retrieves next page of members.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 50
  token: "next-page-token-from-previous-response"
```

func (*OrganizationService) ListMembersAutoPaging

Lists and filters organization members with optional pagination.

Use this method to:

- View all organization members - Monitor member activity - Manage team membership

### Examples

- List active members:

Retrieves active members with pagination.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

- List with pagination:

Retrieves next page of members.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 50
  token: "next-page-token-from-previous-response"
```

func (*OrganizationService) New

Creates a new organization with the specified name and settings.

Use this method to:

- Create a new organization for team collaboration - Set up automatic domain-based invites for team members - Join the organization immediately upon creation

### Examples

- Create a basic organization:

Creates an organization with just a name.

```yaml
name: "Acme Corp Engineering"
joinOrganization: true
```

- Create with domain-based invites:

Creates an organization that automatically invites users with matching email
domains.

```yaml
name: "Acme Corp"
joinOrganization: true
inviteAccountsWithMatchingDomain: true
```

func (*OrganizationService) SetRole

Manages organization membership and roles by setting a user's role within the organization.

Use this method to:

- Promote members to admin role - Change member permissions - Demote admins to regular members

### Examples

- Promote to admin:

Makes a user an organization administrator.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
userId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
role: ORGANIZATION_ROLE_ADMIN
```

- Change to member:

Changes a user's role to regular member.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
userId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
role: ORGANIZATION_ROLE_MEMBER
```

func (*OrganizationService) Update

Updates an organization's settings including name, invite domains, and member policies.

Use this method to:

- Modify organization display name - Configure email domain restrictions - Update organization-wide settings - Manage member access policies

### Examples

- Update basic settings:

Changes organization name and invite domains.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
name: "New Company Name"
inviteDomains:
  domains:
    - "company.com"
    - "subsidiary.com"
```

- Remove domain restrictions:

Clears all domain-based invite restrictions.

```yaml
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
inviteDomains:
  domains: []
```

type OrganizationSetRoleParams

type OrganizationSetRoleParams struct {
	OrganizationID param.Field[string]                  `json:"organizationId,required" format:"uuid"`
	UserID         param.Field[string]                  `json:"userId,required" format:"uuid"`
	Role           param.Field[shared.OrganizationRole] `json:"role"`
}

func (OrganizationSetRoleParams) MarshalJSON

func (r OrganizationSetRoleParams) MarshalJSON() (data []byte, err error)

type OrganizationSetRoleResponse

type OrganizationSetRoleResponse = interface{}

type OrganizationUpdateParams

type OrganizationUpdateParams struct {
	// organization_id is the ID of the organization to update the settings for.
	OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
	// invite_domains is the domain allowlist of the organization
	InviteDomains param.Field[InviteDomainsParam] `json:"inviteDomains"`
	// name is the new name of the organization
	Name param.Field[string] `json:"name"`
}

func (OrganizationUpdateParams) MarshalJSON

func (r OrganizationUpdateParams) MarshalJSON() (data []byte, err error)

type OrganizationUpdateResponse

type OrganizationUpdateResponse struct {
	// organization is the updated organization
	Organization Organization                   `json:"organization,required"`
	JSON         organizationUpdateResponseJSON `json:"-"`
}

func (*OrganizationUpdateResponse) UnmarshalJSON

func (r *OrganizationUpdateResponse) UnmarshalJSON(data []byte) (err error)

type PersonalAccessToken

type PersonalAccessToken struct {
	ID string `json:"id" format:"uuid"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt   time.Time      `json:"createdAt" format:"date-time"`
	Creator     shared.Subject `json:"creator"`
	Description string         `json:"description"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	ExpiresAt time.Time `json:"expiresAt" format:"date-time"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	LastUsed time.Time               `json:"lastUsed" format:"date-time"`
	UserID   string                  `json:"userId" format:"uuid"`
	JSON     personalAccessTokenJSON `json:"-"`
}

func (*PersonalAccessToken) UnmarshalJSON

func (r *PersonalAccessToken) UnmarshalJSON(data []byte) (err error)

type Principal

type Principal = shared.Principal

This is an alias to an internal type.

type Project

type Project struct {
	EnvironmentClass ProjectEnvironmentClass `json:"environmentClass,required"`
	// id is the unique identifier for the project
	ID string `json:"id" format:"uuid"`
	// automations_file_path is the path to the automations file relative to the repo
	// root
	AutomationsFilePath string `json:"automationsFilePath"`
	// devcontainer_file_path is the path to the devcontainer file relative to the repo
	// root
	DevcontainerFilePath string `json:"devcontainerFilePath"`
	// initializer is the content initializer
	Initializer EnvironmentInitializer `json:"initializer"`
	Metadata    ProjectMetadata        `json:"metadata"`
	UsedBy      ProjectUsedBy          `json:"usedBy"`
	JSON        projectJSON            `json:"-"`
}

func (*Project) UnmarshalJSON

func (r *Project) UnmarshalJSON(data []byte) (err error)

type ProjectDeleteParams

type ProjectDeleteParams struct {
	// project_id specifies the project identifier
	ProjectID param.Field[string] `json:"projectId" format:"uuid"`
}

func (ProjectDeleteParams) MarshalJSON

func (r ProjectDeleteParams) MarshalJSON() (data []byte, err error)

type ProjectDeleteResponse

type ProjectDeleteResponse = interface{}

type ProjectEnvironmentClass

type ProjectEnvironmentClass struct {
	// Use a fixed environment class on a given Runner. This cannot be a local runner's
	// environment class.
	EnvironmentClassID string `json:"environmentClassId" format:"uuid"`
	// Use a local runner for the user
	LocalRunner bool                        `json:"localRunner"`
	JSON        projectEnvironmentClassJSON `json:"-"`
}

func (*ProjectEnvironmentClass) UnmarshalJSON

func (r *ProjectEnvironmentClass) UnmarshalJSON(data []byte) (err error)

type ProjectEnvironmentClassParam

type ProjectEnvironmentClassParam struct {
	// Use a fixed environment class on a given Runner. This cannot be a local runner's
	// environment class.
	EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"`
	// Use a local runner for the user
	LocalRunner param.Field[bool] `json:"localRunner"`
}

func (ProjectEnvironmentClassParam) MarshalJSON

func (r ProjectEnvironmentClassParam) MarshalJSON() (data []byte, err error)

type ProjectGetParams

type ProjectGetParams struct {
	// project_id specifies the project identifier
	ProjectID param.Field[string] `json:"projectId" format:"uuid"`
}

func (ProjectGetParams) MarshalJSON

func (r ProjectGetParams) MarshalJSON() (data []byte, err error)

type ProjectGetResponse

type ProjectGetResponse struct {
	Project Project                `json:"project"`
	JSON    projectGetResponseJSON `json:"-"`
}

func (*ProjectGetResponse) UnmarshalJSON

func (r *ProjectGetResponse) UnmarshalJSON(data []byte) (err error)

type ProjectListParams

type ProjectListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// pagination contains the pagination options for listing organizations
	Pagination param.Field[ProjectListParamsPagination] `json:"pagination"`
}

func (ProjectListParams) MarshalJSON

func (r ProjectListParams) MarshalJSON() (data []byte, err error)

func (ProjectListParams) URLQuery

func (r ProjectListParams) URLQuery() (v url.Values)

URLQuery serializes ProjectListParams's query parameters as `url.Values`.

type ProjectListParamsPagination

type ProjectListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing organizations

func (ProjectListParamsPagination) MarshalJSON

func (r ProjectListParamsPagination) MarshalJSON() (data []byte, err error)

type ProjectMetadata

type ProjectMetadata struct {
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt time.Time `json:"createdAt" format:"date-time"`
	// creator is the identity of the project creator
	Creator shared.Subject `json:"creator"`
	// name is the human readable name of the project
	Name string `json:"name"`
	// organization_id is the ID of the organization that contains the environment
	OrganizationID string `json:"organizationId" format:"uuid"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	UpdatedAt time.Time           `json:"updatedAt" format:"date-time"`
	JSON      projectMetadataJSON `json:"-"`
}

func (*ProjectMetadata) UnmarshalJSON

func (r *ProjectMetadata) UnmarshalJSON(data []byte) (err error)

type ProjectNewFromEnvironmentParams

type ProjectNewFromEnvironmentParams struct {
	// environment_id specifies the environment identifier
	EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
	Name          param.Field[string] `json:"name"`
}

func (ProjectNewFromEnvironmentParams) MarshalJSON

func (r ProjectNewFromEnvironmentParams) MarshalJSON() (data []byte, err error)

type ProjectNewFromEnvironmentResponse

type ProjectNewFromEnvironmentResponse struct {
	Project Project                               `json:"project"`
	JSON    projectNewFromEnvironmentResponseJSON `json:"-"`
}

func (*ProjectNewFromEnvironmentResponse) UnmarshalJSON

func (r *ProjectNewFromEnvironmentResponse) UnmarshalJSON(data []byte) (err error)

type ProjectNewParams

type ProjectNewParams struct {
	EnvironmentClass param.Field[ProjectEnvironmentClassParam] `json:"environmentClass,required"`
	// initializer is the content initializer
	Initializer param.Field[EnvironmentInitializerParam] `json:"initializer,required"`
	// automations_file_path is the path to the automations file relative to the repo
	// root path must not be absolute (start with a /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	AutomationsFilePath param.Field[string] `json:"automationsFilePath"`
	// devcontainer_file_path is the path to the devcontainer file relative to the repo
	// root path must not be absolute (start with a /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"`
	Name                 param.Field[string] `json:"name"`
}

func (ProjectNewParams) MarshalJSON

func (r ProjectNewParams) MarshalJSON() (data []byte, err error)

type ProjectNewResponse

type ProjectNewResponse struct {
	Project Project                `json:"project"`
	JSON    projectNewResponseJSON `json:"-"`
}

func (*ProjectNewResponse) UnmarshalJSON

func (r *ProjectNewResponse) UnmarshalJSON(data []byte) (err error)

type ProjectPolicy

type ProjectPolicy struct {
	GroupID string `json:"groupId" format:"uuid"`
	// role is the role assigned to the group
	Role ProjectRole       `json:"role"`
	JSON projectPolicyJSON `json:"-"`
}

func (*ProjectPolicy) UnmarshalJSON

func (r *ProjectPolicy) UnmarshalJSON(data []byte) (err error)

type ProjectPolicyDeleteParams

type ProjectPolicyDeleteParams struct {
	// group_id specifies the group_id identifier
	GroupID param.Field[string] `json:"groupId" format:"uuid"`
	// project_id specifies the project identifier
	ProjectID param.Field[string] `json:"projectId" format:"uuid"`
}

func (ProjectPolicyDeleteParams) MarshalJSON

func (r ProjectPolicyDeleteParams) MarshalJSON() (data []byte, err error)

type ProjectPolicyDeleteResponse

type ProjectPolicyDeleteResponse = interface{}

type ProjectPolicyListParams

type ProjectPolicyListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// pagination contains the pagination options for listing project policies
	Pagination param.Field[ProjectPolicyListParamsPagination] `json:"pagination"`
	// project_id specifies the project identifier
	ProjectID param.Field[string] `json:"projectId" format:"uuid"`
}

func (ProjectPolicyListParams) MarshalJSON

func (r ProjectPolicyListParams) MarshalJSON() (data []byte, err error)

func (ProjectPolicyListParams) URLQuery

func (r ProjectPolicyListParams) URLQuery() (v url.Values)

URLQuery serializes ProjectPolicyListParams's query parameters as `url.Values`.

type ProjectPolicyListParamsPagination

type ProjectPolicyListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing project policies

func (ProjectPolicyListParamsPagination) MarshalJSON

func (r ProjectPolicyListParamsPagination) MarshalJSON() (data []byte, err error)

type ProjectPolicyNewParams

type ProjectPolicyNewParams struct {
	// group_id specifies the group_id identifier
	GroupID param.Field[string] `json:"groupId" format:"uuid"`
	// project_id specifies the project identifier
	ProjectID param.Field[string]      `json:"projectId" format:"uuid"`
	Role      param.Field[ProjectRole] `json:"role"`
}

func (ProjectPolicyNewParams) MarshalJSON

func (r ProjectPolicyNewParams) MarshalJSON() (data []byte, err error)

type ProjectPolicyNewResponse

type ProjectPolicyNewResponse struct {
	Policy ProjectPolicy                `json:"policy"`
	JSON   projectPolicyNewResponseJSON `json:"-"`
}

func (*ProjectPolicyNewResponse) UnmarshalJSON

func (r *ProjectPolicyNewResponse) UnmarshalJSON(data []byte) (err error)

type ProjectPolicyService

type ProjectPolicyService struct {
	Options []option.RequestOption
}

ProjectPolicyService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProjectPolicyService method instead.

func NewProjectPolicyService

func NewProjectPolicyService(opts ...option.RequestOption) (r *ProjectPolicyService)

NewProjectPolicyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ProjectPolicyService) Delete

Deletes a project policy.

Use this method to:

- Remove access controls - Revoke permissions - Clean up policies

### Examples

- Delete policy:

Removes a group's access policy.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
```

func (*ProjectPolicyService) List

Lists policies for a project.

Use this method to:

- View access controls - Check policy configurations - Audit permissions

### Examples

- List policies:

Shows all policies for a project.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

func (*ProjectPolicyService) ListAutoPaging

Lists policies for a project.

Use this method to:

- View access controls - Check policy configurations - Audit permissions

### Examples

- List policies:

Shows all policies for a project.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
  pageSize: 20
```

func (*ProjectPolicyService) New

Creates a new policy for a project.

Use this method to:

- Set up access controls - Define group permissions - Configure role-based access

### Examples

- Create admin policy:

Grants admin access to a group.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
role: PROJECT_ROLE_ADMIN
```

func (*ProjectPolicyService) Update

Updates an existing project policy.

Use this method to:

- Modify access levels - Change group roles - Update permissions

### Examples

- Update policy role:

Changes a group's access level.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
role: PROJECT_ROLE_EDITOR
```

type ProjectPolicyUpdateParams

type ProjectPolicyUpdateParams struct {
	// group_id specifies the group_id identifier
	GroupID param.Field[string] `json:"groupId" format:"uuid"`
	// project_id specifies the project identifier
	ProjectID param.Field[string]      `json:"projectId" format:"uuid"`
	Role      param.Field[ProjectRole] `json:"role"`
}

func (ProjectPolicyUpdateParams) MarshalJSON

func (r ProjectPolicyUpdateParams) MarshalJSON() (data []byte, err error)

type ProjectPolicyUpdateResponse

type ProjectPolicyUpdateResponse struct {
	Policy ProjectPolicy                   `json:"policy"`
	JSON   projectPolicyUpdateResponseJSON `json:"-"`
}

func (*ProjectPolicyUpdateResponse) UnmarshalJSON

func (r *ProjectPolicyUpdateResponse) UnmarshalJSON(data []byte) (err error)

type ProjectRole

type ProjectRole string
const (
	ProjectRoleUnspecified ProjectRole = "PROJECT_ROLE_UNSPECIFIED"
	ProjectRoleAdmin       ProjectRole = "PROJECT_ROLE_ADMIN"
	ProjectRoleUser        ProjectRole = "PROJECT_ROLE_USER"
	ProjectRoleEditor      ProjectRole = "PROJECT_ROLE_EDITOR"
)

func (ProjectRole) IsKnown

func (r ProjectRole) IsKnown() bool

type ProjectService

type ProjectService struct {
	Options  []option.RequestOption
	Policies *ProjectPolicyService
}

ProjectService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProjectService method instead.

func NewProjectService

func NewProjectService(opts ...option.RequestOption) (r *ProjectService)

NewProjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ProjectService) Delete

Deletes a project permanently.

Use this method to:

- Remove unused projects - Clean up test projects - Delete obsolete configurations

### Examples

- Delete project:

Permanently removes a project.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

func (*ProjectService) Get

Gets details about a specific project.

Use this method to:

- View project configuration - Check project status - Get project metadata

### Examples

- Get project details:

Retrieves information about a specific project.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
```

func (*ProjectService) List

Lists projects with optional filtering.

Use this method to:

- View all accessible projects - Browse project configurations - Monitor project status

### Examples

- List projects:

Shows all projects with pagination.

```yaml
pagination:
  pageSize: 20
```

func (*ProjectService) ListAutoPaging

Lists projects with optional filtering.

Use this method to:

- View all accessible projects - Browse project configurations - Monitor project status

### Examples

- List projects:

Shows all projects with pagination.

```yaml
pagination:
  pageSize: 20
```

func (*ProjectService) New

Creates a new project with specified configuration.

Use this method to:

- Set up development projects - Configure project environments - Define project settings - Initialize project content

### Examples

- Create basic project:

Creates a project with minimal configuration.

```yaml
name: "Web Application"
environmentClass:
  environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
initializer:
  specs:
    - git:
        remoteUri: "https://github.com/org/repo"
```

- Create project with devcontainer:

Creates a project with custom development container.

```yaml
name: "Backend Service"
environmentClass:
  environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
initializer:
  specs:
    - git:
        remoteUri: "https://github.com/org/backend"
devcontainerFilePath: ".devcontainer/devcontainer.json"
automationsFilePath: ".gitpod/automations.yaml"
```

func (*ProjectService) NewFromEnvironment

Creates a new project using an existing environment as a template.

Use this method to:

- Clone environment configurations - Create projects from templates - Share environment setups

### Examples

- Create from environment:

Creates a project based on existing environment.

```yaml
name: "Frontend Project"
environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
```

func (*ProjectService) Update

Updates a project's configuration.

Use this method to:

- Modify project settings - Update environment class - Change project name - Configure initializers

### Examples

- Update project name:

Changes the project's display name.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
name: "New Project Name"
```

- Update environment class:

Changes the project's environment class.

```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
environmentClass:
  environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

type ProjectUpdateParams

type ProjectUpdateParams struct {
	// automations_file_path is the path to the automations file relative to the repo
	// root path must not be absolute (start with a /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	AutomationsFilePath param.Field[string] `json:"automationsFilePath"`
	// devcontainer_file_path is the path to the devcontainer file relative to the repo
	// root path must not be absolute (start with a /):
	//
	// “`
	// this.matches('^$|^[^/].*')
	// “`
	DevcontainerFilePath param.Field[string]                       `json:"devcontainerFilePath"`
	EnvironmentClass     param.Field[ProjectEnvironmentClassParam] `json:"environmentClass"`
	// initializer is the content initializer
	Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"`
	Name        param.Field[string]                      `json:"name"`
	// project_id specifies the project identifier
	ProjectID param.Field[string] `json:"projectId" format:"uuid"`
}

func (ProjectUpdateParams) MarshalJSON

func (r ProjectUpdateParams) MarshalJSON() (data []byte, err error)

type ProjectUpdateResponse

type ProjectUpdateResponse struct {
	Project Project                   `json:"project"`
	JSON    projectUpdateResponseJSON `json:"-"`
}

func (*ProjectUpdateResponse) UnmarshalJSON

func (r *ProjectUpdateResponse) UnmarshalJSON(data []byte) (err error)

type ProjectUsedBy

type ProjectUsedBy struct {
	// Subjects are the 10 most recent subjects who have used the project to create an
	// environment
	Subjects []shared.Subject `json:"subjects"`
	// Total number of unique subjects who have used the project
	TotalSubjects int64             `json:"totalSubjects"`
	JSON          projectUsedByJSON `json:"-"`
}

func (*ProjectUsedBy) UnmarshalJSON

func (r *ProjectUsedBy) UnmarshalJSON(data []byte) (err error)

type ProviderType

type ProviderType string
const (
	ProviderTypeUnspecified ProviderType = "PROVIDER_TYPE_UNSPECIFIED"
	ProviderTypeBuiltin     ProviderType = "PROVIDER_TYPE_BUILTIN"
	ProviderTypeCustom      ProviderType = "PROVIDER_TYPE_CUSTOM"
)

func (ProviderType) IsKnown

func (r ProviderType) IsKnown() bool

type ResourceOperation

type ResourceOperation string
const (
	ResourceOperationUnspecified  ResourceOperation = "RESOURCE_OPERATION_UNSPECIFIED"
	ResourceOperationCreate       ResourceOperation = "RESOURCE_OPERATION_CREATE"
	ResourceOperationUpdate       ResourceOperation = "RESOURCE_OPERATION_UPDATE"
	ResourceOperationDelete       ResourceOperation = "RESOURCE_OPERATION_DELETE"
	ResourceOperationUpdateStatus ResourceOperation = "RESOURCE_OPERATION_UPDATE_STATUS"
)

func (ResourceOperation) IsKnown

func (r ResourceOperation) IsKnown() bool

type ResourceType

type ResourceType string
const (
	ResourceTypeUnspecified             ResourceType = "RESOURCE_TYPE_UNSPECIFIED"
	ResourceTypeEnvironment             ResourceType = "RESOURCE_TYPE_ENVIRONMENT"
	ResourceTypeRunner                  ResourceType = "RESOURCE_TYPE_RUNNER"
	ResourceTypeProject                 ResourceType = "RESOURCE_TYPE_PROJECT"
	ResourceTypeTask                    ResourceType = "RESOURCE_TYPE_TASK"
	ResourceTypeTaskExecution           ResourceType = "RESOURCE_TYPE_TASK_EXECUTION"
	ResourceTypeService                 ResourceType = "RESOURCE_TYPE_SERVICE"
	ResourceTypeOrganization            ResourceType = "RESOURCE_TYPE_ORGANIZATION"
	ResourceTypeUser                    ResourceType = "RESOURCE_TYPE_USER"
	ResourceTypeEnvironmentClass        ResourceType = "RESOURCE_TYPE_ENVIRONMENT_CLASS"
	ResourceTypeRunnerScmIntegration    ResourceType = "RESOURCE_TYPE_RUNNER_SCM_INTEGRATION"
	ResourceTypeHostAuthenticationToken ResourceType = "RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN"
	ResourceTypeGroup                   ResourceType = "RESOURCE_TYPE_GROUP"
	ResourceTypePersonalAccessToken     ResourceType = "RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN"
	ResourceTypeUserPreference          ResourceType = "RESOURCE_TYPE_USER_PREFERENCE"
	ResourceTypeServiceAccount          ResourceType = "RESOURCE_TYPE_SERVICE_ACCOUNT"
	ResourceTypeSecret                  ResourceType = "RESOURCE_TYPE_SECRET"
	ResourceTypeSSOConfig               ResourceType = "RESOURCE_TYPE_SSO_CONFIG"
	ResourceTypeDomainVerification      ResourceType = "RESOURCE_TYPE_DOMAIN_VERIFICATION"
)

func (ResourceType) IsKnown

func (r ResourceType) IsKnown() bool

type Runner

type Runner struct {
	// Time when the Runner was created.
	CreatedAt time.Time `json:"createdAt" format:"date-time"`
	// creator is the identity of the creator of the environment
	Creator shared.Subject `json:"creator"`
	// The runner's kind
	Kind RunnerKind `json:"kind"`
	// The runner's name which is shown to users
	Name string `json:"name"`
	// The runner's provider
	Provider RunnerProvider `json:"provider"`
	RunnerID string         `json:"runnerId"`
	// The runner's specification
	Spec RunnerSpec `json:"spec"`
	// The runner's status
	Status RunnerStatus `json:"status"`
	// Time when the Runner was last udpated.
	UpdatedAt time.Time  `json:"updatedAt" format:"date-time"`
	JSON      runnerJSON `json:"-"`
}

func (*Runner) UnmarshalJSON

func (r *Runner) UnmarshalJSON(data []byte) (err error)

type RunnerCapability

type RunnerCapability string
const (
	RunnerCapabilityUnspecified               RunnerCapability = "RUNNER_CAPABILITY_UNSPECIFIED"
	RunnerCapabilityFetchLocalScmIntegrations RunnerCapability = "RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS"
	RunnerCapabilitySecretContainerRegistry   RunnerCapability = "RUNNER_CAPABILITY_SECRET_CONTAINER_REGISTRY"
)

func (RunnerCapability) IsKnown

func (r RunnerCapability) IsKnown() bool

type RunnerCheckAuthenticationForHostParams

type RunnerCheckAuthenticationForHostParams struct {
	Host     param.Field[string] `json:"host"`
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerCheckAuthenticationForHostParams) MarshalJSON

func (r RunnerCheckAuthenticationForHostParams) MarshalJSON() (data []byte, err error)

type RunnerCheckAuthenticationForHostResponse

type RunnerCheckAuthenticationForHostResponse struct {
	Authenticated bool `json:"authenticated"`
	// Deprecated: deprecated
	AuthenticationURL string `json:"authenticationUrl"`
	// Deprecated: deprecated
	PatSupported bool `json:"patSupported"`
	// scm_id is the unique identifier of the SCM provider
	ScmID string `json:"scmId"`
	// scm_name is the human-readable name of the SCM provider (e.g., "GitHub",
	// "GitLab")
	ScmName string `json:"scmName"`
	// supports_oauth2 indicates that the host supports OAuth2 authentication
	SupportsOauth2 RunnerCheckAuthenticationForHostResponseSupportsOauth2 `json:"supportsOauth2"`
	// supports_pat indicates that the host supports Personal Access Token
	// authentication
	SupportsPat RunnerCheckAuthenticationForHostResponseSupportsPat `json:"supportsPat"`
	JSON        runnerCheckAuthenticationForHostResponseJSON        `json:"-"`
}

func (*RunnerCheckAuthenticationForHostResponse) UnmarshalJSON

func (r *RunnerCheckAuthenticationForHostResponse) UnmarshalJSON(data []byte) (err error)

type RunnerCheckAuthenticationForHostResponseSupportsOauth2 added in v0.2.0

type RunnerCheckAuthenticationForHostResponseSupportsOauth2 struct {
	// auth_url is the URL where users can authenticate
	AuthURL string `json:"authUrl"`
	// docs_url is the URL to the documentation explaining this authentication method
	DocsURL string                                                     `json:"docsUrl"`
	JSON    runnerCheckAuthenticationForHostResponseSupportsOauth2JSON `json:"-"`
}

supports_oauth2 indicates that the host supports OAuth2 authentication

func (*RunnerCheckAuthenticationForHostResponseSupportsOauth2) UnmarshalJSON added in v0.2.0

func (r *RunnerCheckAuthenticationForHostResponseSupportsOauth2) UnmarshalJSON(data []byte) (err error)

type RunnerCheckAuthenticationForHostResponseSupportsPat added in v0.2.0

type RunnerCheckAuthenticationForHostResponseSupportsPat struct {
	// create_url is the URL where users can create a new Personal Access Token
	CreateURL string `json:"createUrl"`
	// docs_url is the URL to the documentation explaining PAT usage for this host
	DocsURL string `json:"docsUrl"`
	// example is an example of a Personal Access Token
	Example string `json:"example"`
	// required_scopes is the list of permissions required for the Personal Access
	// Token
	RequiredScopes []string                                                `json:"requiredScopes"`
	JSON           runnerCheckAuthenticationForHostResponseSupportsPatJSON `json:"-"`
}

supports_pat indicates that the host supports Personal Access Token authentication

func (*RunnerCheckAuthenticationForHostResponseSupportsPat) UnmarshalJSON added in v0.2.0

func (r *RunnerCheckAuthenticationForHostResponseSupportsPat) UnmarshalJSON(data []byte) (err error)

type RunnerConfiguration

type RunnerConfiguration struct {
	// auto_update indicates whether the runner should automatically update itself.
	AutoUpdate bool `json:"autoUpdate"`
	// Region to deploy the runner in, if applicable. This is mainly used for remote
	// runners, and is only a hint. The runner may be deployed in a different region.
	// See the runner's status for the actual region.
	Region string `json:"region"`
	// The release channel the runner is on
	ReleaseChannel RunnerReleaseChannel    `json:"releaseChannel"`
	JSON           runnerConfigurationJSON `json:"-"`
}

func (*RunnerConfiguration) UnmarshalJSON

func (r *RunnerConfiguration) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationEnvironmentClassGetParams

type RunnerConfigurationEnvironmentClassGetParams struct {
	EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"`
}

func (RunnerConfigurationEnvironmentClassGetParams) MarshalJSON

func (r RunnerConfigurationEnvironmentClassGetParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationEnvironmentClassGetResponse

type RunnerConfigurationEnvironmentClassGetResponse struct {
	EnvironmentClass shared.EnvironmentClass                            `json:"environmentClass"`
	JSON             runnerConfigurationEnvironmentClassGetResponseJSON `json:"-"`
}

func (*RunnerConfigurationEnvironmentClassGetResponse) UnmarshalJSON

func (r *RunnerConfigurationEnvironmentClassGetResponse) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationEnvironmentClassListParams

type RunnerConfigurationEnvironmentClassListParams struct {
	Token    param.Field[string]                                              `query:"token"`
	PageSize param.Field[int64]                                               `query:"pageSize"`
	Filter   param.Field[RunnerConfigurationEnvironmentClassListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing environment classes
	Pagination param.Field[RunnerConfigurationEnvironmentClassListParamsPagination] `json:"pagination"`
}

func (RunnerConfigurationEnvironmentClassListParams) MarshalJSON

func (r RunnerConfigurationEnvironmentClassListParams) MarshalJSON() (data []byte, err error)

func (RunnerConfigurationEnvironmentClassListParams) URLQuery

URLQuery serializes RunnerConfigurationEnvironmentClassListParams's query parameters as `url.Values`.

type RunnerConfigurationEnvironmentClassListParamsFilter

type RunnerConfigurationEnvironmentClassListParamsFilter struct {
	// can_create_environments filters the response to only environment classes that
	// can be used to create new environments by the caller. Unlike enabled, which
	// indicates general availability, this ensures the caller only sees environment
	// classes they are allowed to use.
	CanCreateEnvironments param.Field[bool] `json:"canCreateEnvironments"`
	// enabled filters the response to only enabled or disabled environment classes. If
	// not set, all environment classes are returned.
	Enabled param.Field[bool] `json:"enabled"`
	// runner_ids filters the response to only EnvironmentClasses of these Runner IDs
	RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"`
	// runner_kind filters the response to only environment classes from runners of
	// these kinds.
	RunnerKinds param.Field[[]RunnerKind] `json:"runnerKinds"`
	// runner_providers filters the response to only environment classes from runners
	// of these providers.
	RunnerProviders param.Field[[]RunnerProvider] `json:"runnerProviders"`
}

func (RunnerConfigurationEnvironmentClassListParamsFilter) MarshalJSON

func (r RunnerConfigurationEnvironmentClassListParamsFilter) MarshalJSON() (data []byte, err error)

type RunnerConfigurationEnvironmentClassListParamsPagination

type RunnerConfigurationEnvironmentClassListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing environment classes

func (RunnerConfigurationEnvironmentClassListParamsPagination) MarshalJSON

type RunnerConfigurationEnvironmentClassNewParams

type RunnerConfigurationEnvironmentClassNewParams struct {
	Configuration param.Field[[]shared.FieldValueParam] `json:"configuration"`
	Description   param.Field[string]                   `json:"description"`
	DisplayName   param.Field[string]                   `json:"displayName"`
	RunnerID      param.Field[string]                   `json:"runnerId" format:"uuid"`
}

func (RunnerConfigurationEnvironmentClassNewParams) MarshalJSON

func (r RunnerConfigurationEnvironmentClassNewParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationEnvironmentClassNewResponse

type RunnerConfigurationEnvironmentClassNewResponse struct {
	ID   string                                             `json:"id"`
	JSON runnerConfigurationEnvironmentClassNewResponseJSON `json:"-"`
}

func (*RunnerConfigurationEnvironmentClassNewResponse) UnmarshalJSON

func (r *RunnerConfigurationEnvironmentClassNewResponse) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationEnvironmentClassService

type RunnerConfigurationEnvironmentClassService struct {
	Options []option.RequestOption
}

RunnerConfigurationEnvironmentClassService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationEnvironmentClassService method instead.

func NewRunnerConfigurationEnvironmentClassService

func NewRunnerConfigurationEnvironmentClassService(opts ...option.RequestOption) (r *RunnerConfigurationEnvironmentClassService)

NewRunnerConfigurationEnvironmentClassService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RunnerConfigurationEnvironmentClassService) Get

Gets details about a specific environment class.

Use this method to:

- View class configuration - Check resource settings - Verify availability

### Examples

- Get class details:

Retrieves information about a specific class.

```yaml
environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerConfigurationEnvironmentClassService) List

Lists environment classes with optional filtering.

Use this method to:

- View available classes - Filter by capability - Check enabled status

### Examples

- List all classes:

Shows all environment classes.

```yaml
pagination:
  pageSize: 20
```

- Filter enabled classes:

Lists only enabled environment classes.

```yaml
filter:
  enabled: true
pagination:
  pageSize: 20
```

buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE

func (*RunnerConfigurationEnvironmentClassService) ListAutoPaging

Lists environment classes with optional filtering.

Use this method to:

- View available classes - Filter by capability - Check enabled status

### Examples

- List all classes:

Shows all environment classes.

```yaml
pagination:
  pageSize: 20
```

- Filter enabled classes:

Lists only enabled environment classes.

```yaml
filter:
  enabled: true
pagination:
  pageSize: 20
```

buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE

func (*RunnerConfigurationEnvironmentClassService) New

Creates a new environment class for a runner.

Use this method to:

- Define compute resources - Configure environment settings - Set up runtime options

### Examples

- Create environment class:

Creates a new environment configuration.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
displayName: "Large Instance"
description: "8 CPU, 16GB RAM"
configuration:
  - key: "cpu"
    value: "8"
  - key: "memory"
    value: "16384"
```

func (*RunnerConfigurationEnvironmentClassService) Update

Updates an environment class.

Use this method to:

- Modify class settings - Update resource limits - Change availability

### Examples

- Update class:

Changes class configuration.

```yaml
environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
displayName: "Updated Large Instance"
description: "16 CPU, 32GB RAM"
enabled: true
```

type RunnerConfigurationEnvironmentClassUpdateParams

type RunnerConfigurationEnvironmentClassUpdateParams struct {
	Description        param.Field[string] `json:"description"`
	DisplayName        param.Field[string] `json:"displayName"`
	Enabled            param.Field[bool]   `json:"enabled"`
	EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"`
}

func (RunnerConfigurationEnvironmentClassUpdateParams) MarshalJSON

func (r RunnerConfigurationEnvironmentClassUpdateParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationEnvironmentClassUpdateResponse

type RunnerConfigurationEnvironmentClassUpdateResponse = interface{}

type RunnerConfigurationHostAuthenticationTokenDeleteParams

type RunnerConfigurationHostAuthenticationTokenDeleteParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (RunnerConfigurationHostAuthenticationTokenDeleteParams) MarshalJSON

type RunnerConfigurationHostAuthenticationTokenDeleteResponse

type RunnerConfigurationHostAuthenticationTokenDeleteResponse = interface{}

type RunnerConfigurationHostAuthenticationTokenGetParams

type RunnerConfigurationHostAuthenticationTokenGetParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (RunnerConfigurationHostAuthenticationTokenGetParams) MarshalJSON

func (r RunnerConfigurationHostAuthenticationTokenGetParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationHostAuthenticationTokenGetResponse

type RunnerConfigurationHostAuthenticationTokenGetResponse struct {
	Token HostAuthenticationToken                                   `json:"token,required"`
	JSON  runnerConfigurationHostAuthenticationTokenGetResponseJSON `json:"-"`
}

func (*RunnerConfigurationHostAuthenticationTokenGetResponse) UnmarshalJSON

func (r *RunnerConfigurationHostAuthenticationTokenGetResponse) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationHostAuthenticationTokenListParams

type RunnerConfigurationHostAuthenticationTokenListParams struct {
	Token      param.Field[string]                                                         `query:"token"`
	PageSize   param.Field[int64]                                                          `query:"pageSize"`
	Filter     param.Field[RunnerConfigurationHostAuthenticationTokenListParamsFilter]     `json:"filter"`
	Pagination param.Field[RunnerConfigurationHostAuthenticationTokenListParamsPagination] `json:"pagination"`
}

func (RunnerConfigurationHostAuthenticationTokenListParams) MarshalJSON

func (r RunnerConfigurationHostAuthenticationTokenListParams) MarshalJSON() (data []byte, err error)

func (RunnerConfigurationHostAuthenticationTokenListParams) URLQuery

URLQuery serializes RunnerConfigurationHostAuthenticationTokenListParams's query parameters as `url.Values`.

type RunnerConfigurationHostAuthenticationTokenListParamsFilter

type RunnerConfigurationHostAuthenticationTokenListParamsFilter struct {
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
	UserID   param.Field[string] `json:"userId" format:"uuid"`
}

func (RunnerConfigurationHostAuthenticationTokenListParamsFilter) MarshalJSON

type RunnerConfigurationHostAuthenticationTokenListParamsPagination

type RunnerConfigurationHostAuthenticationTokenListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

func (RunnerConfigurationHostAuthenticationTokenListParamsPagination) MarshalJSON

type RunnerConfigurationHostAuthenticationTokenNewParams

type RunnerConfigurationHostAuthenticationTokenNewParams struct {
	Token param.Field[string] `json:"token"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	ExpiresAt    param.Field[time.Time]                     `json:"expiresAt" format:"date-time"`
	Host         param.Field[string]                        `json:"host"`
	RefreshToken param.Field[string]                        `json:"refreshToken"`
	RunnerID     param.Field[string]                        `json:"runnerId" format:"uuid"`
	Source       param.Field[HostAuthenticationTokenSource] `json:"source"`
	UserID       param.Field[string]                        `json:"userId" format:"uuid"`
}

func (RunnerConfigurationHostAuthenticationTokenNewParams) MarshalJSON

func (r RunnerConfigurationHostAuthenticationTokenNewParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationHostAuthenticationTokenNewResponse

type RunnerConfigurationHostAuthenticationTokenNewResponse struct {
	Token HostAuthenticationToken                                   `json:"token,required"`
	JSON  runnerConfigurationHostAuthenticationTokenNewResponseJSON `json:"-"`
}

func (*RunnerConfigurationHostAuthenticationTokenNewResponse) UnmarshalJSON

func (r *RunnerConfigurationHostAuthenticationTokenNewResponse) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationHostAuthenticationTokenService

type RunnerConfigurationHostAuthenticationTokenService struct {
	Options []option.RequestOption
}

RunnerConfigurationHostAuthenticationTokenService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationHostAuthenticationTokenService method instead.

func NewRunnerConfigurationHostAuthenticationTokenService

func NewRunnerConfigurationHostAuthenticationTokenService(opts ...option.RequestOption) (r *RunnerConfigurationHostAuthenticationTokenService)

NewRunnerConfigurationHostAuthenticationTokenService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RunnerConfigurationHostAuthenticationTokenService) Delete

Deletes a host authentication token.

Use this method to:

- Remove unused tokens - Revoke access - Clean up expired tokens

### Examples

- Delete token:

Permanently removes a token.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerConfigurationHostAuthenticationTokenService) Get

Gets details about a specific host authentication token.

Use this method to:

- View token information - Check token expiration - Verify token validity

### Examples

- Get token details:

Retrieves information about a specific token.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerConfigurationHostAuthenticationTokenService) List

Lists host authentication tokens with optional filtering.

Use this method to:

- View all tokens - Filter by runner or user - Monitor token status

### Examples

- List all tokens:

Shows all tokens with pagination.

```yaml
pagination:
  pageSize: 20
```

- Filter by runner:

Lists tokens for a specific runner.

```yaml
filter:
  runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
pagination:
  pageSize: 20
```

func (*RunnerConfigurationHostAuthenticationTokenService) ListAutoPaging

Lists host authentication tokens with optional filtering.

Use this method to:

- View all tokens - Filter by runner or user - Monitor token status

### Examples

- List all tokens:

Shows all tokens with pagination.

```yaml
pagination:
  pageSize: 20
```

- Filter by runner:

Lists tokens for a specific runner.

```yaml
filter:
  runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
pagination:
  pageSize: 20
```

func (*RunnerConfigurationHostAuthenticationTokenService) New

Creates a new authentication token for accessing remote hosts.

Use this method to:

- Set up SCM authentication - Configure OAuth credentials - Manage PAT tokens

### Examples

- Create OAuth token:

Creates a new OAuth-based authentication token.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
userId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
host: "github.com"
token: "gho_xxxxxxxxxxxx"
source: HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH
expiresAt: "2024-12-31T23:59:59Z"
refreshToken: "ghr_xxxxxxxxxxxx"
```

func (*RunnerConfigurationHostAuthenticationTokenService) Update

Updates an existing host authentication token.

Use this method to:

- Refresh token values - Update expiration - Modify token settings

### Examples

- Update token:

Updates token value and expiration.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
token: "gho_xxxxxxxxxxxx"
expiresAt: "2024-12-31T23:59:59Z"
refreshToken: "ghr_xxxxxxxxxxxx"
```

type RunnerConfigurationHostAuthenticationTokenUpdateParams

type RunnerConfigurationHostAuthenticationTokenUpdateParams struct {
	ID    param.Field[string] `json:"id" format:"uuid"`
	Token param.Field[string] `json:"token"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	ExpiresAt    param.Field[time.Time] `json:"expiresAt" format:"date-time"`
	RefreshToken param.Field[string]    `json:"refreshToken"`
}

func (RunnerConfigurationHostAuthenticationTokenUpdateParams) MarshalJSON

type RunnerConfigurationHostAuthenticationTokenUpdateResponse

type RunnerConfigurationHostAuthenticationTokenUpdateResponse = interface{}

type RunnerConfigurationParam

type RunnerConfigurationParam struct {
	// auto_update indicates whether the runner should automatically update itself.
	AutoUpdate param.Field[bool] `json:"autoUpdate"`
	// Region to deploy the runner in, if applicable. This is mainly used for remote
	// runners, and is only a hint. The runner may be deployed in a different region.
	// See the runner's status for the actual region.
	Region param.Field[string] `json:"region"`
	// The release channel the runner is on
	ReleaseChannel param.Field[RunnerReleaseChannel] `json:"releaseChannel"`
}

func (RunnerConfigurationParam) MarshalJSON

func (r RunnerConfigurationParam) MarshalJSON() (data []byte, err error)

type RunnerConfigurationSchema

type RunnerConfigurationSchema struct {
	EnvironmentClasses []RunnerConfigurationSchemaEnvironmentClass `json:"environmentClasses"`
	RunnerConfig       []RunnerConfigurationSchemaRunnerConfig     `json:"runnerConfig"`
	Scm                []RunnerConfigurationSchemaScm              `json:"scm"`
	// The schema version
	Version string                        `json:"version"`
	JSON    runnerConfigurationSchemaJSON `json:"-"`
}

func (*RunnerConfigurationSchema) UnmarshalJSON

func (r *RunnerConfigurationSchema) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaEnvironmentClass

type RunnerConfigurationSchemaEnvironmentClass struct {
	ID          string                                             `json:"id"`
	Bool        RunnerConfigurationSchemaEnvironmentClassesBool    `json:"bool"`
	Description string                                             `json:"description"`
	Display     RunnerConfigurationSchemaEnvironmentClassesDisplay `json:"display"`
	Enum        RunnerConfigurationSchemaEnvironmentClassesEnum    `json:"enum"`
	Int         RunnerConfigurationSchemaEnvironmentClassesInt     `json:"int"`
	Name        string                                             `json:"name"`
	Required    bool                                               `json:"required"`
	Secret      bool                                               `json:"secret"`
	String      RunnerConfigurationSchemaEnvironmentClassesString  `json:"string"`
	JSON        runnerConfigurationSchemaEnvironmentClassJSON      `json:"-"`
}

func (*RunnerConfigurationSchemaEnvironmentClass) UnmarshalJSON

func (r *RunnerConfigurationSchemaEnvironmentClass) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaEnvironmentClassesBool

type RunnerConfigurationSchemaEnvironmentClassesBool struct {
	Default bool                                                `json:"default"`
	JSON    runnerConfigurationSchemaEnvironmentClassesBoolJSON `json:"-"`
}

func (*RunnerConfigurationSchemaEnvironmentClassesBool) UnmarshalJSON

func (r *RunnerConfigurationSchemaEnvironmentClassesBool) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaEnvironmentClassesDisplay

type RunnerConfigurationSchemaEnvironmentClassesDisplay struct {
	Default string                                                 `json:"default"`
	JSON    runnerConfigurationSchemaEnvironmentClassesDisplayJSON `json:"-"`
}

func (*RunnerConfigurationSchemaEnvironmentClassesDisplay) UnmarshalJSON

func (r *RunnerConfigurationSchemaEnvironmentClassesDisplay) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaEnvironmentClassesEnum

type RunnerConfigurationSchemaEnvironmentClassesEnum struct {
	Default string                                              `json:"default"`
	Values  []string                                            `json:"values"`
	JSON    runnerConfigurationSchemaEnvironmentClassesEnumJSON `json:"-"`
}

func (*RunnerConfigurationSchemaEnvironmentClassesEnum) UnmarshalJSON

func (r *RunnerConfigurationSchemaEnvironmentClassesEnum) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaEnvironmentClassesInt

type RunnerConfigurationSchemaEnvironmentClassesInt struct {
	Default int64                                              `json:"default"`
	Max     int64                                              `json:"max"`
	Min     int64                                              `json:"min"`
	JSON    runnerConfigurationSchemaEnvironmentClassesIntJSON `json:"-"`
}

func (*RunnerConfigurationSchemaEnvironmentClassesInt) UnmarshalJSON

func (r *RunnerConfigurationSchemaEnvironmentClassesInt) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaEnvironmentClassesString

type RunnerConfigurationSchemaEnvironmentClassesString struct {
	Default string                                                `json:"default"`
	Pattern string                                                `json:"pattern"`
	JSON    runnerConfigurationSchemaEnvironmentClassesStringJSON `json:"-"`
}

func (*RunnerConfigurationSchemaEnvironmentClassesString) UnmarshalJSON

func (r *RunnerConfigurationSchemaEnvironmentClassesString) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaGetParams

type RunnerConfigurationSchemaGetParams struct {
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerConfigurationSchemaGetParams) MarshalJSON

func (r RunnerConfigurationSchemaGetParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationSchemaGetResponse

type RunnerConfigurationSchemaGetResponse struct {
	Schema RunnerConfigurationSchema                `json:"schema"`
	JSON   runnerConfigurationSchemaGetResponseJSON `json:"-"`
}

func (*RunnerConfigurationSchemaGetResponse) UnmarshalJSON

func (r *RunnerConfigurationSchemaGetResponse) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaRunnerConfig

type RunnerConfigurationSchemaRunnerConfig struct {
	ID          string                                       `json:"id"`
	Bool        RunnerConfigurationSchemaRunnerConfigBool    `json:"bool"`
	Description string                                       `json:"description"`
	Display     RunnerConfigurationSchemaRunnerConfigDisplay `json:"display"`
	Enum        RunnerConfigurationSchemaRunnerConfigEnum    `json:"enum"`
	Int         RunnerConfigurationSchemaRunnerConfigInt     `json:"int"`
	Name        string                                       `json:"name"`
	Required    bool                                         `json:"required"`
	Secret      bool                                         `json:"secret"`
	String      RunnerConfigurationSchemaRunnerConfigString  `json:"string"`
	JSON        runnerConfigurationSchemaRunnerConfigJSON    `json:"-"`
}

func (*RunnerConfigurationSchemaRunnerConfig) UnmarshalJSON

func (r *RunnerConfigurationSchemaRunnerConfig) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaRunnerConfigBool

type RunnerConfigurationSchemaRunnerConfigBool struct {
	Default bool                                          `json:"default"`
	JSON    runnerConfigurationSchemaRunnerConfigBoolJSON `json:"-"`
}

func (*RunnerConfigurationSchemaRunnerConfigBool) UnmarshalJSON

func (r *RunnerConfigurationSchemaRunnerConfigBool) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaRunnerConfigDisplay

type RunnerConfigurationSchemaRunnerConfigDisplay struct {
	Default string                                           `json:"default"`
	JSON    runnerConfigurationSchemaRunnerConfigDisplayJSON `json:"-"`
}

func (*RunnerConfigurationSchemaRunnerConfigDisplay) UnmarshalJSON

func (r *RunnerConfigurationSchemaRunnerConfigDisplay) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaRunnerConfigEnum

type RunnerConfigurationSchemaRunnerConfigEnum struct {
	Default string                                        `json:"default"`
	Values  []string                                      `json:"values"`
	JSON    runnerConfigurationSchemaRunnerConfigEnumJSON `json:"-"`
}

func (*RunnerConfigurationSchemaRunnerConfigEnum) UnmarshalJSON

func (r *RunnerConfigurationSchemaRunnerConfigEnum) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaRunnerConfigInt

type RunnerConfigurationSchemaRunnerConfigInt struct {
	Default int64                                        `json:"default"`
	Max     int64                                        `json:"max"`
	Min     int64                                        `json:"min"`
	JSON    runnerConfigurationSchemaRunnerConfigIntJSON `json:"-"`
}

func (*RunnerConfigurationSchemaRunnerConfigInt) UnmarshalJSON

func (r *RunnerConfigurationSchemaRunnerConfigInt) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaRunnerConfigString

type RunnerConfigurationSchemaRunnerConfigString struct {
	Default string                                          `json:"default"`
	Pattern string                                          `json:"pattern"`
	JSON    runnerConfigurationSchemaRunnerConfigStringJSON `json:"-"`
}

func (*RunnerConfigurationSchemaRunnerConfigString) UnmarshalJSON

func (r *RunnerConfigurationSchemaRunnerConfigString) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaScm

type RunnerConfigurationSchemaScm struct {
	DefaultHosts []string                          `json:"defaultHosts"`
	Name         string                            `json:"name"`
	OAuth        RunnerConfigurationSchemaScmOAuth `json:"oauth"`
	Pat          RunnerConfigurationSchemaScmPat   `json:"pat"`
	ScmID        string                            `json:"scmId"`
	JSON         runnerConfigurationSchemaScmJSON  `json:"-"`
}

func (*RunnerConfigurationSchemaScm) UnmarshalJSON

func (r *RunnerConfigurationSchemaScm) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaScmOAuth

type RunnerConfigurationSchemaScmOAuth struct {
	// callback_url is the URL the OAuth app will redirect to after the user has
	// authenticated.
	CallbackURL string                                `json:"callbackUrl"`
	JSON        runnerConfigurationSchemaScmOAuthJSON `json:"-"`
}

func (*RunnerConfigurationSchemaScmOAuth) UnmarshalJSON

func (r *RunnerConfigurationSchemaScmOAuth) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaScmPat

type RunnerConfigurationSchemaScmPat struct {
	// description is a human-readable description of the PAT.
	Description string `json:"description"`
	// docs_link is a link to the documentation on how to create a PAT for this SCM
	// system.
	DocsLink string                              `json:"docsLink"`
	JSON     runnerConfigurationSchemaScmPatJSON `json:"-"`
}

func (*RunnerConfigurationSchemaScmPat) UnmarshalJSON

func (r *RunnerConfigurationSchemaScmPat) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationSchemaService

type RunnerConfigurationSchemaService struct {
	Options []option.RequestOption
}

RunnerConfigurationSchemaService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationSchemaService method instead.

func NewRunnerConfigurationSchemaService

func NewRunnerConfigurationSchemaService(opts ...option.RequestOption) (r *RunnerConfigurationSchemaService)

NewRunnerConfigurationSchemaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RunnerConfigurationSchemaService) Get

Gets the latest runner configuration schema.

Use this method to:

- View available settings - Check configuration options - Validate configurations

### Examples

- Get schema:

Retrieves configuration schema for a runner.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

type RunnerConfigurationScmIntegrationDeleteParams

type RunnerConfigurationScmIntegrationDeleteParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (RunnerConfigurationScmIntegrationDeleteParams) MarshalJSON

func (r RunnerConfigurationScmIntegrationDeleteParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationScmIntegrationDeleteResponse

type RunnerConfigurationScmIntegrationDeleteResponse = interface{}

type RunnerConfigurationScmIntegrationGetParams

type RunnerConfigurationScmIntegrationGetParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
}

func (RunnerConfigurationScmIntegrationGetParams) MarshalJSON

func (r RunnerConfigurationScmIntegrationGetParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationScmIntegrationGetResponse

type RunnerConfigurationScmIntegrationGetResponse struct {
	Integration ScmIntegration                                   `json:"integration"`
	JSON        runnerConfigurationScmIntegrationGetResponseJSON `json:"-"`
}

func (*RunnerConfigurationScmIntegrationGetResponse) UnmarshalJSON

func (r *RunnerConfigurationScmIntegrationGetResponse) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationScmIntegrationListParams

type RunnerConfigurationScmIntegrationListParams struct {
	Token    param.Field[string]                                            `query:"token"`
	PageSize param.Field[int64]                                             `query:"pageSize"`
	Filter   param.Field[RunnerConfigurationScmIntegrationListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing scm integrations
	Pagination param.Field[RunnerConfigurationScmIntegrationListParamsPagination] `json:"pagination"`
}

func (RunnerConfigurationScmIntegrationListParams) MarshalJSON

func (r RunnerConfigurationScmIntegrationListParams) MarshalJSON() (data []byte, err error)

func (RunnerConfigurationScmIntegrationListParams) URLQuery

URLQuery serializes RunnerConfigurationScmIntegrationListParams's query parameters as `url.Values`.

type RunnerConfigurationScmIntegrationListParamsFilter

type RunnerConfigurationScmIntegrationListParamsFilter struct {
	// runner_ids filters the response to only SCM integrations of these Runner IDs
	RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"`
}

func (RunnerConfigurationScmIntegrationListParamsFilter) MarshalJSON

func (r RunnerConfigurationScmIntegrationListParamsFilter) MarshalJSON() (data []byte, err error)

type RunnerConfigurationScmIntegrationListParamsPagination

type RunnerConfigurationScmIntegrationListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing scm integrations

func (RunnerConfigurationScmIntegrationListParamsPagination) MarshalJSON

type RunnerConfigurationScmIntegrationNewParams

type RunnerConfigurationScmIntegrationNewParams struct {
	Host param.Field[string] `json:"host"`
	// oauth_client_id is the OAuth app's client ID, if OAuth is configured. If
	// configured, oauth_plaintext_client_secret must also be set.
	OAuthClientID param.Field[string] `json:"oauthClientId"`
	// oauth_plaintext_client_secret is the OAuth app's client secret in clear text.
	// This will first be encrypted with the runner's public key before being stored.
	OAuthPlaintextClientSecret param.Field[string] `json:"oauthPlaintextClientSecret"`
	Pat                        param.Field[bool]   `json:"pat"`
	RunnerID                   param.Field[string] `json:"runnerId" format:"uuid"`
	// scm_id references the scm_id in the runner's configuration schema that this
	// integration is for
	ScmID param.Field[string] `json:"scmId"`
}

func (RunnerConfigurationScmIntegrationNewParams) MarshalJSON

func (r RunnerConfigurationScmIntegrationNewParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationScmIntegrationNewResponse

type RunnerConfigurationScmIntegrationNewResponse struct {
	// id is a uniquely generated identifier for the SCM integration
	ID   string                                           `json:"id" format:"uuid"`
	JSON runnerConfigurationScmIntegrationNewResponseJSON `json:"-"`
}

func (*RunnerConfigurationScmIntegrationNewResponse) UnmarshalJSON

func (r *RunnerConfigurationScmIntegrationNewResponse) UnmarshalJSON(data []byte) (err error)

type RunnerConfigurationScmIntegrationService

type RunnerConfigurationScmIntegrationService struct {
	Options []option.RequestOption
}

RunnerConfigurationScmIntegrationService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationScmIntegrationService method instead.

func NewRunnerConfigurationScmIntegrationService

func NewRunnerConfigurationScmIntegrationService(opts ...option.RequestOption) (r *RunnerConfigurationScmIntegrationService)

NewRunnerConfigurationScmIntegrationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RunnerConfigurationScmIntegrationService) Delete

Deletes an SCM integration.

Use this method to:

- Remove unused integrations - Clean up configurations - Revoke SCM access

### Examples

- Delete integration:

Removes an SCM integration.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerConfigurationScmIntegrationService) Get

Gets details about a specific SCM integration.

Use this method to:

- View integration settings - Check integration status - Verify configuration

### Examples

- Get integration details:

Retrieves information about a specific integration.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerConfigurationScmIntegrationService) List

Lists SCM integrations for a runner.

Use this method to:

- View all integrations - Monitor integration status - Check available SCMs

### Examples

- List integrations:

Shows all SCM integrations.

```yaml
filter:
  runnerIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
pagination:
  pageSize: 20
```

func (*RunnerConfigurationScmIntegrationService) ListAutoPaging

Lists SCM integrations for a runner.

Use this method to:

- View all integrations - Monitor integration status - Check available SCMs

### Examples

- List integrations:

Shows all SCM integrations.

```yaml
filter:
  runnerIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
pagination:
  pageSize: 20
```

func (*RunnerConfigurationScmIntegrationService) New

Creates a new SCM integration for a runner.

Use this method to:

- Configure source control access - Set up repository integrations - Enable code synchronization

### Examples

- Create GitHub integration:

Sets up GitHub SCM integration.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
scmId: "github"
host: "github.com"
oauthClientId: "client_id"
oauthPlaintextClientSecret: "client_secret"
```

func (*RunnerConfigurationScmIntegrationService) Update

Updates an existing SCM integration.

Use this method to:

- Modify integration settings - Update credentials - Change configuration

### Examples

- Update integration:

Updates OAuth credentials.

```yaml
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
oauthClientId: "new_client_id"
oauthPlaintextClientSecret: "new_client_secret"
```

type RunnerConfigurationScmIntegrationUpdateParams

type RunnerConfigurationScmIntegrationUpdateParams struct {
	ID param.Field[string] `json:"id" format:"uuid"`
	// oauth_client_id can be set to update the OAuth app's client ID. If an empty
	// string is set, the OAuth configuration will be removed (regardless of whether a
	// client secret is set), and any existing Host Authentication Tokens for the SCM
	// integration's runner and host that were created using the OAuth app will be
	// deleted. This might lead to users being unable to access their repositories
	// until they re-authenticate.
	OAuthClientID param.Field[string] `json:"oauthClientId"`
	// oauth_plaintext_client_secret can be set to update the OAuth app's client
	// secret. The cleartext secret will be encrypted with the runner's public key
	// before being stored.
	OAuthPlaintextClientSecret param.Field[string] `json:"oauthPlaintextClientSecret"`
	// pat can be set to enable or disable Personal Access Tokens support. When
	// disabling PATs, any existing Host Authentication Tokens for the SCM
	// integration's runner and host that were created using a PAT will be deleted.
	// This might lead to users being unable to access their repositories until they
	// re-authenticate.
	Pat param.Field[bool] `json:"pat"`
}

func (RunnerConfigurationScmIntegrationUpdateParams) MarshalJSON

func (r RunnerConfigurationScmIntegrationUpdateParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationScmIntegrationUpdateResponse

type RunnerConfigurationScmIntegrationUpdateResponse = interface{}

type RunnerConfigurationService

type RunnerConfigurationService struct {
	Options                  []option.RequestOption
	EnvironmentClasses       *RunnerConfigurationEnvironmentClassService
	HostAuthenticationTokens *RunnerConfigurationHostAuthenticationTokenService
	Schema                   *RunnerConfigurationSchemaService
	ScmIntegrations          *RunnerConfigurationScmIntegrationService
}

RunnerConfigurationService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationService method instead.

func NewRunnerConfigurationService

func NewRunnerConfigurationService(opts ...option.RequestOption) (r *RunnerConfigurationService)

NewRunnerConfigurationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RunnerConfigurationService) Validate

Validates a runner configuration.

Use this method to:

- Check configuration validity - Verify integration settings - Validate environment classes

### Examples

- Validate SCM integration:

Checks if an SCM integration is valid.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
scmIntegration:
  id: "integration-id"
  scmId: "github"
  host: "github.com"
  oauthClientId: "client_id"
  oauthPlaintextClientSecret: "client_secret"
```

type RunnerConfigurationValidateParams

type RunnerConfigurationValidateParams struct {
	EnvironmentClass param.Field[shared.EnvironmentClassParam]                    `json:"environmentClass"`
	RunnerID         param.Field[string]                                          `json:"runnerId" format:"uuid"`
	ScmIntegration   param.Field[RunnerConfigurationValidateParamsScmIntegration] `json:"scmIntegration"`
}

func (RunnerConfigurationValidateParams) MarshalJSON

func (r RunnerConfigurationValidateParams) MarshalJSON() (data []byte, err error)

type RunnerConfigurationValidateParamsScmIntegration

type RunnerConfigurationValidateParamsScmIntegration struct {
	// id is the unique identifier of the SCM integration
	ID   param.Field[string] `json:"id"`
	Host param.Field[string] `json:"host"`
	// oauth_client_id is the OAuth app's client ID, if OAuth is configured. If
	// configured, oauth_client_secret must also be set.
	OAuthClientID param.Field[string] `json:"oauthClientId"`
	// oauth_encrypted_client_secret is the OAuth app's client secret encrypted with
	// the runner's public key, if OAuth is configured. This can be used to e.g.
	// validate an already encrypted client secret of an existing SCM integration.
	OAuthEncryptedClientSecret param.Field[string] `json:"oauthEncryptedClientSecret" format:"byte"`
	// oauth_plaintext_client_secret is the OAuth app's client secret in clear text, if
	// OAuth is configured. This can be set to validate any new client secret before it
	// is encrypted and stored. This value will not be stored and get encrypted with
	// the runner's public key before passing it to the runner.
	OAuthPlaintextClientSecret param.Field[string] `json:"oauthPlaintextClientSecret"`
	Pat                        param.Field[bool]   `json:"pat"`
	// scm_id references the scm_id in the runner's configuration schema that this
	// integration is for
	ScmID param.Field[string] `json:"scmId"`
}

func (RunnerConfigurationValidateParamsScmIntegration) MarshalJSON

func (r RunnerConfigurationValidateParamsScmIntegration) MarshalJSON() (data []byte, err error)

type RunnerConfigurationValidateResponse

type RunnerConfigurationValidateResponse struct {
	EnvironmentClass EnvironmentClassValidationResult        `json:"environmentClass"`
	ScmIntegration   ScmIntegrationValidationResult          `json:"scmIntegration"`
	JSON             runnerConfigurationValidateResponseJSON `json:"-"`
}

func (*RunnerConfigurationValidateResponse) UnmarshalJSON

func (r *RunnerConfigurationValidateResponse) UnmarshalJSON(data []byte) (err error)

type RunnerDeleteParams

type RunnerDeleteParams struct {
	// force indicates whether the runner should be deleted forcefully. When force
	// deleting a Runner, all Environments on the runner are also force deleted and
	// regular Runner lifecycle is not respected. Force deleting can result in data
	// loss.
	Force    param.Field[bool]   `json:"force"`
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerDeleteParams) MarshalJSON

func (r RunnerDeleteParams) MarshalJSON() (data []byte, err error)

type RunnerDeleteResponse

type RunnerDeleteResponse = interface{}

type RunnerGetParams

type RunnerGetParams struct {
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerGetParams) MarshalJSON

func (r RunnerGetParams) MarshalJSON() (data []byte, err error)

type RunnerGetResponse

type RunnerGetResponse struct {
	Runner Runner                `json:"runner,required"`
	JSON   runnerGetResponseJSON `json:"-"`
}

func (*RunnerGetResponse) UnmarshalJSON

func (r *RunnerGetResponse) UnmarshalJSON(data []byte) (err error)

type RunnerKind

type RunnerKind string

RunnerKind represents the kind of a runner

const (
	RunnerKindUnspecified        RunnerKind = "RUNNER_KIND_UNSPECIFIED"
	RunnerKindLocal              RunnerKind = "RUNNER_KIND_LOCAL"
	RunnerKindRemote             RunnerKind = "RUNNER_KIND_REMOTE"
	RunnerKindLocalConfiguration RunnerKind = "RUNNER_KIND_LOCAL_CONFIGURATION"
)

func (RunnerKind) IsKnown

func (r RunnerKind) IsKnown() bool

type RunnerListParams

type RunnerListParams struct {
	Token    param.Field[string]                 `query:"token"`
	PageSize param.Field[int64]                  `query:"pageSize"`
	Filter   param.Field[RunnerListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing runners
	Pagination param.Field[RunnerListParamsPagination] `json:"pagination"`
}

func (RunnerListParams) MarshalJSON

func (r RunnerListParams) MarshalJSON() (data []byte, err error)

func (RunnerListParams) URLQuery

func (r RunnerListParams) URLQuery() (v url.Values)

URLQuery serializes RunnerListParams's query parameters as `url.Values`.

type RunnerListParamsFilter

type RunnerListParamsFilter struct {
	// creator_ids filters the response to only runner created by specified users
	CreatorIDs param.Field[[]string] `json:"creatorIds" format:"uuid"`
	// kinds filters the response to only runners of the specified kinds
	Kinds param.Field[[]RunnerKind] `json:"kinds"`
	// providers filters the response to only runners of the specified providers
	Providers param.Field[[]RunnerProvider] `json:"providers"`
}

func (RunnerListParamsFilter) MarshalJSON

func (r RunnerListParamsFilter) MarshalJSON() (data []byte, err error)

type RunnerListParamsPagination

type RunnerListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing runners

func (RunnerListParamsPagination) MarshalJSON

func (r RunnerListParamsPagination) MarshalJSON() (data []byte, err error)

type RunnerNewParams

type RunnerNewParams struct {
	// The runner's kind This field is optional and here for backwards-compatibility.
	// Use the provider field instead. If provider is set, the runner's kind will be
	// deduced from the provider. Only one of kind and provider must be set.
	Kind param.Field[RunnerKind] `json:"kind"`
	// The runner name for humans
	Name param.Field[string] `json:"name"`
	// The specific implementation type of the runner This field is optional for
	// backwards compatibility but will be required in the future. When specified, kind
	// must not be specified (will be deduced from provider)
	Provider param.Field[RunnerProvider]  `json:"provider"`
	Spec     param.Field[RunnerSpecParam] `json:"spec"`
}

func (RunnerNewParams) MarshalJSON

func (r RunnerNewParams) MarshalJSON() (data []byte, err error)

type RunnerNewResponse

type RunnerNewResponse struct {
	Runner Runner `json:"runner,required"`
	// deprecated, will be removed. Use exchange_token instead.
	//
	// Deprecated: deprecated
	AccessToken string `json:"accessToken"`
	// exchange_token is a one-time use token that should be exchanged by the runner
	// for an access token, using the IdentityService.ExchangeToken rpc. The token
	// expires after 24 hours.
	ExchangeToken string                `json:"exchangeToken"`
	JSON          runnerNewResponseJSON `json:"-"`
}

func (*RunnerNewResponse) UnmarshalJSON

func (r *RunnerNewResponse) UnmarshalJSON(data []byte) (err error)

type RunnerNewRunnerTokenParams

type RunnerNewRunnerTokenParams struct {
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerNewRunnerTokenParams) MarshalJSON

func (r RunnerNewRunnerTokenParams) MarshalJSON() (data []byte, err error)

type RunnerNewRunnerTokenResponse

type RunnerNewRunnerTokenResponse struct {
	// deprecated, will be removed. Use exchange_token instead.
	//
	// Deprecated: deprecated
	AccessToken string `json:"accessToken"`
	// exchange_token is a one-time use token that should be exchanged by the runner
	// for an access token, using the IdentityService.ExchangeToken rpc. The token
	// expires after 24 hours.
	ExchangeToken string                           `json:"exchangeToken"`
	JSON          runnerNewRunnerTokenResponseJSON `json:"-"`
}

func (*RunnerNewRunnerTokenResponse) UnmarshalJSON

func (r *RunnerNewRunnerTokenResponse) UnmarshalJSON(data []byte) (err error)

type RunnerParseContextURLParams

type RunnerParseContextURLParams struct {
	ContextURL param.Field[string] `json:"contextUrl" format:"uri"`
	RunnerID   param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerParseContextURLParams) MarshalJSON

func (r RunnerParseContextURLParams) MarshalJSON() (data []byte, err error)

type RunnerParseContextURLResponse

type RunnerParseContextURLResponse struct {
	Git                RunnerParseContextURLResponseGit  `json:"git"`
	OriginalContextURL string                            `json:"originalContextUrl"`
	JSON               runnerParseContextURLResponseJSON `json:"-"`
}

func (*RunnerParseContextURLResponse) UnmarshalJSON

func (r *RunnerParseContextURLResponse) UnmarshalJSON(data []byte) (err error)

type RunnerParseContextURLResponseGit

type RunnerParseContextURLResponseGit struct {
	Branch            string                               `json:"branch"`
	CloneURL          string                               `json:"cloneUrl"`
	Commit            string                               `json:"commit"`
	Host              string                               `json:"host"`
	Owner             string                               `json:"owner"`
	Repo              string                               `json:"repo"`
	UpstreamRemoteURL string                               `json:"upstreamRemoteUrl"`
	JSON              runnerParseContextURLResponseGitJSON `json:"-"`
}

func (*RunnerParseContextURLResponseGit) UnmarshalJSON

func (r *RunnerParseContextURLResponseGit) UnmarshalJSON(data []byte) (err error)

type RunnerPhase

type RunnerPhase string

RunnerPhase represents the phase a runner is in

const (
	RunnerPhaseUnspecified RunnerPhase = "RUNNER_PHASE_UNSPECIFIED"
	RunnerPhaseCreated     RunnerPhase = "RUNNER_PHASE_CREATED"
	RunnerPhaseInactive    RunnerPhase = "RUNNER_PHASE_INACTIVE"
	RunnerPhaseActive      RunnerPhase = "RUNNER_PHASE_ACTIVE"
	RunnerPhaseDeleting    RunnerPhase = "RUNNER_PHASE_DELETING"
	RunnerPhaseDeleted     RunnerPhase = "RUNNER_PHASE_DELETED"
	RunnerPhaseDegraded    RunnerPhase = "RUNNER_PHASE_DEGRADED"
)

func (RunnerPhase) IsKnown

func (r RunnerPhase) IsKnown() bool

type RunnerPolicy

type RunnerPolicy struct {
	GroupID string `json:"groupId" format:"uuid"`
	// role is the role assigned to the group
	Role RunnerRole       `json:"role"`
	JSON runnerPolicyJSON `json:"-"`
}

func (*RunnerPolicy) UnmarshalJSON

func (r *RunnerPolicy) UnmarshalJSON(data []byte) (err error)

type RunnerPolicyDeleteParams

type RunnerPolicyDeleteParams struct {
	// group_id specifies the group_id identifier
	GroupID param.Field[string] `json:"groupId" format:"uuid"`
	// runner_id specifies the project identifier
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerPolicyDeleteParams) MarshalJSON

func (r RunnerPolicyDeleteParams) MarshalJSON() (data []byte, err error)

type RunnerPolicyDeleteResponse

type RunnerPolicyDeleteResponse = interface{}

type RunnerPolicyListParams

type RunnerPolicyListParams struct {
	Token    param.Field[string] `query:"token"`
	PageSize param.Field[int64]  `query:"pageSize"`
	// pagination contains the pagination options for listing project policies
	Pagination param.Field[RunnerPolicyListParamsPagination] `json:"pagination"`
	// runner_id specifies the project identifier
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerPolicyListParams) MarshalJSON

func (r RunnerPolicyListParams) MarshalJSON() (data []byte, err error)

func (RunnerPolicyListParams) URLQuery

func (r RunnerPolicyListParams) URLQuery() (v url.Values)

URLQuery serializes RunnerPolicyListParams's query parameters as `url.Values`.

type RunnerPolicyListParamsPagination

type RunnerPolicyListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing project policies

func (RunnerPolicyListParamsPagination) MarshalJSON

func (r RunnerPolicyListParamsPagination) MarshalJSON() (data []byte, err error)

type RunnerPolicyNewParams

type RunnerPolicyNewParams struct {
	// group_id specifies the group_id identifier
	GroupID param.Field[string]     `json:"groupId" format:"uuid"`
	Role    param.Field[RunnerRole] `json:"role"`
	// runner_id specifies the project identifier
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerPolicyNewParams) MarshalJSON

func (r RunnerPolicyNewParams) MarshalJSON() (data []byte, err error)

type RunnerPolicyNewResponse

type RunnerPolicyNewResponse struct {
	Policy RunnerPolicy                `json:"policy,required"`
	JSON   runnerPolicyNewResponseJSON `json:"-"`
}

func (*RunnerPolicyNewResponse) UnmarshalJSON

func (r *RunnerPolicyNewResponse) UnmarshalJSON(data []byte) (err error)

type RunnerPolicyService

type RunnerPolicyService struct {
	Options []option.RequestOption
}

RunnerPolicyService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerPolicyService method instead.

func NewRunnerPolicyService

func NewRunnerPolicyService(opts ...option.RequestOption) (r *RunnerPolicyService)

NewRunnerPolicyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RunnerPolicyService) Delete

Deletes a runner policy.

Use this method to:

- Remove access controls - Revoke permissions - Clean up policies

### Examples

- Delete policy:

Removes a group's access policy.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
```

func (*RunnerPolicyService) List

Lists policies for a runner.

Use this method to:

- View access controls - Check policy configurations - Audit permissions

### Examples

- List policies:

Shows all policies for a runner.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
pagination:
  pageSize: 20
```

func (*RunnerPolicyService) ListAutoPaging

Lists policies for a runner.

Use this method to:

- View access controls - Check policy configurations - Audit permissions

### Examples

- List policies:

Shows all policies for a runner.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
pagination:
  pageSize: 20
```

func (*RunnerPolicyService) New

Creates a new policy for a runner.

Use this method to:

- Set up access controls - Define group permissions - Configure role-based access

### Examples

- Create admin policy:

Grants admin access to a group.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
role: RUNNER_ROLE_ADMIN
```

func (*RunnerPolicyService) Update

Updates an existing runner policy.

Use this method to:

- Modify access levels - Change group roles - Update permissions

### Examples

- Update policy role:

Changes a group's access level.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
role: RUNNER_ROLE_USER
```

type RunnerPolicyUpdateParams

type RunnerPolicyUpdateParams struct {
	// group_id specifies the group_id identifier
	GroupID param.Field[string]     `json:"groupId" format:"uuid"`
	Role    param.Field[RunnerRole] `json:"role"`
	// runner_id specifies the project identifier
	RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}

func (RunnerPolicyUpdateParams) MarshalJSON

func (r RunnerPolicyUpdateParams) MarshalJSON() (data []byte, err error)

type RunnerPolicyUpdateResponse

type RunnerPolicyUpdateResponse struct {
	Policy RunnerPolicy                   `json:"policy,required"`
	JSON   runnerPolicyUpdateResponseJSON `json:"-"`
}

func (*RunnerPolicyUpdateResponse) UnmarshalJSON

func (r *RunnerPolicyUpdateResponse) UnmarshalJSON(data []byte) (err error)

type RunnerProvider

type RunnerProvider string

RunnerProvider identifies the specific implementation type of a runner. Each provider maps to a specific kind of runner (local or remote), as specified below for each provider.

const (
	RunnerProviderUnspecified RunnerProvider = "RUNNER_PROVIDER_UNSPECIFIED"
	RunnerProviderAwsEc2      RunnerProvider = "RUNNER_PROVIDER_AWS_EC2"
	RunnerProviderLinuxHost   RunnerProvider = "RUNNER_PROVIDER_LINUX_HOST"
	RunnerProviderDesktopMac  RunnerProvider = "RUNNER_PROVIDER_DESKTOP_MAC"
)

func (RunnerProvider) IsKnown

func (r RunnerProvider) IsKnown() bool

type RunnerReleaseChannel

type RunnerReleaseChannel string
const (
	RunnerReleaseChannelUnspecified RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_UNSPECIFIED"
	RunnerReleaseChannelStable      RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_STABLE"
	RunnerReleaseChannelLatest      RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_LATEST"
)

func (RunnerReleaseChannel) IsKnown

func (r RunnerReleaseChannel) IsKnown() bool

type RunnerRole

type RunnerRole string
const (
	RunnerRoleUnspecified RunnerRole = "RUNNER_ROLE_UNSPECIFIED"
	RunnerRoleAdmin       RunnerRole = "RUNNER_ROLE_ADMIN"
	RunnerRoleUser        RunnerRole = "RUNNER_ROLE_USER"
)

func (RunnerRole) IsKnown

func (r RunnerRole) IsKnown() bool

type RunnerService

type RunnerService struct {
	Options        []option.RequestOption
	Configurations *RunnerConfigurationService
	Policies       *RunnerPolicyService
}

RunnerService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerService method instead.

func NewRunnerService

func NewRunnerService(opts ...option.RequestOption) (r *RunnerService)

NewRunnerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RunnerService) CheckAuthenticationForHost

Checks if a user is authenticated for a specific host.

Use this method to:

- Verify authentication status - Get authentication URLs - Check PAT support

### Examples

- Check authentication:

Verifies authentication for a host.

```yaml
host: "github.com"
```

func (*RunnerService) Delete

Deletes a runner permanently.

Use this method to:

- Remove unused runners - Clean up runner registrations - Delete obsolete runners

### Examples

- Delete runner:

Permanently removes a runner.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerService) Get

Gets details about a specific runner.

Use this method to:

- Check runner status - View runner configuration - Monitor runner health - Verify runner capabilities

### Examples

- Get runner details:

Retrieves information about a specific runner.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerService) List

Lists all registered runners with optional filtering.

Use this method to:

- View all available runners - Filter by runner type - Monitor runner status - Check runner availability

### Examples

- List all runners:

Shows all runners with pagination.

```yaml
pagination:
  pageSize: 20
```

- Filter by provider:

Lists only AWS EC2 runners.

```yaml
filter:
  providers: ["RUNNER_PROVIDER_AWS_EC2"]
pagination:
  pageSize: 20
```

func (*RunnerService) ListAutoPaging

Lists all registered runners with optional filtering.

Use this method to:

- View all available runners - Filter by runner type - Monitor runner status - Check runner availability

### Examples

- List all runners:

Shows all runners with pagination.

```yaml
pagination:
  pageSize: 20
```

- Filter by provider:

Lists only AWS EC2 runners.

```yaml
filter:
  providers: ["RUNNER_PROVIDER_AWS_EC2"]
pagination:
  pageSize: 20
```

func (*RunnerService) New

Creates a new runner registration with the server. Registrations are very short-lived and must be renewed every 30 seconds.

Use this method to:

- Register organization runners - Set up runner configurations - Initialize runner credentials - Configure auto-updates

### Examples

- Create cloud runner:

Creates a new runner in AWS EC2.

```yaml
name: "Production Runner"
provider: RUNNER_PROVIDER_AWS_EC2
spec:
  desiredPhase: RUNNER_PHASE_ACTIVE
  configuration:
    region: "us-west"
    releaseChannel: RUNNER_RELEASE_CHANNEL_STABLE
    autoUpdate: true
```

- Create local runner:

Creates a new local runner on Linux.

```yaml
name: "Local Development Runner"
provider: RUNNER_PROVIDER_LINUX_HOST
spec:
  desiredPhase: RUNNER_PHASE_ACTIVE
  configuration:
    releaseChannel: RUNNER_RELEASE_CHANNEL_LATEST
    autoUpdate: true
```

func (*RunnerService) NewRunnerToken

Creates a new authentication token for a runner.

Use this method to:

- Generate runner credentials - Renew expired tokens - Set up runner authentication

Note: This does not expire previously issued tokens.

### Examples

- Create token:

Creates a new token for runner authentication.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*RunnerService) ParseContextURL

Parses a context URL and returns the parsed result.

Use this method to:

- Validate context URLs - Check repository access - Verify branch existence

Returns:

- FAILED_PRECONDITION if authentication is required - PERMISSION_DENIED if access is not allowed - INVALID_ARGUMENT if URL is invalid - NOT_FOUND if repository/branch doesn't exist

### Examples

- Parse URL:

Parses and validates a context URL.

```yaml
contextUrl: "https://github.com/org/repo/tree/main"
```

func (*RunnerService) Update

Updates a runner's configuration.

Use this method to:

- Modify runner settings - Update release channels - Change runner status - Configure auto-update settings

### Examples

- Update configuration:

Changes runner settings.

```yaml
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
name: "Updated Runner Name"
spec:
  configuration:
    releaseChannel: RUNNER_RELEASE_CHANNEL_LATEST
    autoUpdate: true
```

type RunnerSpec

type RunnerSpec struct {
	// The runner's configuration
	Configuration RunnerConfiguration `json:"configuration"`
	// RunnerPhase represents the phase a runner is in
	DesiredPhase RunnerPhase    `json:"desiredPhase"`
	JSON         runnerSpecJSON `json:"-"`
}

func (*RunnerSpec) UnmarshalJSON

func (r *RunnerSpec) UnmarshalJSON(data []byte) (err error)

type RunnerSpecParam

type RunnerSpecParam struct {
	// The runner's configuration
	Configuration param.Field[RunnerConfigurationParam] `json:"configuration"`
	// RunnerPhase represents the phase a runner is in
	DesiredPhase param.Field[RunnerPhase] `json:"desiredPhase"`
}

func (RunnerSpecParam) MarshalJSON

func (r RunnerSpecParam) MarshalJSON() (data []byte, err error)

type RunnerStatus

type RunnerStatus struct {
	// additional_info contains additional information about the runner, e.g. a
	// CloudFormation stack URL.
	AdditionalInfo []shared.FieldValue `json:"additionalInfo"`
	// capabilities is a list of capabilities the runner supports.
	Capabilities []RunnerCapability `json:"capabilities"`
	LogURL       string             `json:"logUrl"`
	// The runner's reported message which is shown to users. This message adds more
	// context to the runner's phase.
	Message string `json:"message"`
	// The runner's reported phase
	Phase RunnerPhase `json:"phase"`
	// region is the region the runner is running in, if applicable.
	Region        string `json:"region"`
	SystemDetails string `json:"systemDetails"`
	// Time when the status was last udpated.
	UpdatedAt time.Time        `json:"updatedAt" format:"date-time"`
	Version   string           `json:"version"`
	JSON      runnerStatusJSON `json:"-"`
}

RunnerStatus represents the status of a runner

func (*RunnerStatus) UnmarshalJSON

func (r *RunnerStatus) UnmarshalJSON(data []byte) (err error)

type RunnerUpdateParams

type RunnerUpdateParams struct {
	// The runner's name which is shown to users
	Name param.Field[string] `json:"name"`
	// runner_id specifies which runner to be updated.
	//
	// +required
	RunnerID param.Field[string]                 `json:"runnerId" format:"uuid"`
	Spec     param.Field[RunnerUpdateParamsSpec] `json:"spec"`
}

func (RunnerUpdateParams) MarshalJSON

func (r RunnerUpdateParams) MarshalJSON() (data []byte, err error)

type RunnerUpdateParamsSpec

type RunnerUpdateParamsSpec struct {
	Configuration param.Field[RunnerUpdateParamsSpecConfiguration] `json:"configuration"`
	// desired_phase can currently only be updated on local-configuration runners, to
	// toggle whether local runners are allowed for running environments in the
	// organization. Set to:
	//
	//   - ACTIVE to enable local runners.
	//   - INACTIVE to disable all local runners. Existing local runners and their
	//     environments will stop, and cannot be started again until the desired_phase is
	//     set to ACTIVE. Use this carefully, as it will affect all users in the
	//     organization who use local runners.
	DesiredPhase param.Field[RunnerPhase] `json:"desiredPhase"`
}

func (RunnerUpdateParamsSpec) MarshalJSON

func (r RunnerUpdateParamsSpec) MarshalJSON() (data []byte, err error)

type RunnerUpdateParamsSpecConfiguration

type RunnerUpdateParamsSpecConfiguration struct {
	// auto_update indicates whether the runner should automatically update itself.
	AutoUpdate param.Field[bool] `json:"autoUpdate"`
	// The release channel the runner is on
	ReleaseChannel param.Field[RunnerReleaseChannel] `json:"releaseChannel"`
}

func (RunnerUpdateParamsSpecConfiguration) MarshalJSON

func (r RunnerUpdateParamsSpecConfiguration) MarshalJSON() (data []byte, err error)

type RunnerUpdateResponse

type RunnerUpdateResponse = interface{}

type RunsOn

type RunsOn = shared.RunsOn

This is an alias to an internal type.

type RunsOnDocker

type RunsOnDocker = shared.RunsOnDocker

This is an alias to an internal type.

type RunsOnDockerParam

type RunsOnDockerParam = shared.RunsOnDockerParam

This is an alias to an internal type.

type RunsOnParam

type RunsOnParam = shared.RunsOnParam

This is an alias to an internal type.

type SSOConfiguration

type SSOConfiguration struct {
	// id is the unique identifier of the SSO configuration
	ID string `json:"id,required" format:"uuid"`
	// issuer_url is the URL of the IdP issuer
	IssuerURL      string `json:"issuerUrl,required"`
	OrganizationID string `json:"organizationId,required" format:"uuid"`
	// provider_type defines the type of the SSO configuration
	ProviderType ProviderType `json:"providerType,required"`
	// state is the state of the SSO configuration
	State SSOConfigurationState `json:"state,required"`
	// claims are key/value pairs that defines a mapping of claims issued by the IdP.
	Claims map[string]string `json:"claims"`
	// client_id is the client ID of the OIDC application set on the IdP
	ClientID    string               `json:"clientId"`
	EmailDomain string               `json:"emailDomain"`
	JSON        ssoConfigurationJSON `json:"-"`
}

func (*SSOConfiguration) UnmarshalJSON

func (r *SSOConfiguration) UnmarshalJSON(data []byte) (err error)

type SSOConfigurationState

type SSOConfigurationState string
const (
	SSOConfigurationStateUnspecified SSOConfigurationState = "SSO_CONFIGURATION_STATE_UNSPECIFIED"
	SSOConfigurationStateInactive    SSOConfigurationState = "SSO_CONFIGURATION_STATE_INACTIVE"
	SSOConfigurationStateActive      SSOConfigurationState = "SSO_CONFIGURATION_STATE_ACTIVE"
)

func (SSOConfigurationState) IsKnown

func (r SSOConfigurationState) IsKnown() bool

type ScmIntegration

type ScmIntegration struct {
	// id is the unique identifier of the SCM integration
	ID       string                    `json:"id"`
	Host     string                    `json:"host"`
	OAuth    ScmIntegrationOAuthConfig `json:"oauth,nullable"`
	Pat      bool                      `json:"pat"`
	RunnerID string                    `json:"runnerId"`
	// scm_id references the scm_id in the runner's configuration schema that this
	// integration is for
	ScmID string             `json:"scmId"`
	JSON  scmIntegrationJSON `json:"-"`
}

func (*ScmIntegration) UnmarshalJSON

func (r *ScmIntegration) UnmarshalJSON(data []byte) (err error)

type ScmIntegrationOAuthConfig

type ScmIntegrationOAuthConfig struct {
	// client_id is the OAuth app's client ID in clear text.
	ClientID string `json:"clientId"`
	// encrypted_client_secret is the OAuth app's secret encrypted with the runner's
	// public key.
	EncryptedClientSecret string                        `json:"encryptedClientSecret" format:"byte"`
	JSON                  scmIntegrationOAuthConfigJSON `json:"-"`
}

func (*ScmIntegrationOAuthConfig) UnmarshalJSON

func (r *ScmIntegrationOAuthConfig) UnmarshalJSON(data []byte) (err error)

type ScmIntegrationValidationResult

type ScmIntegrationValidationResult struct {
	HostError  string                             `json:"hostError,nullable"`
	OAuthError string                             `json:"oauthError,nullable"`
	PatError   string                             `json:"patError,nullable"`
	ScmIDError string                             `json:"scmIdError,nullable"`
	Valid      bool                               `json:"valid"`
	JSON       scmIntegrationValidationResultJSON `json:"-"`
}

func (*ScmIntegrationValidationResult) UnmarshalJSON

func (r *ScmIntegrationValidationResult) UnmarshalJSON(data []byte) (err error)

type Scope

type Scope string
const (
	ScopeUnspecified Scope = "SCOPE_UNSPECIFIED"
	ScopeMember      Scope = "SCOPE_MEMBER"
	ScopeAll         Scope = "SCOPE_ALL"
)

func (Scope) IsKnown

func (r Scope) IsKnown() bool

type Secret

type Secret struct {
	ID string `json:"id" format:"uuid"`
	// secret will be mounted as a registry secret
	ContainerRegistryBasicAuthHost string `json:"containerRegistryBasicAuthHost" format:"uri"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	CreatedAt time.Time `json:"createdAt" format:"date-time"`
	// creator is the identity of the creator of the secret
	Creator shared.Subject `json:"creator"`
	// secret will be created as an Environment Variable with the same name as the
	// secret
	EnvironmentVariable bool `json:"environmentVariable"`
	// absolute path to the file where the secret is mounted
	FilePath string `json:"filePath"`
	// Name of the secret for humans.
	Name string `json:"name"`
	// The Project ID this Secret belongs to
	ProjectID string `json:"projectId" format:"uuid"`
	// 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](https://developers.google.com/time/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](https://www.ietf.org/rfc/rfc3339.txt) 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](https://www.ietf.org/rfc/rfc3339.txt) 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()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
	// method. In Python, a standard `datetime.datetime` object can be converted to
	// this format using
	// [`strftime`](https://docs.python.org/2/library/time.html#time.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()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
	// to obtain a formatter capable of generating timestamps in this format.
	UpdatedAt time.Time  `json:"updatedAt" format:"date-time"`
	JSON      secretJSON `json:"-"`
}

func (*Secret) UnmarshalJSON

func (r *Secret) UnmarshalJSON(data []byte) (err error)

type SecretDeleteParams

type SecretDeleteParams struct {
	SecretID param.Field[string] `json:"secretId" format:"uuid"`
}

func (SecretDeleteParams) MarshalJSON

func (r SecretDeleteParams) MarshalJSON() (data []byte, err error)

type SecretDeleteResponse

type SecretDeleteResponse = interface{}

type SecretGetValueParams

type SecretGetValueParams struct {
	SecretID param.Field[string] `json:"secretId" format:"uuid"`
}

func (SecretGetValueParams) MarshalJSON

func (r SecretGetValueParams) MarshalJSON() (data []byte, err error)

type SecretGetValueResponse

type SecretGetValueResponse struct {
	Value string                     `json:"value"`
	JSON  secretGetValueResponseJSON `json:"-"`
}

func (*SecretGetValueResponse) UnmarshalJSON

func (r *SecretGetValueResponse) UnmarshalJSON(data []byte) (err error)

type SecretListParams

type SecretListParams struct {
	Token    param.Field[string]                 `query:"token"`
	PageSize param.Field[int64]                  `query:"pageSize"`
	Filter   param.Field[SecretListParamsFilter] `json:"filter"`
	// pagination contains the pagination options for listing environments
	Pagination param.Field[SecretListParamsPagination] `json:"pagination"`
}

func (SecretListParams) MarshalJSON

func (r SecretListParams) MarshalJSON() (data []byte, err error)

func (SecretListParams) URLQuery

func (r SecretListParams) URLQuery() (v url.Values)

URLQuery serializes SecretListParams's query parameters as `url.Values`.

type SecretListParamsFilter

type SecretListParamsFilter struct {
	// project_ids filters the response to only Secrets used by these Project IDs
	ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"`
}

func (SecretListParamsFilter) MarshalJSON

func (r SecretListParamsFilter) MarshalJSON() (data []byte, err error)

type SecretListParamsPagination

type SecretListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

pagination contains the pagination options for listing environments

func (SecretListParamsPagination) MarshalJSON

func (r SecretListParamsPagination) MarshalJSON() (data []byte, err error)

type SecretNewParams

type SecretNewParams struct {
	// secret will be mounted as a docker config in the environment VM, mount will have
	// the docker registry host value must be a valid registry host (e.g.
	// registry.docker.com, https://registry.docker.com, ghcr.io:5050):
	//
	// “`
	// this.matches('^[a-zA-Z0-9.-/:]+(:[0-9]+)?$')
	// “`
	ContainerRegistryBasicAuthHost param.Field[string] `json:"containerRegistryBasicAuthHost"`
	// secret will be created as an Environment Variable with the same name as the
	// secret
	EnvironmentVariable param.Field[bool] `json:"environmentVariable"`
	// absolute path to the file where the secret is mounted value must be an absolute
	// path (start with a /):
	//
	// “`
	// this.matches('^/(?:[^/]*/)*.*$')
	// “`
	FilePath param.Field[string] `json:"filePath"`
	Name     param.Field[string] `json:"name"`
	// project_id is the ProjectID this Secret belongs to
	ProjectID param.Field[string] `json:"projectId" format:"uuid"`
	// value is the plaintext value of the secret
	Value param.Field[string] `json:"value"`
}

func (SecretNewParams) MarshalJSON

func (r SecretNewParams) MarshalJSON() (data []byte, err error)

type SecretNewResponse

type SecretNewResponse struct {
	Secret Secret                `json:"secret"`
	JSON   secretNewResponseJSON `json:"-"`
}

func (*SecretNewResponse) UnmarshalJSON

func (r *SecretNewResponse) UnmarshalJSON(data []byte) (err error)

type SecretService

type SecretService struct {
	Options []option.RequestOption
}

SecretService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSecretService method instead.

func NewSecretService

func NewSecretService(opts ...option.RequestOption) (r *SecretService)

NewSecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SecretService) Delete

Deletes a secret permanently.

Use this method to:

- Remove unused secrets - Clean up old credentials

### Examples

- Delete secret:

Permanently removes a secret.

```yaml
secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*SecretService) GetValue

Gets the value of a secret. Only available to environments that are authorized to access the secret.

Use this method to:

- Retrieve secret values - Access credentials

### Examples

- Get secret value:

Retrieves the value of a specific secret.

```yaml
secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*SecretService) List

Lists secrets with optional filtering.

Use this method to:

- View all project secrets - Filter secrets by project

### Examples

- List project secrets:

Shows all secrets for a project.

```yaml
filter:
  projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]
pagination:
  pageSize: 20
```

func (*SecretService) ListAutoPaging

Lists secrets with optional filtering.

Use this method to:

- View all project secrets - Filter secrets by project

### Examples

- List project secrets:

Shows all secrets for a project.

```yaml
filter:
  projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]
pagination:
  pageSize: 20
```

func (*SecretService) New

Creates a new secret for a project.

Use this method to:

- Store sensitive configuration values - Set up environment variables - Configure registry authentication - Add file-based secrets

### Examples

- Create environment variable:

Creates a secret that will be available as an environment variable.

```yaml
name: "DATABASE_URL"
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
value: "postgresql://user:pass@localhost:5432/db"
environmentVariable: true
```

- Create file secret:

Creates a secret that will be mounted as a file.

```yaml
name: "SSH_KEY"
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
value: "-----BEGIN RSA PRIVATE KEY-----\n..."
filePath: "/home/gitpod/.ssh/id_rsa"
```

- Create registry auth:

Creates credentials for private container registry.

```yaml
name: "DOCKER_AUTH"
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
value: "username:password"
containerRegistryBasicAuthHost: "https://registry.example.com"
```

func (*SecretService) UpdateValue

Updates the value of an existing secret.

Use this method to:

- Rotate secret values - Update credentials

### Examples

- Update secret value:

Changes the value of an existing secret.

```yaml
secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
value: "new-secret-value"
```

type SecretUpdateValueParams

type SecretUpdateValueParams struct {
	SecretID param.Field[string] `json:"secretId" format:"uuid"`
	// value is the plaintext value of the secret
	Value param.Field[string] `json:"value"`
}

func (SecretUpdateValueParams) MarshalJSON

func (r SecretUpdateValueParams) MarshalJSON() (data []byte, err error)

type SecretUpdateValueResponse

type SecretUpdateValueResponse = interface{}

type Service

type Service struct {
	ID            string          `json:"id,required" format:"uuid"`
	EnvironmentID string          `json:"environmentId" format:"uuid"`
	Metadata      ServiceMetadata `json:"metadata"`
	Spec          ServiceSpec     `json:"spec"`
	Status        ServiceStatus   `json:"status"`
	JSON          serviceJSON     `json:"-"`
}

func (*Service) UnmarshalJSON

func (r *Service) UnmarshalJSON(data []byte) (err error)

type ServiceMetadata

type ServiceMetadata struct {
	// created_at is the time the service was created.
	CreatedAt time.Time `json:"createdAt" format:"date-time"`
	// creator describes the principal who created the service.
	Creator shared.Subject `json:"creator"`
	// description is a user-facing description for the service. It can be used to
	// provide context and documentation for the service.
	Description string `json:"description"`
	// name is a user-facing name for the service. Unlike the reference, this field is
	// not unique, and not referenced by the system. This is a short descriptive name
	// for the service.
	Name string `json:"name"`
	// reference is a user-facing identifier for the service which must be unique on
	// the environment. It is used to express dependencies between services, and to
	// identify the service in user interactions (e.g. the CLI).
	Reference string `json:"reference"`
	// triggered_by is a list of trigger that start the service.
	TriggeredBy []shared.AutomationTrigger `json:"triggeredBy"`
	JSON        serviceMetadataJSON        `json:"-"`
}

func (*ServiceMetadata) UnmarshalJSON

func (r *ServiceMetadata) UnmarshalJSON(data []byte) (err error)

type ServiceMetadataParam

type ServiceMetadataParam struct {
	// created_at is the time the service was created.
	CreatedAt param.Field[time.Time] `json:"createdAt" format:"date-time"`
	// creator describes the principal who created the service.
	Creator param.Field[shared.SubjectParam] `json:"creator"`
	// description is a user-facing description for the service. It can be used to
	// provide context and documentation for the service.
	Description param.Field[string] `json:"description"`
	// name is a user-facing name for the service. Unlike the reference, this field is
	// not unique, and not referenced by the system. This is a short descriptive name
	// for the service.
	Name param.Field[string] `json:"name"`
	// reference is a user-facing identifier for the service which must be unique on
	// the environment. It is used to express dependencies between services, and to
	// identify the service in user interactions (e.g. the CLI).
	Reference param.Field[string] `json:"reference"`
	// triggered_by is a list of trigger that start the service.
	TriggeredBy param.Field[[]shared.AutomationTriggerParam] `json:"triggeredBy"`
}

func (ServiceMetadataParam) MarshalJSON

func (r ServiceMetadataParam) MarshalJSON() (data []byte, err error)

type ServicePhase

type ServicePhase string
const (
	ServicePhaseUnspecified ServicePhase = "SERVICE_PHASE_UNSPECIFIED"
	ServicePhaseStarting    ServicePhase = "SERVICE_PHASE_STARTING"
	ServicePhaseRunning     ServicePhase = "SERVICE_PHASE_RUNNING"
	ServicePhaseStopping    ServicePhase = "SERVICE_PHASE_STOPPING"
	ServicePhaseStopped     ServicePhase = "SERVICE_PHASE_STOPPED"
	ServicePhaseFailed      ServicePhase = "SERVICE_PHASE_FAILED"
	ServicePhaseDeleted     ServicePhase = "SERVICE_PHASE_DELETED"
)

func (ServicePhase) IsKnown

func (r ServicePhase) IsKnown() bool

type ServiceSpec

type ServiceSpec struct {
	// commands contains the commands to start, stop and check the readiness of the
	// service
	Commands ServiceSpecCommands `json:"commands"`
	// desired_phase is the phase the service should be in. Used to start or stop the
	// service.
	DesiredPhase ServicePhase `json:"desiredPhase"`
	// runs_on specifies the environment the service should run on.
	RunsOn shared.RunsOn `json:"runsOn"`
	// session should be changed to trigger a restart of the service. If a service
	// exits it will not be restarted until the session is changed.
	Session string `json:"session"`
	// version of the spec. The value of this field has no semantic meaning (e.g. don't
	// interpret it as as a timestamp), but it can be used to impose a partial order.
	// If a.spec_version < b.spec_version then a was the spec before b.
	SpecVersion string          `json:"specVersion"`
	JSON        serviceSpecJSON `json:"-"`
}

func (*ServiceSpec) UnmarshalJSON

func (r *ServiceSpec) UnmarshalJSON(data []byte) (err error)

type ServiceSpecCommands

type ServiceSpecCommands struct {
	// ready is an optional command that is run repeatedly until it exits with a zero
	// exit code. If set, the service will first go into a Starting phase, and then
	// into a Running phase once the ready command exits with a zero exit code.
	Ready string `json:"ready"`
	// start is the command to start and run the service. If start exits, the service
	// will transition to the following phase:
	//
	//   - Stopped: if the exit code is 0
	//   - Failed: if the exit code is not 0 If the stop command is not set, the start
	//     command will receive a SIGTERM signal when the service is requested to stop.
	//     If it does not exit within 2 minutes, it will receive a SIGKILL signal.
	Start string `json:"start"`
	// stop is an optional command that runs when the service is requested to stop. If
	// set, instead of sending a SIGTERM signal to the start command, the stop command
	// will be run. Once the stop command exits, the start command will receive a
	// SIGKILL signal. If the stop command exits with a non-zero exit code, the service
	// will transition to the Failed phase. If the stop command does not exit within 2
	// minutes, a SIGKILL signal will be sent to both the start and stop commands.
	Stop string                  `json:"stop"`
	JSON serviceSpecCommandsJSON `json:"-"`
}

commands contains the commands to start, stop and check the readiness of the service

func (*ServiceSpecCommands) UnmarshalJSON

func (r *ServiceSpecCommands) UnmarshalJSON(data []byte) (err error)

type ServiceSpecCommandsParam

type ServiceSpecCommandsParam struct {
	// ready is an optional command that is run repeatedly until it exits with a zero
	// exit code. If set, the service will first go into a Starting phase, and then
	// into a Running phase once the ready command exits with a zero exit code.
	Ready param.Field[string] `json:"ready"`
	// start is the command to start and run the service. If start exits, the service
	// will transition to the following phase:
	//
	//   - Stopped: if the exit code is 0
	//   - Failed: if the exit code is not 0 If the stop command is not set, the start
	//     command will receive a SIGTERM signal when the service is requested to stop.
	//     If it does not exit within 2 minutes, it will receive a SIGKILL signal.
	Start param.Field[string] `json:"start"`
	// stop is an optional command that runs when the service is requested to stop. If
	// set, instead of sending a SIGTERM signal to the start command, the stop command
	// will be run. Once the stop command exits, the start command will receive a
	// SIGKILL signal. If the stop command exits with a non-zero exit code, the service
	// will transition to the Failed phase. If the stop command does not exit within 2
	// minutes, a SIGKILL signal will be sent to both the start and stop commands.
	Stop param.Field[string] `json:"stop"`
}

commands contains the commands to start, stop and check the readiness of the service

func (ServiceSpecCommandsParam) MarshalJSON

func (r ServiceSpecCommandsParam) MarshalJSON() (data []byte, err error)

type ServiceSpecParam

type ServiceSpecParam struct {
	// commands contains the commands to start, stop and check the readiness of the
	// service
	Commands param.Field[ServiceSpecCommandsParam] `json:"commands"`
	// desired_phase is the phase the service should be in. Used to start or stop the
	// service.
	DesiredPhase param.Field[ServicePhase] `json:"desiredPhase"`
	// runs_on specifies the environment the service should run on.
	RunsOn param.Field[shared.RunsOnParam] `json:"runsOn"`
	// session should be changed to trigger a restart of the service. If a service
	// exits it will not be restarted until the session is changed.
	Session param.Field[string] `json:"session"`
	// version of the spec. The value of this field has no semantic meaning (e.g. don't
	// interpret it as as a timestamp), but it can be used to impose a partial order.
	// If a.spec_version < b.spec_version then a was the spec before b.
	SpecVersion param.Field[string] `json:"specVersion"`
}

func (ServiceSpecParam) MarshalJSON

func (r ServiceSpecParam) MarshalJSON() (data []byte, err error)

type ServiceStatus

type ServiceStatus struct {
	// failure_message summarises why the service failed to operate. If this is
	// non-empty the service has failed to operate and will likely transition to a
	// failed state.
	FailureMessage string `json:"failureMessage"`
	// log_url contains the URL at which the service logs can be accessed.
	LogURL string `json:"logUrl"`
	// phase is the current phase of the service.
	Phase ServicePhase `json:"phase"`
	// session is the current session of the service.
	Session string `json:"session"`
	// version of the status update. Service instances themselves are unversioned, but
	// their status has different versions. The value of this field has no semantic
	// meaning (e.g. don't interpret it as as a timestamp), but it can be used to
	// impose a partial order. If a.status_version < b.status_version then a was the
	// status before b.
	StatusVersion string            `json:"statusVersion"`
	JSON          serviceStatusJSON `json:"-"`
}

func (*ServiceStatus) UnmarshalJSON

func (r *ServiceStatus) UnmarshalJSON(data []byte) (err error)

type Subject

type Subject = shared.Subject

This is an alias to an internal type.

type SubjectParam

type SubjectParam = shared.SubjectParam

This is an alias to an internal type.

type Task

type Task = shared.Task

This is an alias to an internal type.

type TaskExecution

type TaskExecution = shared.TaskExecution

This is an alias to an internal type.

type TaskExecutionMetadata

type TaskExecutionMetadata = shared.TaskExecutionMetadata

This is an alias to an internal type.

type TaskExecutionPhase

type TaskExecutionPhase = shared.TaskExecutionPhase

This is an alias to an internal type.

type TaskExecutionSpec

type TaskExecutionSpec = shared.TaskExecutionSpec

This is an alias to an internal type.

type TaskExecutionSpecPlan

type TaskExecutionSpecPlan = shared.TaskExecutionSpecPlan

This is an alias to an internal type.

type TaskExecutionSpecPlanStep

type TaskExecutionSpecPlanStep = shared.TaskExecutionSpecPlanStep

This is an alias to an internal type.

type TaskExecutionSpecPlanStepsTask

type TaskExecutionSpecPlanStepsTask = shared.TaskExecutionSpecPlanStepsTask

This is an alias to an internal type.

type TaskExecutionStatus

type TaskExecutionStatus = shared.TaskExecutionStatus

This is an alias to an internal type.

type TaskExecutionStatusStep

type TaskExecutionStatusStep = shared.TaskExecutionStatusStep

This is an alias to an internal type.

type TaskMetadata

type TaskMetadata = shared.TaskMetadata

This is an alias to an internal type.

type TaskMetadataParam

type TaskMetadataParam = shared.TaskMetadataParam

This is an alias to an internal type.

type TaskSpec

type TaskSpec = shared.TaskSpec

This is an alias to an internal type.

type TaskSpecParam

type TaskSpecParam = shared.TaskSpecParam

This is an alias to an internal type.

type User

type User struct {
	// id is a UUID of the user
	ID string `json:"id,required" format:"uuid"`
	// avatar_url is a link to the user avatar
	AvatarURL string `json:"avatarUrl"`
	// created_at is the creation time
	CreatedAt time.Time `json:"createdAt" format:"date-time"`
	// name is the full name of the user
	Name string `json:"name"`
	// organization_id is the id of the organization this account is owned by.
	//
	// +optional if not set, this account is owned by the installation.
	OrganizationID string `json:"organizationId" format:"uuid"`
	// status is the status the user is in
	Status shared.UserStatus `json:"status"`
	JSON   userJSON          `json:"-"`
}

func (*User) UnmarshalJSON

func (r *User) UnmarshalJSON(data []byte) (err error)

type UserGetAuthenticatedUserParams

type UserGetAuthenticatedUserParams struct {
	Empty param.Field[bool] `json:"empty"`
}

func (UserGetAuthenticatedUserParams) MarshalJSON

func (r UserGetAuthenticatedUserParams) MarshalJSON() (data []byte, err error)

type UserGetAuthenticatedUserResponse

type UserGetAuthenticatedUserResponse struct {
	User User                                 `json:"user,required"`
	JSON userGetAuthenticatedUserResponseJSON `json:"-"`
}

func (*UserGetAuthenticatedUserResponse) UnmarshalJSON

func (r *UserGetAuthenticatedUserResponse) UnmarshalJSON(data []byte) (err error)

type UserPatDeleteParams

type UserPatDeleteParams struct {
	PersonalAccessTokenID param.Field[string] `json:"personalAccessTokenId" format:"uuid"`
}

func (UserPatDeleteParams) MarshalJSON

func (r UserPatDeleteParams) MarshalJSON() (data []byte, err error)

type UserPatDeleteResponse

type UserPatDeleteResponse = interface{}

type UserPatGetParams

type UserPatGetParams struct {
	PersonalAccessTokenID param.Field[string] `json:"personalAccessTokenId" format:"uuid"`
}

func (UserPatGetParams) MarshalJSON

func (r UserPatGetParams) MarshalJSON() (data []byte, err error)

type UserPatGetResponse

type UserPatGetResponse struct {
	Pat  PersonalAccessToken    `json:"pat,required"`
	JSON userPatGetResponseJSON `json:"-"`
}

func (*UserPatGetResponse) UnmarshalJSON

func (r *UserPatGetResponse) UnmarshalJSON(data []byte) (err error)

type UserPatListParams

type UserPatListParams struct {
	Token      param.Field[string]                      `query:"token"`
	PageSize   param.Field[int64]                       `query:"pageSize"`
	Filter     param.Field[UserPatListParamsFilter]     `json:"filter"`
	Pagination param.Field[UserPatListParamsPagination] `json:"pagination"`
}

func (UserPatListParams) MarshalJSON

func (r UserPatListParams) MarshalJSON() (data []byte, err error)

func (UserPatListParams) URLQuery

func (r UserPatListParams) URLQuery() (v url.Values)

URLQuery serializes UserPatListParams's query parameters as `url.Values`.

type UserPatListParamsFilter

type UserPatListParamsFilter struct {
	// creator_ids filters the response to only Environments created by specified
	// members
	UserIDs param.Field[[]string] `json:"userIds" format:"uuid"`
}

func (UserPatListParamsFilter) MarshalJSON

func (r UserPatListParamsFilter) MarshalJSON() (data []byte, err error)

type UserPatListParamsPagination

type UserPatListParamsPagination struct {
	// Token for the next set of results that was returned as next_token of a
	// PaginationResponse
	Token param.Field[string] `json:"token"`
	// Page size is the maximum number of results to retrieve per page. Defaults to 25.
	// Maximum 100.
	PageSize param.Field[int64] `json:"pageSize"`
}

func (UserPatListParamsPagination) MarshalJSON

func (r UserPatListParamsPagination) MarshalJSON() (data []byte, err error)

type UserPatService

type UserPatService struct {
	Options []option.RequestOption
}

UserPatService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserPatService method instead.

func NewUserPatService

func NewUserPatService(opts ...option.RequestOption) (r *UserPatService)

NewUserPatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserPatService) Delete

Deletes a personal access token.

Use this method to:

- Revoke token access - Remove unused tokens - Rotate credentials

### Examples

- Delete token:

Permanently revokes a token.

```yaml
personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*UserPatService) Get

Gets details about a specific personal access token.

Use this method to:

- View token metadata - Check token expiration - Monitor token usage

### Examples

- Get token details:

Retrieves information about a specific token.

```yaml
personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

func (*UserPatService) List

Lists personal access tokens with optional filtering.

Use this method to:

- View all active tokens - Audit token usage - Manage token lifecycle

### Examples

- List user tokens:

Shows all tokens for specific users.

```yaml
filter:
  userIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"]
pagination:
  pageSize: 20
```

func (*UserPatService) ListAutoPaging

Lists personal access tokens with optional filtering.

Use this method to:

- View all active tokens - Audit token usage - Manage token lifecycle

### Examples

- List user tokens:

Shows all tokens for specific users.

```yaml
filter:
  userIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"]
pagination:
  pageSize: 20
```

type UserService

type UserService struct {
	Options []option.RequestOption
	Pats    *UserPatService
}

UserService contains methods and other services that help with interacting with the gitpod API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.

func NewUserService

func NewUserService(opts ...option.RequestOption) (r *UserService)

NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserService) GetAuthenticatedUser

Gets information about the currently authenticated user.

Use this method to:

- Get user profile information - Check authentication status - Retrieve user settings - Verify account details

### Examples

- Get current user:

Retrieves details about the authenticated user.

```yaml
{}
```

func (*UserService) SetSuspended

func (r *UserService) SetSuspended(ctx context.Context, body UserSetSuspendedParams, opts ...option.RequestOption) (res *UserSetSuspendedResponse, err error)

Sets whether a user account is suspended.

Use this method to:

- Suspend problematic users - Reactivate suspended accounts - Manage user access

### Examples

- Suspend user:

Suspends a user account.

```yaml
userId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
suspended: true
```

- Reactivate user:

Removes suspension from a user account.

```yaml
userId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
suspended: false
```

type UserSetSuspendedParams

type UserSetSuspendedParams struct {
	Suspended param.Field[bool]   `json:"suspended"`
	UserID    param.Field[string] `json:"userId" format:"uuid"`
}

func (UserSetSuspendedParams) MarshalJSON

func (r UserSetSuspendedParams) MarshalJSON() (data []byte, err error)

type UserSetSuspendedResponse

type UserSetSuspendedResponse = interface{}

type UserStatus

type UserStatus = shared.UserStatus

This is an alias to an internal type.

Directories

Path Synopsis
packages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL