package com.zdww.dict.portal.controller.scheduleTask.gitTask.utils;
import java.util.HashMap;
import java.util.List;
/**
* @author xiangdongliang
*/
public class CreateProjectParams {
/**
*项目名称
* is required if path is not provided
*/
private String name;
/**
*项目路径
* is required if name is not provided
*/
private String path;
/**
* Namespace for the new project (defaults to the current user's namespace)
*/
private Integer namespace_id;
/**
*master by default
*/
private String default_branch;
/**
* 项目介绍
*/
private String description;
private EnabledLevel issues_access_level;
private EnabledLevel repository_access_level;
private EnabledLevel merge_requests_access_level;
private EnabledLevel builds_access_level;
private EnabledLevel wiki_access_level;
private EnabledLevel snippets_access_level;
private EnabledLevel pages_access_level;
/**
* 是否邮件通知
*/
private boolean emails_disabled;
/**
* 是否自动解决合并冲突
*/
private boolean resolve_outdated_diff_discussions;
/**
* 是否可以通过容器注册
*/
private boolean container_registry_enabled;
/**
* Update the container expiration policy for this project
*/
private HashMap<String,Object> container_expiration_policy_attributes;
private String cadence;
private String keep_n;
private String older_than;
private String name_regex;
private boolean enabled;
/**
* 是否共享
*/
private boolean shared_runners_enabled;
/**
* 可见性
*/
private Visibility visibility;
/**
* URL to import repository from
*/
private String import_url;
/**
* If true, jobs can be viewed by non-project-members
*/
private boolean public_builds;
/**
* Set whether merge requests can only be merged with successful jobs
*/
private boolean only_allow_merge_if_pipeline_succeeds;
/**
* Set whether merge requests can only be merged when all the discussions are resolved
*/
private boolean only_allow_merge_if_all_discussions_are_resolved;
/**
*合并方法
*/
private MergeMethod merge_method;
/**
* Set whether auto-closing referenced issues on default branch
*/
private boolean autoclose_referenced_issues;
/**
* Enable Delete source branch option by default for all new merge requests
*/
private boolean remove_source_branch_after_merge;
/**
* Enable LFS
*/
private boolean lfs_enabled;
/**
* Allow users to request member access
*/
private boolean request_access_enabled;
/**
* The list of tags for a project
*/
private List<String> tag_list;
/**
* Show link to create/view merge request when pushing from the command line
*/
private boolean printing_merge_request_link_enabled;
/**
* The Git strategy. Defaults to fetch
*/
private String build_git_strategy;
/**
* The maximum amount of time in minutes that a job is able run (in seconds)
*/
private Integer build_timeout;
/**
* Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled
*/
private boolean auto_cancel_pending_pipelines;
/**
*Test coverage parsing
*/
private String build_coverage_regex;
/**
* The path to CI config file
*/
private String ci_config_path;
/**
* Enable Auto DevOps for this project
*/
private boolean auto_devops_enabled;
/**
* Auto Deploy strategy (continuous, manual or timed_incremental)
*/
private DeployStrategy auto_devops_deploy_strategy;
/**
*Which storage shard the repository is on. Available only to admins
*/
private String repository_storage;
/**
* How many approvers should approve merge requests by default
*/
private Integer approvals_before_merge;
/**
* The classification label for the project
*/
private String external_authorization_classification_label;
/**
* Enables pull mirroring in a project
*/
private boolean mirror;
/**
* Pull mirroring triggers builds
*/
private boolean mirror_trigger_builds;
/**
* false by default
* (Only Create Project Used)
*/
private boolean initialize_with_readme;
/**
* 是否启用临时名称
* (Only Create Project Used)
*/
private boolean use_custom_template;
/**
* When used without use_custom_template, name of a built-in project template.
* When used with use_custom_template, name of a custom project template
*/
private String template_name;
/**
* When used with use_custom_template, project ID of a custom project template.
* This is preferable to using template_name since template_name may be ambiguous.
* (Only Create Project Used)
*/
private Integer template_project_id;
/**
* For group-level custom templates, specifies ID of group from which all the custom project templates are sourced.
* Leave empty for instance-level templates.
* Requires use_custom_template to be true
* (Only Create Project Used)
*/
private Integer group_with_project_templates_id;
/**
* Enable or disable packages repository feature
*/
boolean packages_enabled;
/**
* The commit message used to apply merge request suggestions
* (Only Modify Project Used)
*/
String suggestion_commit_message;
/**
* Default number of revisions for shallow cloning
* (Only Modify Project Used)
*/
Integer ci_default_git_depth;
/**
* (STARTER) User responsible for all the activity surrounding a pull mirror event
* (Only Modify Project Used)
*/
Integer mirror_user_id;
/**
* (STARTER) Only mirror protected branches
* (Only Modify Project Used)
*/
boolean only_mirror_protected_branches;
/**
* (STARTER) Pull mirror overwrites diverged branches
* (Only Modify Project Used)
*/
boolean mirror_overwrites_diverged_branches;
/**
* (PREMIUM ONLY) Enable or disable service desk feature
* (Only Modify Project Used)
*/
boolean service_desk_enabled;
public CreateProjectParams(String name, String path) {
this.name = name;
this.path = path;
}
public String getName() {
return name;
}
public String getPath() {
return path;
}
public Integer getNamespace_id() {
return namespace_id;
}
public String getDefault_branch() {
return default_branch;
}
public String getDescription() {
return description;
}
public EnabledLevel getIssues_access_level() {
return issues_access_level;
}
public EnabledLevel getRepository_access_level() {
return repository_access_level;
}
public EnabledLevel getMerge_requests_access_level() {
return merge_requests_access_level;
}
public EnabledLevel getBuilds_access_level() {
return builds_access_level;
}
public EnabledLevel getWiki_access_level() {
return wiki_access_level;
}
public EnabledLevel getSnippets_access_level() {
return snippets_access_level;
}
public EnabledLevel getPages_access_level() {
return pages_access_level;
}
public boolean isEmails_disabled() {
return emails_disabled;
}
public boolean isResolve_outdated_diff_discussions() {
return resolve_outdated_diff_discussions;
}
public boolean isContainer_registry_enabled() {
return container_registry_enabled;
}
public HashMap<String, Object> getContainer_expiration_policy_attributes() {
return container_expiration_policy_attr
- 1
- 2
- 3
- 4
前往页