Verified Commit 2e9756b5 authored by Mohamed Mongy's avatar Mohamed Mongy Committed by GitLab
Browse files

Add missing group API parameters to Go SDK structs

Changelog: Improvements
parent 69e2f6a4
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
@@ -414,6 +414,11 @@ type CreateGroupOptions struct {

	// Deprecated: User DefaultBranchProtectionDefaults instead
	DefaultBranchProtection *int64 `url:"default_branch_protection,omitempty" json:"default_branch_protection,omitempty"`

	EnabledGitAccessProtocol  *EnabledGitAccessProtocolValue `url:"enabled_git_access_protocol,omitempty" json:"enabled_git_access_protocol,omitempty"`
	OrganizationID            *int64                         `url:"organization_id,omitempty" json:"organization_id,omitempty"`
	DuoAvailability           *DuoAvailabilityValue          `url:"duo_availability,omitempty" json:"duo_availability,omitempty"`
	ExperimentFeaturesEnabled *bool                          `url:"experiment_features_enabled,omitempty" json:"experiment_features_enabled,omitempty"`
}

// DefaultBranchProtectionDefaultsOptions represents the available options for
@@ -567,6 +572,24 @@ type UpdateGroupOptions struct {

	// Deprecated: Use DefaultBranchProtectionDefaults instead
	DefaultBranchProtection         *int64                         `url:"default_branch_protection,omitempty" json:"default_branch_protection,omitempty"`
	EnabledGitAccessProtocol        *EnabledGitAccessProtocolValue `url:"enabled_git_access_protocol,omitempty" json:"enabled_git_access_protocol,omitempty"`
	StepUpAuthRequiredOAuthProvider *string                        `url:"step_up_auth_required_oauth_provider,omitempty" json:"step_up_auth_required_oauth_provider,omitempty"`
	// The following fields are Premium and Ultimate only.
	UniqueProjectDownloadLimit                  *int64    `url:"unique_project_download_limit,omitempty" json:"unique_project_download_limit,omitempty"`
	UniqueProjectDownloadLimitIntervalInSeconds *int64    `url:"unique_project_download_limit_interval_in_seconds,omitempty" json:"unique_project_download_limit_interval_in_seconds,omitempty"`
	UniqueProjectDownloadLimitAllowlist         *[]string `url:"unique_project_download_limit_allowlist,omitempty" json:"unique_project_download_limit_allowlist,omitempty"`
	UniqueProjectDownloadLimitAlertlist         *[]int64  `url:"unique_project_download_limit_alertlist,omitempty" json:"unique_project_download_limit_alertlist,omitempty"`
	AutoBanUserOnExcessiveProjectsDownload      *bool     `url:"auto_ban_user_on_excessive_projects_download,omitempty" json:"auto_ban_user_on_excessive_projects_download,omitempty"`

	DuoAvailability                *DuoAvailabilityValue `url:"duo_availability,omitempty" json:"duo_availability,omitempty"`
	ExperimentFeaturesEnabled      *bool                 `url:"experiment_features_enabled,omitempty" json:"experiment_features_enabled,omitempty"`
	MathRenderingLimitsEnabled     *bool                 `url:"math_rendering_limits_enabled,omitempty" json:"math_rendering_limits_enabled,omitempty"`
	LockMathRenderingLimitsEnabled *bool                 `url:"lock_math_rendering_limits_enabled,omitempty" json:"lock_math_rendering_limits_enabled,omitempty"`
	DuoFeaturesEnabled             *bool                 `url:"duo_features_enabled,omitempty" json:"duo_features_enabled,omitempty"`
	LockDuoFeaturesEnabled         *bool                 `url:"lock_duo_features_enabled,omitempty" json:"lock_duo_features_enabled,omitempty"`

	WebBasedCommitSigningEnabled *bool `url:"web_based_commit_signing_enabled,omitempty" json:"web_based_commit_signing_enabled,omitempty"`
	AllowPersonalSnippets        *bool `url:"allow_personal_snippets,omitempty" json:"allow_personal_snippets,omitempty"`
}

// UpdateGroup updates an existing group; only available to group owners and
+18 −0
Original line number Diff line number Diff line
@@ -906,3 +906,21 @@ const (
	CiPipelineVariablesMaintainerRole   CIPipelineVariablesMinimumOverrideRoleValue = "maintainer"
	CIPipelineVariablesDeveloperRole    CIPipelineVariablesMinimumOverrideRoleValue = "developer"
)

// EnabledGitAccessProtocolValue represents a git access protocol value.
type EnabledGitAccessProtocolValue string

const (
	EnabledGitAccessProtocolSSH  EnabledGitAccessProtocolValue = "ssh"
	EnabledGitAccessProtocolHTTP EnabledGitAccessProtocolValue = "http"
	EnabledGitAccessProtocolAll  EnabledGitAccessProtocolValue = "all"
)

// DuoAvailabilityValue represents a GitLab Duo availability value.
type DuoAvailabilityValue string

const (
	DuoAvailabilityDefaultOn  DuoAvailabilityValue = "default_on"
	DuoAvailabilityDefaultOff DuoAvailabilityValue = "default_off"
	DuoAvailabilityNeverOn    DuoAvailabilityValue = "never_on" // Displayed as "Always Off" in the UI
)