@@ -10,100 +10,107 @@ import (
1010type BatchService service
1111
1212type BatchRequestHeaders struct {
13- XCosAppid int `header:"x-cos-appid"`
14- ContentLength string `header:"Content-Length,omitempty"`
15- ContentType string `header:"Content-Type,omitempty"`
16- Headers * http.Header `header:"-"`
13+ XCosAppid int `header:"x-cos-appid" xml:"-" url:"-" `
14+ ContentLength string `header:"Content-Length,omitempty" xml:"-" url:"-" `
15+ ContentType string `header:"Content-Type,omitempty" xml:"-" url:"-" `
16+ Headers * http.Header `header:"-" xml:"-", url:"-" `
1717}
1818
1919// BatchProgressSummary
2020type BatchProgressSummary struct {
21- NumberOfTasksFailed int `xml:"NumberOfTasksFailed"`
22- NumberOfTasksSucceeded int `xml:"NumberOfTasksSucceeded"`
23- TotalNumberOfTasks int `xml:"TotalNumberOfTasks"`
21+ NumberOfTasksFailed int `xml:"NumberOfTasksFailed" header:"-" url:"-" `
22+ NumberOfTasksSucceeded int `xml:"NumberOfTasksSucceeded" header:"-" url:"-" `
23+ TotalNumberOfTasks int `xml:"TotalNumberOfTasks" header:"-" url:"-" `
2424}
2525
2626// BatchJobReport
2727type BatchJobReport struct {
28- Bucket string `xml:"Bucket"`
29- Enabled string `xml:"Enabled"`
30- Format string `xml:"Format"`
31- Prefix string `xml:"Prefix,omitempty"`
32- ReportScope string `xml:"ReportScope"`
28+ Bucket string `xml:"Bucket" header:"-" url:"-" `
29+ Enabled string `xml:"Enabled" header:"-" url:"-" `
30+ Format string `xml:"Format" header:"-" url:"-" `
31+ Prefix string `xml:"Prefix,omitempty" header:"-" url:"-" `
32+ ReportScope string `xml:"ReportScope" header:"-" url:"-" `
3333}
3434
3535// BatchJobOperationCopy
3636type BatchMetadata struct {
37- Key string `xml:"Key"`
38- Value string `xml:"Value"`
37+ Key string `xml:"Key" header:"-" url:"-" `
38+ Value string `xml:"Value" header:"-" url:"-" `
3939}
4040type BatchNewObjectMetadata struct {
41- CacheControl string `xml:"CacheControl,omitempty"`
42- ContentDisposition string `xml:"ContentDisposition,omitempty"`
43- ContentEncoding string `xml:"ContentEncoding,omitempty"`
44- ContentType string `xml:"ContentType,omitempty"`
45- HttpExpiresDate string `xml:"HttpExpiresDate,omitempty"`
46- SSEAlgorithm string `xml:"SSEAlgorithm,omitempty"`
47- UserMetadata []BatchMetadata `xml:"UserMetadata>member,omitempty"`
41+ CacheControl string `xml:"CacheControl,omitempty" header:"-" url:"-" `
42+ ContentDisposition string `xml:"ContentDisposition,omitempty" header:"-" url:"-" `
43+ ContentEncoding string `xml:"ContentEncoding,omitempty" header:"-" url:"-" `
44+ ContentType string `xml:"ContentType,omitempty" header:"-" url:"-" `
45+ HttpExpiresDate string `xml:"HttpExpiresDate,omitempty" header:"-" url:"-" `
46+ SSEAlgorithm string `xml:"SSEAlgorithm,omitempty" header:"-" url:"-" `
47+ UserMetadata []BatchMetadata `xml:"UserMetadata>member,omitempty" header:"-" url:"-" `
4848}
4949type BatchGrantee struct {
50- DisplayName string `xml:"DisplayName,omitempty"`
51- Identifier string `xml:"Identifier"`
52- TypeIdentifier string `xml:"TypeIdentifier"`
50+ DisplayName string `xml:"DisplayName,omitempty" header:"-" url:"-" `
51+ Identifier string `xml:"Identifier" header:"-" url:"-" `
52+ TypeIdentifier string `xml:"TypeIdentifier" header:"-" url:"-" `
5353}
5454type BatchCOSGrant struct {
55- Grantee * BatchGrantee `xml:"Grantee"`
56- Permission string `xml:"Permission"`
55+ Grantee * BatchGrantee `xml:"Grantee" header:"-" url:"-" `
56+ Permission string `xml:"Permission" header:"-" url:"-" `
5757}
5858type BatchAccessControlGrants struct {
59- COSGrants * BatchCOSGrant `xml:"COSGrant,omitempty"`
59+ COSGrants * BatchCOSGrant `xml:"COSGrant,omitempty" header:"-" url:"-" `
6060}
6161type BatchJobOperationCopy struct {
62- AccessControlGrants * BatchAccessControlGrants `xml:"AccessControlGrants,omitempty"`
63- CannedAccessControlList string `xml:"CannedAccessControlList,omitempty"`
64- MetadataDirective string `xml:"MetadataDirective,omitempty"`
65- ModifiedSinceConstraint int64 `xml:"ModifiedSinceConstraint,omitempty"`
66- UnModifiedSinceConstraint int64 `xml:"UnModifiedSinceConstraint,omitempty"`
67- NewObjectMetadata * BatchNewObjectMetadata `xml:"NewObjectMetadata,omitempty"`
68- StorageClass string `xml:"StorageClass,omitempty"`
69- TargetResource string `xml:"TargetResource"`
62+ AccessControlGrants * BatchAccessControlGrants `xml:"AccessControlGrants,omitempty" header:"-" url:"-"`
63+ CannedAccessControlList string `xml:"CannedAccessControlList,omitempty" header:"-" url:"-"`
64+ MetadataDirective string `xml:"MetadataDirective,omitempty" header:"-" url:"-"`
65+ ModifiedSinceConstraint int64 `xml:"ModifiedSinceConstraint,omitempty" header:"-" url:"-"`
66+ UnModifiedSinceConstraint int64 `xml:"UnModifiedSinceConstraint,omitempty" header:"-" url:"-"`
67+ NewObjectMetadata * BatchNewObjectMetadata `xml:"NewObjectMetadata,omitempty" header:"-" url:"-"`
68+ StorageClass string `xml:"StorageClass,omitempty" header:"-" url:"-"`
69+ TargetResource string `xml:"TargetResource" header:"-" url:"-"`
70+ }
71+
72+ // BatchInitiateRestoreObject
73+ type BatchInitiateRestoreObject struct {
74+ ExpirationInDays int `xml:"ExpirationInDays"`
75+ JobTier string `xml:"JobTier"`
7076}
7177
7278// BatchJobOperation
7379type BatchJobOperation struct {
74- PutObjectCopy * BatchJobOperationCopy `xml:"COSPutObjectCopy,omitempty" header:"-"`
80+ PutObjectCopy * BatchJobOperationCopy `xml:"COSPutObjectCopy,omitempty" header:"-" url:"-"`
81+ RestoreObject * BatchInitiateRestoreObject `xml:"COSInitiateRestoreObject,omitempty" header:"-" url:"-"`
7582}
7683
7784// BatchJobManifest
7885type BatchJobManifestLocation struct {
79- ETag string `xml:"ETag" header:"-"`
80- ObjectArn string `xml:"ObjectArn" header:"-"`
81- ObjectVersionId string `xml:"ObjectVersionId,omitempty" header:"-"`
86+ ETag string `xml:"ETag" header:"-" url:"-" `
87+ ObjectArn string `xml:"ObjectArn" header:"-" url:"-" `
88+ ObjectVersionId string `xml:"ObjectVersionId,omitempty" header:"-" url:"-" `
8289}
8390type BatchJobManifestSpec struct {
84- Fields []string `xml:"Fields>member,omitempty" header:"-"`
85- Format string `xml:"Format" header:"-"`
91+ Fields []string `xml:"Fields>member,omitempty" header:"-" url:"-" `
92+ Format string `xml:"Format" header:"-" url:"-" `
8693}
8794type BatchJobManifest struct {
88- Location * BatchJobManifestLocation `xml:"Location" header:"-"`
89- Spec * BatchJobManifestSpec `xml:"Spec" header:"-"`
95+ Location * BatchJobManifestLocation `xml:"Location" header:"-" url:"-" `
96+ Spec * BatchJobManifestSpec `xml:"Spec" header:"-" url:"-" `
9097}
9198
9299type BatchCreateJobOptions struct {
93- XMLName xml.Name `xml:"CreateJobRequest" header:"-"`
94- ClientRequestToken string `xml:"ClientRequestToken" header:"-"`
95- ConfirmationRequired string `xml:"ConfirmationRequired,omitempty" header:"-"`
96- Description string `xml:"Description,omitempty" header:"-"`
97- Manifest * BatchJobManifest `xml:"Manifest" header:"-"`
98- Operation * BatchJobOperation `xml:"Operation" header:"-"`
99- Priority int `xml:"Priority" header:"-"`
100- Report * BatchJobReport `xml:"Report" header:"-"`
101- RoleArn string `xml:"RoleArn" header:"-"`
100+ XMLName xml.Name `xml:"CreateJobRequest" header:"-" url:"-" `
101+ ClientRequestToken string `xml:"ClientRequestToken" header:"-" url:"-" `
102+ ConfirmationRequired string `xml:"ConfirmationRequired,omitempty" header:"-" url:"-" `
103+ Description string `xml:"Description,omitempty" header:"-" url:"-" `
104+ Manifest * BatchJobManifest `xml:"Manifest" header:"-" url:"-" `
105+ Operation * BatchJobOperation `xml:"Operation" header:"-" url:"-" `
106+ Priority int `xml:"Priority" header:"-" url:"-" `
107+ Report * BatchJobReport `xml:"Report" header:"-" url:"-" `
108+ RoleArn string `xml:"RoleArn" header:"-" url:"-" `
102109}
103110
104111type BatchCreateJobResult struct {
105112 XMLName xml.Name `xml:"CreateJobResult"`
106- JobId string `xml:"JobId"`
113+ JobId string `xml:"JobId,omitempty "`
107114}
108115
109116func processETag (opt * BatchCreateJobOptions ) * BatchCreateJobOptions {
@@ -129,31 +136,31 @@ func (s *BatchService) CreateJob(ctx context.Context, opt *BatchCreateJobOptions
129136}
130137
131138type BatchJobFailureReasons struct {
132- FailureCode string `xml:"FailureCode"`
133- FailureReason string `xml:"FailureReason"`
139+ FailureCode string `xml:"FailureCode" header:"-" url:"-" `
140+ FailureReason string `xml:"FailureReason" header:"-" url:"-" `
134141}
135142
136143type BatchDescribeJob struct {
137- ConfirmationRequired string `xml:"ConfirmationRequired,omitempty"`
138- CreationTime string `xml:"CreationTime,omitempty"`
139- Description string `xml:"Description,omitempty"`
140- FailureReasons * BatchJobFailureReasons `xml:"FailureReasons>JobFailure,omitempty"`
141- JobId string `xml:"JobId"`
142- Manifest * BatchJobManifest `xml:"Manifest"`
143- Operation * BatchJobOperation `xml:"Operation"`
144- Priority int `xml:"Priority"`
145- ProgressSummary * BatchProgressSummary `xml:"ProgressSummary"`
146- Report * BatchJobReport `xml:"Report,omitempty"`
147- RoleArn string `xml:"RoleArn,omitempty"`
148- Status string `xml:"Status,omitempty"`
149- StatusUpdateReason string `xml:"StatusUpdateReason,omitempty"`
150- SuspendedCause string `xml:"SuspendedCause,omitempty"`
151- SuspendedDate string `xml:"SuspendedDate,omitempty"`
152- TerminationDate string `xml:"TerminationDate,omitempty"`
144+ ConfirmationRequired string `xml:"ConfirmationRequired,omitempty" header:"-" url:"-" `
145+ CreationTime string `xml:"CreationTime,omitempty" header:"-" url:"-" `
146+ Description string `xml:"Description,omitempty" header:"-" url:"-" `
147+ FailureReasons * BatchJobFailureReasons `xml:"FailureReasons>JobFailure,omitempty" header:"-" url:"-" `
148+ JobId string `xml:"JobId" header:"-" url:"-" `
149+ Manifest * BatchJobManifest `xml:"Manifest" header:"-" url:"-" `
150+ Operation * BatchJobOperation `xml:"Operation" header:"-" url:"-" `
151+ Priority int `xml:"Priority" header:"-" url:"-" `
152+ ProgressSummary * BatchProgressSummary `xml:"ProgressSummary" header:"-" url:"-" `
153+ Report * BatchJobReport `xml:"Report,omitempty" header:"-" url:"-" `
154+ RoleArn string `xml:"RoleArn,omitempty" header:"-" url:"-" `
155+ Status string `xml:"Status,omitempty" header:"-" url:"-" `
156+ StatusUpdateReason string `xml:"StatusUpdateReason,omitempty" header:"-" url:"-" `
157+ SuspendedCause string `xml:"SuspendedCause,omitempty" header:"-" url:"-" `
158+ SuspendedDate string `xml:"SuspendedDate,omitempty" header:"-" url:"-" `
159+ TerminationDate string `xml:"TerminationDate,omitempty" header:"-" url:"-" `
153160}
154161type BatchDescribeJobResult struct {
155162 XMLName xml.Name `xml:"DescribeJobResult"`
156- Job * BatchDescribeJob `xml:"Job"`
163+ Job * BatchDescribeJob `xml:"Job,omitempty "`
157164}
158165
159166func (s * BatchService ) DescribeJob (ctx context.Context , id string , headers * BatchRequestHeaders ) (* BatchDescribeJobResult , * Response , error ) {
@@ -171,27 +178,27 @@ func (s *BatchService) DescribeJob(ctx context.Context, id string, headers *Batc
171178}
172179
173180type BatchListJobsOptions struct {
174- JobStatuses string `url:"jobStatuses,omitempty" header:"-"`
175- MaxResults int `url:"maxResults,omitempty" header:"-"`
176- NextToken string `url:"nextToken,omitempty" header:"-"`
181+ JobStatuses string `url:"jobStatuses,omitempty" header:"-" xml:"-" `
182+ MaxResults int `url:"maxResults,omitempty" header:"-" xml:"-" `
183+ NextToken string `url:"nextToken,omitempty" header:"-" xml:"-" `
177184}
178185
179186type BatchListJobsMember struct {
180- CreationTime string `xml:"CreationTime,omitempty"`
181- Description string `xml:"Description,omitempty"`
182- JobId string `xml:"JobId,omitempty"`
183- Operation string `xml:"Operation,omitempty"`
184- Priority int `xml:"Priority,omitempty"`
185- ProgressSummary * BatchProgressSummary `xml:"ProgressSummary,omitempty"`
186- Status string `xml:"Status,omitempty"`
187- TerminationDate string `xml:"TerminationDate,omitempty"`
187+ CreationTime string `xml:"CreationTime,omitempty" header:"-" url:"-" `
188+ Description string `xml:"Description,omitempty" header:"-" url:"-" `
189+ JobId string `xml:"JobId,omitempty" header:"-" url:"-" `
190+ Operation string `xml:"Operation,omitempty" header:"-" url:"-" `
191+ Priority int `xml:"Priority,omitempty" header:"-" url:"-" `
192+ ProgressSummary * BatchProgressSummary `xml:"ProgressSummary,omitempty" header:"-" url:"-" `
193+ Status string `xml:"Status,omitempty" header:"-" url:"-" `
194+ TerminationDate string `xml:"TerminationDate,omitempty" header:"-" url:"-" `
188195}
189196type BatchListJobs struct {
190- Members []BatchListJobsMember `xml:"member,omitempty"`
197+ Members []BatchListJobsMember `xml:"member,omitempty" header:"-" url:"-" `
191198}
192199type BatchListJobsResult struct {
193200 XMLName xml.Name `xml:"ListJobsResult"`
194- Jobs * BatchListJobs `xml:"Jobs"`
201+ Jobs * BatchListJobs `xml:"Jobs,omitempty "`
195202 NextToken string `xml:"NextToken,omitempty"`
196203}
197204
0 commit comments