pub struct CreateProjectBuilder<'a> { /* private fields */ }
Expand description
Builder for CreateProject
.
Implementations§
Source§impl<'a> CreateProjectBuilder<'a>
impl<'a> CreateProjectBuilder<'a>
Sourcepub fn namespace_id(&mut self, value: u64) -> &mut Self
pub fn namespace_id(&mut self, value: u64) -> &mut Self
The namespace of the new project.
By default, the project is created in the API caller’s namespace.
Sourcepub fn default_branch<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn default_branch<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The default branch of the new project.
Defaults to main
. Requires initialize_with_readme
to be true
.
Sourcepub fn description<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn description<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The description of the new project.
Sourcepub fn issues_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn issues_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for issues.
Sourcepub fn repository_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn repository_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for repository access.
Sourcepub fn container_registry_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn container_registry_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for container registry access.
Sourcepub fn merge_requests_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn merge_requests_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for merge requests.
Sourcepub fn forking_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn forking_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for making a fork of the project.
Sourcepub fn builds_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn builds_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for CI pipeline access.
Sourcepub fn wiki_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn wiki_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for access to view the wiki.
Sourcepub fn snippets_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn snippets_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for snippets.
Sourcepub fn pages_access_level(
&mut self,
value: FeatureAccessLevelPublic,
) -> &mut Self
pub fn pages_access_level( &mut self, value: FeatureAccessLevelPublic, ) -> &mut Self
Set the access level for GitLab Pages on the project.
Sourcepub fn requirements_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn requirements_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for requirements features.
Sourcepub fn analytics_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn analytics_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for analytics features.
Sourcepub fn security_and_compliance_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn security_and_compliance_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for security and compliance features.
Sourcepub fn releases_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn releases_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for release access.
Sourcepub fn environments_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn environments_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for environment access.
Sourcepub fn feature_flags_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn feature_flags_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for feature flag access.
Sourcepub fn infrastructure_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn infrastructure_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for infrastructure access.
Sourcepub fn monitor_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
pub fn monitor_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self
Set the access level for monitoring access.
Sourcepub fn model_experiments_access_level(
&mut self,
value: FeatureAccessLevel,
) -> &mut Self
pub fn model_experiments_access_level( &mut self, value: FeatureAccessLevel, ) -> &mut Self
Set the access level for model experiment access.
Sourcepub fn emails_enabled(&mut self, value: bool) -> &mut Self
pub fn emails_enabled(&mut self, value: bool) -> &mut Self
Whether to enable email notifications or not.
Sourcepub fn show_default_award_emojis(&mut self, value: bool) -> &mut Self
pub fn show_default_award_emojis(&mut self, value: bool) -> &mut Self
Whether the default set of award emojis are shown for this project.
Sourcepub fn restrict_user_defined_variables(&mut self, value: bool) -> &mut Self
pub fn restrict_user_defined_variables(&mut self, value: bool) -> &mut Self
Whether to allow non-members to set pipeline variables when triggering pipelines or not.
Sourcepub fn resolve_outdated_diff_discussions(&mut self, value: bool) -> &mut Self
pub fn resolve_outdated_diff_discussions(&mut self, value: bool) -> &mut Self
Whether outdated diff discussions are resolved when a merge request is updated or not.
Sourcepub fn container_expiration_policy_attributes(
&mut self,
value: ContainerExpirationPolicy<'a>,
) -> &mut Self
pub fn container_expiration_policy_attributes( &mut self, value: ContainerExpirationPolicy<'a>, ) -> &mut Self
The expiration policy for containers.
Whether the project can use shared runners or not.
Sourcepub fn visibility(&mut self, value: VisibilityLevel) -> &mut Self
pub fn visibility(&mut self, value: VisibilityLevel) -> &mut Self
The visibility level of the project.
Sourcepub fn import_url<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn import_url<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
A URL to import the repository from.
Mutually exclusive with initialize_with_readme
.
Sourcepub fn public_builds(&mut self, value: bool) -> &mut Self
pub fn public_builds(&mut self, value: bool) -> &mut Self
Whether job results are visible to non-project members or not.
Sourcepub fn only_allow_merge_if_pipeline_succeeds(
&mut self,
value: bool,
) -> &mut Self
pub fn only_allow_merge_if_pipeline_succeeds( &mut self, value: bool, ) -> &mut Self
Whether the CI pipeline is required to succeed before merges are allowed.
Sourcepub fn allow_merge_on_skipped_pipeline(&mut self, value: bool) -> &mut Self
pub fn allow_merge_on_skipped_pipeline(&mut self, value: bool) -> &mut Self
Whether the CI pipeline can be skipped before merges are allowed.
Sourcepub fn only_allow_merge_if_all_discussions_are_resolved(
&mut self,
value: bool,
) -> &mut Self
pub fn only_allow_merge_if_all_discussions_are_resolved( &mut self, value: bool, ) -> &mut Self
Whether all discussions must be resolved before merges are allowed.
Sourcepub fn only_allow_merge_if_all_status_checks_passed(
&mut self,
value: bool,
) -> &mut Self
pub fn only_allow_merge_if_all_status_checks_passed( &mut self, value: bool, ) -> &mut Self
If true
, merge requests may not be merged unless all status checks are passing.
Sourcepub fn merge_commit_template<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn merge_commit_template<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The template for merge commit messages.
Sourcepub fn merge_method(&mut self, value: MergeMethod) -> &mut Self
pub fn merge_method(&mut self, value: MergeMethod) -> &mut Self
The merge method to use for the project.
Sourcepub fn merge_pipelines_enabled(&mut self, value: bool) -> &mut Self
pub fn merge_pipelines_enabled(&mut self, value: bool) -> &mut Self
Whether merge pipelines are enabled.
Sourcepub fn merge_trains_enabled(&mut self, value: bool) -> &mut Self
pub fn merge_trains_enabled(&mut self, value: bool) -> &mut Self
Whether merge trains are enabled.
Sourcepub fn mr_default_target_self(&mut self, value: bool) -> &mut Self
pub fn mr_default_target_self(&mut self, value: bool) -> &mut Self
Whether MRs default to targing this project or the upstream project.
Sourcepub fn squash_option(&mut self, value: SquashOption) -> &mut Self
pub fn squash_option(&mut self, value: SquashOption) -> &mut Self
The squash option for the project.
Sourcepub fn autoclose_referenced_issues(&mut self, value: bool) -> &mut Self
pub fn autoclose_referenced_issues(&mut self, value: bool) -> &mut Self
Whether issues referenced on the default branch should be closed or not.
Sourcepub fn remove_source_branch_after_merge(&mut self, value: bool) -> &mut Self
pub fn remove_source_branch_after_merge(&mut self, value: bool) -> &mut Self
Whether to enabled the “Remove source branch” option in new merge requests by default or not.
Sourcepub fn lfs_enabled(&mut self, value: bool) -> &mut Self
pub fn lfs_enabled(&mut self, value: bool) -> &mut Self
Whether git-lfs
support should be enabled or not.
See the git-lfs website for more information.
Sourcepub fn request_access_enabled(&mut self, value: bool) -> &mut Self
pub fn request_access_enabled(&mut self, value: bool) -> &mut Self
Whether users may request access to the repository or not.
Sourcepub fn printing_merge_request_link_enabled(&mut self, value: bool) -> &mut Self
pub fn printing_merge_request_link_enabled(&mut self, value: bool) -> &mut Self
Whether to show a link to create or view a merge request when pushing a branch from the command line or not.
Sourcepub fn build_git_strategy(&mut self, value: BuildGitStrategy) -> &mut Self
pub fn build_git_strategy(&mut self, value: BuildGitStrategy) -> &mut Self
The default Git strategy for CI jobs of the project.
Sourcepub fn build_timeout(&mut self, value: u64) -> &mut Self
pub fn build_timeout(&mut self, value: u64) -> &mut Self
The default timeout for jobs of the project (in seconds).
Sourcepub fn auto_cancel_pending_pipelines<VALUE: Into<EnableState>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn auto_cancel_pending_pipelines<VALUE: Into<EnableState>>( &mut self, value: VALUE, ) -> &mut Self
Whether to automatically cancel pipelines when branches are updated when using a previous version of the branch.
Sourcepub fn ci_config_path<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn ci_config_path<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The path to the GitLab CI configuration file within the repository.
Defaults to .gitlab-ci.yml
.
Sourcepub fn auto_devops_enabled(&mut self, value: bool) -> &mut Self
pub fn auto_devops_enabled(&mut self, value: bool) -> &mut Self
Whether Auto DevOps are enabled or not.
Sourcepub fn auto_devops_deploy_strategy(
&mut self,
value: AutoDevOpsDeployStrategy,
) -> &mut Self
pub fn auto_devops_deploy_strategy( &mut self, value: AutoDevOpsDeployStrategy, ) -> &mut Self
The Auto Deploy strategy of the project.
Sourcepub fn repository_storage<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn repository_storage<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The storage shard on which to store the repository.
The classification label of the project.
Sourcepub fn mirror(&mut self, value: bool) -> &mut Self
pub fn mirror(&mut self, value: bool) -> &mut Self
Whether to enable pull mirroring for the project or not.
Sourcepub fn mirror_trigger_builds(&mut self, value: bool) -> &mut Self
pub fn mirror_trigger_builds(&mut self, value: bool) -> &mut Self
Whether mirror updates trigger CI builds ir not.
Sourcepub fn initialize_with_readme(&mut self, value: bool) -> &mut Self
pub fn initialize_with_readme(&mut self, value: bool) -> &mut Self
Initialize the project with a readme.
Mutually exclusive with import_url
.
Sourcepub fn template_name<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn template_name<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The name of a template project to use.
Sourcepub fn template_project_id(&mut self, value: u64) -> &mut Self
pub fn template_project_id(&mut self, value: u64) -> &mut Self
The ID of the template project to use.
Sourcepub fn use_custom_template(&mut self, value: bool) -> &mut Self
pub fn use_custom_template(&mut self, value: bool) -> &mut Self
Whether to use a custom instance or group template.
Sourcepub fn packages_enabled(&mut self, value: bool) -> &mut Self
pub fn packages_enabled(&mut self, value: bool) -> &mut Self
Whether the package repository is enabled or not.
Sourcepub fn group_runners_enabled(&mut self, value: bool) -> &mut Self
pub fn group_runners_enabled(&mut self, value: bool) -> &mut Self
Whether group runners are enabled for this project or not.
Sourcepub fn build(&self) -> Result<CreateProject<'a>, CreateProjectBuilderError>
pub fn build(&self) -> Result<CreateProject<'a>, CreateProjectBuilderError>
Source§impl<'a> CreateProjectBuilder<'a>
impl<'a> CreateProjectBuilder<'a>
Sourcepub fn name<N>(&mut self, name: N) -> &mut Self
pub fn name<N>(&mut self, name: N) -> &mut Self
Set the name of the project.
If not set, it will default to the value of path
.
Sourcepub fn path<P>(&mut self, path: P) -> &mut Self
pub fn path<P>(&mut self, path: P) -> &mut Self
Set the path of the project.
If not set, it will default to the value of name
after processing to make it a valid
path.
Sourcepub fn group_with_project_templates_id(&mut self, id: u64) -> &mut Self
pub fn group_with_project_templates_id(&mut self, id: u64) -> &mut Self
Whether the template project should come from the group or the instance.
Note that setting this also sets use_custom_template
to true
automatically.
Trait Implementations§
Source§impl<'a> Clone for CreateProjectBuilder<'a>
impl<'a> Clone for CreateProjectBuilder<'a>
Source§fn clone(&self) -> CreateProjectBuilder<'a>
fn clone(&self) -> CreateProjectBuilder<'a>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for CreateProjectBuilder<'a>
impl<'a> RefUnwindSafe for CreateProjectBuilder<'a>
impl<'a> Send for CreateProjectBuilder<'a>
impl<'a> Sync for CreateProjectBuilder<'a>
impl<'a> Unpin for CreateProjectBuilder<'a>
impl<'a> UnwindSafe for CreateProjectBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more