package domain

import (
	"time"
)

const CollectionNameAccess = "access"

type Access struct {
	Meta
	Name      string         `db:"name"     json:"name"`
	Provider  string         `db:"provider" json:"provider"`
	Config    map[string]any `db:"config"   json:"config"`
	Reserve   string         `db:"reserve"  json:"reserve,omitempty"`
	DeletedAt *time.Time     `db:"deleted" json:"deleted"`
}

type AccessConfigFor1Panel struct {
	ServerUrl                string `json:"serverUrl"`
	ApiVersion               string `json:"apiVersion"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigFor35cn struct {
	Username    string `json:"username"`
	ApiPassword string `json:"apiPassword"`
}

type AccessConfigFor51DNScom struct {
	ApiKey    string `json:"apiKey"`
	ApiSecret string `json:"apiSecret"`
}

type AccessConfigForACMEExternalAccountBinding struct {
	EabKid     string `json:"eabKid,omitempty"`
	EabHmacKey string `json:"eabHmacKey,omitempty"`
}

type AccessConfigForACMECA struct {
	AccessConfigForACMEExternalAccountBinding
	Endpoint string `json:"endpoint"`
}

type AccessConfigForACMEDNS struct {
	ServerUrl   string `json:"serverUrl"`
	Credentials string `json:"credentials"`
}

type AccessConfigForACMEHttpReq struct {
	Endpoint string `json:"endpoint"`
	Mode     string `json:"mode,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type AccessConfigForActalisSSL struct {
	AccessConfigForACMEExternalAccountBinding
}

type AccessConfigForAkamai struct {
	Host         string `json:"host"`
	ClientToken  string `json:"clientToken"`
	ClientSecret string `json:"clientSecret"`
	AccessToken  string `json:"accessToken"`
}

type AccessConfigForAliyun struct {
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
	ResourceGroupId string `json:"resourceGroupId,omitempty"`
}

type AccessConfigForAPISIX struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForArvanCloud struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForAWS struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type AccessConfigForAzure struct {
	TenantId          string `json:"tenantId"`
	ClientId          string `json:"clientId"`
	ClientSecret      string `json:"clientSecret"`
	SubscriptionId    string `json:"subscriptionId,omitempty"`
	ResourceGroupName string `json:"resourceGroupName,omitempty"`
	CloudName         string `json:"cloudName,omitempty"`
}

type AccessConfigForBaiduCloud struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type AccessConfigForBaishan struct {
	ApiToken string `json:"apiToken"`
}

type AccessConfigForBaotaPanel struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForBaotaPanelGo struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForBaotaWAF struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForBeget struct {
	Username    string `json:"username"`
	ApiPassword string `json:"apiPassword"`
}

type AccessConfigForBookMyName struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type AccessConfigForBunny struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForBytePlus struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
	ProjectName     string `json:"projectName,omitempty"`
}

type AccessConfigForCacheFly struct {
	ApiToken string `json:"apiToken"`
}

type AccessConfigForCdnfly struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	ApiSecret                string `json:"apiSecret"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForCloudflare struct {
	ApiToken        string `json:"apiToken"`
	ApiTokenForZone string `json:"apiTokenForZone,omitempty"`
}

type AccessConfigForClouDNS struct {
	AuthId       string `json:"authId"`
	AuthPassword string `json:"authPassword"`
}

type AccessConfigForCMCCCloud struct {
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
}

type AccessConfigForConoHaVPS struct {
	ApiVersion  string `json:"apiVersion"`
	ApiUserId   string `json:"apiUserId,omitempty"`
	ApiUserName string `json:"apiUserName"`
	ApiPassword string `json:"apiPassword"`
	TenantId    string `json:"tenantId"`
	TenantName  string `json:"tenantName,omitempty"`
}

type AccessConfigForConstellix struct {
	ApiKey    string `json:"apiKey"`
	SecretKey string `json:"secretKey"`
}

type AccessConfigForCPanel struct {
	ServerUrl                string `json:"serverUrl"`
	Username                 string `json:"username"`
	ApiToken                 string `json:"apiToken"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForCTCCCloud struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type AccessConfigForDeSEC struct {
	Token string `json:"token"`
}

type AccessConfigForDigitalOcean struct {
	AccessToken string `json:"accessToken"`
}

type AccessConfigForDingTalkBot struct {
	WebhookUrl    string `json:"webhookUrl"`
	Secret        string `json:"secret,omitempty"`
	CustomPayload string `json:"customPayload,omitempty"`
}

type AccessConfigForDiscordBot struct {
	BotToken  string `json:"botToken"`
	ChannelId string `json:"channelId,omitempty"`
}

type AccessConfigForDNSExit struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForDNSLA struct {
	ApiId     string `json:"apiId"`
	ApiSecret string `json:"apiSecret"`
}

type AccessConfigForDNSMadeEasy struct {
	ApiKey    string `json:"apiKey"`
	ApiSecret string `json:"apiSecret"`
}

type AccessConfigForDogeCloud struct {
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
}

type AccessConfigForDokploy struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForDuckDNS struct {
	Token string `json:"token"`
}

type AccessConfigForDynadot struct {
	ApiKey    string `json:"apiKey"`
	ApiSecret string `json:"apiSecret"`
}

type AccessConfigForDynu struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForDynv6 struct {
	HttpToken string `json:"httpToken"`
}

type AccessConfigForEmail struct {
	SmtpHost                 string `json:"smtpHost"`
	SmtpPort                 int32  `json:"smtpPort"`
	SmtpTls                  bool   `json:"smtpTls"`
	Username                 string `json:"username"`
	Password                 string `json:"password"`
	SenderAddress            string `json:"senderAddress"`
	SenderName               string `json:"senderName"`
	ReceiverAddress          string `json:"receiverAddress,omitempty"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForFlexCDN struct {
	ServerUrl                string `json:"serverUrl"`
	ApiRole                  string `json:"apiRole"`
	AccessKeyId              string `json:"accessKeyId"`
	AccessKey                string `json:"accessKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForFlyIO struct {
	ApiToken string `json:"apiToken"`
}

type AccessConfigForFTP struct {
	Host     string `json:"host"`
	Port     int32  `json:"port"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type AccessConfigForGandinet struct {
	PersonalAccessToken string `json:"personalAccessToken"`
}

type AccessConfigForGcore struct {
	ApiToken string `json:"apiToken"`
}

type AccessConfigForGlobalSectigo struct {
	AccessConfigForACMEExternalAccountBinding
	ValidationType string `json:"validationType"`
}

type AccessConfigForGlobalSignAtlas struct {
	AccessConfigForACMEExternalAccountBinding
}

type AccessConfigForGname struct {
	AppId  string `json:"appId"`
	AppKey string `json:"appKey"`
}

type AccessConfigForGoDaddy struct {
	ApiKey    string `json:"apiKey"`
	ApiSecret string `json:"apiSecret"`
}

type AccessConfigForGoEdge struct {
	ServerUrl                string `json:"serverUrl"`
	ApiRole                  string `json:"apiRole"`
	AccessKeyId              string `json:"accessKeyId"`
	AccessKey                string `json:"accessKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForGoogleCloud struct {
	ProjectId         string `json:"projectId"`
	ServiceAccountKey string `json:"serviceAccountKey"`
}

type AccessConfigForGoogleTrustServices struct {
	AccessConfigForACMEExternalAccountBinding
}

type AccessConfigForHetzner struct {
	ApiToken string `json:"apiToken"`
}

type AccessConfigForHostingde struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForHostinger struct {
	ApiToken string `json:"apiToken"`
}

type AccessConfigForHuaweiCloud struct {
	AccessKeyId         string `json:"accessKeyId"`
	SecretAccessKey     string `json:"secretAccessKey"`
	EnterpriseProjectId string `json:"enterpriseProjectId,omitempty"`
}

type AccessConfigForInfomaniak struct {
	AccessToken string `json:"accessToken"`
}

type AccessConfigForIONOS struct {
	ApiKeyPublicPrefix string `json:"apiKeyPublicPrefix"`
	ApiKeySecret       string `json:"apiKeySecret"`
}

type AccessConfigForJDCloud struct {
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
}

type AccessConfigForKong struct {
	ServerUrl                string `json:"serverUrl"`
	ApiToken                 string `json:"apiToken,omitempty"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForKubernetes struct {
	KubeConfig string `json:"kubeConfig,omitempty"`
}

type AccessConfigForKsyun struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type AccessConfigForLarkBot struct {
	WebhookUrl    string `json:"webhookUrl"`
	Secret        string `json:"secret,omitempty"`
	CustomPayload string `json:"customPayload,omitempty"`
}

type AccessConfigForLeCDN struct {
	ServerUrl                string `json:"serverUrl"`
	ApiVersion               string `json:"apiVersion"`
	ApiRole                  string `json:"apiRole"`
	Username                 string `json:"username"`
	Password                 string `json:"password"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForLinode struct {
	AccessToken string `json:"accessToken"`
}

type AccessConfigForLiteSSL struct {
	AccessConfigForACMEExternalAccountBinding
}

type AccessConfigForMatrix struct {
	ServerUrl   string `json:"serverUrl"`
	UserId      string `json:"userId"`
	AccessToken string `json:"accessToken"`
	RoomId      string `json:"roomId,omitempty"`
}

type AccessConfigForMattermost struct {
	ServerUrl string `json:"serverUrl"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	ChannelId string `json:"channelId,omitempty"`
}

type AccessConfigForMohua struct {
	Username    string `json:"username"`
	ApiPassword string `json:"apiPassword"`
}

type AccessConfigForNamecheap struct {
	Username string `json:"username"`
	ApiKey   string `json:"apiKey"`
}

type AccessConfigForNameDotCom struct {
	Username string `json:"username"`
	ApiToken string `json:"apiToken"`
}

type AccessConfigForNameSilo struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForNetcup struct {
	CustomerNumber string `json:"customerNumber"`
	ApiKey         string `json:"apiKey"`
	ApiPassword    string `json:"apiPassword"`
}

type AccessConfigForNetlify struct {
	ApiToken string `json:"apiToken"`
}

type AccessConfigForNginxProxyManager struct {
	ServerUrl                string `json:"serverUrl"`
	AuthMethod               string `json:"authMethod"`
	Username                 string `json:"username,omitempty"`
	Password                 string `json:"password,omitempty"`
	ApiToken                 string `json:"apiToken,omitempty"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForNS1 struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForOracleCloud struct {
	AuthMethod           string `json:"authMethod"`
	PrivateKey           string `json:"privateKey,omitempty"`
	PrivateKeyPassphrase string `json:"privateKeyPassphrase,omitempty"`
	PublicKeyFingerprint string `json:"publicKeyFingerprint,omitempty"`
	TenancyOcid          string `json:"tenancyOcid,omitempty"`
	UserOcid             string `json:"userOcid,omitempty"`
}

type AccessConfigForOVHcloud struct {
	Endpoint          string `json:"endpoint"`
	AuthMethod        string `json:"authMethod"`
	ApplicationKey    string `json:"applicationKey,omitempty"`
	ApplicationSecret string `json:"applicationSecret,omitempty"`
	ConsumerKey       string `json:"consumerKey,omitempty"`
	ClientId          string `json:"clientId,omitempty"`
	ClientSecret      string `json:"clientSecret,omitempty"`
}

type AccessConfigForPorkbun struct {
	ApiKey       string `json:"apiKey"`
	SecretApiKey string `json:"secretApiKey"`
}

type AccessConfigForPowerDNS struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForProxmoxVE struct {
	ServerUrl                string `json:"serverUrl"`
	ApiToken                 string `json:"apiToken"`
	ApiTokenSecret           string `json:"apiTokenSecret,omitempty"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForQingCloud struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type AccessConfigForQiniu struct {
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
}

type AccessConfigForRainYun struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForRatPanel struct {
	ServerUrl                string `json:"serverUrl"`
	AccessTokenId            int64  `json:"accessTokenId"`
	AccessToken              string `json:"accessToken"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForRegru struct {
	Username        string `json:"username"`
	Password        string `json:"password"`
	MtlsCertificate string `json:"mtlsCertificate,omitempty"`
	MtlsPrivateKey  string `json:"mtlsPrivateKey,omitempty"`
}

type AccessConfigForRFC2136 struct {
	Host            string `json:"host"`
	Port            int32  `json:"port"`
	TsigAlgorithm   string `json:"tsigAlgorithm,omitempty"`
	TsigKey         string `json:"tsigKey,omitempty"`
	TsigSecret      string `json:"tsigSecret,omitempty"`
	TsigGssRealm    string `json:"tsigGssRealm,omitempty"`
	TsigGssUsername string `json:"tsigGssUsername,omitempty"`
	TsigGssPassword string `json:"tsigGssPassword,omitempty"`
}

type AccessConfigForRuCenter struct {
	Username         string `json:"username"`
	Password         string `json:"password"`
	ApplicationId    string `json:"applicationId"`
	ApplicationToken string `json:"applicationToken"`
}

type AccessConfigForS3 struct {
	Endpoint                 string `json:"endpoint"`
	AccessKey                string `json:"accessKey"`
	SecretKey                string `json:"secretKey"`
	SignatureVersion         string `json:"signatureVersion,omitempty"`
	UsePathStyle             bool   `json:"usePathStyle,omitempty"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForSafeLine struct {
	ServerUrl                string `json:"serverUrl"`
	ApiToken                 string `json:"apiToken"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForSamWAF struct {
	ServerUrl                string `json:"serverUrl"`
	ApiKey                   string `json:"apiKey"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForSimplyCom struct {
	AccountNumber string `json:"accountNumber"`
	ApiKey        string `json:"apiKey"`
}

type AccessConfigForSlackBot struct {
	BotToken  string `json:"botToken"`
	ChannelId string `json:"channelId,omitempty"`
}

type AccessConfigForSpaceship struct {
	ApiKey    string `json:"apiKey"`
	ApiSecret string `json:"apiSecret"`
}

type AccessConfigForSSH struct {
	Host          string `json:"host"`
	Port          int32  `json:"port"`
	AuthMethod    string `json:"authMethod"`
	Username      string `json:"username"`
	Password      string `json:"password,omitempty"`
	Key           string `json:"key,omitempty"`
	KeyPassphrase string `json:"keyPassphrase,omitempty"`
	JumpServers   []struct {
		Host          string `json:"host"`
		Port          int32  `json:"port"`
		AuthMethod    string `json:"authMethod"`
		Username      string `json:"username"`
		Password      string `json:"password,omitempty"`
		Key           string `json:"key,omitempty"`
		KeyPassphrase string `json:"keyPassphrase,omitempty"`
	} `json:"jumpServers,omitempty"`
}

type AccessConfigForSSLCom struct {
	AccessConfigForACMEExternalAccountBinding
}

type AccessConfigForSynologyDSM struct {
	ServerUrl                string `json:"serverUrl"`
	Username                 string `json:"username"`
	Password                 string `json:"password"`
	TotpSecret               string `json:"totpSecret,omitempty"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForTechnitiumDNS struct {
	ServerUrl                string `json:"serverUrl"`
	ApiToken                 string `json:"apiToken"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForTelegramBot struct {
	BotToken string `json:"botToken"`
	ChatId   string `json:"chatId,omitempty"`
}

type AccessConfigForTodayNIC struct {
	UserId string `json:"userId"`
	ApiKey string `json:"apiKey"`
}

type AccessConfigForTencentCloud struct {
	SecretId  string `json:"secretId"`
	SecretKey string `json:"secretKey"`
	ProjectId int64  `json:"projectId,omitempty"`
}

type AccessConfigForUCloud struct {
	PrivateKey string `json:"privateKey"`
	PublicKey  string `json:"publicKey"`
	ProjectId  string `json:"projectId,omitempty"`
}

type AccessConfigForUniCloud struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type AccessConfigForUpyun struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type AccessConfigForVercel struct {
	ApiAccessToken string `json:"apiAccessToken"`
	TeamId         string `json:"teamId,omitempty"`
}

type AccessConfigForVolcEngine struct {
	AccessKeyId     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
	ProjectName     string `json:"projectName,omitempty"`
}

type AccessConfigForVultr struct {
	ApiKey string `json:"apiKey"`
}

type AccessConfigForWangsu struct {
	AccessKeyId     string `json:"accessKeyId"`
	AccessKeySecret string `json:"accessKeySecret"`
	ApiKey          string `json:"apiKey"`
}

type AccessConfigForWebhook struct {
	Url                      string `json:"url"`
	Method                   string `json:"method,omitempty"`
	HeadersString            string `json:"headers,omitempty"`
	DataString               string `json:"data,omitempty"`
	AllowInsecureConnections bool   `json:"allowInsecureConnections,omitempty"`
}

type AccessConfigForWeComBot struct {
	WebhookUrl    string `json:"webhookUrl"`
	CustomPayload string `json:"customPayload,omitempty"`
}

type AccessConfigForWestcn struct {
	Username    string `json:"username"`
	ApiPassword string `json:"apiPassword"`
}

type AccessConfigForXinnet struct {
	AgentId     string `json:"agentId"`
	ApiPassword string `json:"apiPassword"`
}

type AccessConfigForZenlayer struct {
	AccessKeyId       string `json:"accessKeyId"`
	AccessKeyPassword string `json:"accessKeyPassword"`
	ResourceGroupId   string `json:"resourceGroupId,omitempty"`
}

type AccessConfigForZeroSSL struct {
	AccessConfigForACMEExternalAccountBinding
}
