From 4f35021138b17f3f70e535e58660a61d5be1a2d5 Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 13 Nov 2025 10:58:07 +0200 Subject: [PATCH 1/3] fix: update promotion orch golang types to support new promotions list query on cli v2 --- .../promotion-orchestrator/models_gen.go | 1813 ++++++++++++++++- 1 file changed, 1718 insertions(+), 95 deletions(-) diff --git a/pkg/model/promotion-orchestrator/models_gen.go b/pkg/model/promotion-orchestrator/models_gen.go index e1861f5..8ef3ee1 100644 --- a/pkg/model/promotion-orchestrator/models_gen.go +++ b/pkg/model/promotion-orchestrator/models_gen.go @@ -3,6 +3,7 @@ package model import ( + "bytes" "fmt" "io" "strconv" @@ -142,6 +143,10 @@ type ProjectBasedEntity interface { IsProjectBasedEntity() } +type PromotionOrReleaseNode interface { + IsPromotionOrReleaseNode() +} + // PromotionTemplateFields type PromotionTemplateFields interface { IsPromotionTemplateFields() @@ -341,8 +346,6 @@ type AccountFeatures struct { Abac *bool `json:"abac,omitempty"` // New ABAC permissions page AbacV2 *bool `json:"abacV2,omitempty"` - // Shows user git personal token settings menu in project one - UnifiedUserGitTokens *bool `json:"unifiedUserGitTokens,omitempty"` // Adds ability to rollback rollout from rollout drawer in app timeline GitOpsRolloutRollback *bool `json:"gitOpsRolloutRollback,omitempty"` // Shows Beamer widget for all platforms (What's new) @@ -421,6 +424,8 @@ type AccountFeatures struct { HeaderLiveState *bool `json:"headerLiveState,omitempty"` // Enables promotion orchestration for products including product's releases API and promotion flow API PromotionOrchestration *bool `json:"promotionOrchestration,omitempty"` + // Enables the main releases page, allowing users to view releases from all products + MainReleasesPage *bool `json:"mainReleasesPage,omitempty"` // Enables promotion policies view PromotionPolicies *bool `json:"promotionPolicies,omitempty"` // Enables git commit statuses for product release promotions @@ -501,6 +506,14 @@ type AccountFeatures struct { GitlabSupportInRuntimeWizard *bool `json:"gitlabSupportInRuntimeWizard,omitempty"` // Adds ability to connect Bitbucket as git provider in runtime installation wizard BitbucketSupportInRuntimeWizard *bool `json:"bitbucketSupportInRuntimeWizard,omitempty"` + // Shows warning message that promotions are in early access + PromotionsEarlyAccessWarning *bool `json:"promotionsEarlyAccessWarning,omitempty"` + // Enables new user settings page based on Gitops UI under /2.0 path + NewUserSettingsPage *bool `json:"newUserSettingsPage,omitempty"` + // Hides classic-only related sections from new user settings page + HideClassicRelatedSectionsFromNewUserSettingsPage *bool `json:"hideClassicRelatedSectionsFromNewUserSettingsPage,omitempty"` + // Uses new endpoints for retrieval of product promotions(releases) across all corresponding views. + NewPromotionEndpoints *bool `json:"newPromotionEndpoints,omitempty"` } // Account Gitops Usage @@ -3225,10 +3238,12 @@ type EnvironmentCluster struct { RuntimeName string `json:"runtimeName"` // Cluster name Name string `json:"name"` - // Cluster address - Server string `json:"server"` + // Cluster address - resolved dynamically, null if cluster doesn't exist + Server *string `json:"server,omitempty"` // Cluster namespaces Namespaces []string `json:"namespaces"` + // Indicate if the cluster still exists + Exists bool `json:"exists"` } // Environment Cluster @@ -3238,7 +3253,7 @@ type EnvironmentClusterInput struct { // Cluster name Name string `json:"name"` // Cluster address - Server string `json:"server"` + Server *string `json:"server,omitempty"` // Cluster namespaces Namespaces []string `json:"namespaces"` } @@ -6374,6 +6389,8 @@ type ProductComponentFilterArgs struct { HealthStatuses []HealthStatus `json:"healthStatuses,omitempty"` // If 'true' returns components that have at least 1 pending PR HasPendingPullRequests *bool `json:"hasPendingPullRequests,omitempty"` + // Assignment type + ProductAssignment *AssignmentType `json:"productAssignment,omitempty"` } // Info about the workflow that promoted component @@ -6466,6 +6483,8 @@ type ProductFilterArgs struct { AppNames []*string `json:"appNames,omitempty"` // Environments names Environments []*string `json:"environments,omitempty"` + // Promotion flow names + PromotionFlowNames []*string `json:"promotionFlowNames,omitempty"` // Filter by user favorite Favorite *bool `json:"favorite,omitempty"` } @@ -6496,12 +6515,22 @@ type ProductGroupForEnvs struct { ProductComponents []*ProductComponent `json:"productComponents"` } +// Args to filter Product names +type ProductNamesFilterArgs struct { + // Partial name (case insensitive) + PartialName *string `json:"partialName,omitempty"` + // Promotion flow names + PromotionFlowNames []*string `json:"promotionFlowNames,omitempty"` +} + // Product Promotion Flow Selectors type ProductPromotionFlowSelectors struct { // Entity db id Name string `json:"name"` // Group name GitTriggerSelectors []*ProductGitTriggerSelector `json:"gitTriggerSelectors"` + // Indicates whether the specified promotion flow still exists + Exists bool `json:"exists"` } // Product Release @@ -6540,6 +6569,8 @@ type ProductRelease struct { Hooks *ProductReleaseHooks `json:"hooks,omitempty"` } +func (ProductRelease) IsPromotionOrReleaseNode() {} + // Product Release App Step Status Entry type ProductReleaseAppStepStatusEntry struct { // Application step status @@ -6618,6 +6649,8 @@ type ProductReleaseError struct { // Product release filters args type ProductReleaseFiltersArgs struct { + // Product name + ProductNames []string `json:"productNames,omitempty"` // Promotion Flow ids PromotionFlows []string `json:"promotionFlows,omitempty"` // Product release status @@ -6804,6 +6837,34 @@ type ProjectSlice struct { func (ProjectSlice) IsSlice() {} +// Promotion entity +type Promotion struct { + // Promotion ID + ID string `json:"id"` + // Account ID + AccountID string `json:"accountId"` + // Product name + ProductName string `json:"productName"` + // Promotion flow name + PromotionFlowName *string `json:"promotionFlowName,omitempty"` + // Trigger environment + TriggerEnvironment string `json:"triggerEnvironment"` + // Environments array + Environments []*PromotionEnvironment `json:"environments"` + // Trigger commit information + TriggerCommitInfo *PromotionCommitInfo `json:"triggerCommitInfo"` + // Promotion status + Status ProductReleasePublicStatus `json:"status"` + // Created at timestamp + CreatedAt string `json:"createdAt"` + // Updated at timestamp + UpdatedAt *string `json:"updatedAt,omitempty"` + // Promotion app version + PromotionAppVersion *string `json:"promotionAppVersion,omitempty"` +} + +func (Promotion) IsPromotionOrReleaseNode() {} + // Promotion Code type PromotionCode struct { // Id @@ -6834,6 +6895,32 @@ type PromotionCode struct { TimesRedeemed int `json:"timesRedeemed"` } +// Commit information +type PromotionCommitInfo struct { + // Commit SHA + CommitSha string `json:"commitSha"` + // Commit message + CommitMessage string `json:"commitMessage"` + // Commit author + CommitAuthor string `json:"commitAuthor"` + // Commit date + CommitDate string `json:"commitDate"` +} + +// Environment information +type PromotionEnvironment struct { + // Environment name + Name string `json:"name"` + // Dependencies array + DependsOn []string `json:"dependsOn"` + // Environment status + Status EnvironmentStatus `json:"status"` + // Created at timestamp + CreatedAt string `json:"createdAt"` + // Updated at timestamp + UpdatedAt *string `json:"updatedAt,omitempty"` +} + // PromotionFlow entity type PromotionFlow struct { // Object metadata @@ -6920,6 +7007,21 @@ type PromotionHooksDefinitionInput struct { OnFail *string `json:"onFail,omitempty"` } +type PromotionOrReleaseEdge struct { + // Node contains the actual promotion or release data + Node PromotionOrReleaseNode `json:"node"` + // Cursor + Cursor string `json:"cursor"` +} + +// Promotion Slice +type PromotionOrReleaseSlice struct { + // Promotion edges + Edges []*PromotionOrReleaseEdge `json:"edges"` + // Slice information + PageInfo *SliceInfo `json:"pageInfo"` +} + // PromotionPolicy entity type PromotionPolicy struct { // Object metadata @@ -8040,6 +8142,8 @@ type Runtime struct { RuntimeApplicationName *string `json:"runtimeApplicationName,omitempty"` // Is using an external ArgoCD instance instead of the bundled one IsExternalArgoCd *bool `json:"isExternalArgoCd,omitempty"` + // True if the runtime is installed in single namespace mode + IsNamespacedRuntime *bool `json:"isNamespacedRuntime,omitempty"` } func (Runtime) IsBaseEntity() {} @@ -9711,7 +9815,7 @@ func (e AbacActionNames) String() string { return string(e) } -func (e *AbacActionNames) UnmarshalGQL(v interface{}) error { +func (e *AbacActionNames) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -9728,6 +9832,20 @@ func (e AbacActionNames) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AbacActionNames) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AbacActionNames) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // AbacAttributeNames type AbacAttributeNames string @@ -9765,7 +9883,7 @@ func (e AbacAttributeNames) String() string { return string(e) } -func (e *AbacAttributeNames) UnmarshalGQL(v interface{}) error { +func (e *AbacAttributeNames) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -9782,6 +9900,20 @@ func (e AbacAttributeNames) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AbacAttributeNames) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AbacAttributeNames) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Values from AbacEntityValues enum type AbacEntityValues string @@ -9829,7 +9961,7 @@ func (e AbacEntityValues) String() string { return string(e) } -func (e *AbacEntityValues) UnmarshalGQL(v interface{}) error { +func (e *AbacEntityValues) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -9846,6 +9978,20 @@ func (e AbacEntityValues) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AbacEntityValues) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AbacEntityValues) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Access Mode type AccessMode string @@ -9873,7 +10019,7 @@ func (e AccessMode) String() string { return string(e) } -func (e *AccessMode) UnmarshalGQL(v interface{}) error { +func (e *AccessMode) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -9890,6 +10036,20 @@ func (e AccessMode) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AccessMode) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AccessMode) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Analysis Metric Provider Types type AnalysisMetricProviderTypes string @@ -9938,7 +10098,7 @@ func (e AnalysisMetricProviderTypes) String() string { return string(e) } -func (e *AnalysisMetricProviderTypes) UnmarshalGQL(v interface{}) error { +func (e *AnalysisMetricProviderTypes) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -9955,6 +10115,20 @@ func (e AnalysisMetricProviderTypes) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AnalysisMetricProviderTypes) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AnalysisMetricProviderTypes) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // AnalysisPhases type AnalysisPhases string @@ -9994,7 +10168,7 @@ func (e AnalysisPhases) String() string { return string(e) } -func (e *AnalysisPhases) UnmarshalGQL(v interface{}) error { +func (e *AnalysisPhases) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10011,6 +10185,20 @@ func (e AnalysisPhases) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AnalysisPhases) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AnalysisPhases) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // SyncOperationPhase type AppOperationType string @@ -10041,7 +10229,7 @@ func (e AppOperationType) String() string { return string(e) } -func (e *AppOperationType) UnmarshalGQL(v interface{}) error { +func (e *AppOperationType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10058,6 +10246,20 @@ func (e AppOperationType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AppOperationType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AppOperationType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // App-Proxy Status type AppProxyStatus string @@ -10088,7 +10290,7 @@ func (e AppProxyStatus) String() string { return string(e) } -func (e *AppProxyStatus) UnmarshalGQL(v interface{}) error { +func (e *AppProxyStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10105,6 +10307,20 @@ func (e AppProxyStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AppProxyStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AppProxyStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // App Sync Policies type AppSyncPolicies string @@ -10135,7 +10351,7 @@ func (e AppSyncPolicies) String() string { return string(e) } -func (e *AppSyncPolicies) UnmarshalGQL(v interface{}) error { +func (e *AppSyncPolicies) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10152,6 +10368,20 @@ func (e AppSyncPolicies) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *AppSyncPolicies) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AppSyncPolicies) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Application Groups Sorting field type ApplicationGroupsSortingField string @@ -10179,7 +10409,7 @@ func (e ApplicationGroupsSortingField) String() string { return string(e) } -func (e *ApplicationGroupsSortingField) UnmarshalGQL(v interface{}) error { +func (e *ApplicationGroupsSortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10196,6 +10426,20 @@ func (e ApplicationGroupsSortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ApplicationGroupsSortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ApplicationGroupsSortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Application Tree Sorting field type ApplicationTreeSortingField string @@ -10235,7 +10479,7 @@ func (e ApplicationTreeSortingField) String() string { return string(e) } -func (e *ApplicationTreeSortingField) UnmarshalGQL(v interface{}) error { +func (e *ApplicationTreeSortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10252,6 +10496,20 @@ func (e ApplicationTreeSortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ApplicationTreeSortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ApplicationTreeSortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // ArgoCD State type ArgoCdState string @@ -10285,7 +10543,7 @@ func (e ArgoCdState) String() string { return string(e) } -func (e *ArgoCdState) UnmarshalGQL(v interface{}) error { +func (e *ArgoCdState) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10302,6 +10560,78 @@ func (e ArgoCdState) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ArgoCdState) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ArgoCdState) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Assignment type +type AssignmentType string + +const ( + // Linked applications + AssignmentTypeAnnotation AssignmentType = "ANNOTATION" + // Manually attached + AssignmentTypeManually AssignmentType = "MANUALLY" +) + +var AllAssignmentType = []AssignmentType{ + AssignmentTypeAnnotation, + AssignmentTypeManually, +} + +func (e AssignmentType) IsValid() bool { + switch e { + case AssignmentTypeAnnotation, AssignmentTypeManually: + return true + } + return false +} + +func (e AssignmentType) String() string { + return string(e) +} + +func (e *AssignmentType) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = AssignmentType(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid AssignmentType", str) + } + return nil +} + +func (e AssignmentType) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *AssignmentType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e AssignmentType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // ConnectionState contains information about remote resource connection state, currently used for clusters and repositories type ClusterConnectionStatus string @@ -10332,7 +10662,7 @@ func (e ClusterConnectionStatus) String() string { return string(e) } -func (e *ClusterConnectionStatus) UnmarshalGQL(v interface{}) error { +func (e *ClusterConnectionStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10349,6 +10679,20 @@ func (e ClusterConnectionStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ClusterConnectionStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ClusterConnectionStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Commit Status type CommitStatus string @@ -10380,7 +10724,7 @@ func (e CommitStatus) String() string { return string(e) } -func (e *CommitStatus) UnmarshalGQL(v interface{}) error { +func (e *CommitStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10397,6 +10741,20 @@ func (e CommitStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *CommitStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e CommitStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Coupon Duration type CouponDuration string @@ -10424,7 +10782,7 @@ func (e CouponDuration) String() string { return string(e) } -func (e *CouponDuration) UnmarshalGQL(v interface{}) error { +func (e *CouponDuration) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10441,6 +10799,20 @@ func (e CouponDuration) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *CouponDuration) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e CouponDuration) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Deployment Statistics Status type DeploymentStatisticsStatus string @@ -10472,7 +10844,7 @@ func (e DeploymentStatisticsStatus) String() string { return string(e) } -func (e *DeploymentStatisticsStatus) UnmarshalGQL(v interface{}) error { +func (e *DeploymentStatisticsStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10489,6 +10861,20 @@ func (e DeploymentStatisticsStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *DeploymentStatisticsStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e DeploymentStatisticsStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Duration Name type DurationName string @@ -10522,7 +10908,7 @@ func (e DurationName) String() string { return string(e) } -func (e *DurationName) UnmarshalGQL(v interface{}) error { +func (e *DurationName) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10539,6 +10925,20 @@ func (e DurationName) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *DurationName) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e DurationName) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Kind of environment type EnvironmentKind string @@ -10564,7 +10964,7 @@ func (e EnvironmentKind) String() string { return string(e) } -func (e *EnvironmentKind) UnmarshalGQL(v interface{}) error { +func (e *EnvironmentKind) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10581,6 +10981,20 @@ func (e EnvironmentKind) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *EnvironmentKind) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e EnvironmentKind) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // "Relative position of the moved environment in relation to the target environment" type EnvironmentRelativePos string @@ -10606,7 +11020,7 @@ func (e EnvironmentRelativePos) String() string { return string(e) } -func (e *EnvironmentRelativePos) UnmarshalGQL(v interface{}) error { +func (e *EnvironmentRelativePos) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10623,6 +11037,88 @@ func (e EnvironmentRelativePos) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *EnvironmentRelativePos) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e EnvironmentRelativePos) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Environment status enum +type EnvironmentStatus string + +const ( + EnvironmentStatusFailed EnvironmentStatus = "FAILED" + EnvironmentStatusPending EnvironmentStatus = "PENDING" + EnvironmentStatusRunning EnvironmentStatus = "RUNNING" + EnvironmentStatusSkipped EnvironmentStatus = "SKIPPED" + EnvironmentStatusSucceeded EnvironmentStatus = "SUCCEEDED" + EnvironmentStatusSuspended EnvironmentStatus = "SUSPENDED" + EnvironmentStatusTerminated EnvironmentStatus = "TERMINATED" + EnvironmentStatusTerminating EnvironmentStatus = "TERMINATING" +) + +var AllEnvironmentStatus = []EnvironmentStatus{ + EnvironmentStatusFailed, + EnvironmentStatusPending, + EnvironmentStatusRunning, + EnvironmentStatusSkipped, + EnvironmentStatusSucceeded, + EnvironmentStatusSuspended, + EnvironmentStatusTerminated, + EnvironmentStatusTerminating, +} + +func (e EnvironmentStatus) IsValid() bool { + switch e { + case EnvironmentStatusFailed, EnvironmentStatusPending, EnvironmentStatusRunning, EnvironmentStatusSkipped, EnvironmentStatusSucceeded, EnvironmentStatusSuspended, EnvironmentStatusTerminated, EnvironmentStatusTerminating: + return true + } + return false +} + +func (e EnvironmentStatus) String() string { + return string(e) +} + +func (e *EnvironmentStatus) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = EnvironmentStatus(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid EnvironmentStatus", str) + } + return nil +} + +func (e EnvironmentStatus) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *EnvironmentStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e EnvironmentStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Error severity levels type ErrorLevels string @@ -10650,7 +11146,7 @@ func (e ErrorLevels) String() string { return string(e) } -func (e *ErrorLevels) UnmarshalGQL(v interface{}) error { +func (e *ErrorLevels) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10667,6 +11163,20 @@ func (e ErrorLevels) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ErrorLevels) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ErrorLevels) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Extended Workflow Phases type ExtendedWorkflowPhases string @@ -10710,7 +11220,7 @@ func (e ExtendedWorkflowPhases) String() string { return string(e) } -func (e *ExtendedWorkflowPhases) UnmarshalGQL(v interface{}) error { +func (e *ExtendedWorkflowPhases) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10727,6 +11237,20 @@ func (e ExtendedWorkflowPhases) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ExtendedWorkflowPhases) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ExtendedWorkflowPhases) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // GitAuthMode type GitAuthMode string @@ -10757,7 +11281,7 @@ func (e GitAuthMode) String() string { return string(e) } -func (e *GitAuthMode) UnmarshalGQL(v interface{}) error { +func (e *GitAuthMode) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10774,6 +11298,20 @@ func (e GitAuthMode) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *GitAuthMode) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e GitAuthMode) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Git providers type GitProviders string @@ -10810,7 +11348,7 @@ func (e GitProviders) String() string { return string(e) } -func (e *GitProviders) UnmarshalGQL(v interface{}) error { +func (e *GitProviders) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10827,6 +11365,20 @@ func (e GitProviders) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *GitProviders) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e GitProviders) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Types of push event type GitPushPayloadDataTypes string @@ -10852,7 +11404,7 @@ func (e GitPushPayloadDataTypes) String() string { return string(e) } -func (e *GitPushPayloadDataTypes) UnmarshalGQL(v interface{}) error { +func (e *GitPushPayloadDataTypes) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10869,6 +11421,20 @@ func (e GitPushPayloadDataTypes) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *GitPushPayloadDataTypes) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e GitPushPayloadDataTypes) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Gitops Releases Sorting field type GitopsReleasesSortingField string @@ -10902,7 +11468,7 @@ func (e GitopsReleasesSortingField) String() string { return string(e) } -func (e *GitopsReleasesSortingField) UnmarshalGQL(v interface{}) error { +func (e *GitopsReleasesSortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10919,6 +11485,20 @@ func (e GitopsReleasesSortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *GitopsReleasesSortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e GitopsReleasesSortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Health Error codes type HealthErrorCodes string @@ -10958,7 +11538,7 @@ func (e HealthErrorCodes) String() string { return string(e) } -func (e *HealthErrorCodes) UnmarshalGQL(v interface{}) error { +func (e *HealthErrorCodes) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -10975,6 +11555,20 @@ func (e HealthErrorCodes) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *HealthErrorCodes) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e HealthErrorCodes) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Health Status type HealthStatus string @@ -11017,7 +11611,7 @@ func (e HealthStatus) String() string { return string(e) } -func (e *HealthStatus) UnmarshalGQL(v interface{}) error { +func (e *HealthStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11034,6 +11628,20 @@ func (e HealthStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *HealthStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e HealthStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Image pull policy // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated type ImagePullPolicy string @@ -11062,7 +11670,7 @@ func (e ImagePullPolicy) String() string { return string(e) } -func (e *ImagePullPolicy) UnmarshalGQL(v interface{}) error { +func (e *ImagePullPolicy) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11079,6 +11687,20 @@ func (e ImagePullPolicy) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ImagePullPolicy) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ImagePullPolicy) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Image registry domain types type ImageRegistryType string @@ -11121,7 +11743,7 @@ func (e ImageRegistryType) String() string { return string(e) } -func (e *ImageRegistryType) UnmarshalGQL(v interface{}) error { +func (e *ImageRegistryType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11138,9 +11760,23 @@ func (e ImageRegistryType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } -// Image Repo Tag Sorting field -type ImageRepoTagSortingField string - +func (e *ImageRegistryType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ImageRegistryType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Image Repo Tag Sorting field +type ImageRepoTagSortingField string + const ( // Tag name ImageRepoTagSortingFieldTag ImageRepoTagSortingField = "tag" @@ -11162,7 +11798,7 @@ func (e ImageRepoTagSortingField) String() string { return string(e) } -func (e *ImageRepoTagSortingField) UnmarshalGQL(v interface{}) error { +func (e *ImageRepoTagSortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11179,6 +11815,20 @@ func (e ImageRepoTagSortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ImageRepoTagSortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ImageRepoTagSortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Image Repository Sorting field type ImageRepositorySortingField string @@ -11206,7 +11856,7 @@ func (e ImageRepositorySortingField) String() string { return string(e) } -func (e *ImageRepositorySortingField) UnmarshalGQL(v interface{}) error { +func (e *ImageRepositorySortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11223,6 +11873,20 @@ func (e ImageRepositorySortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ImageRepositorySortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ImageRepositorySortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Installation Status type InstallationStatus string @@ -11253,7 +11917,7 @@ func (e InstallationStatus) String() string { return string(e) } -func (e *InstallationStatus) UnmarshalGQL(v interface{}) error { +func (e *InstallationStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11270,6 +11934,20 @@ func (e InstallationStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *InstallationStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e InstallationStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Installation type type InstallationType string @@ -11297,7 +11975,7 @@ func (e InstallationType) String() string { return string(e) } -func (e *InstallationType) UnmarshalGQL(v interface{}) error { +func (e *InstallationType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11314,6 +11992,20 @@ func (e InstallationType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *InstallationType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e InstallationType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Integration Consumer type IntegrationConsumer string @@ -11338,7 +12030,7 @@ func (e IntegrationConsumer) String() string { return string(e) } -func (e *IntegrationConsumer) UnmarshalGQL(v interface{}) error { +func (e *IntegrationConsumer) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11355,6 +12047,20 @@ func (e IntegrationConsumer) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *IntegrationConsumer) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e IntegrationConsumer) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // InvoiceStatus type InvoiceStatus string @@ -11386,7 +12092,7 @@ func (e InvoiceStatus) String() string { return string(e) } -func (e *InvoiceStatus) UnmarshalGQL(v interface{}) error { +func (e *InvoiceStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11403,6 +12109,20 @@ func (e InvoiceStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *InvoiceStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e InvoiceStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Issue Type type IssueType string @@ -11433,7 +12153,7 @@ func (e IssueType) String() string { return string(e) } -func (e *IssueType) UnmarshalGQL(v interface{}) error { +func (e *IssueType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11450,6 +12170,20 @@ func (e IssueType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *IssueType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e IssueType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // MatchExpressionOperator type MatchExpressionOperator string @@ -11483,7 +12217,7 @@ func (e MatchExpressionOperator) String() string { return string(e) } -func (e *MatchExpressionOperator) UnmarshalGQL(v interface{}) error { +func (e *MatchExpressionOperator) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11500,6 +12234,20 @@ func (e MatchExpressionOperator) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *MatchExpressionOperator) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e MatchExpressionOperator) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Notification action type type NotificationActionType string @@ -11530,7 +12278,7 @@ func (e NotificationActionType) String() string { return string(e) } -func (e *NotificationActionType) UnmarshalGQL(v interface{}) error { +func (e *NotificationActionType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11547,6 +12295,20 @@ func (e NotificationActionType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *NotificationActionType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e NotificationActionType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Notification State type NotificationState string @@ -11577,7 +12339,7 @@ func (e NotificationState) String() string { return string(e) } -func (e *NotificationState) UnmarshalGQL(v interface{}) error { +func (e *NotificationState) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11594,6 +12356,20 @@ func (e NotificationState) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *NotificationState) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e NotificationState) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Notification Type type NotificationType string @@ -11624,7 +12400,7 @@ func (e NotificationType) String() string { return string(e) } -func (e *NotificationType) UnmarshalGQL(v interface{}) error { +func (e *NotificationType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11641,6 +12417,20 @@ func (e NotificationType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *NotificationType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e NotificationType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Types of event payload type PayloadDataTypes string @@ -11668,7 +12458,7 @@ func (e PayloadDataTypes) String() string { return string(e) } -func (e *PayloadDataTypes) UnmarshalGQL(v interface{}) error { +func (e *PayloadDataTypes) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11685,6 +12475,20 @@ func (e PayloadDataTypes) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PayloadDataTypes) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PayloadDataTypes) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Payment Intervals type PaymentInterval string @@ -11710,7 +12514,7 @@ func (e PaymentInterval) String() string { return string(e) } -func (e *PaymentInterval) UnmarshalGQL(v interface{}) error { +func (e *PaymentInterval) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11727,6 +12531,20 @@ func (e PaymentInterval) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PaymentInterval) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PaymentInterval) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Payment Type type PaymentType string @@ -11758,7 +12576,7 @@ func (e PaymentType) String() string { return string(e) } -func (e *PaymentType) UnmarshalGQL(v interface{}) error { +func (e *PaymentType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11775,6 +12593,20 @@ func (e PaymentType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PaymentType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PaymentType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Pipeline statistics sort by duration type type PipelineClassicStatisticDurationMetricType string @@ -11802,7 +12634,7 @@ func (e PipelineClassicStatisticDurationMetricType) String() string { return string(e) } -func (e *PipelineClassicStatisticDurationMetricType) UnmarshalGQL(v interface{}) error { +func (e *PipelineClassicStatisticDurationMetricType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11819,6 +12651,20 @@ func (e PipelineClassicStatisticDurationMetricType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PipelineClassicStatisticDurationMetricType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PipelineClassicStatisticDurationMetricType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // PlanTypes type PlanTypes string @@ -11844,7 +12690,7 @@ func (e PlanTypes) String() string { return string(e) } -func (e *PlanTypes) UnmarshalGQL(v interface{}) error { +func (e *PlanTypes) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11861,6 +12707,20 @@ func (e PlanTypes) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PlanTypes) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PlanTypes) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Components Sorting field type ProductComponentSortingField string @@ -11888,7 +12748,7 @@ func (e ProductComponentSortingField) String() string { return string(e) } -func (e *ProductComponentSortingField) UnmarshalGQL(v interface{}) error { +func (e *ProductComponentSortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11905,6 +12765,20 @@ func (e ProductComponentSortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductComponentSortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductComponentSortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Component types type ProductComponentType string @@ -11932,7 +12806,7 @@ func (e ProductComponentType) String() string { return string(e) } -func (e *ProductComponentType) UnmarshalGQL(v interface{}) error { +func (e *ProductComponentType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11949,6 +12823,20 @@ func (e ProductComponentType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductComponentType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductComponentType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // ProductConcurrency type ProductConcurrency string @@ -11976,7 +12864,7 @@ func (e ProductConcurrency) String() string { return string(e) } -func (e *ProductConcurrency) UnmarshalGQL(v interface{}) error { +func (e *ProductConcurrency) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -11993,6 +12881,20 @@ func (e ProductConcurrency) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductConcurrency) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductConcurrency) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // ProductGitTrigger type ProductGitTrigger string @@ -12020,7 +12922,7 @@ func (e ProductGitTrigger) String() string { return string(e) } -func (e *ProductGitTrigger) UnmarshalGQL(v interface{}) error { +func (e *ProductGitTrigger) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12037,6 +12939,20 @@ func (e ProductGitTrigger) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductGitTrigger) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductGitTrigger) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product release error code type ProductReleaseErrorCode string @@ -12079,7 +12995,7 @@ func (e ProductReleaseErrorCode) String() string { return string(e) } -func (e *ProductReleaseErrorCode) UnmarshalGQL(v interface{}) error { +func (e *ProductReleaseErrorCode) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12096,6 +13012,20 @@ func (e ProductReleaseErrorCode) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductReleaseErrorCode) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductReleaseErrorCode) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Release Public Status type ProductReleasePublicStatus string @@ -12138,7 +13068,7 @@ func (e ProductReleasePublicStatus) String() string { return string(e) } -func (e *ProductReleasePublicStatus) UnmarshalGQL(v interface{}) error { +func (e *ProductReleasePublicStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12155,6 +13085,20 @@ func (e ProductReleasePublicStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductReleasePublicStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductReleasePublicStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Release Status, including internal statuses type ProductReleaseStatus string @@ -12209,7 +13153,7 @@ func (e ProductReleaseStatus) String() string { return string(e) } -func (e *ProductReleaseStatus) UnmarshalGQL(v interface{}) error { +func (e *ProductReleaseStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12226,6 +13170,20 @@ func (e ProductReleaseStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductReleaseStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductReleaseStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Release step status type ProductReleaseStepStatus string @@ -12280,7 +13238,7 @@ func (e ProductReleaseStepStatus) String() string { return string(e) } -func (e *ProductReleaseStepStatus) UnmarshalGQL(v interface{}) error { +func (e *ProductReleaseStepStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12297,6 +13255,20 @@ func (e ProductReleaseStepStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductReleaseStepStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductReleaseStepStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Release task type type ProductReleaseTaskType string @@ -12333,7 +13305,7 @@ func (e ProductReleaseTaskType) String() string { return string(e) } -func (e *ProductReleaseTaskType) UnmarshalGQL(v interface{}) error { +func (e *ProductReleaseTaskType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12350,10 +13322,26 @@ func (e ProductReleaseTaskType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductReleaseTaskType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductReleaseTaskType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Sorting field type ProductSortingField string const ( + // By id + ProductSortingFieldID ProductSortingField = "id" // By name ProductSortingFieldName ProductSortingField = "name" // By updated at @@ -12361,13 +13349,14 @@ const ( ) var AllProductSortingField = []ProductSortingField{ + ProductSortingFieldID, ProductSortingFieldName, ProductSortingFieldUpdatedAt, } func (e ProductSortingField) IsValid() bool { switch e { - case ProductSortingFieldName, ProductSortingFieldUpdatedAt: + case ProductSortingFieldID, ProductSortingFieldName, ProductSortingFieldUpdatedAt: return true } return false @@ -12377,7 +13366,7 @@ func (e ProductSortingField) String() string { return string(e) } -func (e *ProductSortingField) UnmarshalGQL(v interface{}) error { +func (e *ProductSortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12394,6 +13383,20 @@ func (e ProductSortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ProductSortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ProductSortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Promotion policy possible actions type PromotionPolicyAction string @@ -12424,7 +13427,7 @@ func (e PromotionPolicyAction) String() string { return string(e) } -func (e *PromotionPolicyAction) UnmarshalGQL(v interface{}) error { +func (e *PromotionPolicyAction) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12441,6 +13444,20 @@ func (e PromotionPolicyAction) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PromotionPolicyAction) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromotionPolicyAction) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Policy sorting field type PromotionPolicySortingField string @@ -12471,7 +13488,7 @@ func (e PromotionPolicySortingField) String() string { return string(e) } -func (e *PromotionPolicySortingField) UnmarshalGQL(v interface{}) error { +func (e *PromotionPolicySortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12488,6 +13505,206 @@ func (e PromotionPolicySortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PromotionPolicySortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromotionPolicySortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Promotion triggers enum +type PromotionTriggers string + +const ( + PromotionTriggersRestart PromotionTriggers = "RESTART" + PromotionTriggersGitCommit PromotionTriggers = "GIT_COMMIT" + PromotionTriggersDragAndDrop PromotionTriggers = "DRAG_AND_DROP" + PromotionTriggersManual PromotionTriggers = "MANUAL" +) + +var AllPromotionTriggers = []PromotionTriggers{ + PromotionTriggersRestart, + PromotionTriggersGitCommit, + PromotionTriggersDragAndDrop, + PromotionTriggersManual, +} + +func (e PromotionTriggers) IsValid() bool { + switch e { + case PromotionTriggersRestart, PromotionTriggersGitCommit, PromotionTriggersDragAndDrop, PromotionTriggersManual: + return true + } + return false +} + +func (e PromotionTriggers) String() string { + return string(e) +} + +func (e *PromotionTriggers) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = PromotionTriggers(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid PromotionTriggers", str) + } + return nil +} + +func (e PromotionTriggers) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *PromotionTriggers) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromotionTriggers) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Promotion status enum +type PromotionsStatus string + +const ( + PromotionsStatusFailed PromotionsStatus = "FAILED" + PromotionsStatusQueued PromotionsStatus = "QUEUED" + PromotionsStatusRunning PromotionsStatus = "RUNNING" + PromotionsStatusSucceeded PromotionsStatus = "SUCCEEDED" + PromotionsStatusSuspended PromotionsStatus = "SUSPENDED" + PromotionsStatusTerminated PromotionsStatus = "TERMINATED" + PromotionsStatusTerminating PromotionsStatus = "TERMINATING" +) + +var AllPromotionsStatus = []PromotionsStatus{ + PromotionsStatusFailed, + PromotionsStatusQueued, + PromotionsStatusRunning, + PromotionsStatusSucceeded, + PromotionsStatusSuspended, + PromotionsStatusTerminated, + PromotionsStatusTerminating, +} + +func (e PromotionsStatus) IsValid() bool { + switch e { + case PromotionsStatusFailed, PromotionsStatusQueued, PromotionsStatusRunning, PromotionsStatusSucceeded, PromotionsStatusSuspended, PromotionsStatusTerminated, PromotionsStatusTerminating: + return true + } + return false +} + +func (e PromotionsStatus) String() string { + return string(e) +} + +func (e *PromotionsStatus) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = PromotionsStatus(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid PromotionsStatus", str) + } + return nil +} + +func (e PromotionsStatus) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *PromotionsStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromotionsStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Promotion triggers enum +type PromotionsTriggers string + +const ( + PromotionsTriggersRestart PromotionsTriggers = "RESTART" + PromotionsTriggersGitCommit PromotionsTriggers = "GIT_COMMIT" + PromotionsTriggersDragAndDrop PromotionsTriggers = "DRAG_AND_DROP" + PromotionsTriggersManual PromotionsTriggers = "MANUAL" +) + +var AllPromotionsTriggers = []PromotionsTriggers{ + PromotionsTriggersRestart, + PromotionsTriggersGitCommit, + PromotionsTriggersDragAndDrop, + PromotionsTriggersManual, +} + +func (e PromotionsTriggers) IsValid() bool { + switch e { + case PromotionsTriggersRestart, PromotionsTriggersGitCommit, PromotionsTriggersDragAndDrop, PromotionsTriggersManual: + return true + } + return false +} + +func (e PromotionsTriggers) String() string { + return string(e) +} + +func (e *PromotionsTriggers) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = PromotionsTriggers(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid PromotionsTriggers", str) + } + return nil +} + +func (e PromotionsTriggers) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *PromotionsTriggers) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromotionsTriggers) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Pull request state type PullRequestState string @@ -12515,7 +13732,7 @@ func (e PullRequestState) String() string { return string(e) } -func (e *PullRequestState) UnmarshalGQL(v interface{}) error { +func (e *PullRequestState) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12532,6 +13749,20 @@ func (e PullRequestState) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *PullRequestState) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PullRequestState) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Release Rollout Disabled Reasons type ReleaseRolloutDisabledReasons string @@ -12556,7 +13787,7 @@ func (e ReleaseRolloutDisabledReasons) String() string { return string(e) } -func (e *ReleaseRolloutDisabledReasons) UnmarshalGQL(v interface{}) error { +func (e *ReleaseRolloutDisabledReasons) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12573,6 +13804,20 @@ func (e ReleaseRolloutDisabledReasons) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ReleaseRolloutDisabledReasons) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ReleaseRolloutDisabledReasons) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Resource action type ResourceAction string @@ -12603,7 +13848,7 @@ func (e ResourceAction) String() string { return string(e) } -func (e *ResourceAction) UnmarshalGQL(v interface{}) error { +func (e *ResourceAction) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12620,6 +13865,20 @@ func (e ResourceAction) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ResourceAction) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ResourceAction) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // ResourceOperation type ResourceOperation string @@ -12650,7 +13909,7 @@ func (e ResourceOperation) String() string { return string(e) } -func (e *ResourceOperation) UnmarshalGQL(v interface{}) error { +func (e *ResourceOperation) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12667,6 +13926,20 @@ func (e ResourceOperation) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ResourceOperation) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ResourceOperation) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Rollout Phases type RolloutPhases string @@ -12706,7 +13979,7 @@ func (e RolloutPhases) String() string { return string(e) } -func (e *RolloutPhases) UnmarshalGQL(v interface{}) error { +func (e *RolloutPhases) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12723,6 +13996,20 @@ func (e RolloutPhases) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *RolloutPhases) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e RolloutPhases) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Rollout Step Status type RolloutStepStatus string @@ -12765,7 +14052,7 @@ func (e RolloutStepStatus) String() string { return string(e) } -func (e *RolloutStepStatus) UnmarshalGQL(v interface{}) error { +func (e *RolloutStepStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12782,6 +14069,20 @@ func (e RolloutStepStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *RolloutStepStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e RolloutStepStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Rollout Strategy Names type RolloutStrategyNames string @@ -12809,7 +14110,7 @@ func (e RolloutStrategyNames) String() string { return string(e) } -func (e *RolloutStrategyNames) UnmarshalGQL(v interface{}) error { +func (e *RolloutStrategyNames) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12826,6 +14127,20 @@ func (e RolloutStrategyNames) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *RolloutStrategyNames) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e RolloutStrategyNames) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // RuntimeOperationAction type RuntimeOperationAction string @@ -12853,7 +14168,7 @@ func (e RuntimeOperationAction) String() string { return string(e) } -func (e *RuntimeOperationAction) UnmarshalGQL(v interface{}) error { +func (e *RuntimeOperationAction) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12870,6 +14185,20 @@ func (e RuntimeOperationAction) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *RuntimeOperationAction) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e RuntimeOperationAction) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Runtime Sync Mode type RuntimeSyncMode string @@ -12900,7 +14229,7 @@ func (e RuntimeSyncMode) String() string { return string(e) } -func (e *RuntimeSyncMode) UnmarshalGQL(v interface{}) error { +func (e *RuntimeSyncMode) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12917,6 +14246,20 @@ func (e RuntimeSyncMode) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *RuntimeSyncMode) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e RuntimeSyncMode) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Integration Entity Type type SecretType string @@ -12944,7 +14287,7 @@ func (e SecretType) String() string { return string(e) } -func (e *SecretType) UnmarshalGQL(v interface{}) error { +func (e *SecretType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -12961,6 +14304,20 @@ func (e SecretType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SecretType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SecretType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Service Sorting field type ServiceSortingField string @@ -12988,7 +14345,7 @@ func (e ServiceSortingField) String() string { return string(e) } -func (e *ServiceSortingField) UnmarshalGQL(v interface{}) error { +func (e *ServiceSortingField) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13005,6 +14362,20 @@ func (e ServiceSortingField) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ServiceSortingField) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ServiceSortingField) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // ServiceType type ServiceType string @@ -13034,7 +14405,7 @@ func (e ServiceType) String() string { return string(e) } -func (e *ServiceType) UnmarshalGQL(v interface{}) error { +func (e *ServiceType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13051,6 +14422,20 @@ func (e ServiceType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *ServiceType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ServiceType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Sorting order type SortingOrder string @@ -13078,7 +14463,7 @@ func (e SortingOrder) String() string { return string(e) } -func (e *SortingOrder) UnmarshalGQL(v interface{}) error { +func (e *SortingOrder) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13095,6 +14480,20 @@ func (e SortingOrder) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SortingOrder) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SortingOrder) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Support Plan type SupportPlan string @@ -13124,7 +14523,7 @@ func (e SupportPlan) String() string { return string(e) } -func (e *SupportPlan) UnmarshalGQL(v interface{}) error { +func (e *SupportPlan) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13141,6 +14540,20 @@ func (e SupportPlan) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SupportPlan) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SupportPlan) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Supported CI Tools type SupportedCITools string @@ -13171,7 +14584,7 @@ func (e SupportedCITools) String() string { return string(e) } -func (e *SupportedCITools) UnmarshalGQL(v interface{}) error { +func (e *SupportedCITools) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13188,6 +14601,20 @@ func (e SupportedCITools) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SupportedCITools) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SupportedCITools) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // SyncResourceAction type SyncActionOnResource string @@ -13230,7 +14657,7 @@ func (e SyncActionOnResource) String() string { return string(e) } -func (e *SyncActionOnResource) UnmarshalGQL(v interface{}) error { +func (e *SyncActionOnResource) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13247,6 +14674,20 @@ func (e SyncActionOnResource) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SyncActionOnResource) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SyncActionOnResource) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Sync Error codes type SyncErrorCodes string @@ -13280,7 +14721,7 @@ func (e SyncErrorCodes) String() string { return string(e) } -func (e *SyncErrorCodes) UnmarshalGQL(v interface{}) error { +func (e *SyncErrorCodes) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13297,6 +14738,20 @@ func (e SyncErrorCodes) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SyncErrorCodes) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SyncErrorCodes) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // SyncHookType type SyncHookType string @@ -13333,7 +14788,7 @@ func (e SyncHookType) String() string { return string(e) } -func (e *SyncHookType) UnmarshalGQL(v interface{}) error { +func (e *SyncHookType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13350,6 +14805,20 @@ func (e SyncHookType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SyncHookType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SyncHookType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // SyncOperationPhase type SyncOperationPhase string @@ -13389,7 +14858,7 @@ func (e SyncOperationPhase) String() string { return string(e) } -func (e *SyncOperationPhase) UnmarshalGQL(v interface{}) error { +func (e *SyncOperationPhase) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13406,6 +14875,20 @@ func (e SyncOperationPhase) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SyncOperationPhase) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SyncOperationPhase) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // SyncPhase type SyncPhase string @@ -13439,7 +14922,7 @@ func (e SyncPhase) String() string { return string(e) } -func (e *SyncPhase) UnmarshalGQL(v interface{}) error { +func (e *SyncPhase) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13456,6 +14939,20 @@ func (e SyncPhase) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SyncPhase) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SyncPhase) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // SyncResultCode type SyncResultCode string @@ -13492,7 +14989,7 @@ func (e SyncResultCode) String() string { return string(e) } -func (e *SyncResultCode) UnmarshalGQL(v interface{}) error { +func (e *SyncResultCode) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13509,6 +15006,20 @@ func (e SyncResultCode) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SyncResultCode) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SyncResultCode) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Sync status type SyncStatus string @@ -13542,7 +15053,7 @@ func (e SyncStatus) String() string { return string(e) } -func (e *SyncStatus) UnmarshalGQL(v interface{}) error { +func (e *SyncStatus) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13559,6 +15070,20 @@ func (e SyncStatus) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SyncStatus) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SyncStatus) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Types of system type type SystemType string @@ -13588,7 +15113,7 @@ func (e SystemType) String() string { return string(e) } -func (e *SystemType) UnmarshalGQL(v interface{}) error { +func (e *SystemType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13605,6 +15130,20 @@ func (e SystemType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *SystemType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e SystemType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Team sources type TeamSource string @@ -13650,7 +15189,7 @@ func (e TeamSource) String() string { return string(e) } -func (e *TeamSource) UnmarshalGQL(v interface{}) error { +func (e *TeamSource) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13667,6 +15206,20 @@ func (e TeamSource) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *TeamSource) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e TeamSource) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Types of team type TeamType string @@ -13697,7 +15250,7 @@ func (e TeamType) String() string { return string(e) } -func (e *TeamType) UnmarshalGQL(v interface{}) error { +func (e *TeamType) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13714,6 +15267,20 @@ func (e TeamType) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *TeamType) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e TeamType) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Product Release termination strategy type TerminationStrategy string @@ -13741,7 +15308,7 @@ func (e TerminationStrategy) String() string { return string(e) } -func (e *TerminationStrategy) UnmarshalGQL(v interface{}) error { +func (e *TerminationStrategy) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13758,6 +15325,20 @@ func (e TerminationStrategy) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *TerminationStrategy) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e TerminationStrategy) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Workflow nodes WorkflowPhases type WorkflowNodePhases string @@ -13800,7 +15381,7 @@ func (e WorkflowNodePhases) String() string { return string(e) } -func (e *WorkflowNodePhases) UnmarshalGQL(v interface{}) error { +func (e *WorkflowNodePhases) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13817,6 +15398,20 @@ func (e WorkflowNodePhases) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *WorkflowNodePhases) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e WorkflowNodePhases) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Name of the flows that can be the workflow origins type WorkflowOrigins string @@ -13856,7 +15451,7 @@ func (e WorkflowOrigins) String() string { return string(e) } -func (e *WorkflowOrigins) UnmarshalGQL(v interface{}) error { +func (e *WorkflowOrigins) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13873,6 +15468,20 @@ func (e WorkflowOrigins) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } +func (e *WorkflowOrigins) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e WorkflowOrigins) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Workflow WorkflowPhases type WorkflowPhases string @@ -13912,7 +15521,7 @@ func (e WorkflowPhases) String() string { return string(e) } -func (e *WorkflowPhases) UnmarshalGQL(v interface{}) error { +func (e *WorkflowPhases) UnmarshalGQL(v any) error { str, ok := v.(string) if !ok { return fmt.Errorf("enums must be strings") @@ -13928,3 +15537,17 @@ func (e *WorkflowPhases) UnmarshalGQL(v interface{}) error { func (e WorkflowPhases) MarshalGQL(w io.Writer) { fmt.Fprint(w, strconv.Quote(e.String())) } + +func (e *WorkflowPhases) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e WorkflowPhases) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} From 819361115bc27f64555811246d2ee61933667d0e Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 13 Nov 2025 10:58:34 +0200 Subject: [PATCH 2/3] bump --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f27adb..57d70ff 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=v1.4.12 +VERSION=v1.4.13 ifndef GOBIN ifndef GOPATH From d6412913926df4dec886e5b91649d4eed222df51 Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 13 Nov 2025 16:24:28 +0200 Subject: [PATCH 3/3] fix: update promotion orch golang types to support new promotions list query on cli v2 --- .../promotion-orchestrator/models_gen.go | 603 +++++++++++++++++- 1 file changed, 598 insertions(+), 5 deletions(-) diff --git a/pkg/model/promotion-orchestrator/models_gen.go b/pkg/model/promotion-orchestrator/models_gen.go index 8ef3ee1..4cea720 100644 --- a/pkg/model/promotion-orchestrator/models_gen.go +++ b/pkg/model/promotion-orchestrator/models_gen.go @@ -514,6 +514,12 @@ type AccountFeatures struct { HideClassicRelatedSectionsFromNewUserSettingsPage *bool `json:"hideClassicRelatedSectionsFromNewUserSettingsPage,omitempty"` // Uses new endpoints for retrieval of product promotions(releases) across all corresponding views. NewPromotionEndpoints *bool `json:"newPromotionEndpoints,omitempty"` + // Enables product CRD commit flow + ProductCRDCommitFlow *bool `json:"productCRDCommitFlow,omitempty"` + // Disables the application tree if the number of applications exceeds the limit. The limit can be overridden using the APPLICATION_TREE_SIZE_LIMIT variable + DisableApplicationTreeViewForLargeTrees *bool `json:"disableApplicationTreeViewForLargeTrees,omitempty"` + // Enable support for runtime release channels. Use pre-computed release data from GitHub Pages instead of GitHub API. + UseRuntimeUpdateChannels *bool `json:"useRuntimeUpdateChannels,omitempty"` } // Account Gitops Usage @@ -588,6 +594,32 @@ type AhHocProductReleasePullRequestFilesArgs struct { IntegrationName *string `json:"integrationName,omitempty"` } +// Arguments to create an ad-hoc promotion with a commit +type AhHocPromotionCommitFilesArgs struct { + // Application Id + AppID *ApplicationIDInput `json:"appId"` + // Commit message + Msg *string `json:"msg,omitempty"` + // Commit Description + Description *string `json:"description,omitempty"` +} + +// Arguments to create an ad-hoc promotion with a Pull Request +type AhHocPromotionPullRequestFilesArgs struct { + // Application Id + AppID *ApplicationIDInput `json:"appId"` + // Branch name + Head *string `json:"head,omitempty"` + // Pull request title + Title *string `json:"title,omitempty"` + // Pull request description + Description *string `json:"description,omitempty"` + // Commit message + CommitMessage *string `json:"commitMessage,omitempty"` + // Commit Description + CommitDescription *string `json:"commitDescription,omitempty"` +} + // AnalysisRun type AnalysisRun struct { // Object metadata @@ -2426,6 +2458,14 @@ type CalendarTriggerConditionsArgs struct { Metadata *string `json:"metadata,omitempty"` } +// Channel-specific release data +type ChannelReleases struct { + // All releases in this channel + Releases []*Release `json:"releases"` + // Latest (newest) chart version in this channel, null if no releases + LatestChartVersion *string `json:"latestChartVersion,omitempty"` +} + // ChildApplicationField Entity type ChildApplicationField struct { // Name @@ -2540,6 +2580,10 @@ type Cluster struct { ClusterResources bool `json:"clusterResources"` // Info holds information about cluster cache and state Info *ClusterInfo `json:"info"` + // Indicated if cluster considered inactive due to missing events from the app-proxy + Inactive *bool `json:"inactive,omitempty"` + // UpdatedAt holds time when cluster has been updated + UpdatedAt *string `json:"updatedAt,omitempty"` } func (Cluster) IsBaseEntity() {} @@ -2870,6 +2914,22 @@ type CreateCommitAdHocProductReleaseInput struct { Hooks *PromotionHooksDefinitionInput `json:"hooks,omitempty"` } +// Create commit ad hoc promotion arguments +type CreateCommitAdHocPromotionInput struct { + // Source application id + SrcAppID *ApplicationIDInput `json:"srcAppId"` + // Source environment name + SrcEnvironment string `json:"srcEnvironment"` + // Destination environment name + DestEnvironment string `json:"destEnvironment"` + // Promotion policy + Policy *PromotionPolicyDefinitionInput `json:"policy"` + // Last commit info of source application + CommitInfo *CommitInfoArgs `json:"commitInfo"` + // List of destination applications ids and commit data + Payload []*AhHocPromotionCommitFilesArgs `json:"payload"` +} + // Create Environment Input type CreateEnvironmentArgs struct { // Environment name @@ -2932,6 +2992,22 @@ type CreatePullRequestAdHocProductReleaseInput struct { Hooks *PromotionHooksDefinitionInput `json:"hooks,omitempty"` } +// Create Pull Request ad hoc promotion arguments +type CreatePullRequestAdHocPromotionInput struct { + // Source application id + SrcAppID *ApplicationIDInput `json:"srcAppId"` + // Source environment name + SrcEnvironment string `json:"srcEnvironment"` + // Destination environment name + DestEnvironment string `json:"destEnvironment"` + // Promotion policy + Policy *PromotionPolicyDefinitionInput `json:"policy"` + // Last commit info of source application + CommitInfo *CommitInfoArgs `json:"commitInfo"` + // List of destination applications ids and pull request data + Payload []*AhHocPromotionPullRequestFilesArgs `json:"payload"` +} + // Data filter is the raw argo events DataFilter ported from their types type DataFilter struct { // Comparator compares the event data with a user given value. Can be '>=', '>', '=', '!=', '<', or '<='. Is optional, and if left blank treated as equality '='. @@ -6231,6 +6307,8 @@ type Product struct { Concurrency *ProductConcurrency `json:"concurrency,omitempty"` // Latest product release LatestRelease *ProductReleaseEntity `json:"latestRelease,omitempty"` + // Latest product promotion + LatestPromotion *PromotionEntity `json:"latestPromotion,omitempty"` } func (Product) IsFavorableNotK8sEntity() {} @@ -6311,6 +6389,24 @@ type ProductApplicationRelease struct { AppVersions *ProductComponentVersions `json:"appVersions,omitempty"` } +// Product App application +type ProductApplicationStatic struct { + // Entity id object + Self *ProductApplicationEntityID `json:"self"` + // Runtime name + Runtime string `json:"runtime"` + // Deployed to object + DeployedTo *ProductApplicationDeployedTo `json:"deployedTo"` + // Product App Application Status object + Status *ProductApplicationStatus `json:"status"` + // Annotaion pairs array strings(key=value) + AnnotationPairs []*string `json:"annotationPairs"` + // Label pairs array strings(key=value) + LabelPairs []string `json:"labelPairs"` + // Latest application release + Release *ProductApplicationRelease `json:"release,omitempty"` +} + // Product App deployed to type ProductApplicationStatus struct { // Application sync status @@ -6415,6 +6511,44 @@ type ProductComponentSortArg struct { Order SortingOrder `json:"order"` } +// Product Component Static +type ProductComponentStatic struct { + // Entity db id + ID string `json:"id"` + // Component name + Name string `json:"name"` + // Product app type + Type ProductComponentType `json:"type"` + // Application + Application *ProductApplicationStatic `json:"application,omitempty"` +} + +// Args to filter Product Components Static +type ProductComponentStaticFilterArgs struct { + // Partial name (case insensitive) + PartialName *string `json:"partialName,omitempty"` + // Application names + AppNames []*string `json:"appNames,omitempty"` + // Application version + AppVersion *string `json:"appVersion,omitempty"` + // Issue key array + IssueKeys []string `json:"issueKeys,omitempty"` + // PR key array + PrKeys []string `json:"prKeys,omitempty"` + // Committers array + Committers []string `json:"committers,omitempty"` + // Images array + Images []string `json:"images,omitempty"` + // Product names array + Products []string `json:"products,omitempty"` + // If 'true' returns unassigned components, 'false' ignored + NotInProduct *bool `json:"notInProduct,omitempty"` + // Environments names array + Environments []string `json:"environments,omitempty"` + // If 'true' returns components that belong to any environment, 'false' ignored + InEnvironment *bool `json:"inEnvironment,omitempty"` +} + // Version of product and dependencies type ProductComponentVersions struct { // AppVersion @@ -6477,6 +6611,8 @@ type ProductEnvironmentStatistic struct { // Args to filter Product type ProductFilterArgs struct { + // Product name + Name *string `json:"name,omitempty"` // Partial name (case insensitive) PartialName *string `json:"partialName,omitempty"` // Application names @@ -6517,6 +6653,8 @@ type ProductGroupForEnvs struct { // Args to filter Product names type ProductNamesFilterArgs struct { + // Product name + Name *string `json:"name,omitempty"` // Partial name (case insensitive) PartialName *string `json:"partialName,omitempty"` // Promotion flow names @@ -6545,6 +6683,8 @@ type ProductRelease struct { TriggerEnvironment *string `json:"triggerEnvironment,omitempty"` // Product release steps Steps []*ProductReleaseStep `json:"steps"` + // Product release environments + EnvironmentsStatuses []*ProductReleaseEnvironment `json:"environmentsStatuses"` // First commit that triggered the product release TriggerCommit *CommitInfo `json:"triggerCommit"` // Product release status @@ -6639,6 +6779,14 @@ type ProductReleaseEntity struct { Version *string `json:"version,omitempty"` } +// Product Release Environment +type ProductReleaseEnvironment struct { + // Environment name + EnvironmentName string `json:"environmentName"` + // Environment status + Status ProductReleaseStepStatus `json:"status"` +} + // Product release error type ProductReleaseError struct { // Product release error code @@ -6861,6 +7009,8 @@ type Promotion struct { UpdatedAt *string `json:"updatedAt,omitempty"` // Promotion app version PromotionAppVersion *string `json:"promotionAppVersion,omitempty"` + // Promotion error + Failure *PromotionError `json:"failure,omitempty"` } func (Promotion) IsPromotionOrReleaseNode() {} @@ -6904,7 +7054,29 @@ type PromotionCommitInfo struct { // Commit author CommitAuthor string `json:"commitAuthor"` // Commit date - CommitDate string `json:"commitDate"` + CommitDate *string `json:"commitDate,omitempty"` + // Commit repository url + RepoURL *string `json:"repoURL,omitempty"` + // Commit revision (branch) + Revision *string `json:"revision,omitempty"` + // Committer avatar url + AvatarURL *string `json:"avatarURL,omitempty"` +} + +// Promotion Entity +type PromotionEntity struct { + // Promotion id + PromotionID string `json:"promotionId"` + // Promotion status + Status ProductReleasePublicStatus `json:"status"` + // Promotion app version + PromotionAppVersion *string `json:"promotionAppVersion,omitempty"` + // Trigger commit information + TriggerCommitInfo *PromotionCommitInfo `json:"triggerCommitInfo"` + // Updated at timestamp + UpdatedAt *string `json:"updatedAt,omitempty"` + // Created at timestamp + CreatedAt string `json:"createdAt"` } // Environment information @@ -6915,12 +7087,41 @@ type PromotionEnvironment struct { DependsOn []string `json:"dependsOn"` // Environment status Status EnvironmentStatus `json:"status"` - // Created at timestamp - CreatedAt string `json:"createdAt"` + // Started at timestamp + StartedAt *string `json:"startedAt,omitempty"` // Updated at timestamp UpdatedAt *string `json:"updatedAt,omitempty"` } +// Environment workflows steps view +type PromotionEnvironmentStatus struct { + // Environment name + Environment string `json:"environment"` + // Promotion environment step pre workflows steps view + PreWorkflowsStepsView []*WorkflowsStepView `json:"preWorkflowsStepsView"` + // Promotion environment step post workflows steps view + PostWorkflowsStepsView []*WorkflowsStepView `json:"postWorkflowsStepsView"` + // Applications promoted during the release + VerifyAppStatus []*PromotionTaskVerifyAppStatus `json:"verifyAppStatus"` + // Promotion pull request status + PullRequestStatus []*PromotionTaskPullRequestStatus `json:"pullRequestStatus"` + // Promotion commit status + CommitStatus []*PromotionTaskCommitStatus `json:"commitStatus"` + // Promotion issues + Issues []Issue `json:"issues"` + // Promotion applications status + Applications []*PromotionTaskApplicationStatus `json:"applications"` +} + +type PromotionError struct { + // Promotion error message + Message string `json:"message"` + // Promotion error code + Code PromotionErrorCode `json:"code"` + // Promotion error timestamp + Timestamp string `json:"timestamp"` +} + // PromotionFlow entity type PromotionFlow struct { // Object metadata @@ -7172,6 +7373,82 @@ type PromotionSource struct { JSONPaths []string `json:"jsonPaths"` } +type PromotionTaskApplicationStatus struct { + // Promotion task application id + AppID *ApplicationID `json:"appId"` + // Promotion task application health status + HealthStatus HealthStatus `json:"healthStatus"` + // Promotion task application sync status + SyncStatus SyncStatus `json:"syncStatus"` +} + +// Promote app with commit status +type PromotionTaskCommitStatus struct { + // Promote app with commit phase + Phase PromoteAppWithCommitPhase `json:"phase"` + // Promote app with commit app id + AppID *ApplicationID `json:"appId"` + // Promote app with commit commit sha + CommitSha *string `json:"commitSha,omitempty"` + // Promote app with commit commit message + CommitMessage *string `json:"commitMessage,omitempty"` + // Promote app with commit commit description + CommitDescription *string `json:"commitDescription,omitempty"` +} + +// Promote app with pr status +// most of the fields are optional because when we create a pr +// at the moment we just save the url. only later we fetch more info +// see https://codefresh-io.atlassian.net/browse/CR-32102 +type PromotionTaskPullRequestStatus struct { + // Promote app with pr phase + Phase PromoteAppWithPRPhase `json:"phase"` + // Promote app with pr pr url + PrURL *string `json:"prUrl,omitempty"` + // Promote app with pr pr title + PrTitle *string `json:"prTitle,omitempty"` + // Promote app with pr pr description + PrDescription *string `json:"prDescription,omitempty"` + // Promote app with pr app id + AppID *ApplicationID `json:"appId"` + // Pull request repo name + Repo *string `json:"repo,omitempty"` + // Pull request id + ID *int `json:"id,omitempty"` + // Pull request url + URL string `json:"url"` + // Pull request title + Title *string `json:"title,omitempty"` + // Pull request description + Description *string `json:"description,omitempty"` + // Pull request author + Author *string `json:"author,omitempty"` + // Pull request author avatar url + AvatarURL *string `json:"avatarUrl,omitempty"` + // Pull request base branch + BaseBranch *string `json:"baseBranch,omitempty"` + // Pull request head branch + HeadBranch *string `json:"headBranch,omitempty"` + // Pull request created at + CreatedAt *string `json:"createdAt,omitempty"` + // Pull request state + State *PullRequestState `json:"state,omitempty"` + // Pull request is merged + IsMerged *bool `json:"isMerged,omitempty"` + // Commit sha from the pull request merge + MergeCommitSha *string `json:"mergeCommitSHA,omitempty"` +} + +// Verify app status +type PromotionTaskVerifyAppStatus struct { + // Verify app status phase + Phase VerifyAppStatusPhase `json:"phase"` + // Verify app status app id + AppID *ApplicationID `json:"appId"` + // Verify app status commit sha + CommitSha *string `json:"commitSha,omitempty"` +} + // PromotionTemplate entity type PromotionTemplate struct { // Object metadata @@ -7338,6 +7615,10 @@ type Release struct { ChartVersion *string `json:"chartVersion,omitempty"` // Has security vulnerabilities HasSecurityVulnerabilities *bool `json:"hasSecurityVulnerabilities,omitempty"` + // Release channel (stable or latest) + Channel *ReleaseChannel `json:"channel,omitempty"` + // Whether an upgrade is available for this release + UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` } // Product Release Step Workflow Info @@ -7426,6 +7707,14 @@ type ReleaseStepWorkflowInfo struct { Status WorkflowNodePhases `json:"status"` } +// Releases grouped by channel +type ReleasesByChannel struct { + // Stable channel releases + Stable *ChannelReleases `json:"stable"` + // Latest channel releases + Latest *ChannelReleases `json:"latest"` +} + // "response for renew access token type RenewAccessTokenResponse struct { // The access token to use for the next requests @@ -8312,6 +8601,16 @@ type RuntimeStatus struct { ArgoCdState ArgoCdState `json:"argoCdState"` } +// Runtime Version Info +type RuntimeVersionInfo struct { + // Name of the Runtime + Name string `json:"name"` + // Runtime version + RuntimeVersion *string `json:"runtimeVersion,omitempty"` + // Chart version + ChartVersion *string `json:"chartVersion,omitempty"` +} + // Runtimes statistics type RuntimesStatistics struct { // Total runtimes number @@ -11057,6 +11356,7 @@ type EnvironmentStatus string const ( EnvironmentStatusFailed EnvironmentStatus = "FAILED" EnvironmentStatusPending EnvironmentStatus = "PENDING" + EnvironmentStatusQueued EnvironmentStatus = "QUEUED" EnvironmentStatusRunning EnvironmentStatus = "RUNNING" EnvironmentStatusSkipped EnvironmentStatus = "SKIPPED" EnvironmentStatusSucceeded EnvironmentStatus = "SUCCEEDED" @@ -11068,6 +11368,7 @@ const ( var AllEnvironmentStatus = []EnvironmentStatus{ EnvironmentStatusFailed, EnvironmentStatusPending, + EnvironmentStatusQueued, EnvironmentStatusRunning, EnvironmentStatusSkipped, EnvironmentStatusSucceeded, @@ -11078,7 +11379,7 @@ var AllEnvironmentStatus = []EnvironmentStatus{ func (e EnvironmentStatus) IsValid() bool { switch e { - case EnvironmentStatusFailed, EnvironmentStatusPending, EnvironmentStatusRunning, EnvironmentStatusSkipped, EnvironmentStatusSucceeded, EnvironmentStatusSuspended, EnvironmentStatusTerminated, EnvironmentStatusTerminating: + case EnvironmentStatusFailed, EnvironmentStatusPending, EnvironmentStatusQueued, EnvironmentStatusRunning, EnvironmentStatusSkipped, EnvironmentStatusSucceeded, EnvironmentStatusSuspended, EnvironmentStatusTerminated, EnvironmentStatusTerminating: return true } return false @@ -13032,7 +13333,7 @@ type ProductReleasePublicStatus string const ( // Release status on release step failed ProductReleasePublicStatusFailed ProductReleasePublicStatus = "FAILED" - // Release is in queue to be started + // Release is in queue to be started or pending execution ProductReleasePublicStatusQueued ProductReleasePublicStatus = "QUEUED" // Release status on release step is running ProductReleasePublicStatusRunning ProductReleasePublicStatus = "RUNNING" @@ -13397,6 +13698,184 @@ func (e ProductSortingField) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } +// Promote app with commit phase +type PromoteAppWithCommitPhase string + +const ( + PromoteAppWithCommitPhasePending PromoteAppWithCommitPhase = "PENDING" + PromoteAppWithCommitPhaseCommitDone PromoteAppWithCommitPhase = "COMMIT_DONE" + PromoteAppWithCommitPhaseSyncing PromoteAppWithCommitPhase = "SYNCING" + PromoteAppWithCommitPhaseComplete PromoteAppWithCommitPhase = "COMPLETE" +) + +var AllPromoteAppWithCommitPhase = []PromoteAppWithCommitPhase{ + PromoteAppWithCommitPhasePending, + PromoteAppWithCommitPhaseCommitDone, + PromoteAppWithCommitPhaseSyncing, + PromoteAppWithCommitPhaseComplete, +} + +func (e PromoteAppWithCommitPhase) IsValid() bool { + switch e { + case PromoteAppWithCommitPhasePending, PromoteAppWithCommitPhaseCommitDone, PromoteAppWithCommitPhaseSyncing, PromoteAppWithCommitPhaseComplete: + return true + } + return false +} + +func (e PromoteAppWithCommitPhase) String() string { + return string(e) +} + +func (e *PromoteAppWithCommitPhase) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = PromoteAppWithCommitPhase(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid PromoteAppWithCommitPhase", str) + } + return nil +} + +func (e PromoteAppWithCommitPhase) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *PromoteAppWithCommitPhase) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromoteAppWithCommitPhase) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Promote app with pr phase +type PromoteAppWithPRPhase string + +const ( + PromoteAppWithPRPhasePending PromoteAppWithPRPhase = "PENDING" + PromoteAppWithPRPhaseSuspended PromoteAppWithPRPhase = "SUSPENDED" + PromoteAppWithPRPhaseSyncing PromoteAppWithPRPhase = "SYNCING" + PromoteAppWithPRPhaseComplete PromoteAppWithPRPhase = "COMPLETE" +) + +var AllPromoteAppWithPRPhase = []PromoteAppWithPRPhase{ + PromoteAppWithPRPhasePending, + PromoteAppWithPRPhaseSuspended, + PromoteAppWithPRPhaseSyncing, + PromoteAppWithPRPhaseComplete, +} + +func (e PromoteAppWithPRPhase) IsValid() bool { + switch e { + case PromoteAppWithPRPhasePending, PromoteAppWithPRPhaseSuspended, PromoteAppWithPRPhaseSyncing, PromoteAppWithPRPhaseComplete: + return true + } + return false +} + +func (e PromoteAppWithPRPhase) String() string { + return string(e) +} + +func (e *PromoteAppWithPRPhase) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = PromoteAppWithPRPhase(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid PromoteAppWithPRPhase", str) + } + return nil +} + +func (e PromoteAppWithPRPhase) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *PromoteAppWithPRPhase) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromoteAppWithPRPhase) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + +// Promotion error code enum +type PromotionErrorCode string + +const ( + PromotionErrorCodeUnknown PromotionErrorCode = "UNKNOWN" + PromotionErrorCodeEnvironmentMissingApplications PromotionErrorCode = "ENVIRONMENT_MISSING_APPLICATIONS" + PromotionErrorCodePromotionTermination PromotionErrorCode = "PROMOTION_TERMINATION" +) + +var AllPromotionErrorCode = []PromotionErrorCode{ + PromotionErrorCodeUnknown, + PromotionErrorCodeEnvironmentMissingApplications, + PromotionErrorCodePromotionTermination, +} + +func (e PromotionErrorCode) IsValid() bool { + switch e { + case PromotionErrorCodeUnknown, PromotionErrorCodeEnvironmentMissingApplications, PromotionErrorCodePromotionTermination: + return true + } + return false +} + +func (e PromotionErrorCode) String() string { + return string(e) +} + +func (e *PromotionErrorCode) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = PromotionErrorCode(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid PromotionErrorCode", str) + } + return nil +} + +func (e PromotionErrorCode) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *PromotionErrorCode) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e PromotionErrorCode) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Promotion policy possible actions type PromotionPolicyAction string @@ -13763,6 +14242,62 @@ func (e PullRequestState) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } +// Release channel type +type ReleaseChannel string + +const ( + ReleaseChannelLatest ReleaseChannel = "latest" + ReleaseChannelStable ReleaseChannel = "stable" +) + +var AllReleaseChannel = []ReleaseChannel{ + ReleaseChannelLatest, + ReleaseChannelStable, +} + +func (e ReleaseChannel) IsValid() bool { + switch e { + case ReleaseChannelLatest, ReleaseChannelStable: + return true + } + return false +} + +func (e ReleaseChannel) String() string { + return string(e) +} + +func (e *ReleaseChannel) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = ReleaseChannel(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid ReleaseChannel", str) + } + return nil +} + +func (e ReleaseChannel) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *ReleaseChannel) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e ReleaseChannel) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Release Rollout Disabled Reasons type ReleaseRolloutDisabledReasons string @@ -15339,6 +15874,64 @@ func (e TerminationStrategy) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } +// Verify app status phase +type VerifyAppStatusPhase string + +const ( + VerifyAppStatusPhasePending VerifyAppStatusPhase = "PENDING" + VerifyAppStatusPhaseSyncing VerifyAppStatusPhase = "SYNCING" + VerifyAppStatusPhaseComplete VerifyAppStatusPhase = "COMPLETE" +) + +var AllVerifyAppStatusPhase = []VerifyAppStatusPhase{ + VerifyAppStatusPhasePending, + VerifyAppStatusPhaseSyncing, + VerifyAppStatusPhaseComplete, +} + +func (e VerifyAppStatusPhase) IsValid() bool { + switch e { + case VerifyAppStatusPhasePending, VerifyAppStatusPhaseSyncing, VerifyAppStatusPhaseComplete: + return true + } + return false +} + +func (e VerifyAppStatusPhase) String() string { + return string(e) +} + +func (e *VerifyAppStatusPhase) UnmarshalGQL(v any) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = VerifyAppStatusPhase(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid VerifyAppStatusPhase", str) + } + return nil +} + +func (e VerifyAppStatusPhase) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +func (e *VerifyAppStatusPhase) UnmarshalJSON(b []byte) error { + s, err := strconv.Unquote(string(b)) + if err != nil { + return err + } + return e.UnmarshalGQL(s) +} + +func (e VerifyAppStatusPhase) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + e.MarshalGQL(&buf) + return buf.Bytes(), nil +} + // Workflow nodes WorkflowPhases type WorkflowNodePhases string