func SetDomainSeo(cli bce.Client, domain string, seoSwitch *SeoSwitch) error {
	urlPath := fmt.Sprintf("/v2/domain/%s/config", domain)
	params := map[string]string{
		"seoSwitch": "",
	}
	respObj := &struct {
		Status string `json:"status"`
	}{}
	err := httpRequest(cli, "PUT", urlPath, params, &struct {
		SeoSwitch *SeoSwitch `json:"seoSwitch"`
	}{
		SeoSwitch: seoSwitch,
	}, respObj)
	if err != nil {
		return err
	}
	return nil
}
SetDomainSeo - set SEO setting
For details, please refer https://cloud.baidu.com/doc/CDN/s/Jjxziuq4y

PARAMS:
- cli: the client agent which can perform sending request
- domain: the specified domain
- seoSwitch: the setting about SEO
RETURNS:
- error: nil if success otherwise the specific error
package api
import (
	"encoding/json"
	"errors"
	"fmt"
	"strings"
	"github.com/baidubce/bce-sdk-go/bce"
)
type DomainConfig struct {
	Domain         string       `json:"domain"`
	Cname          string       `json:"cname"`
	Status         string       `json:"status"`
	CreateTime     string       `json:"createTime"`
	LastModifyTime string       `json:"lastModifyTime"`
	IsBan          string       `json:"isBan"`
	Origin         []OriginPeer `json:"origin"`
	DefaultHost    string       `json:"defaultHost,omitempty"`
	CacheTTL       []CacheTTL   `json:"cacheTTL"`
	LimitRate      int          `json:"limitRate"`
	RequestAuth    *RequestAuth `json:"requestAuth,omitempty"`
	Https          *HTTPSConfig `json:"https,omitempty"`
	FollowProtocol bool         `json:"followProtocol"`
	SeoSwitch      *SeoSwitch   `json:"seoSwitch"`
	Form           string       `json:"form"`
}
type CacheTTL struct {
	Type   string `json:"type"`
	Value  string `json:"value"`
	Weight int    `json:"weight,omitempty"`
	TTL    int    `json:"ttl"`
}
type CacheShared struct {
	Enabled    bool   `json:"enabled"`
	SharedWith string `json:"domain,omitempty"`
}
type RequestAuth struct {
	Type      string   `json:"type"`
	Key1      string   `json:"key1"`
	Key2      string   `json:"key2,omitempty"`
	Timeout   int      `json:"timeout,omitempty"`
	WhiteList []string `json:"whiteList,omitempty"`
	SignArg   string   `json:"signArg,omitempty"`
	TimeArg   string   `json:"timeArg,omitempty"`
}
type HTTPSConfig struct {
	Enabled           bool   `json:"enabled"`
	CertId            string `json:"certId,omitempty"`
	HttpRedirect      bool   `json:"httpRedirect"`
	HttpRedirectCode  int    `json:"httpRedirectCode,omitempty"`
	HttpsRedirect     bool   `json:"httpsRedirect"`
	HttpsRedirectCode int    `json:"httpsRedirectCode"`
	Http2Enabled      bool   `json:"http2Enabled"`
	SslVersion        string `json:"sslVersion,omitempty"`
	HttpOrigin bool `json:"-"`
}
type SeoSwitch struct {
	DirectlyOrigin string `json:"diretlyOrigin"`
	PushRecord     string `json:"pushRecord"`
}
type TrafficLimit struct {
	Enabled          bool   `json:"enable"`
	LimitRate        int    `json:"limitRate,omitempty"`
	LimitStartHour   int    `json:"limitStartHour,omitempty"`
	LimitEndHour     int    `json:"limitEndHour,omitempty"`
	LimitRateAfter   int    `json:"limitRateAfter,omitempty"`
	TrafficLimitArg  string `json:"trafficLimitArg,omitempty"`
	TrafficLimitUnit string `json:"trafficLimitUnit,omitempty"`
}
type HttpHeader struct {
	Type     string `json:"type"`
	Header   string `json:"header"`
	Value    string `json:"value"`
	Action   string `json:"action,omitempty"`
	Describe string `json:"describe,omitempty"`
}
type RefererACL struct {
	BlackList  []string `json:"blackList,omitempty"`
	WhiteList  []string `json:"whiteList,omitempty"`
	AllowEmpty bool     `json:"allowEmpty"`
}
type IpACL struct {
	BlackList []string `json:"blackList,omitempty"`
	WhiteList []string `json:"whiteList,omitempty"`
}
type UaACL struct {
	BlackList []string `json:"blackList,omitempty"`
	WhiteList []string `json:"whiteList,omitempty"`
}
type ErrorPage struct {
	Code         int    `json:"code"`
	RedirectCode int    `json:"redirectCode,omitempty"`
	Url          string `json:"url"`
}
type MediaCfg struct {
	FileSuffix   []string `json:"fileSuffix"`
	StartArgName string   `json:"startArgName,omitempty"`
	EndArgName   string   `json:"endArgName,omitempty"`
	DragMode     string   `json:"dragMode"`
}
type MediaDragConf struct {
	Mp4 *MediaCfg `json:"mp4,omitempty"`
	Flv *MediaCfg `json:"flv,omitempty"`
}
type ClientIp struct {
	Enabled bool   `json:"enabled"`
	Name    string `json:"name,omitempty"`
}
type RetryOrigin struct {
	Codes []int `json:"codes"`
}
type AccessLimit struct {
	Enabled bool `json:"enabled"`
	Limit   int  `json:"limit,omitempty"`
}
type CacheUrlArgs struct {
	CacheFullUrl bool     `json:"cacheFullUrl"`
	CacheUrlArgs []string `json:"cacheUrlArgs,omitempty"`
}
type CorsCfg struct {
	IsAllow bool
	Origins []string
}
func GetDomainConfig(cli bce.Client, domain string) (*DomainConfig, error) {
	urlPath := fmt.Sprintf("/v2/domain/%s/config", domain)
	config := &DomainConfig{}
	err := httpRequest(cli, "GET", urlPath, nil, nil, config)
	if err != nil {
		return nil, err
	}
	return config, nil
}
func SetDomainOrigin(cli bce.Client, domain string, origins []OriginPeer, defaultHost string) error {
	urlPath := fmt.Sprintf("/v2/domain/%s/config", domain)
	params := map[string]string{
		"origin": "",
	}
	err := httpRequest(cli, "PUT", urlPath, params, &struct {
		Origin      []OriginPeer `json:"origin"`
		DefaultHost string       `json:"defaultHost"`
	}{
		Origin:      origins,
		DefaultHost: defaultHost,
	}, nil)
	return err
}
func SetOriginProtocol(cli bce.Client, domain string, originProtocol string) error {
	validOriginProtocols := map[string]bool{
		"http":  true,
		"https": false,
		"*":     true,
	}
	if _, ok := validOriginProtocols[originProtocol]; !ok {
		return fmt.Errorf("invalid originProtocol \"%s\", "+
			"valid value must be \"http\", \"https\" or \"*\"", originProtocol)
	}
	urlPath := fmt.Sprintf("/v2/domain/%s/config", domain)
	params := map[string]string{
		"originProtocol": "",
	}
	err := httpRequest(cli, "PUT", urlPath, params, map[string]interface{}{
		"originProtocol": map[string]string{
			"value": originProtocol,
		},
	}, nil)
	return err
}
func GetOriginProtocol(cli bce.Client, domain string) (string, error) {
	urlPath := fmt.Sprintf("/v2/domain/%s/config", domain)
	params := map[string]string{
		"originProtocol": "",
	}
	respObj := &struct {
		OriginProtocol struct {
			Value string `json:"value"`
		} `json:"originProtocol"`
	}{}
	err := httpRequest(cli, "GET", urlPath, params, nil, respObj)
	if err != nil {
		return "", err
	}
	if respObj.OriginProtocol.Value == "" {
		return "http", nil
	}
	return respObj.OriginProtocol.Value, nil
}