SDK_UnityMoney/Assets/rd3/AdsSDK/KwaiAds/Scripts/Api/KwaiAdConfig.cs

90 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace KwaiAds.Scripts.Api
{
public class KwaiAdConfig
{
// 必填
internal string AppId { get; }
// 必填
internal string Token { get; }
// 选填
internal string AppName { get; }
// 选填
internal string AppDomain { get; }
// 选填
internal string AppStoreUrl { get; }
// 选填, 打印debug日志使用注意上线前需要关闭
internal bool DebugLog { get; }
private KwaiAdConfig(KwaiAdConfig.Builder builder)
{
AppId = builder.AppId;
Token = builder.Token;
AppName = builder.AppName;
AppDomain = builder.AppDomain;
AppStoreUrl = builder.AppStoreUrl;
DebugLog = builder.DebugLog;
}
public class Builder
{
internal string AppId;
internal string Token;
internal string AppName;
internal string AppDomain;
internal string AppStoreUrl;
internal bool DebugLog;
public Builder SetAppId(string appid)
{
this.AppId = appid;
return this;
}
public Builder SetToken(string token)
{
this.Token = token;
return this;
}
public Builder SetAppName(string appName)
{
this.AppName = appName;
return this;
}
public Builder SetAppDomain(string appDomain)
{
this.AppDomain = appDomain;
return this;
}
public Builder SetAppStoreUrl(string appStoreUrl)
{
this.AppStoreUrl = appStoreUrl;
return this;
}
public Builder SetDebugLog(bool debugLog)
{
this.DebugLog = debugLog;
return this;
}
public KwaiAdConfig Build()
{
return new KwaiAdConfig(this);
}
}
}
}