pub struct Attribute {
pub name: String,
pub type_: Type,
pub multi_valued: bool,
pub description: String,
pub required: bool,
pub canonical_values: Option<Vec<String>>,
pub case_exact: bool,
pub mutability: Mutability,
pub returned: Returned,
pub uniqueness: Uniqueness,
pub reference_types: Option<Vec<String>>,
pub sub_attributes: Option<Vec<Attribute>>,
}
Expand description
A single attribute of a SCIM schema.
Fields§
§name: String
The name of the attribute.
type_: Type
The data type of the attribute.
multi_valued: bool
Whether the attribute is multi-valued.
description: String
A human-readable description of the attribute.
required: bool
Whether the attribute is required.
canonical_values: Option<Vec<String>>
A list of canonical values for the attribute.
case_exact: bool
Whether the attribute is case-sensitive.
mutability: Mutability
The mutability of the attribute.
returned: Returned
When the attribute is returned.
uniqueness: Uniqueness
The uniqueness of the attribute.
reference_types: Option<Vec<String>>
If this attribute is a reference, the types of resources it references.
sub_attributes: Option<Vec<Attribute>>
If this attribute is a complex type, the sub-attributes that form it.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn multi_valued(self) -> Self
pub fn multi_valued(self) -> Self
Set whether the attribute is multi-valued.
Sourcepub fn case_exact(self) -> Self
pub fn case_exact(self) -> Self
Set whether the attribute is case-sensitive.
Sourcepub fn sub_attributes(self, sub_attributes: Vec<Attribute>) -> Self
pub fn sub_attributes(self, sub_attributes: Vec<Attribute>) -> Self
Set the sub-attributes of this attribute.
Sourcepub fn write_only(self) -> Self
pub fn write_only(self) -> Self
Set this attribute as write-only
Sourcepub fn always_returned(self) -> Self
pub fn always_returned(self) -> Self
Set this attribute as always returned
Sourcepub fn never_returned(self) -> Self
pub fn never_returned(self) -> Self
Set this attribute as never returned
Sourcepub fn returned_on_request(self) -> Self
pub fn returned_on_request(self) -> Self
Set this attribute as returned on request
Sourcepub fn globally_unique(self) -> Self
pub fn globally_unique(self) -> Self
Set this attribute as globally unique
Sourcepub fn reference_types(self, reference_types: Vec<String>) -> Self
pub fn reference_types(self, reference_types: Vec<String>) -> Self
Set the types of resources this attribute can reference.