using System; using System.Xml.Serialization; using System.Collections.Generic; using Top.Api.Util; using Top.Api; using Top.Api.DingTalk; namespace DingTalk.Api.Request { /// /// TOP API: dingtalk.oapi.smartwork.hrm.organization.dept.update /// public class OapiSmartworkHrmOrganizationDeptUpdateRequest : BaseDingTalkRequest { /// /// 系统自动生成 /// public string AttributeVOS { get; set; } public List AttributeVOS_ { set { this.AttributeVOS = TopUtils.ObjectToJson(value); } } /// /// 部门ID /// public Nullable DeptId { get; set; } #region IDingTalkRequest Members public override string GetApiName() { return "dingtalk.oapi.smartwork.hrm.organization.dept.update"; } public override string GetApiCallType() { return DingTalkConstants.CALL_TYPE_OAPI; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("attributeVOS", this.AttributeVOS); parameters.Add("dept_id", this.DeptId); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateObjectMaxListSize("attributeVOS", this.AttributeVOS, 999); RequestValidator.ValidateRequired("dept_id", this.DeptId); } /// /// OrgDeptAttributeVoDomain Data Structure. /// [Serializable] public class OrgDeptAttributeVoDomain : TopObject { /// /// 字段code /// [XmlElement("field_code")] public string FieldCode { get; set; } /// /// 字段值 /// [XmlElement("field_value")] public string FieldValue { get; set; } } #endregion } }