Skip to content

Commit 19015d3

Browse files
feat(api): manual updates (#50)
1 parent 3a1e2d8 commit 19015d3

11 files changed

+193
-1570
lines changed

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-064a191bc556bcab46bb5d612c844437e1a4aef5981a4a99ab7f825a96ede4fa.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3655d5ad0ac3e228c1519af70dbf3d0bfa3c47a2d06d4cac92a650da051b49a6.yml

Diff for: environment.go

+39-566
Large diffs are not rendered by default.

Diff for: environment_test.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) {
5757
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
5858
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
5959
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
60-
Repository: gitpod.F("https://example.com"),
61-
InstallCommand: gitpod.F("installCommand"),
62-
TargetPath: gitpod.F("targetPath"),
60+
Repository: gitpod.F("https://example.com"),
6361
}),
6462
Session: gitpod.F("session"),
6563
}),
@@ -300,9 +298,7 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) {
300298
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
301299
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
302300
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
303-
Repository: gitpod.F("https://example.com"),
304-
InstallCommand: gitpod.F("installCommand"),
305-
TargetPath: gitpod.F("targetPath"),
301+
Repository: gitpod.F("https://example.com"),
306302
}),
307303
Session: gitpod.F("session"),
308304
}),

Diff for: environmentautomationservice.go

+2-176
Original file line numberDiff line numberDiff line change
@@ -355,94 +355,7 @@ func (r serviceJSON) RawJSON() string {
355355
}
356356

357357
type ServiceMetadata struct {
358-
// A Timestamp represents a point in time independent of any time zone or local
359-
// calendar, encoded as a count of seconds and fractions of seconds at nanosecond
360-
// resolution. The count is relative to an epoch at UTC midnight on January 1,
361-
// 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar
362-
// backwards to year one.
363-
//
364-
// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
365-
// second table is needed for interpretation, using a
366-
// [24-hour linear smear](https://developers.google.com/time/smear).
367-
//
368-
// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
369-
// restricting to that range, we ensure that we can convert to and from
370-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
371-
//
372-
// # Examples
373-
//
374-
// Example 1: Compute Timestamp from POSIX `time()`.
375-
//
376-
// Timestamp timestamp;
377-
// timestamp.set_seconds(time(NULL));
378-
// timestamp.set_nanos(0);
379-
//
380-
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
381-
//
382-
// struct timeval tv;
383-
// gettimeofday(&tv, NULL);
384-
//
385-
// Timestamp timestamp;
386-
// timestamp.set_seconds(tv.tv_sec);
387-
// timestamp.set_nanos(tv.tv_usec * 1000);
388-
//
389-
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
390-
//
391-
// FILETIME ft;
392-
// GetSystemTimeAsFileTime(&ft);
393-
// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
394-
//
395-
// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
396-
// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
397-
// Timestamp timestamp;
398-
// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
399-
// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
400-
//
401-
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
402-
//
403-
// long millis = System.currentTimeMillis();
404-
//
405-
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
406-
// .setNanos((int) ((millis % 1000) * 1000000)).build();
407-
//
408-
// Example 5: Compute Timestamp from Java `Instant.now()`.
409-
//
410-
// Instant now = Instant.now();
411-
//
412-
// Timestamp timestamp =
413-
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
414-
// .setNanos(now.getNano()).build();
415-
//
416-
// Example 6: Compute Timestamp from current time in Python.
417-
//
418-
// timestamp = Timestamp()
419-
// timestamp.GetCurrentTime()
420-
//
421-
// # JSON Mapping
422-
//
423-
// In JSON format, the Timestamp type is encoded as a string in the
424-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
425-
// "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always
426-
// expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are
427-
// zero-padded to two digits each. The fractional seconds, which can go up to 9
428-
// digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix
429-
// indicates the timezone ("UTC"); the timezone is required. A proto3 JSON
430-
// serializer should always use UTC (as indicated by "Z") when printing the
431-
// Timestamp type and a proto3 JSON parser should be able to accept both UTC and
432-
// other timezones (as indicated by an offset).
433-
//
434-
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on
435-
// January 15, 2017.
436-
//
437-
// In JavaScript, one can convert a Date object to this format using the standard
438-
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
439-
// method. In Python, a standard `datetime.datetime` object can be converted to
440-
// this format using
441-
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the
442-
// time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the
443-
// Joda Time's
444-
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
445-
// to obtain a formatter capable of generating timestamps in this format.
358+
// created_at is the time the service was created.
446359
CreatedAt time.Time `json:"createdAt" format:"date-time"`
447360
// creator describes the principal who created the service.
448361
Creator shared.Subject `json:"creator"`
@@ -483,94 +396,7 @@ func (r serviceMetadataJSON) RawJSON() string {
483396
}
484397

485398
type ServiceMetadataParam struct {
486-
// A Timestamp represents a point in time independent of any time zone or local
487-
// calendar, encoded as a count of seconds and fractions of seconds at nanosecond
488-
// resolution. The count is relative to an epoch at UTC midnight on January 1,
489-
// 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar
490-
// backwards to year one.
491-
//
492-
// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
493-
// second table is needed for interpretation, using a
494-
// [24-hour linear smear](https://developers.google.com/time/smear).
495-
//
496-
// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
497-
// restricting to that range, we ensure that we can convert to and from
498-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
499-
//
500-
// # Examples
501-
//
502-
// Example 1: Compute Timestamp from POSIX `time()`.
503-
//
504-
// Timestamp timestamp;
505-
// timestamp.set_seconds(time(NULL));
506-
// timestamp.set_nanos(0);
507-
//
508-
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
509-
//
510-
// struct timeval tv;
511-
// gettimeofday(&tv, NULL);
512-
//
513-
// Timestamp timestamp;
514-
// timestamp.set_seconds(tv.tv_sec);
515-
// timestamp.set_nanos(tv.tv_usec * 1000);
516-
//
517-
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
518-
//
519-
// FILETIME ft;
520-
// GetSystemTimeAsFileTime(&ft);
521-
// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
522-
//
523-
// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
524-
// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
525-
// Timestamp timestamp;
526-
// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
527-
// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
528-
//
529-
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
530-
//
531-
// long millis = System.currentTimeMillis();
532-
//
533-
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
534-
// .setNanos((int) ((millis % 1000) * 1000000)).build();
535-
//
536-
// Example 5: Compute Timestamp from Java `Instant.now()`.
537-
//
538-
// Instant now = Instant.now();
539-
//
540-
// Timestamp timestamp =
541-
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
542-
// .setNanos(now.getNano()).build();
543-
//
544-
// Example 6: Compute Timestamp from current time in Python.
545-
//
546-
// timestamp = Timestamp()
547-
// timestamp.GetCurrentTime()
548-
//
549-
// # JSON Mapping
550-
//
551-
// In JSON format, the Timestamp type is encoded as a string in the
552-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
553-
// "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always
554-
// expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are
555-
// zero-padded to two digits each. The fractional seconds, which can go up to 9
556-
// digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix
557-
// indicates the timezone ("UTC"); the timezone is required. A proto3 JSON
558-
// serializer should always use UTC (as indicated by "Z") when printing the
559-
// Timestamp type and a proto3 JSON parser should be able to accept both UTC and
560-
// other timezones (as indicated by an offset).
561-
//
562-
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on
563-
// January 15, 2017.
564-
//
565-
// In JavaScript, one can convert a Date object to this format using the standard
566-
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
567-
// method. In Python, a standard `datetime.datetime` object can be converted to
568-
// this format using
569-
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the
570-
// time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the
571-
// Joda Time's
572-
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
573-
// to obtain a formatter capable of generating timestamps in this format.
399+
// created_at is the time the service was created.
574400
CreatedAt param.Field[time.Time] `json:"createdAt" format:"date-time"`
575401
// creator describes the principal who created the service.
576402
Creator param.Field[shared.SubjectParam] `json:"creator"`

Diff for: organizationdomainverification.go

+99-7
Original file line numberDiff line numberDiff line change
@@ -318,20 +318,112 @@ type DomainVerification struct {
318318
// Joda Time's
319319
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
320320
// to obtain a formatter capable of generating timestamps in this format.
321+
CreatedAt time.Time `json:"createdAt" format:"date-time"`
322+
VerificationToken string `json:"verificationToken"`
323+
// A Timestamp represents a point in time independent of any time zone or local
324+
// calendar, encoded as a count of seconds and fractions of seconds at nanosecond
325+
// resolution. The count is relative to an epoch at UTC midnight on January 1,
326+
// 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar
327+
// backwards to year one.
328+
//
329+
// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
330+
// second table is needed for interpretation, using a
331+
// [24-hour linear smear](https://developers.google.com/time/smear).
332+
//
333+
// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
334+
// restricting to that range, we ensure that we can convert to and from
335+
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
336+
//
337+
// # Examples
338+
//
339+
// Example 1: Compute Timestamp from POSIX `time()`.
340+
//
341+
// Timestamp timestamp;
342+
// timestamp.set_seconds(time(NULL));
343+
// timestamp.set_nanos(0);
344+
//
345+
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
346+
//
347+
// struct timeval tv;
348+
// gettimeofday(&tv, NULL);
349+
//
350+
// Timestamp timestamp;
351+
// timestamp.set_seconds(tv.tv_sec);
352+
// timestamp.set_nanos(tv.tv_usec * 1000);
353+
//
354+
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
355+
//
356+
// FILETIME ft;
357+
// GetSystemTimeAsFileTime(&ft);
358+
// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
359+
//
360+
// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
361+
// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
362+
// Timestamp timestamp;
363+
// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
364+
// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
365+
//
366+
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
367+
//
368+
// long millis = System.currentTimeMillis();
369+
//
370+
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
371+
// .setNanos((int) ((millis % 1000) * 1000000)).build();
372+
//
373+
// Example 5: Compute Timestamp from Java `Instant.now()`.
374+
//
375+
// Instant now = Instant.now();
376+
//
377+
// Timestamp timestamp =
378+
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
379+
// .setNanos(now.getNano()).build();
380+
//
381+
// Example 6: Compute Timestamp from current time in Python.
382+
//
383+
// timestamp = Timestamp()
384+
// timestamp.GetCurrentTime()
385+
//
386+
// # JSON Mapping
387+
//
388+
// In JSON format, the Timestamp type is encoded as a string in the
389+
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
390+
// "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always
391+
// expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are
392+
// zero-padded to two digits each. The fractional seconds, which can go up to 9
393+
// digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix
394+
// indicates the timezone ("UTC"); the timezone is required. A proto3 JSON
395+
// serializer should always use UTC (as indicated by "Z") when printing the
396+
// Timestamp type and a proto3 JSON parser should be able to accept both UTC and
397+
// other timezones (as indicated by an offset).
398+
//
399+
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on
400+
// January 15, 2017.
401+
//
402+
// In JavaScript, one can convert a Date object to this format using the standard
403+
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
404+
// method. In Python, a standard `datetime.datetime` object can be converted to
405+
// this format using
406+
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the
407+
// time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the
408+
// Joda Time's
409+
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
410+
// to obtain a formatter capable of generating timestamps in this format.
321411
VerifiedAt time.Time `json:"verifiedAt" format:"date-time"`
322412
JSON domainVerificationJSON `json:"-"`
323413
}
324414

325415
// domainVerificationJSON contains the JSON metadata for the struct
326416
// [DomainVerification]
327417
type domainVerificationJSON struct {
328-
ID apijson.Field
329-
Domain apijson.Field
330-
OrganizationID apijson.Field
331-
State apijson.Field
332-
VerifiedAt apijson.Field
333-
raw string
334-
ExtraFields map[string]apijson.Field
418+
ID apijson.Field
419+
Domain apijson.Field
420+
OrganizationID apijson.Field
421+
State apijson.Field
422+
CreatedAt apijson.Field
423+
VerificationToken apijson.Field
424+
VerifiedAt apijson.Field
425+
raw string
426+
ExtraFields map[string]apijson.Field
335427
}
336428

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

Diff for: project.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ type EnvironmentInitializerSpecsGit struct {
325325
CloneTarget string `json:"cloneTarget"`
326326
// remote_uri is the Git remote origin
327327
RemoteUri string `json:"remoteUri"`
328-
// CloneTargetMode is the target state in which we want to leave a GitEnvironment
328+
// the target mode determines what gets checked out
329329
TargetMode EnvironmentInitializerSpecsGitTargetMode `json:"targetMode"`
330330
// upstream_Remote_uri is the fork upstream of a repository
331331
UpstreamRemoteUri string `json:"upstreamRemoteUri"`
@@ -352,7 +352,7 @@ func (r environmentInitializerSpecsGitJSON) RawJSON() string {
352352
return r.raw
353353
}
354354

355-
// CloneTargetMode is the target state in which we want to leave a GitEnvironment
355+
// the target mode determines what gets checked out
356356
type EnvironmentInitializerSpecsGitTargetMode string
357357

358358
const (
@@ -405,7 +405,7 @@ type EnvironmentInitializerSpecsGitParam struct {
405405
CloneTarget param.Field[string] `json:"cloneTarget"`
406406
// remote_uri is the Git remote origin
407407
RemoteUri param.Field[string] `json:"remoteUri"`
408-
// CloneTargetMode is the target state in which we want to leave a GitEnvironment
408+
// the target mode determines what gets checked out
409409
TargetMode param.Field[EnvironmentInitializerSpecsGitTargetMode] `json:"targetMode"`
410410
// upstream_Remote_uri is the fork upstream of a repository
411411
UpstreamRemoteUri param.Field[string] `json:"upstreamRemoteUri"`
@@ -425,7 +425,7 @@ type Project struct {
425425
// devcontainer_file_path is the path to the devcontainer file relative to the repo
426426
// root
427427
DevcontainerFilePath string `json:"devcontainerFilePath"`
428-
// EnvironmentInitializer specifies how an environment is to be initialized
428+
// initializer is the content initializer
429429
Initializer EnvironmentInitializer `json:"initializer"`
430430
Metadata ProjectMetadata `json:"metadata"`
431431
UsedBy ProjectUsedBy `json:"usedBy"`
@@ -811,7 +811,7 @@ func (r projectNewFromEnvironmentResponseJSON) RawJSON() string {
811811

812812
type ProjectNewParams struct {
813813
EnvironmentClass param.Field[ProjectEnvironmentClassParam] `json:"environmentClass,required"`
814-
// EnvironmentInitializer specifies how an environment is to be initialized
814+
// initializer is the content initializer
815815
Initializer param.Field[EnvironmentInitializerParam] `json:"initializer,required"`
816816
// automations_file_path is the path to the automations file relative to the repo
817817
// root path must not be absolute (start with a /):
@@ -859,7 +859,7 @@ type ProjectUpdateParams struct {
859859
// ```
860860
DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"`
861861
EnvironmentClass param.Field[ProjectEnvironmentClassParam] `json:"environmentClass"`
862-
// EnvironmentInitializer specifies how an environment is to be initialized
862+
// initializer is the content initializer
863863
Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"`
864864
Name param.Field[string] `json:"name"`
865865
// project_id specifies the project identifier

0 commit comments

Comments
 (0)