using System;
using System.Collections.Generic;
using Top.Api.Util;
using Top.Api;
using Top.Api.DingTalk;
namespace DingTalk.Api.Request
{
///
/// TOP API: dingtalk.oapi.cspace.file.presignedurl.get
///
public class OapiCspaceFilePresignedurlGetRequest : BaseDingTalkRequest
{
///
/// 钉盘文件ID
///
public string Dentryid { get; set; }
///
/// 签名URL的有效期,不传的话为默认值15分钟
///
public Nullable ExpireSeconds { get; set; }
///
/// 是否为内部调用,统一传false
///
public Nullable InnerInvoke { get; set; }
///
/// 钉盘空间ID
///
public Nullable Spaceid { get; set; }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.cspace.file.presignedurl.get";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("dentryid", this.Dentryid);
parameters.Add("expire_seconds", this.ExpireSeconds);
parameters.Add("inner_invoke", this.InnerInvoke);
parameters.Add("spaceid", this.Spaceid);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
RequestValidator.ValidateRequired("dentryid", this.Dentryid);
RequestValidator.ValidateRequired("spaceid", this.Spaceid);
}
#endregion
}
}