123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- <?php
- /**
- * dingtalk API: dingtalk.oapi.v2.department.update request
- *
- * @author auto create
- * @since 1.0, 2021.10.18
- */
- class OapiV2DepartmentUpdateRequest
- {
- /**
- * 如果有新人加入部门是否会自动加入部门群
- **/
- private $autoAddUser;
-
- /**
- * 开启后,加入该部门的申请将默认同意
- **/
- private $autoApproveApply;
-
- /**
- * 部门简介
- **/
- private $brief;
-
- /**
- * 是否创建一个关联此部门的企业群,默认为false
- **/
- private $createDeptGroup;
-
- /**
- * 部门ID
- **/
- private $deptId;
-
- /**
- * 部门的主管列表,主管的userid列表
- **/
- private $deptManagerUseridList;
-
- /**
- * 可以查看指定隐藏部门的其他部门列表,如果部门隐藏,则此值生效。总数不能超过200。
- **/
- private $deptPermits;
-
- /**
- * 扩展字段,JSON格式
- **/
- private $extension;
-
- /**
- * 强制更新的字段,支持清空指定的字段,使用逗号分隔。目前支持字段:dept_manager_userid_list
- **/
- private $forceUpdateFields;
-
- /**
- * 部门群是否包含隐藏部门
- **/
- private $groupContainHiddenDept;
-
- /**
- * 部门群是否包含外包部门
- **/
- private $groupContainOuterDept;
-
- /**
- * 部门群是否包含子部门
- **/
- private $groupContainSubDept;
-
- /**
- * 是否隐藏部门, true表示隐藏 false表示显示
- **/
- private $hideDept;
-
- /**
- * 通讯录语言
- **/
- private $language;
-
- /**
- * 部门名称,长度限制为1~64个字符,不允许包含字符‘-’‘,’以及‘,’
- **/
- private $name;
-
- /**
- * 在父部门中的排序值,order值小的排序靠前
- **/
- private $order;
-
- /**
- * 企业群群主的userid
- **/
- private $orgDeptOwner;
-
- /**
- * 限制本部门成员查看通讯录,限制开启后,本部门成员只能看到限定范围内的通讯录。true表示限制开启
- **/
- private $outerDept;
-
- /**
- * 是否只能看到所在部门及下级部门通讯录
- **/
- private $outerDeptOnlySelf;
-
- /**
- * 本部门的员工仅可见员工自己为true时,可以配置额外可见部门,departmentId列表,总数不能超过200。
- **/
- private $outerPermitDepts;
-
- /**
- * 本部门的员工仅可见员工自己为true时,可以配置额外可见人员,userid列表,总数不能超过200。
- **/
- private $outerPermitUsers;
-
- /**
- * 父部门id,根部门id为1
- **/
- private $parentId;
-
- /**
- * 部门标识字段,开发者可用该字段来唯一标识一个部门,并与钉钉外部通讯录里的部门做映射
- **/
- private $sourceIdentifier;
-
- /**
- * 部门联系方式
- **/
- private $telephone;
-
- /**
- * 可以查看指定隐藏部门的其他人员列表,如果部门隐藏,则此值生效,总数不能超过200。
- **/
- private $userPermits;
-
- private $apiParas = array();
-
- public function setAutoAddUser($autoAddUser)
- {
- $this->autoAddUser = $autoAddUser;
- $this->apiParas["auto_add_user"] = $autoAddUser;
- }
- public function getAutoAddUser()
- {
- return $this->autoAddUser;
- }
- public function setAutoApproveApply($autoApproveApply)
- {
- $this->autoApproveApply = $autoApproveApply;
- $this->apiParas["auto_approve_apply"] = $autoApproveApply;
- }
- public function getAutoApproveApply()
- {
- return $this->autoApproveApply;
- }
- public function setBrief($brief)
- {
- $this->brief = $brief;
- $this->apiParas["brief"] = $brief;
- }
- public function getBrief()
- {
- return $this->brief;
- }
- public function setCreateDeptGroup($createDeptGroup)
- {
- $this->createDeptGroup = $createDeptGroup;
- $this->apiParas["create_dept_group"] = $createDeptGroup;
- }
- public function getCreateDeptGroup()
- {
- return $this->createDeptGroup;
- }
- public function setDeptId($deptId)
- {
- $this->deptId = $deptId;
- $this->apiParas["dept_id"] = $deptId;
- }
- public function getDeptId()
- {
- return $this->deptId;
- }
- public function setDeptManagerUseridList($deptManagerUseridList)
- {
- $this->deptManagerUseridList = $deptManagerUseridList;
- $this->apiParas["dept_manager_userid_list"] = $deptManagerUseridList;
- }
- public function getDeptManagerUseridList()
- {
- return $this->deptManagerUseridList;
- }
- public function setDeptPermits($deptPermits)
- {
- $this->deptPermits = $deptPermits;
- $this->apiParas["dept_permits"] = $deptPermits;
- }
- public function getDeptPermits()
- {
- return $this->deptPermits;
- }
- public function setExtension($extension)
- {
- $this->extension = $extension;
- $this->apiParas["extension"] = $extension;
- }
- public function getExtension()
- {
- return $this->extension;
- }
- public function setForceUpdateFields($forceUpdateFields)
- {
- $this->forceUpdateFields = $forceUpdateFields;
- $this->apiParas["force_update_fields"] = $forceUpdateFields;
- }
- public function getForceUpdateFields()
- {
- return $this->forceUpdateFields;
- }
- public function setGroupContainHiddenDept($groupContainHiddenDept)
- {
- $this->groupContainHiddenDept = $groupContainHiddenDept;
- $this->apiParas["group_contain_hidden_dept"] = $groupContainHiddenDept;
- }
- public function getGroupContainHiddenDept()
- {
- return $this->groupContainHiddenDept;
- }
- public function setGroupContainOuterDept($groupContainOuterDept)
- {
- $this->groupContainOuterDept = $groupContainOuterDept;
- $this->apiParas["group_contain_outer_dept"] = $groupContainOuterDept;
- }
- public function getGroupContainOuterDept()
- {
- return $this->groupContainOuterDept;
- }
- public function setGroupContainSubDept($groupContainSubDept)
- {
- $this->groupContainSubDept = $groupContainSubDept;
- $this->apiParas["group_contain_sub_dept"] = $groupContainSubDept;
- }
- public function getGroupContainSubDept()
- {
- return $this->groupContainSubDept;
- }
- public function setHideDept($hideDept)
- {
- $this->hideDept = $hideDept;
- $this->apiParas["hide_dept"] = $hideDept;
- }
- public function getHideDept()
- {
- return $this->hideDept;
- }
- public function setLanguage($language)
- {
- $this->language = $language;
- $this->apiParas["language"] = $language;
- }
- public function getLanguage()
- {
- return $this->language;
- }
- public function setName($name)
- {
- $this->name = $name;
- $this->apiParas["name"] = $name;
- }
- public function getName()
- {
- return $this->name;
- }
- public function setOrder($order)
- {
- $this->order = $order;
- $this->apiParas["order"] = $order;
- }
- public function getOrder()
- {
- return $this->order;
- }
- public function setOrgDeptOwner($orgDeptOwner)
- {
- $this->orgDeptOwner = $orgDeptOwner;
- $this->apiParas["org_dept_owner"] = $orgDeptOwner;
- }
- public function getOrgDeptOwner()
- {
- return $this->orgDeptOwner;
- }
- public function setOuterDept($outerDept)
- {
- $this->outerDept = $outerDept;
- $this->apiParas["outer_dept"] = $outerDept;
- }
- public function getOuterDept()
- {
- return $this->outerDept;
- }
- public function setOuterDeptOnlySelf($outerDeptOnlySelf)
- {
- $this->outerDeptOnlySelf = $outerDeptOnlySelf;
- $this->apiParas["outer_dept_only_self"] = $outerDeptOnlySelf;
- }
- public function getOuterDeptOnlySelf()
- {
- return $this->outerDeptOnlySelf;
- }
- public function setOuterPermitDepts($outerPermitDepts)
- {
- $this->outerPermitDepts = $outerPermitDepts;
- $this->apiParas["outer_permit_depts"] = $outerPermitDepts;
- }
- public function getOuterPermitDepts()
- {
- return $this->outerPermitDepts;
- }
- public function setOuterPermitUsers($outerPermitUsers)
- {
- $this->outerPermitUsers = $outerPermitUsers;
- $this->apiParas["outer_permit_users"] = $outerPermitUsers;
- }
- public function getOuterPermitUsers()
- {
- return $this->outerPermitUsers;
- }
- public function setParentId($parentId)
- {
- $this->parentId = $parentId;
- $this->apiParas["parent_id"] = $parentId;
- }
- public function getParentId()
- {
- return $this->parentId;
- }
- public function setSourceIdentifier($sourceIdentifier)
- {
- $this->sourceIdentifier = $sourceIdentifier;
- $this->apiParas["source_identifier"] = $sourceIdentifier;
- }
- public function getSourceIdentifier()
- {
- return $this->sourceIdentifier;
- }
- public function setTelephone($telephone)
- {
- $this->telephone = $telephone;
- $this->apiParas["telephone"] = $telephone;
- }
- public function getTelephone()
- {
- return $this->telephone;
- }
- public function setUserPermits($userPermits)
- {
- $this->userPermits = $userPermits;
- $this->apiParas["user_permits"] = $userPermits;
- }
- public function getUserPermits()
- {
- return $this->userPermits;
- }
- public function getApiMethodName()
- {
- return "dingtalk.oapi.v2.department.update";
- }
-
- public function getApiParas()
- {
- return $this->apiParas;
- }
-
- public function check()
- {
-
- RequestCheckUtil::checkMaxLength($this->brief,255,"brief");
- RequestCheckUtil::checkNotNull($this->deptId,"deptId");
- RequestCheckUtil::checkMaxListSize($this->deptManagerUseridList,999,"deptManagerUseridList");
- RequestCheckUtil::checkMaxListSize($this->deptPermits,200,"deptPermits");
- RequestCheckUtil::checkMaxListSize($this->forceUpdateFields,999,"forceUpdateFields");
- RequestCheckUtil::checkMaxLength($this->name,64,"name");
- RequestCheckUtil::checkMaxListSize($this->outerPermitDepts,200,"outerPermitDepts");
- RequestCheckUtil::checkMaxListSize($this->outerPermitUsers,200,"outerPermitUsers");
- RequestCheckUtil::checkMaxLength($this->telephone,50,"telephone");
- RequestCheckUtil::checkMaxListSize($this->userPermits,200,"userPermits");
- }
-
- public function putOtherTextParam($key, $value) {
- $this->apiParas[$key] = $value;
- $this->$key = $value;
- }
- }
|