pub struct ProjectBuilder<'a> { /* private fields */ }Expand description
Builder for Project.
Implementations§
Source§impl<'a> ProjectBuilder<'a>
impl<'a> ProjectBuilder<'a>
Sourcepub fn description<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn description<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
The description of the project.
Sourcepub fn domain_id<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn domain_id<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
The ID of the domain for the project.
For projects acting as a domain, the domain_id must not be specified,
it will be generated by the Identity service implementation.
For regular projects (i.e. those not acing as a domain), if domain_id
is not specified, but parent_id is specified, then the domain ID of
the parent will be used. If neither domain_id or parent_id is
specified, the Identity service implementation will default to the
domain to which the client’s token is scoped. If both domain_id and
parent_id are specified, and they do not indicate the same domain, an
Bad Request (400) will be returned.
Sourcepub fn enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
If set to true, project is enabled. If set to false, project is
disabled. The default is true.
Sourcepub fn is_domain<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn is_domain<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
If set to true, project is enabled. If set to false, project is
disabled. The default is true.
Sourcepub fn name<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The name of the project, which must be unique within the owning domain. A project can have the same name as its domain.
Sourcepub fn options<VALUE: Into<Options>>(&mut self, value: VALUE) -> &mut Self
pub fn options<VALUE: Into<Options>>(&mut self, value: VALUE) -> &mut Self
The resource options for the project. Available resource options are
immutable.
Sourcepub fn parent_id<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn parent_id<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
The ID of the parent of the project.
If specified on project creation, this places the project within a
hierarchy and implicitly defines the owning domain, which will be the
same domain as the parent specified. If parent_id is not specified
and is_domain is false, then the project will use its owning domain
as its parent. If is_domain is true (i.e. the project is acting as
a domain), then parent_id must not specified (or if it is, it must be
null) since domains have no parents.
parent_id is immutable, and can’t be updated after the project is
created - hence a project cannot be moved within the hierarchy.
New in version 3.4
A list of simple strings assigned to a project. Tags can be used to classify projects into groups.
Trait Implementations§
Source§impl<'a> Clone for ProjectBuilder<'a>
impl<'a> Clone for ProjectBuilder<'a>
Source§fn clone(&self) -> ProjectBuilder<'a>
fn clone(&self) -> ProjectBuilder<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ProjectBuilder<'a>
impl<'a> RefUnwindSafe for ProjectBuilder<'a>
impl<'a> Send for ProjectBuilder<'a>
impl<'a> Sync for ProjectBuilder<'a>
impl<'a> Unpin for ProjectBuilder<'a>
impl<'a> UnwindSafe for ProjectBuilder<'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