diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java index 755de25d..1980fb7c 100644 --- a/gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java +++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java @@ -28,6 +28,7 @@ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Date; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -1128,7 +1129,60 @@ public Project createProject(Project project, String importUrl) throws GitLabApi .withParam("suggestion_commit_message", project.getSuggestionCommitMessage()) .withParam("remove_source_branch_after_merge", project.getRemoveSourceBranchAfterMerge()) .withParam("auto_devops_enabled", project.getAutoDevopsEnabled()) - .withParam("squash_option", project.getSquashOption()); + .withParam("squash_option", project.getSquashOption()) + .withParam("use_custom_template", project.getUseCustomTemplate()) + .withParam( + "external_authorization_classification_label", + project.getExternalAuthorizationClassificationLabel()) + .withParam("group_runners_enabled", project.getGroupRunnersEnabled()) + .withParam("show_default_award_emojis", project.getShowDefaultAwardEmojis()) + .withParam( + "warn_about_potentially_unwanted_characters", + project.getWarnAboutPotentiallyUnwantedCharacters()) + .withParam("mirror_trigger_builds", project.getMirrorTriggerBuilds()) + .withParam("auto_cancel_pending_pipelines", project.getAutoCancelPendingPipelines()) + .withParam("repository_object_format", project.getRepositoryObjectFormat()) + .withParam( + "only_allow_merge_if_all_status_checks_passed", + project.getOnlyAllowMergeIfAllStatusChecksPassed()) + .withParam("group_with_project_templates_id", project.getGroupWithProjectTemplatesId()) + .withParam("public_builds", project.getPublicBuilds()) + .withParam("build_timeout", project.getBuildTimeout()) + .withParam("template_name", project.getTemplateName()) + .withParam("emails_enabled", project.getEmailsEnabled()) + .withParam("mirror", project.getMirror()) + .withParam("analytics_access_level", project.getAnalyticsAccessLevel()) + .withParam("builds_access_level", project.getBuildsAccessLevel()) + .withParam("container_registry_access_level", project.getContainerRegistryAccessLevel()) + .withParam("environments_access_level", project.getEnvironmentsAccessLevel()) + .withParam("feature_flags_access_level", project.getFeatureFlagsAccessLevel()) + .withParam("forking_access_level", project.getForkingAccessLevel()) + .withParam("infrastructure_access_level", project.getInfrastructureAccessLevel()) + .withParam("issues_access_level", project.getIssuesAccessLevel()) + .withParam("merge_requests_access_level", project.getMergeRequestsAccessLevel()) + .withParam("model_experiments_access_level", project.getModelExperimentsAccessLevel()) + .withParam("model_registry_access_level", project.getModelRegistryAccessLevel()) + .withParam("monitor_access_level", project.getMonitorAccessLevel()) + .withParam("pages_access_level", project.getPagesAccessLevel()) + .withParam("releases_access_level", project.getReleasesAccessLevel()) + .withParam("repository_access_level", project.getRepositoryAccessLevel()) + .withParam("requirements_access_level", project.getRequirementsAccessLevel()) + .withParam("security_and_compliance_access_level", project.getSecurityAndComplianceAccessLevel()) + .withParam("snippets_access_level", project.getSnippetsAccessLevel()) + .withParam("wiki_access_level", project.getWikiAccessLevel()); + + if (project.getContainerExpirationPolicy() != null) { + Map attributes = new HashMap<>(); + attributes.put("cadence", project.getContainerExpirationPolicy().getCadence()); + attributes.put("enabled", project.getContainerExpirationPolicy().getEnabled()); + attributes.put("keep_n", project.getContainerExpirationPolicy().getKeepN()); + attributes.put("older_than", project.getContainerExpirationPolicy().getOlderThan()); + attributes.put("name_regex", project.getContainerExpirationPolicy().getNameRegex()); + attributes.put( + "name_regex_keep", project.getContainerExpirationPolicy().getNameRegexKeep()); + + formData.withParam("container_expiration_policy_attributes", attributes, false); + } Namespace namespace = project.getNamespace(); if (namespace != null && namespace.getId() != null) { @@ -1490,7 +1544,60 @@ public Project updateProject(Project project) throws GitLabApiException { .withParam("merge_method", project.getMergeMethod()) .withParam("suggestion_commit_message", project.getSuggestionCommitMessage()) .withParam("remove_source_branch_after_merge", project.getRemoveSourceBranchAfterMerge()) - .withParam("squash_option", project.getSquashOption()); + .withParam("squash_option", project.getSquashOption()) + .withParam("use_custom_template", project.getUseCustomTemplate()) + .withParam( + "external_authorization_classification_label", + project.getExternalAuthorizationClassificationLabel()) + .withParam("group_runners_enabled", project.getGroupRunnersEnabled()) + .withParam("show_default_award_emojis", project.getShowDefaultAwardEmojis()) + .withParam( + "warn_about_potentially_unwanted_characters", + project.getWarnAboutPotentiallyUnwantedCharacters()) + .withParam("mirror_trigger_builds", project.getMirrorTriggerBuilds()) + .withParam("auto_cancel_pending_pipelines", project.getAutoCancelPendingPipelines()) + .withParam("repository_object_format", project.getRepositoryObjectFormat()) + .withParam( + "only_allow_merge_if_all_status_checks_passed", + project.getOnlyAllowMergeIfAllStatusChecksPassed()) + .withParam("group_with_project_templates_id", project.getGroupWithProjectTemplatesId()) + .withParam("public_builds", project.getPublicBuilds()) + .withParam("build_timeout", project.getBuildTimeout()) + .withParam("template_name", project.getTemplateName()) + .withParam("emails_enabled", project.getEmailsEnabled()) + .withParam("mirror", project.getMirror()) + .withParam("analytics_access_level", project.getAnalyticsAccessLevel()) + .withParam("builds_access_level", project.getBuildsAccessLevel()) + .withParam("container_registry_access_level", project.getContainerRegistryAccessLevel()) + .withParam("environments_access_level", project.getEnvironmentsAccessLevel()) + .withParam("feature_flags_access_level", project.getFeatureFlagsAccessLevel()) + .withParam("forking_access_level", project.getForkingAccessLevel()) + .withParam("infrastructure_access_level", project.getInfrastructureAccessLevel()) + .withParam("issues_access_level", project.getIssuesAccessLevel()) + .withParam("merge_requests_access_level", project.getMergeRequestsAccessLevel()) + .withParam("model_experiments_access_level", project.getModelExperimentsAccessLevel()) + .withParam("model_registry_access_level", project.getModelRegistryAccessLevel()) + .withParam("monitor_access_level", project.getMonitorAccessLevel()) + .withParam("pages_access_level", project.getPagesAccessLevel()) + .withParam("releases_access_level", project.getReleasesAccessLevel()) + .withParam("repository_access_level", project.getRepositoryAccessLevel()) + .withParam("requirements_access_level", project.getRequirementsAccessLevel()) + .withParam("security_and_compliance_access_level", project.getSecurityAndComplianceAccessLevel()) + .withParam("snippets_access_level", project.getSnippetsAccessLevel()) + .withParam("wiki_access_level", project.getWikiAccessLevel()); + + if (project.getContainerExpirationPolicy() != null) { + Map attributes = new HashMap<>(); + attributes.put("cadence", project.getContainerExpirationPolicy().getCadence()); + attributes.put("enabled", project.getContainerExpirationPolicy().getEnabled()); + attributes.put("keep_n", project.getContainerExpirationPolicy().getKeepN()); + attributes.put("older_than", project.getContainerExpirationPolicy().getOlderThan()); + attributes.put("name_regex", project.getContainerExpirationPolicy().getNameRegex()); + attributes.put( + "name_regex_keep", project.getContainerExpirationPolicy().getNameRegexKeep()); + + formData.withParam("container_expiration_policy_attributes", attributes, false); + } if (isApiVersion(ApiVersion.V3)) { formData.withParam("visibility_level", project.getVisibilityLevel()); diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ContainerExpirationPolicy.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ContainerExpirationPolicy.java new file mode 100644 index 00000000..181916c6 --- /dev/null +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/ContainerExpirationPolicy.java @@ -0,0 +1,109 @@ +package org.gitlab4j.api.models; + +import java.io.Serializable; + +import org.gitlab4j.models.utils.JacksonJson; + +public class ContainerExpirationPolicy implements Serializable { + private static final long serialVersionUID = 1L; + + private String cadence; + private Boolean enabled; + private Integer keepN; + private String olderThan; + private String nameRegex; + private String nameRegexKeep; + + private String nextRunAt; + + public String getCadence() { + return cadence; + } + + public void setCadence(String cadence) { + this.cadence = cadence; + } + + public ContainerExpirationPolicy withCadence(String cadence) { + this.cadence = cadence; + return this; + } + + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public ContainerExpirationPolicy withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + public Integer getKeepN() { + return keepN; + } + + public void setKeepN(Integer keepN) { + this.keepN = keepN; + } + + public ContainerExpirationPolicy withKeepN(Integer keepN) { + this.keepN = keepN; + return this; + } + + public String getOlderThan() { + return olderThan; + } + + public void setOlderThan(String olderThan) { + this.olderThan = olderThan; + } + + public ContainerExpirationPolicy withOlderThan(String olderThan) { + this.olderThan = olderThan; + return this; + } + + public String getNameRegex() { + return nameRegex; + } + + public void setNameRegex(String nameRegex) { + this.nameRegex = nameRegex; + } + + public ContainerExpirationPolicy withNameRegex(String nameRegex) { + this.nameRegex = nameRegex; + return this; + } + + public String getNameRegexKeep() { + return nameRegexKeep; + } + + public void setNameRegexKeep(String nameRegexKeep) { + this.nameRegexKeep = nameRegexKeep; + } + + public ContainerExpirationPolicy withNameRegexKeep(String nameRegexKeep) { + this.nameRegexKeep = nameRegexKeep; + return this; + } + + public String getNextRunAt() { + return nextRunAt; + } + + public void setNextRunAt(String nextRunAt) { + this.nextRunAt = nextRunAt; + } + + @Override + public String toString() { + return (JacksonJson.toJsonString(this)); + } +} diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java index 89d1d52f..82e3e475 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Project.java @@ -6,8 +6,10 @@ import java.util.Map; import org.gitlab4j.api.models.ImportStatus.Status; +import org.gitlab4j.models.Constants.AutoCancelPendingPipelines; import org.gitlab4j.models.Constants.AutoDevopsDeployStrategy; import org.gitlab4j.models.Constants.BuildGitStrategy; +import org.gitlab4j.models.Constants.ProjectFeatureVisibilityAccessLevel; import org.gitlab4j.models.Constants.SquashOption; import org.gitlab4j.models.utils.JacksonJson; import org.gitlab4j.models.utils.JacksonJsonEnumHelper; @@ -122,6 +124,67 @@ public String toString() { private String mergeRequestsTemplate; private String issuesTemplate; + private Boolean useCustomTemplate; + private String externalAuthorizationClassificationLabel; + private Boolean groupRunnersEnabled; + private Boolean showDefaultAwardEmojis; + private Boolean warnAboutPotentiallyUnwantedCharacters; + private Boolean mirrorTriggerBuilds; + private AutoCancelPendingPipelines autoCancelPendingPipelines; + private String repositoryObjectFormat; + private Boolean onlyAllowMergeIfAllStatusChecksPassed; + private Integer groupWithProjectTemplatesId; + private Boolean publicBuilds; + private Integer buildTimeout; + private String templateName; + private Boolean emailsEnabled; + private Boolean mirror; + private Date updatedAt; + private String descriptionHtml; + private String containerRegistryImagePrefix; + private ContainerExpirationPolicy containerExpirationPolicy; + private Boolean serviceDeskEnabled; + private String importUrl; + private String importType; + private String importError; + private Boolean ciForwardDeploymentRollbackAllowed; + private Boolean ciAllowForkPipelinesToRunInParentProject; + private List ciIdTokenSubClaimComponents; + private Boolean ciJobTokenScopeEnabled; + private Boolean ciSeparatedCaches; + private String ciRestrictPipelineCancellationRole; + private String ciPipelineVariablesMinimumOverrideRole; + private Boolean ciPushRepositoryForJobTokenAllowed; + private Boolean allowPipelineTriggerApproveDeployment; + private Boolean restrictUserDefinedVariables; + private Boolean enforceAuthChecksOnUploads; + private Boolean keepLatestArtifact; + private Integer runnerTokenExpirationInterval; + private Boolean requirementsEnabled; + private Boolean securityAndComplianceEnabled; + private Boolean secretPushProtectionEnabled; + private List complianceFrameworks; + + private ProjectFeatureVisibilityAccessLevel analyticsAccessLevel; + private ProjectFeatureVisibilityAccessLevel buildsAccessLevel; + private ProjectFeatureVisibilityAccessLevel containerRegistryAccessLevel; + private ProjectFeatureVisibilityAccessLevel environmentsAccessLevel; + private ProjectFeatureVisibilityAccessLevel featureFlagsAccessLevel; + private ProjectFeatureVisibilityAccessLevel forkingAccessLevel; + private ProjectFeatureVisibilityAccessLevel infrastructureAccessLevel; + private ProjectFeatureVisibilityAccessLevel issuesAccessLevel; + private ProjectFeatureVisibilityAccessLevel mergeRequestsAccessLevel; + private ProjectFeatureVisibilityAccessLevel modelExperimentsAccessLevel; + private ProjectFeatureVisibilityAccessLevel modelRegistryAccessLevel; + private ProjectFeatureVisibilityAccessLevel monitorAccessLevel; + private ProjectFeatureVisibilityAccessLevel pagesAccessLevel; + private ProjectFeatureVisibilityAccessLevel releasesAccessLevel; + private ProjectFeatureVisibilityAccessLevel repositoryAccessLevel; + private ProjectFeatureVisibilityAccessLevel requirementsAccessLevel; + private ProjectFeatureVisibilityAccessLevel securityAndComplianceAccessLevel; + private ProjectFeatureVisibilityAccessLevel snippetsAccessLevel; + private ProjectFeatureVisibilityAccessLevel wikiAccessLevel; + @JsonProperty("_links") private Map links; @@ -138,7 +201,7 @@ public void setApprovalsBeforeMerge(Integer approvalsBeforeMerge) { public Project withApprovalsBeforeMerge(Integer approvalsBeforeMerge) { this.approvalsBeforeMerge = approvalsBeforeMerge; - return (this); + return this; } public Boolean getArchived() { @@ -165,9 +228,9 @@ public void setContainerRegistryEnabled(Boolean containerRegistryEnabled) { this.containerRegistryEnabled = containerRegistryEnabled; } - public Project withContainerRegistryEnabled(boolean containerRegistryEnabled) { + public Project withContainerRegistryEnabled(Boolean containerRegistryEnabled) { this.containerRegistryEnabled = containerRegistryEnabled; - return (this); + return this; } public Date getCreatedAt() { @@ -196,7 +259,7 @@ public void setDefaultBranch(String defaultBranch) { public Project withDefaultBranch(String defaultBranch) { this.defaultBranch = defaultBranch; - return (this); + return this; } public String getDescription() { @@ -209,7 +272,7 @@ public void setDescription(String description) { public Project withDescription(String description) { this.description = description; - return (this); + return this; } public Integer getForksCount() { @@ -246,7 +309,7 @@ public void setId(Long id) { public Project withId(Long id) { this.id = id; - return (this); + return this; } public Boolean getIssuesEnabled() { @@ -257,9 +320,9 @@ public void setIssuesEnabled(Boolean issuesEnabled) { this.issuesEnabled = issuesEnabled; } - public Project withIssuesEnabled(boolean issuesEnabled) { + public Project withIssuesEnabled(Boolean issuesEnabled) { this.issuesEnabled = issuesEnabled; - return (this); + return this; } public Boolean getJobsEnabled() { @@ -270,9 +333,9 @@ public void setJobsEnabled(Boolean jobsEnabled) { this.jobsEnabled = jobsEnabled; } - public Project withJobsEnabled(boolean jobsEnabled) { + public Project withJobsEnabled(Boolean jobsEnabled) { this.jobsEnabled = jobsEnabled; - return (this); + return this; } public Date getLastActivityAt() { @@ -293,7 +356,7 @@ public void setLfsEnabled(Boolean lfsEnabled) { public Project withLfsEnabled(Boolean lfsEnabled) { this.lfsEnabled = lfsEnabled; - return (this); + return this; } public MergeMethod getMergeMethod() { @@ -306,7 +369,7 @@ public void setMergeMethod(MergeMethod mergeMethod) { public Project withMergeMethod(MergeMethod mergeMethod) { this.mergeMethod = mergeMethod; - return (this); + return this; } public Boolean getMergeRequestsEnabled() { @@ -317,9 +380,9 @@ public void setMergeRequestsEnabled(Boolean mergeRequestsEnabled) { this.mergeRequestsEnabled = mergeRequestsEnabled; } - public Project withMergeRequestsEnabled(boolean mergeRequestsEnabled) { + public Project withMergeRequestsEnabled(Boolean mergeRequestsEnabled) { this.mergeRequestsEnabled = mergeRequestsEnabled; - return (this); + return this; } public String getName() { @@ -332,7 +395,7 @@ public void setName(String name) { public Project withName(String name) { this.name = name; - return (this); + return this; } public Namespace getNamespace() { @@ -345,13 +408,13 @@ public void setNamespace(Namespace namespace) { public Project withNamespace(Namespace namespace) { this.namespace = namespace; - return (this); + return this; } public Project withNamespaceId(long namespaceId) { this.namespace = new Namespace(); this.namespace.setId(namespaceId); - return (this); + return this; } public String getNameWithNamespace() { @@ -372,7 +435,7 @@ public void setOnlyAllowMergeIfPipelineSucceeds(Boolean onlyAllowMergeIfPipeline public Project withOnlyAllowMergeIfPipelineSucceeds(Boolean onlyAllowMergeIfPipelineSucceeds) { this.onlyAllowMergeIfPipelineSucceeds = onlyAllowMergeIfPipelineSucceeds; - return (this); + return this; } public Boolean getAllowMergeOnSkippedPipeline() { @@ -385,7 +448,7 @@ public void setAllowMergeOnSkippedPipeline(Boolean allowMergeOnSkippedPipeline) public Project withAllowMergeOnSkippedPipeline(Boolean allowMergeOnSkippedPipeline) { this.allowMergeOnSkippedPipeline = allowMergeOnSkippedPipeline; - return (this); + return this; } public Boolean getOnlyAllowMergeIfAllDiscussionsAreResolved() { @@ -398,7 +461,7 @@ public void setOnlyAllowMergeIfAllDiscussionsAreResolved(Boolean onlyAllowMergeI public Project withOnlyAllowMergeIfAllDiscussionsAreResolved(Boolean onlyAllowMergeIfAllDiscussionsAreResolved) { this.onlyAllowMergeIfAllDiscussionsAreResolved = onlyAllowMergeIfAllDiscussionsAreResolved; - return (this); + return this; } public Integer getOpenIssuesCount() { @@ -427,7 +490,7 @@ public void setPath(String path) { public Project withPath(String path) { this.path = path; - return (this); + return this; } public String getPathWithNamespace() { @@ -456,7 +519,7 @@ public void setPublic(Boolean isPublic) { public Project withPublic(Boolean isPublic) { this.isPublic = isPublic; - return (this); + return this; } public Boolean getPublicJobs() { @@ -467,9 +530,9 @@ public void setPublicJobs(Boolean publicJobs) { this.publicJobs = publicJobs; } - public Project withPublicJobs(boolean publicJobs) { + public Project withPublicJobs(Boolean publicJobs) { this.publicJobs = publicJobs; - return (this); + return this; } public String getRepositoryStorage() { @@ -482,7 +545,7 @@ public void setRepositoryStorage(String repositoryStorage) { public Project withRepositoryStorage(String repositoryStorage) { this.repositoryStorage = repositoryStorage; - return (this); + return this; } public Boolean getRequestAccessEnabled() { @@ -493,9 +556,9 @@ public void setRequestAccessEnabled(Boolean request_access_enabled) { this.requestAccessEnabled = request_access_enabled; } - public Project withRequestAccessEnabled(boolean requestAccessEnabled) { + public Project withRequestAccessEnabled(Boolean requestAccessEnabled) { this.requestAccessEnabled = requestAccessEnabled; - return (this); + return this; } public String getRunnersToken() { @@ -522,9 +585,9 @@ public void setSharedWithGroups(List sharedWithGroups) { this.sharedWithGroups = sharedWithGroups; } - public Project withSharedRunnersEnabled(boolean sharedRunnersEnabled) { + public Project withSharedRunnersEnabled(Boolean sharedRunnersEnabled) { this.sharedRunnersEnabled = sharedRunnersEnabled; - return (this); + return this; } public Boolean getSnippetsEnabled() { @@ -535,9 +598,9 @@ public void setSnippetsEnabled(Boolean snippetsEnabled) { this.snippetsEnabled = snippetsEnabled; } - public Project withSnippetsEnabled(boolean snippetsEnabled) { + public Project withSnippetsEnabled(Boolean snippetsEnabled) { this.snippetsEnabled = snippetsEnabled; - return (this); + return this; } public String getSshUrlToRepo() { @@ -578,7 +641,7 @@ public void setTagList(List tagList) { @Deprecated public Project withTagList(List tagList) { this.tagList = tagList; - return (this); + return this; } public List getTopics() { @@ -591,7 +654,7 @@ public void setTopics(List topics) { public Project withTopics(List topics) { this.topics = topics; - return (this); + return this; } public Visibility getVisibility() { @@ -604,7 +667,7 @@ public void setVisibility(Visibility visibility) { public Project withVisibility(Visibility visibility) { this.visibility = visibility; - return (this); + return this; } public Integer getVisibilityLevel() { @@ -617,7 +680,7 @@ public void setVisibilityLevel(Integer visibilityLevel) { public Project withVisibilityLevel(Integer visibilityLevel) { this.visibilityLevel = visibilityLevel; - return (this); + return this; } public Boolean getWallEnabled() { @@ -630,7 +693,7 @@ public void setWallEnabled(Boolean wallEnabled) { public Project withWallEnabled(Boolean wallEnabled) { this.wallEnabled = wallEnabled; - return (this); + return this; } public String getWebUrl() { @@ -643,7 +706,7 @@ public void setWebUrl(String webUrl) { public Project withWebUrl(String webUrl) { this.webUrl = webUrl; - return (this); + return this; } public Boolean getWikiEnabled() { @@ -654,9 +717,9 @@ public void setWikiEnabled(Boolean wikiEnabled) { this.wikiEnabled = wikiEnabled; } - public Project withWikiEnabled(boolean wikiEnabled) { + public Project withWikiEnabled(Boolean wikiEnabled) { this.wikiEnabled = wikiEnabled; - return (this); + return this; } public Boolean getPrintingMergeRequestLinkEnabled() { @@ -669,7 +732,7 @@ public void setPrintingMergeRequestLinkEnabled(Boolean printingMergeRequestLinkE public Project withPrintingMergeRequestLinkEnabled(Boolean printingMergeRequestLinkEnabled) { this.printingMergeRequestLinkEnabled = printingMergeRequestLinkEnabled; - return (this); + return this; } public Boolean getResolveOutdatedDiffDiscussions() { @@ -680,9 +743,9 @@ public void setResolveOutdatedDiffDiscussions(Boolean resolveOutdatedDiffDiscuss this.resolveOutdatedDiffDiscussions = resolveOutdatedDiffDiscussions; } - public Project withResolveOutdatedDiffDiscussions(boolean resolveOutdatedDiffDiscussions) { + public Project withResolveOutdatedDiffDiscussions(Boolean resolveOutdatedDiffDiscussions) { this.resolveOutdatedDiffDiscussions = resolveOutdatedDiffDiscussions; - return (this); + return this; } public Boolean getInitializeWithReadme() { @@ -693,9 +756,9 @@ public void setInitializeWithReadme(Boolean initializeWithReadme) { this.initializeWithReadme = initializeWithReadme; } - public Project withInitializeWithReadme(boolean initializeWithReadme) { + public Project withInitializeWithReadme(Boolean initializeWithReadme) { this.initializeWithReadme = initializeWithReadme; - return (this); + return this; } public Boolean getPackagesEnabled() { @@ -708,7 +771,7 @@ public void setPackagesEnabled(Boolean packagesEnabled) { public Project withPackagesEnabled(Boolean packagesEnabled) { this.packagesEnabled = packagesEnabled; - return (this); + return this; } public ProjectStatistics getStatistics() { @@ -759,7 +822,7 @@ public void setCustomAttributes(List customAttributes) { this.customAttributes = customAttributes; } - public static final boolean isValid(Project project) { + public static boolean isValid(Project project) { return (project != null && project.getId() != null); } @@ -853,6 +916,11 @@ public void setCiConfigPath(String ciConfigPath) { this.ciConfigPath = ciConfigPath; } + public Project withCiConfigPath(String ciConfigPath) { + this.ciConfigPath = ciConfigPath; + return this; + } + public Boolean getRemoveSourceBranchAfterMerge() { return removeSourceBranchAfterMerge; } @@ -874,6 +942,11 @@ public void setAutoDevopsEnabled(Boolean autoDevopsEnabled) { this.autoDevopsEnabled = autoDevopsEnabled; } + public Project withAutoDevopsEnabled(Boolean autoDevopsEnabled) { + this.autoDevopsEnabled = autoDevopsEnabled; + return this; + } + public AutoDevopsDeployStrategy getAutoDevopsDeployStrategy() { return autoDevopsDeployStrategy; } @@ -890,6 +963,11 @@ public void setAutocloseReferencedIssues(Boolean autocloseReferencedIssues) { this.autocloseReferencedIssues = autocloseReferencedIssues; } + public Project withAutocloseReferencedIssues(Boolean autocloseReferencedIssues) { + this.autocloseReferencedIssues = autocloseReferencedIssues; + return this; + } + public Boolean getEmailsDisabled() { return emailsDisabled; } @@ -977,6 +1055,655 @@ public void setLinks(Map links) { this.links = links; } + public Integer getBuildTimeout() { + return buildTimeout; + } + + public void setBuildTimeout(Integer buildTimeout) { + this.buildTimeout = buildTimeout; + } + + public Project withBuildTimeout(Integer buildTimeout) { + this.buildTimeout = buildTimeout; + return this; + } + + public Boolean getMirrorTriggerBuilds() { + return mirrorTriggerBuilds; + } + + public void setMirrorTriggerBuilds(Boolean mirrorTriggerBuilds) { + this.mirrorTriggerBuilds = mirrorTriggerBuilds; + } + + public Project withMirrorTriggerBuilds(Boolean mirrorTriggerBuilds) { + this.mirrorTriggerBuilds = mirrorTriggerBuilds; + return this; + } + + public Integer getGroupWithProjectTemplatesId() { + return groupWithProjectTemplatesId; + } + + public void setGroupWithProjectTemplatesId(Integer groupWithProjectTemplatesId) { + this.groupWithProjectTemplatesId = groupWithProjectTemplatesId; + } + + public Project withGroupWithProjectTemplatesId(Integer groupWithProjectTemplatesId) { + this.groupWithProjectTemplatesId = groupWithProjectTemplatesId; + return this; + } + + public Boolean getGroupRunnersEnabled() { + return groupRunnersEnabled; + } + + public void setGroupRunnersEnabled(Boolean groupRunnersEnabled) { + this.groupRunnersEnabled = groupRunnersEnabled; + } + + public Project withGroupRunnersEnabled(Boolean groupRunnersEnabled) { + this.groupRunnersEnabled = groupRunnersEnabled; + return this; + } + + public Boolean getOnlyAllowMergeIfAllStatusChecksPassed() { + return onlyAllowMergeIfAllStatusChecksPassed; + } + + public void setOnlyAllowMergeIfAllStatusChecksPassed(Boolean onlyAllowMergeIfAllStatusChecksPassed) { + this.onlyAllowMergeIfAllStatusChecksPassed = onlyAllowMergeIfAllStatusChecksPassed; + } + + public Project withOnlyAllowMergeIfAllStatusChecksPassed(Boolean onlyAllowMergeIfAllStatusChecksPassed) { + this.onlyAllowMergeIfAllStatusChecksPassed = onlyAllowMergeIfAllStatusChecksPassed; + return this; + } + + public Boolean getPublicBuilds() { + return publicBuilds; + } + + public void setPublicBuilds(Boolean publicBuilds) { + this.publicBuilds = publicBuilds; + } + + public Project withPublicBuilds(Boolean publicBuilds) { + this.publicBuilds = publicBuilds; + return this; + } + + public String getRepositoryObjectFormat() { + return repositoryObjectFormat; + } + + public void setRepositoryObjectFormat(String repositoryObjectFormat) { + this.repositoryObjectFormat = repositoryObjectFormat; + } + + public Project withRepositoryObjectFormat(String repositoryObjectFormat) { + this.repositoryObjectFormat = repositoryObjectFormat; + return this; + } + + public String getTemplateName() { + return templateName; + } + + public void setTemplateName(String templateName) { + this.templateName = templateName; + } + + public Project withTemplateName(String templateName) { + this.templateName = templateName; + return this; + } + + public String getExternalAuthorizationClassificationLabel() { + return externalAuthorizationClassificationLabel; + } + + public void setExternalAuthorizationClassificationLabel(String externalAuthorizationClassificationLabel) { + this.externalAuthorizationClassificationLabel = externalAuthorizationClassificationLabel; + } + + public Project withExternalAuthorizationClassificationLabel(String externalAuthorizationClassificationLabel) { + this.externalAuthorizationClassificationLabel = externalAuthorizationClassificationLabel; + return this; + } + + public AutoCancelPendingPipelines getAutoCancelPendingPipelines() { + return autoCancelPendingPipelines; + } + + public void setAutoCancelPendingPipelines(AutoCancelPendingPipelines autoCancelPendingPipelines) { + this.autoCancelPendingPipelines = autoCancelPendingPipelines; + } + + public Project withAutoCancelPendingPipelines(AutoCancelPendingPipelines autoCancelPendingPipelines) { + this.autoCancelPendingPipelines = autoCancelPendingPipelines; + return this; + } + + public Boolean getUseCustomTemplate() { + return useCustomTemplate; + } + + public void setUseCustomTemplate(Boolean useCustomTemplate) { + this.useCustomTemplate = useCustomTemplate; + } + + public Project withUseCustomTemplate(Boolean useCustomTemplate) { + this.useCustomTemplate = useCustomTemplate; + return this; + } + + public Boolean getEmailsEnabled() { + return emailsEnabled; + } + + public void setEmailsEnabled(Boolean emailsEnabled) { + this.emailsEnabled = emailsEnabled; + } + + public Project withEmailsEnabled(Boolean emailsEnabled) { + this.emailsEnabled = emailsEnabled; + return this; + } + + public Boolean getShowDefaultAwardEmojis() { + return showDefaultAwardEmojis; + } + + public void setShowDefaultAwardEmojis(Boolean showDefaultAwardEmojis) { + this.showDefaultAwardEmojis = showDefaultAwardEmojis; + } + + public Project withShowDefaultAwardEmojis(Boolean showDefaultAwardEmojis) { + this.showDefaultAwardEmojis = showDefaultAwardEmojis; + return this; + } + + public Boolean getWarnAboutPotentiallyUnwantedCharacters() { + return warnAboutPotentiallyUnwantedCharacters; + } + + public void setWarnAboutPotentiallyUnwantedCharacters(Boolean warnAboutPotentiallyUnwantedCharacters) { + this.warnAboutPotentiallyUnwantedCharacters = warnAboutPotentiallyUnwantedCharacters; + } + + public Project withWarnAboutPotentiallyUnwantedCharacters(Boolean warnAboutPotentiallyUnwantedCharacters) { + this.warnAboutPotentiallyUnwantedCharacters = warnAboutPotentiallyUnwantedCharacters; + return this; + } + + public Boolean getMirror() { + return mirror; + } + + public void setMirror(Boolean mirror) { + this.mirror = mirror; + } + + public Project withMirror(Boolean mirror) { + this.mirror = mirror; + return this; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public String getDescriptionHtml() { + return descriptionHtml; + } + + public void setDescriptionHtml(String descriptionHtml) { + this.descriptionHtml = descriptionHtml; + } + + public String getContainerRegistryImagePrefix() { + return containerRegistryImagePrefix; + } + + public void setContainerRegistryImagePrefix(String containerRegistryImagePrefix) { + this.containerRegistryImagePrefix = containerRegistryImagePrefix; + } + + public ContainerExpirationPolicy getContainerExpirationPolicy() { + return containerExpirationPolicy; + } + + public void setContainerExpirationPolicy(ContainerExpirationPolicy containerExpirationPolicy) { + this.containerExpirationPolicy = containerExpirationPolicy; + } + + public Project withContainerExpirationPolicy(ContainerExpirationPolicy containerExpirationPolicy) { + this.containerExpirationPolicy = containerExpirationPolicy; + return this; + } + + public Boolean getServiceDeskEnabled() { + return serviceDeskEnabled; + } + + public void setServiceDeskEnabled(Boolean serviceDeskEnabled) { + this.serviceDeskEnabled = serviceDeskEnabled; + } + + public String getImportUrl() { + return importUrl; + } + + public void setImportUrl(String importUrl) { + this.importUrl = importUrl; + } + + public String getImportType() { + return importType; + } + + public void setImportType(String importType) { + this.importType = importType; + } + + public String getImportError() { + return importError; + } + + public void setImportError(String importError) { + this.importError = importError; + } + + public Boolean getCiForwardDeploymentRollbackAllowed() { + return ciForwardDeploymentRollbackAllowed; + } + + public void setCiForwardDeploymentRollbackAllowed(Boolean ciForwardDeploymentRollbackAllowed) { + this.ciForwardDeploymentRollbackAllowed = ciForwardDeploymentRollbackAllowed; + } + + public Boolean getCiAllowForkPipelinesToRunInParentProject() { + return ciAllowForkPipelinesToRunInParentProject; + } + + public void setCiAllowForkPipelinesToRunInParentProject(Boolean ciAllowForkPipelinesToRunInParentProject) { + this.ciAllowForkPipelinesToRunInParentProject = ciAllowForkPipelinesToRunInParentProject; + } + + public List getCiIdTokenSubClaimComponents() { + return ciIdTokenSubClaimComponents; + } + + public void setCiIdTokenSubClaimComponents(List ciIdTokenSubClaimComponents) { + this.ciIdTokenSubClaimComponents = ciIdTokenSubClaimComponents; + } + + public Boolean getCiJobTokenScopeEnabled() { + return ciJobTokenScopeEnabled; + } + + public void setCiJobTokenScopeEnabled(Boolean ciJobTokenScopeEnabled) { + this.ciJobTokenScopeEnabled = ciJobTokenScopeEnabled; + } + + public Boolean getCiSeparatedCaches() { + return ciSeparatedCaches; + } + + public void setCiSeparatedCaches(Boolean ciSeparatedCaches) { + this.ciSeparatedCaches = ciSeparatedCaches; + } + + public String getCiRestrictPipelineCancellationRole() { + return ciRestrictPipelineCancellationRole; + } + + public void setCiRestrictPipelineCancellationRole(String ciRestrictPipelineCancellationRole) { + this.ciRestrictPipelineCancellationRole = ciRestrictPipelineCancellationRole; + } + + public String getCiPipelineVariablesMinimumOverrideRole() { + return ciPipelineVariablesMinimumOverrideRole; + } + + public void setCiPipelineVariablesMinimumOverrideRole(String ciPipelineVariablesMinimumOverrideRole) { + this.ciPipelineVariablesMinimumOverrideRole = ciPipelineVariablesMinimumOverrideRole; + } + + public Boolean getCiPushRepositoryForJobTokenAllowed() { + return ciPushRepositoryForJobTokenAllowed; + } + + public void setCiPushRepositoryForJobTokenAllowed(Boolean ciPushRepositoryForJobTokenAllowed) { + this.ciPushRepositoryForJobTokenAllowed = ciPushRepositoryForJobTokenAllowed; + } + + public Boolean getAllowPipelineTriggerApproveDeployment() { + return allowPipelineTriggerApproveDeployment; + } + + public void setAllowPipelineTriggerApproveDeployment(Boolean allowPipelineTriggerApproveDeployment) { + this.allowPipelineTriggerApproveDeployment = allowPipelineTriggerApproveDeployment; + } + + public Boolean getRestrictUserDefinedVariables() { + return restrictUserDefinedVariables; + } + + public void setRestrictUserDefinedVariables(Boolean restrictUserDefinedVariables) { + this.restrictUserDefinedVariables = restrictUserDefinedVariables; + } + + public Boolean getEnforceAuthChecksOnUploads() { + return enforceAuthChecksOnUploads; + } + + public void setEnforceAuthChecksOnUploads(Boolean enforceAuthChecksOnUploads) { + this.enforceAuthChecksOnUploads = enforceAuthChecksOnUploads; + } + + public Boolean getKeepLatestArtifact() { + return keepLatestArtifact; + } + + public void setKeepLatestArtifact(Boolean keepLatestArtifact) { + this.keepLatestArtifact = keepLatestArtifact; + } + + public Integer getRunnerTokenExpirationInterval() { + return runnerTokenExpirationInterval; + } + + public void setRunnerTokenExpirationInterval(Integer runnerTokenExpirationInterval) { + this.runnerTokenExpirationInterval = runnerTokenExpirationInterval; + } + + public Boolean getRequirementsEnabled() { + return requirementsEnabled; + } + + public void setRequirementsEnabled(Boolean requirementsEnabled) { + this.requirementsEnabled = requirementsEnabled; + } + + public Boolean getSecurityAndComplianceEnabled() { + return securityAndComplianceEnabled; + } + + public void setSecurityAndComplianceEnabled(Boolean securityAndComplianceEnabled) { + this.securityAndComplianceEnabled = securityAndComplianceEnabled; + } + + public Boolean getSecretPushProtectionEnabled() { + return secretPushProtectionEnabled; + } + + public void setSecretPushProtectionEnabled(Boolean secretPushProtectionEnabled) { + this.secretPushProtectionEnabled = secretPushProtectionEnabled; + } + + public List getComplianceFrameworks() { + return complianceFrameworks; + } + + public void setComplianceFrameworks(List complianceFrameworks) { + this.complianceFrameworks = complianceFrameworks; + } + + public ProjectFeatureVisibilityAccessLevel getAnalyticsAccessLevel() { + return analyticsAccessLevel; + } + + public void setAnalyticsAccessLevel(ProjectFeatureVisibilityAccessLevel analyticsAccessLevel) { + this.analyticsAccessLevel = analyticsAccessLevel; + } + + public Project withAnalyticsAccessLevel(ProjectFeatureVisibilityAccessLevel analyticsAccessLevel) { + this.analyticsAccessLevel = analyticsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getBuildsAccessLevel() { + return buildsAccessLevel; + } + + public void setBuildsAccessLevel(ProjectFeatureVisibilityAccessLevel buildsAccessLevel) { + this.buildsAccessLevel = buildsAccessLevel; + } + + public Project withBuildsAccessLevel(ProjectFeatureVisibilityAccessLevel buildsAccessLevel) { + this.buildsAccessLevel = buildsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getContainerRegistryAccessLevel() { + return containerRegistryAccessLevel; + } + + public void setContainerRegistryAccessLevel(ProjectFeatureVisibilityAccessLevel containerRegistryAccessLevel) { + this.containerRegistryAccessLevel = containerRegistryAccessLevel; + } + + public Project withContainerRegistryAccessLevel(ProjectFeatureVisibilityAccessLevel containerRegistryAccessLevel) { + this.containerRegistryAccessLevel = containerRegistryAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getEnvironmentsAccessLevel() { + return environmentsAccessLevel; + } + + public void setEnvironmentsAccessLevel(ProjectFeatureVisibilityAccessLevel environmentsAccessLevel) { + this.environmentsAccessLevel = environmentsAccessLevel; + } + + public Project withEnvironmentsAccessLevel(ProjectFeatureVisibilityAccessLevel environmentsAccessLevel) { + this.environmentsAccessLevel = environmentsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getFeatureFlagsAccessLevel() { + return featureFlagsAccessLevel; + } + + public void setFeatureFlagsAccessLevel(ProjectFeatureVisibilityAccessLevel featureFlagsAccessLevel) { + this.featureFlagsAccessLevel = featureFlagsAccessLevel; + } + + public Project withFeatureFlagsAccessLevel(ProjectFeatureVisibilityAccessLevel featureFlagsAccessLevel) { + this.featureFlagsAccessLevel = featureFlagsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getForkingAccessLevel() { + return forkingAccessLevel; + } + + public void setForkingAccessLevel(ProjectFeatureVisibilityAccessLevel forkingAccessLevel) { + this.forkingAccessLevel = forkingAccessLevel; + } + + public Project withForkingAccessLevel(ProjectFeatureVisibilityAccessLevel forkingAccessLevel) { + this.forkingAccessLevel = forkingAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getInfrastructureAccessLevel() { + return infrastructureAccessLevel; + } + + public void setInfrastructureAccessLevel(ProjectFeatureVisibilityAccessLevel infrastructureAccessLevel) { + this.infrastructureAccessLevel = infrastructureAccessLevel; + } + + public Project withInfrastructureAccessLevel(ProjectFeatureVisibilityAccessLevel infrastructureAccessLevel) { + this.infrastructureAccessLevel = infrastructureAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getIssuesAccessLevel() { + return issuesAccessLevel; + } + + public void setIssuesAccessLevel(ProjectFeatureVisibilityAccessLevel issuesAccessLevel) { + this.issuesAccessLevel = issuesAccessLevel; + } + + public Project withIssuesAccessLevel(ProjectFeatureVisibilityAccessLevel issuesAccessLevel) { + this.issuesAccessLevel = issuesAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getMergeRequestsAccessLevel() { + return mergeRequestsAccessLevel; + } + + public void setMergeRequestsAccessLevel(ProjectFeatureVisibilityAccessLevel mergeRequestsAccessLevel) { + this.mergeRequestsAccessLevel = mergeRequestsAccessLevel; + } + + public Project withMergeRequestsAccessLevel(ProjectFeatureVisibilityAccessLevel mergeRequestsAccessLevel) { + this.mergeRequestsAccessLevel = mergeRequestsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getModelExperimentsAccessLevel() { + return modelExperimentsAccessLevel; + } + + public void setModelExperimentsAccessLevel(ProjectFeatureVisibilityAccessLevel modelExperimentsAccessLevel) { + this.modelExperimentsAccessLevel = modelExperimentsAccessLevel; + } + + public Project withModelExperimentsAccessLevel(ProjectFeatureVisibilityAccessLevel modelExperimentsAccessLevel) { + this.modelExperimentsAccessLevel = modelExperimentsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getModelRegistryAccessLevel() { + return modelRegistryAccessLevel; + } + + public void setModelRegistryAccessLevel(ProjectFeatureVisibilityAccessLevel modelRegistryAccessLevel) { + this.modelRegistryAccessLevel = modelRegistryAccessLevel; + } + + public Project withModelRegistryAccessLevel(ProjectFeatureVisibilityAccessLevel modelRegistryAccessLevel) { + this.modelRegistryAccessLevel = modelRegistryAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getMonitorAccessLevel() { + return monitorAccessLevel; + } + + public void setMonitorAccessLevel(ProjectFeatureVisibilityAccessLevel monitorAccessLevel) { + this.monitorAccessLevel = monitorAccessLevel; + } + + public Project withMonitorAccessLevel(ProjectFeatureVisibilityAccessLevel monitorAccessLevel) { + this.monitorAccessLevel = monitorAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getPagesAccessLevel() { + return pagesAccessLevel; + } + + public void setPagesAccessLevel(ProjectFeatureVisibilityAccessLevel pagesAccessLevel) { + this.pagesAccessLevel = pagesAccessLevel; + } + + public Project withPagesAccessLevel(ProjectFeatureVisibilityAccessLevel pagesAccessLevel) { + this.pagesAccessLevel = pagesAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getReleasesAccessLevel() { + return releasesAccessLevel; + } + + public void setReleasesAccessLevel(ProjectFeatureVisibilityAccessLevel releasesAccessLevel) { + this.releasesAccessLevel = releasesAccessLevel; + } + + public Project withReleasesAccessLevel(ProjectFeatureVisibilityAccessLevel releasesAccessLevel) { + this.releasesAccessLevel = releasesAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getRepositoryAccessLevel() { + return repositoryAccessLevel; + } + + public void setRepositoryAccessLevel(ProjectFeatureVisibilityAccessLevel repositoryAccessLevel) { + this.repositoryAccessLevel = repositoryAccessLevel; + } + + public Project withRepositoryAccessLevel(ProjectFeatureVisibilityAccessLevel repositoryAccessLevel) { + this.repositoryAccessLevel = repositoryAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getRequirementsAccessLevel() { + return requirementsAccessLevel; + } + + public void setRequirementsAccessLevel(ProjectFeatureVisibilityAccessLevel requirementsAccessLevel) { + this.requirementsAccessLevel = requirementsAccessLevel; + } + + public Project withRequirementsAccessLevel(ProjectFeatureVisibilityAccessLevel requirementsAccessLevel) { + this.requirementsAccessLevel = requirementsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getSecurityAndComplianceAccessLevel() { + return securityAndComplianceAccessLevel; + } + + public void setSecurityAndComplianceAccessLevel( + ProjectFeatureVisibilityAccessLevel securityAndComplianceAccessLevel) { + this.securityAndComplianceAccessLevel = securityAndComplianceAccessLevel; + } + + public Project withSecurityAndComplianceAccessLevel( + ProjectFeatureVisibilityAccessLevel securityAndComplianceAccessLevel) { + this.securityAndComplianceAccessLevel = securityAndComplianceAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getSnippetsAccessLevel() { + return snippetsAccessLevel; + } + + public void setSnippetsAccessLevel(ProjectFeatureVisibilityAccessLevel snippetsAccessLevel) { + this.snippetsAccessLevel = snippetsAccessLevel; + } + + public Project withSnippetsAccessLevel(ProjectFeatureVisibilityAccessLevel snippetsAccessLevel) { + this.snippetsAccessLevel = snippetsAccessLevel; + return this; + } + + public ProjectFeatureVisibilityAccessLevel getWikiAccessLevel() { + return wikiAccessLevel; + } + + public void setWikiAccessLevel(ProjectFeatureVisibilityAccessLevel wikiAccessLevel) { + this.wikiAccessLevel = wikiAccessLevel; + } + + public Project withWikiAccessLevel(ProjectFeatureVisibilityAccessLevel wikiAccessLevel) { + this.wikiAccessLevel = wikiAccessLevel; + return this; + } + @JsonIgnore public String getLinkByName(String name) { if (links == null || links.isEmpty()) { diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/models/Constants.java b/gitlab4j-models/src/main/java/org/gitlab4j/models/Constants.java index 02726aec..a0e71f2e 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/models/Constants.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/models/Constants.java @@ -1399,4 +1399,52 @@ public String toString() { return Integer.toString(value); } } + + public enum ProjectFeatureVisibilityAccessLevel { + DISABLED, + PRIVATE, + ENABLED, + PUBLIC; + + private static final JacksonJsonEnumHelper enumHelper = + new JacksonJsonEnumHelper<>(ProjectFeatureVisibilityAccessLevel.class); + + @JsonCreator + public static ProjectFeatureVisibilityAccessLevel forValue(String value) { + return enumHelper.forValue(value); + } + + @JsonValue + public String toValue() { + return (enumHelper.toString(this)); + } + + @Override + public String toString() { + return (enumHelper.toString(this)); + } + } + + public enum AutoCancelPendingPipelines { + DISABLED, + ENABLED; + + private static final JacksonJsonEnumHelper enumHelper = + new JacksonJsonEnumHelper<>(AutoCancelPendingPipelines.class); + + @JsonCreator + public static AutoCancelPendingPipelines forValue(String value) { + return enumHelper.forValue(value); + } + + @JsonValue + public String toValue() { + return (enumHelper.toString(this)); + } + + @Override + public String toString() { + return (enumHelper.toString(this)); + } + } } diff --git a/gitlab4j-models/src/test/resources/org/gitlab4j/models/project.json b/gitlab4j-models/src/test/resources/org/gitlab4j/models/project.json index 982b3fee..bfbf979b 100644 --- a/gitlab4j-models/src/test/resources/org/gitlab4j/models/project.json +++ b/gitlab4j-models/src/test/resources/org/gitlab4j/models/project.json @@ -1,14 +1,16 @@ { "id" : 3, "description" : "Some description", + "description_html" : "

Some description

", "name" : "Diaspora Project Site", "name_with_namespace" : "Diaspora / Diaspora Project Site", "path" : "diaspora-project-site", "path_with_namespace" : "diaspora/diaspora-project-site", "created_at" : "2013-09-30T13:46:02Z", + "updated_at" : "2013-09-30T13:46:02Z", "default_branch" : "master", "tag_list" : [ "example", "disapora project" ], - "topics" : [ ], + "topics" : [ "example", "disapora project" ], "ssh_url_to_repo" : "git@example.com:diaspora/diaspora-project-site.git", "http_url_to_repo" : "http://example.com/diaspora/diaspora-project-site.git", "web_url" : "http://example.com/diaspora/diaspora-project-site", @@ -27,6 +29,7 @@ "avatar_url" : "http://localhost:3000/uploads/group/avatar/3/foo.jpg", "web_url" : "http://localhost:3000/groups/diaspora" }, + "container_registry_image_prefix" : "registry.gitlab.example.com/diaspora/diaspora-client", "_links" : { "self" : "https://example.com/api/v4/projects/3", "issues" : "https://example.com/api/v4/projects/3/issues", @@ -51,17 +54,31 @@ "created_at" : "2013-09-30T13:46:02Z" }, "resolve_outdated_diff_discussions" : false, + "container_expiration_policy" : { + "cadence" : "1month", + "enabled" : true, + "keep_n" : 1, + "older_than" : "14d", + "name_regex" : ".*-development", + "name_regex_keep" : ".*-main", + "next_run_at" : "2022-06-25T17:11:26.865Z" + }, "issues_enabled" : true, "merge_requests_enabled" : true, "wiki_enabled" : true, "jobs_enabled" : true, "snippets_enabled" : false, "container_registry_enabled" : false, + "service_desk_enabled" : true, "can_create_merge_request_in" : true, "emails_disabled" : false, "shared_runners_enabled" : true, "lfs_enabled" : true, "creator_id" : 3, + "import_url" : "https://mirror-source/group/project.git", + "import_type" : "github", + "import_status" : "none", + "import_error" : "Some error", "open_issues_count" : 1, "ci_default_git_depth" : 50, "ci_forward_deployment_enabled" : true, @@ -69,6 +86,14 @@ "runners_token" : "b8bc4a7a29eb76ea83cf79e4908c2b", "auto_devops_enabled" : true, "auto_devops_deploy_strategy" : "continuous", + "ci_forward_deployment_rollback_allowed" : true, + "ci_allow_fork_pipelines_to_run_in_parent_project" : true, + "ci_id_token_sub_claim_components" : [ "project_path", "ref_type", "ref" ], + "ci_job_token_scope_enabled" : false, + "ci_separated_caches" : true, + "ci_restrict_pipeline_cancellation_role" : "developer", + "ci_pipeline_variables_minimum_override_role" : "maintainer", + "ci_push_repository_for_job_token_allowed" : false, "ci_config_path" : "", "public_jobs" : true, "shared_with_groups" : [ { @@ -86,12 +111,15 @@ } ], "only_allow_merge_if_pipeline_succeeds" : false, "allow_merge_on_skipped_pipeline" : true, + "allow_pipeline_trigger_approve_deployment" : false, + "restrict_user_defined_variables" : false, "request_access_enabled" : false, "only_allow_merge_if_all_discussions_are_resolved" : false, "remove_source_branch_after_merge" : false, "printing_merge_request_link_enabled" : true, "merge_method" : "merge", "squash_option" : "default_off", + "enforce_auth_checks_on_uploads" : true, "suggestion_commit_message": "Apply suggestions", "merge_commit_template": "Merge branch '%{source_branch}' into '%{target_branch}'", "squash_commit_template": "Commit %{title}", @@ -99,6 +127,12 @@ "merge_requests_template": "", "issues_template": "", "autoclose_referenced_issues" : true, + "keep_latest_artifact" : true, + "runner_token_expiration_interval" : 7200, + "requirements_enabled" : false, + "security_and_compliance_enabled" : false, + "secret_push_protection_enabled" : false, + "compliance_frameworks" : [], "permissions" : { "project_access" : { "access_level" : 10, @@ -126,5 +160,39 @@ "job_artifacts_size" : 0, "packages_size" : 0 }, - "custom_attributes" : [ ] + "custom_attributes" : [ ], + "use_custom_template" : false, + "external_authorization_classification_label" : "label", + "group_runners_enabled" : true, + "show_default_award_emojis" : false, + "warn_about_potentially_unwanted_characters" : true, + "mirror_trigger_builds" : false, + "auto_cancel_pending_pipelines" : "enabled", + "repository_object_format" : "sha1", + "only_allow_merge_if_all_status_checks_passed" : false, + "group_with_project_templates_id" : 1, + "public_builds" : true, + "build_timeout" : 3600, + "template_name" : "template", + "emails_enabled" : true, + "mirror" : false, + "analytics_access_level" : "enabled", + "builds_access_level" : "enabled", + "container_registry_access_level" : "enabled", + "environments_access_level" : "enabled", + "feature_flags_access_level" : "enabled", + "forking_access_level" : "enabled", + "infrastructure_access_level" : "enabled", + "issues_access_level" : "enabled", + "merge_requests_access_level" : "disabled", + "model_experiments_access_level" : "enabled", + "model_registry_access_level" : "enabled", + "monitor_access_level" : "enabled", + "pages_access_level" : "private", + "releases_access_level" : "enabled", + "repository_access_level" : "enabled", + "requirements_access_level" : "enabled", + "security_and_compliance_access_level" : "private", + "snippets_access_level" : "enabled", + "wiki_access_level" : "enabled" }