Skip to main content

GroupsMemberFieldsGroupResource

Struct GroupsMemberFieldsGroupResource 

Source
pub struct GroupsMemberFieldsGroupResource<'a> { /* private fields */ }
Expand description

client.groups().member_fields().group()

Implementations§

Source§

impl<'a> GroupsMemberFieldsGroupResource<'a>

Source

pub fn create( &self, group_id: impl Display, body: &GroupMemberFieldGroupCreate, ) -> Result<GroupMemberFieldGroup>

Create a group-specific membership field

POST /groups/{groupId}/memberfields/group

Creates a field whose values are stored separately for each person’s membership in this group. Requires permission to edit group member fields. name must be unique within the group; referenceName must also be unique and is generated from name when omitted. Choose fieldTypeCode at creation; subsequent field updates cannot change it. Select-like options receive new backend IDs, and defaults are normalized to those IDs. The response is the field definition, without a type wrapper or member values. Existing memberships are not populated with the new default by this endpoint.

§Example
let body = models::GroupMemberFieldGroupCreate {
    field_type_code: "text".into(),
    name: "T-Shirt size".into(),
    required_in_registration_form: false,
    security_level: 1,
    use_in_registration_form: true,
    ..Default::default()
};
let result = client.groups().member_fields().group().create(42, &body)?;
println!("{}", result.name);
Source

pub fn delete( &self, group_id: impl Display, group_member_field_id: impl Display, ) -> Result<()>

Delete a membership field and its stored values

DELETE /groups/{groupId}/memberfields/group/{groupMemberFieldId}

Deletes the group-specific field definition, its selection options and all stored member values for that field. Requires permission to edit member fields of the path group. Supply a field belonging to that group. This operation has no delete-preview workflow and returns 204 without a body. Global person fields and person-field values are unaffected.

§Example
client.groups().member_fields().group().delete(42, 42)?;
Source

pub fn patch( &self, group_id: impl Display, group_member_field_id: impl Display, body: &GroupMemberFieldGroupPatch, ) -> Result<GroupMemberFieldGroup>

Partially update a membership field definition

PATCH /groups/{groupId}/memberfields/group/{groupMemberFieldId}

Updates only supplied fields of a field belonging to the path group. Requires permission to edit group member fields. Empty {} is accepted and preserves the definition. fieldTypeCode is ignored; a field’s type cannot be changed here. When updating choices, send the full list with numeric IDs for retained choices; omitted IDs are deleted and removed from all member selections and the default. Use options=[] to remove all choices; omit options to preserve it. Avoid options=null because the current implementation reallocates IDs and can clear existing selections. Unlike create and PUT, PATCH does not check uniqueness of the display name, but it checks changed reference names.

§Example
let body = models::GroupMemberFieldGroupPatch {
    name: Some("T-Shirt size".into()),
    ..Default::default()
};
let result = client.groups().member_fields().group().patch(42, 42, &body)?;
println!("{}", result.name);
Source

pub fn update( &self, group_id: impl Display, group_member_field_id: impl Display, body: &GroupMemberFieldGroupUpdate, ) -> Result<GroupMemberFieldGroup>

Replace a membership field definition

PUT /groups/{groupId}/memberfields/group/{groupMemberFieldId}

Updates a field belonging to the path group. Requires permission to edit group member fields and the required name/referenceName/securityLevel/registration flags. Unlike PATCH, omitted notes, signup labels and defaultValue are cleared, and sortKey resets to zero. The display name and reference name must be unique within the group. The field type is unchanged. Send the full option list with numeric IDs for retained choices: removed choices are removed from member selections and defaults. Omitting options or sending null currently reallocates existing choice IDs and can clear selections. The returned object is the saved field definition.

§Example
let body = models::GroupMemberFieldGroupUpdate {
    name: "T-Shirt size".into(),
    reference_name: "t-shirt-size".into(),
    required_in_registration_form: false,
    security_level: 1,
    use_in_registration_form: true,
    ..Default::default()
};
let result = client.groups().member_fields().group().update(42, 42, &body)?;
println!("{}", result.name);

Trait Implementations§

Source§

impl<'a> Clone for GroupsMemberFieldsGroupResource<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for GroupsMemberFieldsGroupResource<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

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

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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