@@ -18,45 +18,36 @@ package apis
1818
1919import (
2020 "github.com/jdcloud-api/jdcloud-sdk-go/core"
21+ vod "github.com/jdcloud-api/jdcloud-sdk-go/services/vod/models"
2122)
2223
2324type CreateSnapshotTemplateRequest struct {
2425
2526 core.JDCloudRequest
2627
27- /* 模板名称 */
28+ /* 模板标题。长度不超过 128 个字节。UTF-8 编码。 */
2829 TemplateName string `json:"templateName"`
2930
3031 /* 模板类型。取值范围:
3132 sample - 采样截图模板
3233 sprite - 雪碧图模板
33- */
34- TemplateType string `json:"templateType "`
35-
36- /* 模板配置,JSON格式的字符串
37- 若 templateType 取值 sample,则JSON字符串须符合 SnapshotTemplateSampleConfigInfo 格式
38- 若 templateType 取值 sprite,则JSON字符串须符合 SnapshotTemplateSpriteConfigInfo 格式
39- */
40- TemplateConfig string `json:"templateConfig "`
34+ (Optional) */
35+ SnapshotType * string `json:"snapshotType "`
36+
37+ /* 采样截图模板配置 (Optional) */
38+ ImageSampleConfig * vod. ImageSampleConfig `json:"imageSampleConfig"`
39+
40+ /* 雪碧图模板配置 (Optional) */
41+ ImageSpriteConfig * vod. ImageSpriteConfig `json:"imageSpriteConfig "`
4142}
4243
4344/*
44- * param templateName: 模板名称 (Required)
45- * param templateType: 模板类型。取值范围:
46- sample - 采样截图模板
47- sprite - 雪碧图模板
48- (Required)
49- * param templateConfig: 模板配置,JSON格式的字符串
50- 若 templateType 取值 sample,则JSON字符串须符合 SnapshotTemplateSampleConfigInfo 格式
51- 若 templateType 取值 sprite,则JSON字符串须符合 SnapshotTemplateSpriteConfigInfo 格式
52- (Required)
45+ * param templateName: 模板标题。长度不超过 128 个字节。UTF-8 编码。 (Required)
5346 *
5447 * @Deprecated, not compatible when mandatory parameters changed
5548 */
5649func NewCreateSnapshotTemplateRequest (
5750 templateName string ,
58- templateType string ,
59- templateConfig string ,
6051) * CreateSnapshotTemplateRequest {
6152
6253 return & CreateSnapshotTemplateRequest {
@@ -67,26 +58,23 @@ func NewCreateSnapshotTemplateRequest(
6758 Version : "v1" ,
6859 },
6960 TemplateName : templateName ,
70- TemplateType : templateType ,
71- TemplateConfig : templateConfig ,
7261 }
7362}
7463
7564/*
76- * param templateName: 模板名称 (Required)
77- * param templateType : 模板类型。取值范围:
65+ * param templateName: 模板标题。长度不超过 128 个字节。UTF-8 编码。 (Required)
66+ * param snapshotType : 模板类型。取值范围:
7867 sample - 采样截图模板
7968 sprite - 雪碧图模板
80- (Required)
81- * param templateConfig: 模板配置,JSON格式的字符串
82- 若 templateType 取值 sample,则JSON字符串须符合 SnapshotTemplateSampleConfigInfo 格式
83- 若 templateType 取值 sprite,则JSON字符串须符合 SnapshotTemplateSpriteConfigInfo 格式
84- (Required)
69+ (Optional)
70+ * param imageSampleConfig: 采样截图模板配置 (Optional)
71+ * param imageSpriteConfig: 雪碧图模板配置 (Optional)
8572 */
8673func NewCreateSnapshotTemplateRequestWithAllParams (
8774 templateName string ,
88- templateType string ,
89- templateConfig string ,
75+ snapshotType * string ,
76+ imageSampleConfig * vod.ImageSampleConfig ,
77+ imageSpriteConfig * vod.ImageSpriteConfig ,
9078) * CreateSnapshotTemplateRequest {
9179
9280 return & CreateSnapshotTemplateRequest {
@@ -97,8 +85,9 @@ func NewCreateSnapshotTemplateRequestWithAllParams(
9785 Version : "v1" ,
9886 },
9987 TemplateName : templateName ,
100- TemplateType : templateType ,
101- TemplateConfig : templateConfig ,
88+ SnapshotType : snapshotType ,
89+ ImageSampleConfig : imageSampleConfig ,
90+ ImageSpriteConfig : imageSpriteConfig ,
10291 }
10392}
10493
@@ -115,25 +104,27 @@ func NewCreateSnapshotTemplateRequestWithoutParam() *CreateSnapshotTemplateReque
115104 }
116105}
117106
118- /* param templateName: 模板名称 (Required) */
107+ /* param templateName: 模板标题。长度不超过 128 个字节。UTF-8 编码。 (Required) */
119108func (r * CreateSnapshotTemplateRequest ) SetTemplateName (templateName string ) {
120109 r .TemplateName = templateName
121110}
122111
123- /* param templateType : 模板类型。取值范围:
112+ /* param snapshotType : 模板类型。取值范围:
124113 sample - 采样截图模板
125114 sprite - 雪碧图模板
126- (Required) */
127- func (r * CreateSnapshotTemplateRequest ) SetTemplateType (templateType string ) {
128- r .TemplateType = templateType
115+ (Optional) */
116+ func (r * CreateSnapshotTemplateRequest ) SetSnapshotType (snapshotType string ) {
117+ r .SnapshotType = & snapshotType
118+ }
119+
120+ /* param imageSampleConfig: 采样截图模板配置(Optional) */
121+ func (r * CreateSnapshotTemplateRequest ) SetImageSampleConfig (imageSampleConfig * vod.ImageSampleConfig ) {
122+ r .ImageSampleConfig = imageSampleConfig
129123}
130124
131- /* param templateConfig: 模板配置,JSON格式的字符串
132- 若 templateType 取值 sample,则JSON字符串须符合 SnapshotTemplateSampleConfigInfo 格式
133- 若 templateType 取值 sprite,则JSON字符串须符合 SnapshotTemplateSpriteConfigInfo 格式
134- (Required) */
135- func (r * CreateSnapshotTemplateRequest ) SetTemplateConfig (templateConfig string ) {
136- r .TemplateConfig = templateConfig
125+ /* param imageSpriteConfig: 雪碧图模板配置(Optional) */
126+ func (r * CreateSnapshotTemplateRequest ) SetImageSpriteConfig (imageSpriteConfig * vod.ImageSpriteConfig ) {
127+ r .ImageSpriteConfig = imageSpriteConfig
137128}
138129
139130// GetRegionId returns path parameter 'regionId' if exist,
@@ -151,8 +142,9 @@ type CreateSnapshotTemplateResponse struct {
151142type CreateSnapshotTemplateResult struct {
152143 TemplateId string `json:"templateId"`
153144 TemplateName string `json:"templateName"`
154- TemplateType string `json:"templateType"`
155- TemplateConfig string `json:"templateConfig"`
145+ SnapshotType string `json:"snapshotType"`
146+ ImageSampleConfig vod.ImageSampleConfig `json:"imageSampleConfig"`
147+ ImageSpriteConfig vod.ImageSpriteConfig `json:"imageSpriteConfig"`
156148 CreateTime string `json:"createTime"`
157149 UpdateTime string `json:"updateTime"`
158150}
0 commit comments