Struct gitlab::api::projects::CreateProjectBuilder

source ·
pub struct CreateProjectBuilder<'a> { /* private fields */ }
Expand description

Builder for CreateProject.

Implementations§

source§

impl<'a> CreateProjectBuilder<'a>

source

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.

source

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.

source

pub fn description<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self

The description of the new project.

source

pub fn issues_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for issues.

source

pub fn repository_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for repository access.

source

pub fn container_registry_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for container registry access.

source

pub fn merge_requests_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for merge requests.

source

pub fn forking_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for making a fork of the project.

source

pub fn builds_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for CI pipeline access.

source

pub fn wiki_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for access to view the wiki.

source

pub fn snippets_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for snippets.

source

pub fn pages_access_level( &mut self, value: FeatureAccessLevelPublic ) -> &mut Self

Set the access level for GitLab Pages on the project.

source

pub fn operations_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for operations features.

source

pub fn requirements_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for requirements features.

source

pub fn analytics_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for analytics features.

source

pub fn security_and_compliance_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for security and compliance features.

source

pub fn releases_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for release access.

source

pub fn environments_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for environment access.

source

pub fn feature_flags_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for feature flag access.

source

pub fn infrastructure_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for infrastructure access.

source

pub fn monitor_access_level(&mut self, value: FeatureAccessLevel) -> &mut Self

Set the access level for monitoring access.

source

pub fn model_experiments_access_level( &mut self, value: FeatureAccessLevel ) -> &mut Self

Set the access level for model experiment access.

source

pub fn emails_disabled(&mut self, value: bool) -> &mut Self

Whether to enable email notifications or not.

source

pub fn emails_enabled(&mut self, value: bool) -> &mut Self

Whether to enable email notifications or not.

source

pub fn show_default_award_emojis(&mut self, value: bool) -> &mut Self

Whether the default set of award emojis are shown for this project.

source

pub fn restrict_user_defined_variables(&mut self, value: bool) -> &mut Self

Whether to allow non-members to set pipeline variables when triggering piplines or not.

source

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.

source

pub fn container_registry_enabled(&mut self, value: bool) -> &mut Self

Whether the container registry is enabled or not.

source

pub fn container_expiration_policy_attributes( &mut self, value: ContainerExpirationPolicy<'a> ) -> &mut Self

The expiration policy for containers.

source

pub fn shared_runners_enabled(&mut self, value: bool) -> &mut Self

Whether the project can use shared runners or not.

source

pub fn visibility(&mut self, value: VisibilityLevel) -> &mut Self

The visibility level of the project.

source

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.

source

pub fn public_builds(&mut self, value: bool) -> &mut Self

Whether job results are visible to non-project members or not.

source

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.

source

pub fn allow_merge_on_skipped_pipeline(&mut self, value: bool) -> &mut Self

Whether the CI pipeline can be skipped before merges are allowed.

source

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.

source

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.

source

pub fn merge_commit_template<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self

The template for merge commit messages.

source

pub fn merge_method(&mut self, value: MergeMethod) -> &mut Self

The merge method to use for the project.

source

pub fn merge_pipelines_enabled(&mut self, value: bool) -> &mut Self

Whether merge pipelines are enabled.

source

pub fn merge_trains_enabled(&mut self, value: bool) -> &mut Self

Whether merge trains are enabled.

source

pub fn mr_default_target_self(&mut self, value: bool) -> &mut Self

Whether MRs default to targing this project or the upstream project.

source

pub fn squash_option(&mut self, value: SquashOption) -> &mut Self

The squash option for the project.

source

pub fn autoclose_referenced_issues(&mut self, value: bool) -> &mut Self

Whether issues referenced on the default branch should be closed or not.

source

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.

source

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.

source

pub fn request_access_enabled(&mut self, value: bool) -> &mut Self

Whether users may request access to the repository or not.

Whether to show a link to create or view a merge request when pushing a branch from the command line or not.

source

pub fn build_git_strategy(&mut self, value: BuildGitStrategy) -> &mut Self

The default Git strategy for CI jobs of the project.

source

pub fn build_timeout(&mut self, value: u64) -> &mut Self

The default timeout for jobs of the project (in seconds).

source

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.

source

pub fn build_coverage_regex<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self

The default regular expression to use for build coverage extraction.

source

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.

source

pub fn auto_devops_enabled(&mut self, value: bool) -> &mut Self

Whether Auto DevOps are enabled or not.

source

pub fn auto_devops_deploy_strategy( &mut self, value: AutoDevOpsDeployStrategy ) -> &mut Self

The Auto Deploy strategy of the project.

source

pub fn repository_storage<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self

The storage shard on which to store the repository.

source

pub fn approvals_before_merge(&mut self, value: u64) -> &mut Self

How many approvals are required before allowing merges.

source

pub fn external_authorization_classification_label<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self

The classification label of the project.

source

pub fn mirror(&mut self, value: bool) -> &mut Self

Whether to enable pull mirroring for the project or not.

source

pub fn mirror_trigger_builds(&mut self, value: bool) -> &mut Self

Whether mirror updates trigger CI builds ir not.

source

pub fn initialize_with_readme(&mut self, value: bool) -> &mut Self

Initialize the project with a readme.

Mutually exclusive with import_url.

source

pub fn template_name<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self

The name of a template project to use.

source

pub fn template_project_id(&mut self, value: u64) -> &mut Self

The ID of the template project to use.

source

pub fn use_custom_template(&mut self, value: bool) -> &mut Self

Whether to use a custom instance or group template.

source

pub fn packages_enabled(&mut self, value: bool) -> &mut Self

Whether the package repository is enabled or not.

source

pub fn group_runners_enabled(&mut self, value: bool) -> &mut Self

Whether group runners are enabled for this project or not.

source

pub fn issues_enabled(&mut self, value: bool) -> &mut Self

Whether to enable issues or not.

source

pub fn merge_requests_enabled(&mut self, value: bool) -> &mut Self

Whether to enable merge requests or not.

source

pub fn jobs_enabled(&mut self, value: bool) -> &mut Self

Whether to enable CI pipelines or not.

source

pub fn wiki_enabled(&mut self, value: bool) -> &mut Self

Whether to enable the wiki or not.

source

pub fn snippets_enabled(&mut self, value: bool) -> &mut Self

Whether to enable snippets or not.

source

pub fn build(&self) -> Result<CreateProject<'a>, CreateProjectBuilderError>

Builds a new CreateProject.

§Errors

If a required field has not been initialized.

source§

impl<'a> CreateProjectBuilder<'a>

source

pub fn name<N>(&mut self, name: N) -> &mut Self
where N: Into<Cow<'a, str>>,

Set the name of the project.

If not set, it will default to the value of path.

source

pub fn path<P>(&mut self, path: P) -> &mut Self
where P: Into<Cow<'a, str>>,

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.

source

pub fn tag<T>(&mut self, tag: T) -> &mut Self
where T: Into<Cow<'a, str>>,

👎Deprecated: use topic instead

Add a tag.

source

pub fn tags<I, T>(&mut self, iter: I) -> &mut Self
where I: Iterator<Item = T>, T: Into<Cow<'a, str>>,

👎Deprecated: use topics instead

Add multiple tags.

source

pub fn topic<T>(&mut self, topic: T) -> &mut Self
where T: Into<Cow<'a, str>>,

Add a optic.

source

pub fn topics<I, T>(&mut self, iter: I) -> &mut Self
where I: Iterator<Item = T>, T: Into<Cow<'a, str>>,

Add multiple topics.

source

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>

source§

fn clone(&self) -> CreateProjectBuilder<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Default for CreateProjectBuilder<'a>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more