pub struct ParamsDepartmentCreate {
Show 13 fields pub name: String, pub parent_id: i64, pub hide_dept: Option<bool>, pub dept_permits: Option<String>, pub user_permits: Option<String>, pub outer_dept: Option<bool>, pub outer_dept_only_self: Option<bool>, pub outer_permit_users: Option<String>, pub outer_permit_depts: Option<String>, pub create_dept_group: Option<bool>, pub auto_approve_apply: Option<bool>, pub order: Option<u64>, pub source_identifier: Option<String>,
}

Fields

name: String

部门名称 长度限制为1~64个字符,不允许包含字符“-“”,“以及”,“

parent_id: i64

父部门ID,根部门ID为1

hide_dept: Option<bool>

是否隐藏本部门: true:隐藏部门,隐藏后本部门将不会显示在公司通讯录中 false(默认值):显示部门

dept_permits: Option<String>

指定可以查看本部门的其他部门列表,总数不能超过200。 当hide_dept为true时,则此值生效 示例值:“123,456”

user_permits: Option<String>

指定可以查看本部门的人员userId列表,总数不能超过200。 当hide_dept为true时,则此值生效 示例值:“user123,manager222”

outer_dept: Option<bool>

是否限制本部门成员查看通讯录: true:开启限制。开启后本部门成员只能看到限定范围内的通讯录 false(默认值):不限制

outer_dept_only_self: Option<bool>

本部门成员是否只能看到所在部门及下级部门通讯录: true:只能看到所在部门及下级部门通讯录 false:不能查看所有通讯录,在通讯录中仅能看到自己 当outer_dept为true时,此参数生效

outer_permit_users: Option<String>

指定本部门成员可查看的通讯录用户userId列表,总数不能超过200。 当outer_dept为true时,此参数生效 示例值:“manager123,user123”

outer_permit_depts: Option<String>

指定本部门成员可查看的通讯录部门ID列表,总数不能超过200。 当outer_dept为true时,此参数生效 示例值: “456,123”

create_dept_group: Option<bool>

是否创建一个关联此部门的企业群,默认为false即不创建。

auto_approve_apply: Option<bool>

是否默认同意加入该部门的申请: true:表示加入该部门的申请将默认同意 false:表示加入该部门的申请需要有权限的管理员同意

order: Option<u64>

在父部门中的排序值,order值小的排序靠前。

source_identifier: Option<String>

部门标识字段,开发者可用该字段来唯一标识一个部门,并与钉钉外部通讯录里的部门做映射。

Trait Implementations

Formats the value using the given formatter. Read more

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

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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