upload_file_request_model.go raw
1 // This file is auto-generated, don't edit it. Thanks.
2 package client
3
4 import (
5 "github.com/alibabacloud-go/tea/dara"
6 )
7
8 type iUploadFileRequest interface {
9 dara.Model
10 String() string
11 GoString() string
12 SetSiteId(v int64) *UploadFileRequest
13 GetSiteId() *int64
14 SetType(v string) *UploadFileRequest
15 GetType() *string
16 SetUploadTaskName(v string) *UploadFileRequest
17 GetUploadTaskName() *string
18 SetUrl(v string) *UploadFileRequest
19 GetUrl() *string
20 }
21
22 type UploadFileRequest struct {
23 // The website ID. You can call the [ListSites](https://help.aliyun.com/document_detail/2850189.html) operation to obtain the ID.
24 //
25 // This parameter is required.
26 //
27 // example:
28 //
29 // 123456789****
30 SiteId *int64 `json:"SiteId,omitempty" xml:"SiteId,omitempty"`
31 // The type of the purge or prefetch task. Valid values:
32 //
33 // - **file* - (default): purges the cache by file.
34 //
35 // - **preload**: prefetches the file.
36 //
37 // - **directory**: purges the cache by directory.
38 //
39 // - **ignoreParams**: purges the cache by URL with specified parameters ignored.
40 //
41 // This parameter is required.
42 //
43 // example:
44 //
45 // file
46 Type *string `json:"Type,omitempty" xml:"Type,omitempty"`
47 // The name of the upload task.
48 //
49 // This parameter is required.
50 //
51 // example:
52 //
53 // purge_task_2024_11_11
54 UploadTaskName *string `json:"UploadTaskName,omitempty" xml:"UploadTaskName,omitempty"`
55 // The OSS URL of the file that contains resources to be purged or prefetched.
56 //
57 // This parameter is required.
58 //
59 // example:
60 //
61 // https://xxxxx.oss-cn-shenzhen.aliyuncs.com/test_oss_file?Expires=1708659191&OSSAccessKeyId=**********&Signature=**********
62 Url *string `json:"Url,omitempty" xml:"Url,omitempty"`
63 }
64
65 func (s UploadFileRequest) String() string {
66 return dara.Prettify(s)
67 }
68
69 func (s UploadFileRequest) GoString() string {
70 return s.String()
71 }
72
73 func (s *UploadFileRequest) GetSiteId() *int64 {
74 return s.SiteId
75 }
76
77 func (s *UploadFileRequest) GetType() *string {
78 return s.Type
79 }
80
81 func (s *UploadFileRequest) GetUploadTaskName() *string {
82 return s.UploadTaskName
83 }
84
85 func (s *UploadFileRequest) GetUrl() *string {
86 return s.Url
87 }
88
89 func (s *UploadFileRequest) SetSiteId(v int64) *UploadFileRequest {
90 s.SiteId = &v
91 return s
92 }
93
94 func (s *UploadFileRequest) SetType(v string) *UploadFileRequest {
95 s.Type = &v
96 return s
97 }
98
99 func (s *UploadFileRequest) SetUploadTaskName(v string) *UploadFileRequest {
100 s.UploadTaskName = &v
101 return s
102 }
103
104 func (s *UploadFileRequest) SetUrl(v string) *UploadFileRequest {
105 s.Url = &v
106 return s
107 }
108
109 func (s *UploadFileRequest) Validate() error {
110 return dara.Validate(s)
111 }
112