From 10959c6292e4e454e1902503a301392da16dec61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:07:47 +0000 Subject: [PATCH] feat(api): strip enum prefix --- aliases.go | 38 +++++++------- environment.go | 28 +++++------ environment_test.go | 18 +++---- environmentautomationservice.go | 16 +++--- environmentautomationservice_test.go | 6 +-- environmentautomationtask_test.go | 2 +- environmentautomationtaskexecution_test.go | 2 +- event.go | 50 +++++++++---------- event_test.go | 4 +- organization.go | 8 +-- organization_test.go | 4 +- organizationssoconfiguration.go | 16 +++--- organizationssoconfiguration_test.go | 2 +- projectpolicy.go | 8 +-- projectpolicy_test.go | 4 +- runner.go | 50 +++++++++---------- runner_test.go | 16 +++--- runnerconfigurationhostauthenticationtoken.go | 8 +-- ...nfigurationhostauthenticationtoken_test.go | 2 +- runnerpolicy.go | 8 +-- runnerpolicy_test.go | 4 +- shared/shared.go | 46 ++++++++--------- 22 files changed, 170 insertions(+), 170 deletions(-) diff --git a/aliases.go b/aliases.go index 3724f20..f7b2249 100644 --- a/aliases.go +++ b/aliases.go @@ -41,34 +41,34 @@ type FieldValueParam = shared.FieldValueParam type OrganizationRole = shared.OrganizationRole // This is an alias to an internal value. -const OrganizationRoleOrganizationRoleUnspecified = shared.OrganizationRoleOrganizationRoleUnspecified +const OrganizationRoleUnspecified = shared.OrganizationRoleUnspecified // This is an alias to an internal value. -const OrganizationRoleOrganizationRoleAdmin = shared.OrganizationRoleOrganizationRoleAdmin +const OrganizationRoleAdmin = shared.OrganizationRoleAdmin // This is an alias to an internal value. -const OrganizationRoleOrganizationRoleMember = shared.OrganizationRoleOrganizationRoleMember +const OrganizationRoleMember = shared.OrganizationRoleMember // This is an alias to an internal type. type Principal = shared.Principal // This is an alias to an internal value. -const PrincipalPrincipalUnspecified = shared.PrincipalPrincipalUnspecified +const PrincipalUnspecified = shared.PrincipalUnspecified // This is an alias to an internal value. -const PrincipalPrincipalAccount = shared.PrincipalPrincipalAccount +const PrincipalAccount = shared.PrincipalAccount // This is an alias to an internal value. -const PrincipalPrincipalUser = shared.PrincipalPrincipalUser +const PrincipalUser = shared.PrincipalUser // This is an alias to an internal value. -const PrincipalPrincipalRunner = shared.PrincipalPrincipalRunner +const PrincipalRunner = shared.PrincipalRunner // This is an alias to an internal value. -const PrincipalPrincipalEnvironment = shared.PrincipalPrincipalEnvironment +const PrincipalEnvironment = shared.PrincipalEnvironment // This is an alias to an internal value. -const PrincipalPrincipalServiceAccount = shared.PrincipalPrincipalServiceAccount +const PrincipalServiceAccount = shared.PrincipalServiceAccount // This is an alias to an internal type. type RunsOn = shared.RunsOn @@ -98,22 +98,22 @@ type TaskExecutionMetadata = shared.TaskExecutionMetadata type TaskExecutionPhase = shared.TaskExecutionPhase // This is an alias to an internal value. -const TaskExecutionPhaseTaskExecutionPhaseUnspecified = shared.TaskExecutionPhaseTaskExecutionPhaseUnspecified +const TaskExecutionPhaseUnspecified = shared.TaskExecutionPhaseUnspecified // This is an alias to an internal value. -const TaskExecutionPhaseTaskExecutionPhasePending = shared.TaskExecutionPhaseTaskExecutionPhasePending +const TaskExecutionPhasePending = shared.TaskExecutionPhasePending // This is an alias to an internal value. -const TaskExecutionPhaseTaskExecutionPhaseRunning = shared.TaskExecutionPhaseTaskExecutionPhaseRunning +const TaskExecutionPhaseRunning = shared.TaskExecutionPhaseRunning // This is an alias to an internal value. -const TaskExecutionPhaseTaskExecutionPhaseSucceeded = shared.TaskExecutionPhaseTaskExecutionPhaseSucceeded +const TaskExecutionPhaseSucceeded = shared.TaskExecutionPhaseSucceeded // This is an alias to an internal value. -const TaskExecutionPhaseTaskExecutionPhaseFailed = shared.TaskExecutionPhaseTaskExecutionPhaseFailed +const TaskExecutionPhaseFailed = shared.TaskExecutionPhaseFailed // This is an alias to an internal value. -const TaskExecutionPhaseTaskExecutionPhaseStopped = shared.TaskExecutionPhaseTaskExecutionPhaseStopped +const TaskExecutionPhaseStopped = shared.TaskExecutionPhaseStopped // This is an alias to an internal type. type TaskExecutionSpec = shared.TaskExecutionSpec @@ -137,13 +137,13 @@ type TaskExecutionStatusStep = shared.TaskExecutionStatusStep type UserStatus = shared.UserStatus // This is an alias to an internal value. -const UserStatusUserStatusUnspecified = shared.UserStatusUserStatusUnspecified +const UserStatusUnspecified = shared.UserStatusUnspecified // This is an alias to an internal value. -const UserStatusUserStatusActive = shared.UserStatusUserStatusActive +const UserStatusActive = shared.UserStatusActive // This is an alias to an internal value. -const UserStatusUserStatusSuspended = shared.UserStatusUserStatusSuspended +const UserStatusSuspended = shared.UserStatusSuspended // This is an alias to an internal value. -const UserStatusUserStatusLeft = shared.UserStatusUserStatusLeft +const UserStatusLeft = shared.UserStatusLeft diff --git a/environment.go b/environment.go index 9a8fbe1..ffcfa97 100644 --- a/environment.go +++ b/environment.go @@ -181,14 +181,14 @@ func (r *EnvironmentService) Stop(ctx context.Context, body EnvironmentStopParam type AdmissionLevel string const ( - AdmissionLevelAdmissionLevelUnspecified AdmissionLevel = "ADMISSION_LEVEL_UNSPECIFIED" - AdmissionLevelAdmissionLevelOwnerOnly AdmissionLevel = "ADMISSION_LEVEL_OWNER_ONLY" - AdmissionLevelAdmissionLevelEveryone AdmissionLevel = "ADMISSION_LEVEL_EVERYONE" + AdmissionLevelUnspecified AdmissionLevel = "ADMISSION_LEVEL_UNSPECIFIED" + AdmissionLevelOwnerOnly AdmissionLevel = "ADMISSION_LEVEL_OWNER_ONLY" + AdmissionLevelEveryone AdmissionLevel = "ADMISSION_LEVEL_EVERYONE" ) func (r AdmissionLevel) IsKnown() bool { switch r { - case AdmissionLevelAdmissionLevelUnspecified, AdmissionLevelAdmissionLevelOwnerOnly, AdmissionLevelAdmissionLevelEveryone: + case AdmissionLevelUnspecified, AdmissionLevelOwnerOnly, AdmissionLevelEveryone: return true } return false @@ -672,20 +672,20 @@ func (r environmentMetadataJSON) RawJSON() string { type EnvironmentPhase string const ( - EnvironmentPhaseEnvironmentPhaseUnspecified EnvironmentPhase = "ENVIRONMENT_PHASE_UNSPECIFIED" - EnvironmentPhaseEnvironmentPhaseCreating EnvironmentPhase = "ENVIRONMENT_PHASE_CREATING" - EnvironmentPhaseEnvironmentPhaseStarting EnvironmentPhase = "ENVIRONMENT_PHASE_STARTING" - EnvironmentPhaseEnvironmentPhaseRunning EnvironmentPhase = "ENVIRONMENT_PHASE_RUNNING" - EnvironmentPhaseEnvironmentPhaseUpdating EnvironmentPhase = "ENVIRONMENT_PHASE_UPDATING" - EnvironmentPhaseEnvironmentPhaseStopping EnvironmentPhase = "ENVIRONMENT_PHASE_STOPPING" - EnvironmentPhaseEnvironmentPhaseStopped EnvironmentPhase = "ENVIRONMENT_PHASE_STOPPED" - EnvironmentPhaseEnvironmentPhaseDeleting EnvironmentPhase = "ENVIRONMENT_PHASE_DELETING" - EnvironmentPhaseEnvironmentPhaseDeleted EnvironmentPhase = "ENVIRONMENT_PHASE_DELETED" + 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 (r EnvironmentPhase) IsKnown() bool { switch r { - case EnvironmentPhaseEnvironmentPhaseUnspecified, EnvironmentPhaseEnvironmentPhaseCreating, EnvironmentPhaseEnvironmentPhaseStarting, EnvironmentPhaseEnvironmentPhaseRunning, EnvironmentPhaseEnvironmentPhaseUpdating, EnvironmentPhaseEnvironmentPhaseStopping, EnvironmentPhaseEnvironmentPhaseStopped, EnvironmentPhaseEnvironmentPhaseDeleting, EnvironmentPhaseEnvironmentPhaseDeleted: + case EnvironmentPhaseUnspecified, EnvironmentPhaseCreating, EnvironmentPhaseStarting, EnvironmentPhaseRunning, EnvironmentPhaseUpdating, EnvironmentPhaseStopping, EnvironmentPhaseStopped, EnvironmentPhaseDeleting, EnvironmentPhaseDeleted: return true } return false diff --git a/environment_test.go b/environment_test.go index 7c77116..5428703 100644 --- a/environment_test.go +++ b/environment_test.go @@ -29,7 +29,7 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) { ) _, err := client.Environments.New(context.TODO(), gitpod.EnvironmentNewParams{ Spec: gitpod.F(gitpod.EnvironmentSpecParam{ - Admission: gitpod.F(gitpod.AdmissionLevelAdmissionLevelUnspecified), + Admission: gitpod.F(gitpod.AdmissionLevelUnspecified), AutomationsFile: gitpod.F(gitpod.EnvironmentSpecAutomationsFileParam{ AutomationsFilePath: gitpod.F("automationsFilePath"), Session: gitpod.F("session"), @@ -53,7 +53,7 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) { }), Session: gitpod.F("session"), }), - DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseEnvironmentPhaseUnspecified), + DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseUnspecified), Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{ DevcontainerFilePath: gitpod.F("devcontainerFilePath"), Session: gitpod.F("session"), @@ -63,7 +63,7 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) { Session: gitpod.F("session"), }), Ports: gitpod.F([]gitpod.EnvironmentSpecPortParam{{ - Admission: gitpod.F(gitpod.AdmissionLevelAdmissionLevelUnspecified), + Admission: gitpod.F(gitpod.AdmissionLevelUnspecified), Name: gitpod.F("x"), Port: gitpod.F(int64(1)), }}), @@ -165,7 +165,7 @@ func TestEnvironmentUpdateWithOptionalParams(t *testing.T) { Session: gitpod.F("session"), }), Ports: gitpod.F([]gitpod.EnvironmentUpdateParamsSpecPort{{ - Admission: gitpod.F(gitpod.AdmissionLevelAdmissionLevelUnspecified), + Admission: gitpod.F(gitpod.AdmissionLevelUnspecified), Name: gitpod.F("x"), Port: gitpod.F(int64(1)), }}), @@ -207,8 +207,8 @@ func TestEnvironmentListWithOptionalParams(t *testing.T) { CreatorIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), ProjectIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), RunnerIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), - RunnerKinds: gitpod.F([]gitpod.RunnerKind{gitpod.RunnerKindRunnerKindUnspecified}), - StatusPhases: gitpod.F([]gitpod.EnvironmentPhase{gitpod.EnvironmentPhaseEnvironmentPhaseUnspecified}), + RunnerKinds: gitpod.F([]gitpod.RunnerKind{gitpod.RunnerKindUnspecified}), + StatusPhases: gitpod.F([]gitpod.EnvironmentPhase{gitpod.EnvironmentPhaseUnspecified}), }), OrganizationID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), Pagination: gitpod.F(gitpod.EnvironmentListParamsPagination{ @@ -267,7 +267,7 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) { _, err := client.Environments.NewFromProject(context.TODO(), gitpod.EnvironmentNewFromProjectParams{ ProjectID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), Spec: gitpod.F(gitpod.EnvironmentSpecParam{ - Admission: gitpod.F(gitpod.AdmissionLevelAdmissionLevelUnspecified), + Admission: gitpod.F(gitpod.AdmissionLevelUnspecified), AutomationsFile: gitpod.F(gitpod.EnvironmentSpecAutomationsFileParam{ AutomationsFilePath: gitpod.F("automationsFilePath"), Session: gitpod.F("session"), @@ -291,7 +291,7 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) { }), Session: gitpod.F("session"), }), - DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseEnvironmentPhaseUnspecified), + DesiredPhase: gitpod.F(gitpod.EnvironmentPhaseUnspecified), Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{ DevcontainerFilePath: gitpod.F("devcontainerFilePath"), Session: gitpod.F("session"), @@ -301,7 +301,7 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) { Session: gitpod.F("session"), }), Ports: gitpod.F([]gitpod.EnvironmentSpecPortParam{{ - Admission: gitpod.F(gitpod.AdmissionLevelAdmissionLevelUnspecified), + Admission: gitpod.F(gitpod.AdmissionLevelUnspecified), Name: gitpod.F("x"), Port: gitpod.F(int64(1)), }}), diff --git a/environmentautomationservice.go b/environmentautomationservice.go index e2c9382..ef95c4e 100644 --- a/environmentautomationservice.go +++ b/environmentautomationservice.go @@ -382,18 +382,18 @@ func (r ServiceMetadataParam) MarshalJSON() (data []byte, err error) { type ServicePhase string const ( - ServicePhaseServicePhaseUnspecified ServicePhase = "SERVICE_PHASE_UNSPECIFIED" - ServicePhaseServicePhaseStarting ServicePhase = "SERVICE_PHASE_STARTING" - ServicePhaseServicePhaseRunning ServicePhase = "SERVICE_PHASE_RUNNING" - ServicePhaseServicePhaseStopping ServicePhase = "SERVICE_PHASE_STOPPING" - ServicePhaseServicePhaseStopped ServicePhase = "SERVICE_PHASE_STOPPED" - ServicePhaseServicePhaseFailed ServicePhase = "SERVICE_PHASE_FAILED" - ServicePhaseServicePhaseDeleted ServicePhase = "SERVICE_PHASE_DELETED" + 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 (r ServicePhase) IsKnown() bool { switch r { - case ServicePhaseServicePhaseUnspecified, ServicePhaseServicePhaseStarting, ServicePhaseServicePhaseRunning, ServicePhaseServicePhaseStopping, ServicePhaseServicePhaseStopped, ServicePhaseServicePhaseFailed, ServicePhaseServicePhaseDeleted: + case ServicePhaseUnspecified, ServicePhaseStarting, ServicePhaseRunning, ServicePhaseStopping, ServicePhaseStopped, ServicePhaseFailed, ServicePhaseDeleted: return true } return false diff --git a/environmentautomationservice_test.go b/environmentautomationservice_test.go index 9d8a3d6..0381304 100644 --- a/environmentautomationservice_test.go +++ b/environmentautomationservice_test.go @@ -34,7 +34,7 @@ func TestEnvironmentAutomationServiceNewWithOptionalParams(t *testing.T) { CreatedAt: gitpod.F(time.Now()), Creator: gitpod.F(shared.SubjectParam{ ID: gitpod.F("id"), - Principal: gitpod.F(shared.PrincipalPrincipalUnspecified), + Principal: gitpod.F(shared.PrincipalUnspecified), }), Description: gitpod.F("description"), Name: gitpod.F("x"), @@ -51,7 +51,7 @@ func TestEnvironmentAutomationServiceNewWithOptionalParams(t *testing.T) { Start: gitpod.F("x"), Stop: gitpod.F("stop"), }), - DesiredPhase: gitpod.F(gitpod.ServicePhaseServicePhaseUnspecified), + DesiredPhase: gitpod.F(gitpod.ServicePhaseUnspecified), RunsOn: gitpod.F(shared.RunsOnParam{ Docker: gitpod.F(shared.RunsOnDockerParam{ Environment: gitpod.F([]string{"string"}), @@ -138,7 +138,7 @@ func TestEnvironmentAutomationServiceUpdateWithOptionalParams(t *testing.T) { Status: gitpod.F(gitpod.EnvironmentAutomationServiceUpdateParamsStatus{ FailureMessage: gitpod.F("failureMessage"), LogURL: gitpod.F("logUrl"), - Phase: gitpod.F(gitpod.ServicePhaseServicePhaseUnspecified), + Phase: gitpod.F(gitpod.ServicePhaseUnspecified), Session: gitpod.F("session"), }), }) diff --git a/environmentautomationtask_test.go b/environmentautomationtask_test.go index fea2171..1a3e517 100644 --- a/environmentautomationtask_test.go +++ b/environmentautomationtask_test.go @@ -35,7 +35,7 @@ func TestEnvironmentAutomationTaskNewWithOptionalParams(t *testing.T) { CreatedAt: gitpod.F(time.Now()), Creator: gitpod.F(shared.SubjectParam{ ID: gitpod.F("id"), - Principal: gitpod.F(shared.PrincipalPrincipalUnspecified), + Principal: gitpod.F(shared.PrincipalUnspecified), }), Description: gitpod.F("description"), Name: gitpod.F("x"), diff --git a/environmentautomationtaskexecution_test.go b/environmentautomationtaskexecution_test.go index b457e82..b9b3b15 100644 --- a/environmentautomationtaskexecution_test.go +++ b/environmentautomationtaskexecution_test.go @@ -57,7 +57,7 @@ func TestEnvironmentAutomationTaskExecutionListWithOptionalParams(t *testing.T) PageSize: gitpod.F(int64(0)), Filter: gitpod.F(gitpod.EnvironmentAutomationTaskExecutionListParamsFilter{ EnvironmentIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), - Phases: gitpod.F([]shared.TaskExecutionPhase{shared.TaskExecutionPhaseTaskExecutionPhaseUnspecified}), + Phases: gitpod.F([]shared.TaskExecutionPhase{shared.TaskExecutionPhaseUnspecified}), TaskIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), TaskReferences: gitpod.F([]string{"string"}), }), diff --git a/event.go b/event.go index 9711d3e..c2ad21c 100644 --- a/event.go +++ b/event.go @@ -78,16 +78,16 @@ func (r *EventService) WatchStreaming(ctx context.Context, body EventWatchParams type ResourceOperation string const ( - ResourceOperationResourceOperationUnspecified ResourceOperation = "RESOURCE_OPERATION_UNSPECIFIED" - ResourceOperationResourceOperationCreate ResourceOperation = "RESOURCE_OPERATION_CREATE" - ResourceOperationResourceOperationUpdate ResourceOperation = "RESOURCE_OPERATION_UPDATE" - ResourceOperationResourceOperationDelete ResourceOperation = "RESOURCE_OPERATION_DELETE" - ResourceOperationResourceOperationUpdateStatus ResourceOperation = "RESOURCE_OPERATION_UPDATE_STATUS" + 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 (r ResourceOperation) IsKnown() bool { switch r { - case ResourceOperationResourceOperationUnspecified, ResourceOperationResourceOperationCreate, ResourceOperationResourceOperationUpdate, ResourceOperationResourceOperationDelete, ResourceOperationResourceOperationUpdateStatus: + case ResourceOperationUnspecified, ResourceOperationCreate, ResourceOperationUpdate, ResourceOperationDelete, ResourceOperationUpdateStatus: return true } return false @@ -96,29 +96,29 @@ func (r ResourceOperation) IsKnown() bool { type ResourceType string const ( - ResourceTypeResourceTypeUnspecified ResourceType = "RESOURCE_TYPE_UNSPECIFIED" - ResourceTypeResourceTypeEnvironment ResourceType = "RESOURCE_TYPE_ENVIRONMENT" - ResourceTypeResourceTypeRunner ResourceType = "RESOURCE_TYPE_RUNNER" - ResourceTypeResourceTypeProject ResourceType = "RESOURCE_TYPE_PROJECT" - ResourceTypeResourceTypeTask ResourceType = "RESOURCE_TYPE_TASK" - ResourceTypeResourceTypeTaskExecution ResourceType = "RESOURCE_TYPE_TASK_EXECUTION" - ResourceTypeResourceTypeService ResourceType = "RESOURCE_TYPE_SERVICE" - ResourceTypeResourceTypeOrganization ResourceType = "RESOURCE_TYPE_ORGANIZATION" - ResourceTypeResourceTypeUser ResourceType = "RESOURCE_TYPE_USER" - ResourceTypeResourceTypeEnvironmentClass ResourceType = "RESOURCE_TYPE_ENVIRONMENT_CLASS" - ResourceTypeResourceTypeRunnerScmIntegration ResourceType = "RESOURCE_TYPE_RUNNER_SCM_INTEGRATION" - ResourceTypeResourceTypeHostAuthenticationToken ResourceType = "RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN" - ResourceTypeResourceTypeGroup ResourceType = "RESOURCE_TYPE_GROUP" - ResourceTypeResourceTypePersonalAccessToken ResourceType = "RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN" - ResourceTypeResourceTypeUserPreference ResourceType = "RESOURCE_TYPE_USER_PREFERENCE" - ResourceTypeResourceTypeServiceAccount ResourceType = "RESOURCE_TYPE_SERVICE_ACCOUNT" - ResourceTypeResourceTypeSecret ResourceType = "RESOURCE_TYPE_SECRET" - ResourceTypeResourceTypeSSOConfig ResourceType = "RESOURCE_TYPE_SSO_CONFIG" + 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" ) func (r ResourceType) IsKnown() bool { switch r { - case ResourceTypeResourceTypeUnspecified, ResourceTypeResourceTypeEnvironment, ResourceTypeResourceTypeRunner, ResourceTypeResourceTypeProject, ResourceTypeResourceTypeTask, ResourceTypeResourceTypeTaskExecution, ResourceTypeResourceTypeService, ResourceTypeResourceTypeOrganization, ResourceTypeResourceTypeUser, ResourceTypeResourceTypeEnvironmentClass, ResourceTypeResourceTypeRunnerScmIntegration, ResourceTypeResourceTypeHostAuthenticationToken, ResourceTypeResourceTypeGroup, ResourceTypeResourceTypePersonalAccessToken, ResourceTypeResourceTypeUserPreference, ResourceTypeResourceTypeServiceAccount, ResourceTypeResourceTypeSecret, ResourceTypeResourceTypeSSOConfig: + case ResourceTypeUnspecified, ResourceTypeEnvironment, ResourceTypeRunner, ResourceTypeProject, ResourceTypeTask, ResourceTypeTaskExecution, ResourceTypeService, ResourceTypeOrganization, ResourceTypeUser, ResourceTypeEnvironmentClass, ResourceTypeRunnerScmIntegration, ResourceTypeHostAuthenticationToken, ResourceTypeGroup, ResourceTypePersonalAccessToken, ResourceTypeUserPreference, ResourceTypeServiceAccount, ResourceTypeSecret, ResourceTypeSSOConfig: return true } return false diff --git a/event_test.go b/event_test.go index b0bd19d..c41a2a8 100644 --- a/event_test.go +++ b/event_test.go @@ -32,9 +32,9 @@ func TestEventListWithOptionalParams(t *testing.T) { PageSize: gitpod.F(int64(0)), Filter: gitpod.F(gitpod.EventListParamsFilter{ ActorIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), - ActorPrincipals: gitpod.F([]shared.Principal{shared.PrincipalPrincipalUnspecified}), + ActorPrincipals: gitpod.F([]shared.Principal{shared.PrincipalUnspecified}), SubjectIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), - SubjectTypes: gitpod.F([]gitpod.ResourceType{gitpod.ResourceTypeResourceTypeUnspecified}), + SubjectTypes: gitpod.F([]gitpod.ResourceType{gitpod.ResourceTypeUnspecified}), }), Pagination: gitpod.F(gitpod.EventListParamsPagination{ Token: gitpod.F("token"), diff --git a/organization.go b/organization.go index 074e9b1..ab44c97 100644 --- a/organization.go +++ b/organization.go @@ -503,14 +503,14 @@ func (r organizationMemberJSON) RawJSON() string { type Scope string const ( - ScopeScopeUnspecified Scope = "SCOPE_UNSPECIFIED" - ScopeScopeMember Scope = "SCOPE_MEMBER" - ScopeScopeAll Scope = "SCOPE_ALL" + ScopeUnspecified Scope = "SCOPE_UNSPECIFIED" + ScopeMember Scope = "SCOPE_MEMBER" + ScopeAll Scope = "SCOPE_ALL" ) func (r Scope) IsKnown() bool { switch r { - case ScopeScopeUnspecified, ScopeScopeMember, ScopeScopeAll: + case ScopeUnspecified, ScopeMember, ScopeAll: return true } return false diff --git a/organization_test.go b/organization_test.go index 523c8c1..d79cd38 100644 --- a/organization_test.go +++ b/organization_test.go @@ -115,7 +115,7 @@ func TestOrganizationListWithOptionalParams(t *testing.T) { Token: gitpod.F("token"), PageSize: gitpod.F(int64(100)), }), - Scope: gitpod.F(gitpod.ScopeScopeUnspecified), + Scope: gitpod.F(gitpod.ScopeUnspecified), }) if err != nil { var apierr *gitpod.Error @@ -248,7 +248,7 @@ func TestOrganizationSetRoleWithOptionalParams(t *testing.T) { ) _, err := client.Organizations.SetRole(context.TODO(), gitpod.OrganizationSetRoleParams{ OrganizationID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Role: gitpod.F(shared.OrganizationRoleOrganizationRoleUnspecified), + Role: gitpod.F(shared.OrganizationRoleUnspecified), UserID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }) if err != nil { diff --git a/organizationssoconfiguration.go b/organizationssoconfiguration.go index ca9f231..185ce3b 100644 --- a/organizationssoconfiguration.go +++ b/organizationssoconfiguration.go @@ -92,14 +92,14 @@ func (r *OrganizationSSOConfigurationService) Delete(ctx context.Context, body O type ProviderType string const ( - ProviderTypeProviderTypeUnspecified ProviderType = "PROVIDER_TYPE_UNSPECIFIED" - ProviderTypeProviderTypeBuiltin ProviderType = "PROVIDER_TYPE_BUILTIN" - ProviderTypeProviderTypeCustom ProviderType = "PROVIDER_TYPE_CUSTOM" + ProviderTypeUnspecified ProviderType = "PROVIDER_TYPE_UNSPECIFIED" + ProviderTypeBuiltin ProviderType = "PROVIDER_TYPE_BUILTIN" + ProviderTypeCustom ProviderType = "PROVIDER_TYPE_CUSTOM" ) func (r ProviderType) IsKnown() bool { switch r { - case ProviderTypeProviderTypeUnspecified, ProviderTypeProviderTypeBuiltin, ProviderTypeProviderTypeCustom: + case ProviderTypeUnspecified, ProviderTypeBuiltin, ProviderTypeCustom: return true } return false @@ -149,14 +149,14 @@ func (r ssoConfigurationJSON) RawJSON() string { type SSOConfigurationState string const ( - SSOConfigurationStateSSOConfigurationStateUnspecified SSOConfigurationState = "SSO_CONFIGURATION_STATE_UNSPECIFIED" - SSOConfigurationStateSSOConfigurationStateInactive SSOConfigurationState = "SSO_CONFIGURATION_STATE_INACTIVE" - SSOConfigurationStateSSOConfigurationStateActive SSOConfigurationState = "SSO_CONFIGURATION_STATE_ACTIVE" + SSOConfigurationStateUnspecified SSOConfigurationState = "SSO_CONFIGURATION_STATE_UNSPECIFIED" + SSOConfigurationStateInactive SSOConfigurationState = "SSO_CONFIGURATION_STATE_INACTIVE" + SSOConfigurationStateActive SSOConfigurationState = "SSO_CONFIGURATION_STATE_ACTIVE" ) func (r SSOConfigurationState) IsKnown() bool { switch r { - case SSOConfigurationStateSSOConfigurationStateUnspecified, SSOConfigurationStateSSOConfigurationStateInactive, SSOConfigurationStateSSOConfigurationStateActive: + case SSOConfigurationStateUnspecified, SSOConfigurationStateInactive, SSOConfigurationStateActive: return true } return false diff --git a/organizationssoconfiguration_test.go b/organizationssoconfiguration_test.go index fec6b73..b0e9929 100644 --- a/organizationssoconfiguration_test.go +++ b/organizationssoconfiguration_test.go @@ -89,7 +89,7 @@ func TestOrganizationSSOConfigurationUpdateWithOptionalParams(t *testing.T) { EmailDomain: gitpod.F("xxxx"), IssuerURL: gitpod.F("https://example.com"), SSOConfigurationID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - State: gitpod.F(gitpod.SSOConfigurationStateSSOConfigurationStateUnspecified), + State: gitpod.F(gitpod.SSOConfigurationStateUnspecified), }) if err != nil { var apierr *gitpod.Error diff --git a/projectpolicy.go b/projectpolicy.go index 2300da1..d93edf3 100644 --- a/projectpolicy.go +++ b/projectpolicy.go @@ -107,14 +107,14 @@ func (r projectPolicyJSON) RawJSON() string { type ProjectRole string const ( - ProjectRoleProjectRoleUnspecified ProjectRole = "PROJECT_ROLE_UNSPECIFIED" - ProjectRoleProjectRoleAdmin ProjectRole = "PROJECT_ROLE_ADMIN" - ProjectRoleProjectRoleUser ProjectRole = "PROJECT_ROLE_USER" + ProjectRoleUnspecified ProjectRole = "PROJECT_ROLE_UNSPECIFIED" + ProjectRoleAdmin ProjectRole = "PROJECT_ROLE_ADMIN" + ProjectRoleUser ProjectRole = "PROJECT_ROLE_USER" ) func (r ProjectRole) IsKnown() bool { switch r { - case ProjectRoleProjectRoleUnspecified, ProjectRoleProjectRoleAdmin, ProjectRoleProjectRoleUser: + case ProjectRoleUnspecified, ProjectRoleAdmin, ProjectRoleUser: return true } return false diff --git a/projectpolicy_test.go b/projectpolicy_test.go index d360543..34e91fd 100644 --- a/projectpolicy_test.go +++ b/projectpolicy_test.go @@ -29,7 +29,7 @@ func TestProjectPolicyNewWithOptionalParams(t *testing.T) { _, err := client.Projects.Policies.New(context.TODO(), gitpod.ProjectPolicyNewParams{ GroupID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), ProjectID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Role: gitpod.F(gitpod.ProjectRoleProjectRoleUnspecified), + Role: gitpod.F(gitpod.ProjectRoleUnspecified), }) if err != nil { var apierr *gitpod.Error @@ -56,7 +56,7 @@ func TestProjectPolicyUpdateWithOptionalParams(t *testing.T) { _, err := client.Projects.Policies.Update(context.TODO(), gitpod.ProjectPolicyUpdateParams{ GroupID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), ProjectID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Role: gitpod.F(gitpod.ProjectRoleProjectRoleUnspecified), + Role: gitpod.F(gitpod.ProjectRoleUnspecified), }) if err != nil { var apierr *gitpod.Error diff --git a/runner.go b/runner.go index 6f577b6..0c7f219 100644 --- a/runner.go +++ b/runner.go @@ -360,13 +360,13 @@ func (r runnerJSON) RawJSON() string { type RunnerCapability string const ( - RunnerCapabilityRunnerCapabilityUnspecified RunnerCapability = "RUNNER_CAPABILITY_UNSPECIFIED" - RunnerCapabilityRunnerCapabilityFetchLocalScmIntegrations RunnerCapability = "RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS" + RunnerCapabilityUnspecified RunnerCapability = "RUNNER_CAPABILITY_UNSPECIFIED" + RunnerCapabilityFetchLocalScmIntegrations RunnerCapability = "RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS" ) func (r RunnerCapability) IsKnown() bool { switch r { - case RunnerCapabilityRunnerCapabilityUnspecified, RunnerCapabilityRunnerCapabilityFetchLocalScmIntegrations: + case RunnerCapabilityUnspecified, RunnerCapabilityFetchLocalScmIntegrations: return true } return false @@ -421,15 +421,15 @@ func (r RunnerConfigurationParam) MarshalJSON() (data []byte, err error) { type RunnerKind string const ( - RunnerKindRunnerKindUnspecified RunnerKind = "RUNNER_KIND_UNSPECIFIED" - RunnerKindRunnerKindLocal RunnerKind = "RUNNER_KIND_LOCAL" - RunnerKindRunnerKindRemote RunnerKind = "RUNNER_KIND_REMOTE" - RunnerKindRunnerKindLocalConfiguration RunnerKind = "RUNNER_KIND_LOCAL_CONFIGURATION" + RunnerKindUnspecified RunnerKind = "RUNNER_KIND_UNSPECIFIED" + RunnerKindLocal RunnerKind = "RUNNER_KIND_LOCAL" + RunnerKindRemote RunnerKind = "RUNNER_KIND_REMOTE" + RunnerKindLocalConfiguration RunnerKind = "RUNNER_KIND_LOCAL_CONFIGURATION" ) func (r RunnerKind) IsKnown() bool { switch r { - case RunnerKindRunnerKindUnspecified, RunnerKindRunnerKindLocal, RunnerKindRunnerKindRemote, RunnerKindRunnerKindLocalConfiguration: + case RunnerKindUnspecified, RunnerKindLocal, RunnerKindRemote, RunnerKindLocalConfiguration: return true } return false @@ -439,18 +439,18 @@ func (r RunnerKind) IsKnown() bool { type RunnerPhase string const ( - RunnerPhaseRunnerPhaseUnspecified RunnerPhase = "RUNNER_PHASE_UNSPECIFIED" - RunnerPhaseRunnerPhaseCreated RunnerPhase = "RUNNER_PHASE_CREATED" - RunnerPhaseRunnerPhaseInactive RunnerPhase = "RUNNER_PHASE_INACTIVE" - RunnerPhaseRunnerPhaseActive RunnerPhase = "RUNNER_PHASE_ACTIVE" - RunnerPhaseRunnerPhaseDeleting RunnerPhase = "RUNNER_PHASE_DELETING" - RunnerPhaseRunnerPhaseDeleted RunnerPhase = "RUNNER_PHASE_DELETED" - RunnerPhaseRunnerPhaseDegraded RunnerPhase = "RUNNER_PHASE_DEGRADED" + 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 (r RunnerPhase) IsKnown() bool { switch r { - case RunnerPhaseRunnerPhaseUnspecified, RunnerPhaseRunnerPhaseCreated, RunnerPhaseRunnerPhaseInactive, RunnerPhaseRunnerPhaseActive, RunnerPhaseRunnerPhaseDeleting, RunnerPhaseRunnerPhaseDeleted, RunnerPhaseRunnerPhaseDegraded: + case RunnerPhaseUnspecified, RunnerPhaseCreated, RunnerPhaseInactive, RunnerPhaseActive, RunnerPhaseDeleting, RunnerPhaseDeleted, RunnerPhaseDegraded: return true } return false @@ -462,15 +462,15 @@ func (r RunnerPhase) IsKnown() bool { type RunnerProvider string const ( - RunnerProviderRunnerProviderUnspecified RunnerProvider = "RUNNER_PROVIDER_UNSPECIFIED" - RunnerProviderRunnerProviderAwsEc2 RunnerProvider = "RUNNER_PROVIDER_AWS_EC2" - RunnerProviderRunnerProviderLinuxHost RunnerProvider = "RUNNER_PROVIDER_LINUX_HOST" - RunnerProviderRunnerProviderDesktopMac RunnerProvider = "RUNNER_PROVIDER_DESKTOP_MAC" + RunnerProviderUnspecified RunnerProvider = "RUNNER_PROVIDER_UNSPECIFIED" + RunnerProviderAwsEc2 RunnerProvider = "RUNNER_PROVIDER_AWS_EC2" + RunnerProviderLinuxHost RunnerProvider = "RUNNER_PROVIDER_LINUX_HOST" + RunnerProviderDesktopMac RunnerProvider = "RUNNER_PROVIDER_DESKTOP_MAC" ) func (r RunnerProvider) IsKnown() bool { switch r { - case RunnerProviderRunnerProviderUnspecified, RunnerProviderRunnerProviderAwsEc2, RunnerProviderRunnerProviderLinuxHost, RunnerProviderRunnerProviderDesktopMac: + case RunnerProviderUnspecified, RunnerProviderAwsEc2, RunnerProviderLinuxHost, RunnerProviderDesktopMac: return true } return false @@ -479,14 +479,14 @@ func (r RunnerProvider) IsKnown() bool { type RunnerReleaseChannel string const ( - RunnerReleaseChannelRunnerReleaseChannelUnspecified RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_UNSPECIFIED" - RunnerReleaseChannelRunnerReleaseChannelStable RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_STABLE" - RunnerReleaseChannelRunnerReleaseChannelLatest RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_LATEST" + RunnerReleaseChannelUnspecified RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_UNSPECIFIED" + RunnerReleaseChannelStable RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_STABLE" + RunnerReleaseChannelLatest RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_LATEST" ) func (r RunnerReleaseChannel) IsKnown() bool { switch r { - case RunnerReleaseChannelRunnerReleaseChannelUnspecified, RunnerReleaseChannelRunnerReleaseChannelStable, RunnerReleaseChannelRunnerReleaseChannelLatest: + case RunnerReleaseChannelUnspecified, RunnerReleaseChannelStable, RunnerReleaseChannelLatest: return true } return false diff --git a/runner_test.go b/runner_test.go index 7db38ab..906be7f 100644 --- a/runner_test.go +++ b/runner_test.go @@ -27,16 +27,16 @@ func TestRunnerNewWithOptionalParams(t *testing.T) { option.WithBearerToken("My Bearer Token"), ) _, err := client.Runners.New(context.TODO(), gitpod.RunnerNewParams{ - Kind: gitpod.F(gitpod.RunnerKindRunnerKindUnspecified), + Kind: gitpod.F(gitpod.RunnerKindUnspecified), Name: gitpod.F("xxx"), - Provider: gitpod.F(gitpod.RunnerProviderRunnerProviderUnspecified), + Provider: gitpod.F(gitpod.RunnerProviderUnspecified), Spec: gitpod.F(gitpod.RunnerSpecParam{ Configuration: gitpod.F(gitpod.RunnerConfigurationParam{ AutoUpdate: gitpod.F(true), Region: gitpod.F("region"), - ReleaseChannel: gitpod.F(gitpod.RunnerReleaseChannelRunnerReleaseChannelUnspecified), + ReleaseChannel: gitpod.F(gitpod.RunnerReleaseChannelUnspecified), }), - DesiredPhase: gitpod.F(gitpod.RunnerPhaseRunnerPhaseUnspecified), + DesiredPhase: gitpod.F(gitpod.RunnerPhaseUnspecified), }), }) if err != nil { @@ -92,9 +92,9 @@ func TestRunnerUpdateWithOptionalParams(t *testing.T) { Spec: gitpod.F(gitpod.RunnerUpdateParamsSpec{ Configuration: gitpod.F(gitpod.RunnerUpdateParamsSpecConfiguration{ AutoUpdate: gitpod.F(true), - ReleaseChannel: gitpod.F(gitpod.RunnerReleaseChannelRunnerReleaseChannelUnspecified), + ReleaseChannel: gitpod.F(gitpod.RunnerReleaseChannelUnspecified), }), - DesiredPhase: gitpod.F(gitpod.RunnerPhaseRunnerPhaseUnspecified), + DesiredPhase: gitpod.F(gitpod.RunnerPhaseUnspecified), }), }) if err != nil { @@ -124,8 +124,8 @@ func TestRunnerListWithOptionalParams(t *testing.T) { PageSize: gitpod.F(int64(0)), Filter: gitpod.F(gitpod.RunnerListParamsFilter{ CreatorIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), - Kinds: gitpod.F([]gitpod.RunnerKind{gitpod.RunnerKindRunnerKindUnspecified}), - Providers: gitpod.F([]gitpod.RunnerProvider{gitpod.RunnerProviderRunnerProviderUnspecified}), + Kinds: gitpod.F([]gitpod.RunnerKind{gitpod.RunnerKindUnspecified}), + Providers: gitpod.F([]gitpod.RunnerProvider{gitpod.RunnerProviderUnspecified}), }), Pagination: gitpod.F(gitpod.RunnerListParamsPagination{ Token: gitpod.F("token"), diff --git a/runnerconfigurationhostauthenticationtoken.go b/runnerconfigurationhostauthenticationtoken.go index 42acdf3..8e00e73 100644 --- a/runnerconfigurationhostauthenticationtoken.go +++ b/runnerconfigurationhostauthenticationtoken.go @@ -213,14 +213,14 @@ func (r hostAuthenticationTokenJSON) RawJSON() string { type HostAuthenticationTokenSource string const ( - HostAuthenticationTokenSourceHostAuthenticationTokenSourceUnspecified HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED" - HostAuthenticationTokenSourceHostAuthenticationTokenSourceOAuth HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH" - HostAuthenticationTokenSourceHostAuthenticationTokenSourcePat HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_PAT" + HostAuthenticationTokenSourceUnspecified HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED" + HostAuthenticationTokenSourceOAuth HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH" + HostAuthenticationTokenSourcePat HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_PAT" ) func (r HostAuthenticationTokenSource) IsKnown() bool { switch r { - case HostAuthenticationTokenSourceHostAuthenticationTokenSourceUnspecified, HostAuthenticationTokenSourceHostAuthenticationTokenSourceOAuth, HostAuthenticationTokenSourceHostAuthenticationTokenSourcePat: + case HostAuthenticationTokenSourceUnspecified, HostAuthenticationTokenSourceOAuth, HostAuthenticationTokenSourcePat: return true } return false diff --git a/runnerconfigurationhostauthenticationtoken_test.go b/runnerconfigurationhostauthenticationtoken_test.go index eabffb4..fdd60a5 100644 --- a/runnerconfigurationhostauthenticationtoken_test.go +++ b/runnerconfigurationhostauthenticationtoken_test.go @@ -33,7 +33,7 @@ func TestRunnerConfigurationHostAuthenticationTokenNewWithOptionalParams(t *test Host: gitpod.F("x"), RefreshToken: gitpod.F("refreshToken"), RunnerID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Source: gitpod.F(gitpod.HostAuthenticationTokenSourceHostAuthenticationTokenSourceUnspecified), + Source: gitpod.F(gitpod.HostAuthenticationTokenSourceUnspecified), UserID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }) if err != nil { diff --git a/runnerpolicy.go b/runnerpolicy.go index 0d8a529..1a99199 100644 --- a/runnerpolicy.go +++ b/runnerpolicy.go @@ -107,14 +107,14 @@ func (r runnerPolicyJSON) RawJSON() string { type RunnerRole string const ( - RunnerRoleRunnerRoleUnspecified RunnerRole = "RUNNER_ROLE_UNSPECIFIED" - RunnerRoleRunnerRoleAdmin RunnerRole = "RUNNER_ROLE_ADMIN" - RunnerRoleRunnerRoleUser RunnerRole = "RUNNER_ROLE_USER" + RunnerRoleUnspecified RunnerRole = "RUNNER_ROLE_UNSPECIFIED" + RunnerRoleAdmin RunnerRole = "RUNNER_ROLE_ADMIN" + RunnerRoleUser RunnerRole = "RUNNER_ROLE_USER" ) func (r RunnerRole) IsKnown() bool { switch r { - case RunnerRoleRunnerRoleUnspecified, RunnerRoleRunnerRoleAdmin, RunnerRoleRunnerRoleUser: + case RunnerRoleUnspecified, RunnerRoleAdmin, RunnerRoleUser: return true } return false diff --git a/runnerpolicy_test.go b/runnerpolicy_test.go index c8ba9fc..e309cfa 100644 --- a/runnerpolicy_test.go +++ b/runnerpolicy_test.go @@ -28,7 +28,7 @@ func TestRunnerPolicyNewWithOptionalParams(t *testing.T) { ) _, err := client.Runners.Policies.New(context.TODO(), gitpod.RunnerPolicyNewParams{ GroupID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Role: gitpod.F(gitpod.RunnerRoleRunnerRoleUnspecified), + Role: gitpod.F(gitpod.RunnerRoleUnspecified), RunnerID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }) if err != nil { @@ -55,7 +55,7 @@ func TestRunnerPolicyUpdateWithOptionalParams(t *testing.T) { ) _, err := client.Runners.Policies.Update(context.TODO(), gitpod.RunnerPolicyUpdateParams{ GroupID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - Role: gitpod.F(gitpod.RunnerRoleRunnerRoleUnspecified), + Role: gitpod.F(gitpod.RunnerRoleUnspecified), RunnerID: gitpod.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }) if err != nil { diff --git a/shared/shared.go b/shared/shared.go index 2c6474a..ad6366d 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -147,14 +147,14 @@ func (r FieldValueParam) MarshalJSON() (data []byte, err error) { type OrganizationRole string const ( - OrganizationRoleOrganizationRoleUnspecified OrganizationRole = "ORGANIZATION_ROLE_UNSPECIFIED" - OrganizationRoleOrganizationRoleAdmin OrganizationRole = "ORGANIZATION_ROLE_ADMIN" - OrganizationRoleOrganizationRoleMember OrganizationRole = "ORGANIZATION_ROLE_MEMBER" + OrganizationRoleUnspecified OrganizationRole = "ORGANIZATION_ROLE_UNSPECIFIED" + OrganizationRoleAdmin OrganizationRole = "ORGANIZATION_ROLE_ADMIN" + OrganizationRoleMember OrganizationRole = "ORGANIZATION_ROLE_MEMBER" ) func (r OrganizationRole) IsKnown() bool { switch r { - case OrganizationRoleOrganizationRoleUnspecified, OrganizationRoleOrganizationRoleAdmin, OrganizationRoleOrganizationRoleMember: + case OrganizationRoleUnspecified, OrganizationRoleAdmin, OrganizationRoleMember: return true } return false @@ -163,17 +163,17 @@ func (r OrganizationRole) IsKnown() bool { type Principal string const ( - PrincipalPrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED" - PrincipalPrincipalAccount Principal = "PRINCIPAL_ACCOUNT" - PrincipalPrincipalUser Principal = "PRINCIPAL_USER" - PrincipalPrincipalRunner Principal = "PRINCIPAL_RUNNER" - PrincipalPrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT" - PrincipalPrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT" + PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED" + PrincipalAccount Principal = "PRINCIPAL_ACCOUNT" + PrincipalUser Principal = "PRINCIPAL_USER" + PrincipalRunner Principal = "PRINCIPAL_RUNNER" + PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT" + PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT" ) func (r Principal) IsKnown() bool { switch r { - case PrincipalPrincipalUnspecified, PrincipalPrincipalAccount, PrincipalPrincipalUser, PrincipalPrincipalRunner, PrincipalPrincipalEnvironment, PrincipalPrincipalServiceAccount: + case PrincipalUnspecified, PrincipalAccount, PrincipalUser, PrincipalRunner, PrincipalEnvironment, PrincipalServiceAccount: return true } return false @@ -603,17 +603,17 @@ func (r taskExecutionMetadataJSON) RawJSON() string { type TaskExecutionPhase string const ( - TaskExecutionPhaseTaskExecutionPhaseUnspecified TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED" - TaskExecutionPhaseTaskExecutionPhasePending TaskExecutionPhase = "TASK_EXECUTION_PHASE_PENDING" - TaskExecutionPhaseTaskExecutionPhaseRunning TaskExecutionPhase = "TASK_EXECUTION_PHASE_RUNNING" - TaskExecutionPhaseTaskExecutionPhaseSucceeded TaskExecutionPhase = "TASK_EXECUTION_PHASE_SUCCEEDED" - TaskExecutionPhaseTaskExecutionPhaseFailed TaskExecutionPhase = "TASK_EXECUTION_PHASE_FAILED" - TaskExecutionPhaseTaskExecutionPhaseStopped TaskExecutionPhase = "TASK_EXECUTION_PHASE_STOPPED" + TaskExecutionPhaseUnspecified TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED" + TaskExecutionPhasePending TaskExecutionPhase = "TASK_EXECUTION_PHASE_PENDING" + TaskExecutionPhaseRunning TaskExecutionPhase = "TASK_EXECUTION_PHASE_RUNNING" + TaskExecutionPhaseSucceeded TaskExecutionPhase = "TASK_EXECUTION_PHASE_SUCCEEDED" + TaskExecutionPhaseFailed TaskExecutionPhase = "TASK_EXECUTION_PHASE_FAILED" + TaskExecutionPhaseStopped TaskExecutionPhase = "TASK_EXECUTION_PHASE_STOPPED" ) func (r TaskExecutionPhase) IsKnown() bool { switch r { - case TaskExecutionPhaseTaskExecutionPhaseUnspecified, TaskExecutionPhaseTaskExecutionPhasePending, TaskExecutionPhaseTaskExecutionPhaseRunning, TaskExecutionPhaseTaskExecutionPhaseSucceeded, TaskExecutionPhaseTaskExecutionPhaseFailed, TaskExecutionPhaseTaskExecutionPhaseStopped: + case TaskExecutionPhaseUnspecified, TaskExecutionPhasePending, TaskExecutionPhaseRunning, TaskExecutionPhaseSucceeded, TaskExecutionPhaseFailed, TaskExecutionPhaseStopped: return true } return false @@ -795,15 +795,15 @@ func (r taskExecutionStatusStepJSON) RawJSON() string { type UserStatus string const ( - UserStatusUserStatusUnspecified UserStatus = "USER_STATUS_UNSPECIFIED" - UserStatusUserStatusActive UserStatus = "USER_STATUS_ACTIVE" - UserStatusUserStatusSuspended UserStatus = "USER_STATUS_SUSPENDED" - UserStatusUserStatusLeft UserStatus = "USER_STATUS_LEFT" + UserStatusUnspecified UserStatus = "USER_STATUS_UNSPECIFIED" + UserStatusActive UserStatus = "USER_STATUS_ACTIVE" + UserStatusSuspended UserStatus = "USER_STATUS_SUSPENDED" + UserStatusLeft UserStatus = "USER_STATUS_LEFT" ) func (r UserStatus) IsKnown() bool { switch r { - case UserStatusUserStatusUnspecified, UserStatusUserStatusActive, UserStatusUserStatusSuspended, UserStatusUserStatusLeft: + case UserStatusUnspecified, UserStatusActive, UserStatusSuspended, UserStatusLeft: return true } return false