@@ -259,22 +259,30 @@ type DescribeFileMetaIndexOptions struct {
259259}
260260
261261type FileInfo struct {
262- Coscrc64 string `json:"COSCRC64"`
263- COSStorageClass string `json:"COSStorageClass"`
264- CacheControl string `json:"CacheControl"`
265- ContentType string `json:"ContentType"`
266- CreateTime string `json:"CreateTime"`
267- CustomID string `json:"CustomId"`
268- CustomLabels map [string ]string `json:"CustomLabels"`
269- DatasetName string `json:"DatasetName"`
270- ETag string `json:"ETag"`
271- FileModifiedTime string `json:"FileModifiedTime"`
272- Filename string `json:"Filename"`
273- MediaType string `json:"MediaType"`
274- ObjectACL string `json:"ObjectACL"`
275- Size int `json:"Size"`
276- URI string `json:"URI"`
277- UpdateTime string `json:"UpdateTime"`
262+ DatasetName string `json:"DatasetName,omitempty"`
263+ OwnerID string `json:"OwnerID,omitempty"`
264+ ObjectId string `json:"ObjectId,omitempty"`
265+ CreateTime string `json:"CreateTime,omitempty"`
266+ UpdateTime string `json:"UpdateTime,omitempty"`
267+ URI string `json:"URI,omitempty"`
268+ Filename string `json:"Filename,omitempty"`
269+ MediaType string `json:"MediaType,omitempty"`
270+ ContentType string `json:"ContentType,omitempty"`
271+ COSStorageClass string `json:"COSStorageClass,omitempty"`
272+ Coscrc64 string `json:"COSCRC64,omitempty"`
273+ Size int `json:"Size,omitempty"`
274+ CacheControl string `json:"CacheControl,omitempty"`
275+ ContentDisposition string `json:"ContentDisposition,omitempty"`
276+ ContentEncoding string `json:"ContentEncoding,omitempty"`
277+ ContentLanguage string `json:"ContentLanguage,omitempty"`
278+ ServerSideEncryption string `json:"ServerSideEncryption,omitempty"`
279+ ETag string `json:"ETag,omitempty"`
280+ FileModifiedTime string `json:"FileModifiedTime,omitempty"`
281+ CustomID string `json:"CustomId,omitempty"`
282+ CustomLabels map [string ]string `json:"CustomLabels,omitempty"`
283+ COSUserMeta map [string ]string `json:"COSUserMeta,omitempty"`
284+ ObjectACL string `json:"ObjectACL",omitempty`
285+ COSTagging map [string ]string `json:"COSTagging,omitempty"`
278286}
279287
280288type DescribeFileMetaIndexResult struct {
@@ -304,7 +312,7 @@ type DeleteFileMetaIndexOptions struct {
304312
305313type DeleteFileMetaIndexResult struct {
306314 Response struct {
307- RequestID string `json:"RequestId"`
315+ RequestID string `json:"RequestId"`
308316 } `json:"Response"`
309317}
310318
@@ -320,3 +328,167 @@ func (s *CIService) DeleteFileMetaIndex(ctx context.Context, opt *DeleteFileMeta
320328 return & res , resp , err
321329}
322330
331+ type Query struct {
332+ Operation string `json:"Operation,omitempty"`
333+ Field string `json:"Field,omitempty"`
334+ Value string `json:"Value,omitempty"`
335+ SubQueries []* Query `json:"SubQueries,omitempty"`
336+ }
337+
338+ type Aggregation struct {
339+ Field string `json:"Field,omitempty"`
340+ Operation string `json:"Operation,omitempty"`
341+ }
342+ type DatasetSimpleQueryOptions struct {
343+ DatasetName string `json:"DatasetName,omitempty" url:"-"`
344+ Query * Query `json:"Query,omitempty" url:"-"`
345+ Sort string `json:"Sort,omitempty" url:"-"`
346+ Order string `json:"Order,omitempty" url:"-"`
347+ MaxResults string `json:"MaxResults,omitempty" url:"-"`
348+ Aggregations []* Aggregation `json:"Aggregations,omitempty" url:"-"`
349+ NextToken string `json:"NextToken,omitempty" url:"-"`
350+ WithFields []string `json:"WithFields,omitempty" url:"-"`
351+ OptHeaders * OptHeaders `header:"-,omitempty" url:"-" json:"-" xml:"-"`
352+ }
353+
354+ type Groups struct {
355+ Count int `json:"Count"`
356+ Value string `json:"Value"`
357+ }
358+ type Aggregations struct {
359+ Field string `json:"Field"`
360+ Groups []Groups `json:"Groups"`
361+ Operation string `json:"Operation"`
362+ Value float32 `json:"Value"`
363+ }
364+
365+ type DatasetSimpleQueryResult struct {
366+ Response struct {
367+ Aggregations []Aggregations `json:"Aggregations"`
368+ Files []FileInfo `json:"Files"`
369+ NextToken string `json:"NextToken"`
370+ RequestID string `json:"RequestId"`
371+ } `json:"Response"`
372+ }
373+
374+ func (s * CIService ) DatasetSimpleQuery (ctx context.Context , opt * DatasetSimpleQueryOptions ) (* DatasetSimpleQueryResult , * Response , error ) {
375+ var res DatasetSimpleQueryResult
376+ if opt == nil {
377+ return nil , nil , fmt .Errorf ("opt param nil" )
378+ }
379+ buf , resp , err := s .baseSend (ctx , opt , opt .OptHeaders , "/datasetquery/simple" , http .MethodPost )
380+ if buf .Len () > 0 {
381+ err = json .Unmarshal (buf .Bytes (), & res )
382+ }
383+ return & res , resp , err
384+ }
385+
386+ type CreateDatasetBindingOptions struct {
387+ DatasetName string `json:"DatasetName,omitempty" url:"-"`
388+ URI string `json:"URI,omitempty" url:"-"`
389+ OptHeaders * OptHeaders `header:"-,omitempty" url:"-" json:"-" xml:"-"`
390+ }
391+
392+ type Binding struct {
393+ CreateTime string `json:"CreateTime,omitempty" url:"-"`
394+ DatasetName string `json:"DatasetName,omitempty" url:"-"`
395+ Detail string `json:"Detail,omitempty" url:"-"`
396+ State string `json:"State,omitempty" url:"-"`
397+ URI string `json:"URI,omitempty" url:"-"`
398+ UpdateTime string `json:"UpdateTime,omitempty" url:"-"`
399+ }
400+ type CreateDatasetBindingResult struct {
401+ Response struct {
402+ Binding Binding `json:"Binding,omitempty"`
403+ RequestID string `json:"RequestId,omitempty"`
404+ } `json:"Response,omitempty"`
405+ }
406+
407+ func (s * CIService ) CreateDatasetBinding (ctx context.Context , opt * CreateDatasetBindingOptions ) (* CreateDatasetBindingResult , * Response , error ) {
408+ var res CreateDatasetBindingResult
409+ if opt == nil {
410+ return nil , nil , fmt .Errorf ("opt param nil" )
411+ }
412+ buf , resp , err := s .baseSend (ctx , opt , opt .OptHeaders , "/datasetbinding/create" , http .MethodPost )
413+ if buf .Len () > 0 {
414+ err = json .Unmarshal (buf .Bytes (), & res )
415+ }
416+ return & res , resp , err
417+ }
418+
419+ type DescribeDatasetBindingOptions struct {
420+ DatasetName string `json:"-" url:"datasetname,omitempty"`
421+ URI string `json:"-" url:"uri,omitempty"`
422+ OptHeaders * OptHeaders `header:"-,omitempty" url:"-" json:"-" xml:"-"`
423+ }
424+
425+ type DescribeDatasetBindingResult struct {
426+ Response struct {
427+ Binding Binding `json:"Binding,omitempty"`
428+ RequestID string `json:"RequestId,omitempty"`
429+ } `json:"Response,omitempty"`
430+ }
431+
432+ func (s * CIService ) DescribeDatasetBinding (ctx context.Context , opt * DescribeDatasetBindingOptions ) (* DescribeDatasetBindingResult , * Response , error ) {
433+ var res DescribeDatasetBindingResult
434+ if opt == nil {
435+ return nil , nil , fmt .Errorf ("opt param nil" )
436+ }
437+ buf , resp , err := s .baseSend (ctx , opt , opt .OptHeaders , "/datasetbinding" , http .MethodGet )
438+ if buf .Len () > 0 {
439+ err = json .Unmarshal (buf .Bytes (), & res )
440+ }
441+ return & res , resp , err
442+ }
443+
444+ type DescribeDatasetBindingsOptions struct {
445+ DatasetName string `json:"-" url:"datasetname,omitempty"`
446+ MaxResults int `json:"-" url:"maxresults,omitempty"`
447+ NextToken string `json:"-" url:"nexttoken,omitempty"`
448+ OptHeaders * OptHeaders `header:"-,omitempty" url:"-" json:"-" xml:"-"`
449+ }
450+
451+ type DescribeDatasetBindingsResult struct {
452+ Response struct {
453+ Bindings []* Binding `json:"Bindings,omitempty"`
454+ NextToken string `json:"NextToken,omitempty"`
455+ RequestID string `json:"RequestId,omitempty"`
456+ } `json:"Response,omitempty"`
457+ }
458+
459+ func (s * CIService ) DescribeDatasetBindings (ctx context.Context , opt * DescribeDatasetBindingsOptions ) (* DescribeDatasetBindingsResult , * Response , error ) {
460+ var res DescribeDatasetBindingsResult
461+ if opt == nil {
462+ return nil , nil , fmt .Errorf ("opt param nil" )
463+ }
464+ buf , resp , err := s .baseSend (ctx , opt , opt .OptHeaders , "/datasetbindings" , http .MethodGet )
465+ if buf .Len () > 0 {
466+ err = json .Unmarshal (buf .Bytes (), & res )
467+ }
468+ return & res , resp , err
469+ }
470+
471+ type DeleteDatasetBindingOptions struct {
472+ DatasetName string `json:"DatasetName,omitempty" url:"-"`
473+ URI string `json:"URI,omitempty" url:"-"`
474+ OptHeaders * OptHeaders `header:"-,omitempty" url:"-" json:"-" xml:"-"`
475+ }
476+
477+ type DeleteDatasetBindingResult struct {
478+ Response struct {
479+ RequestID string `json:"RequestId"`
480+ } `json:"Response"`
481+ }
482+
483+
484+ func (s * CIService ) DeleteDatasetBinding (ctx context.Context , opt * DeleteDatasetBindingOptions )(* DeleteDatasetBindingResult , * Response , error ) {
485+ var res DeleteDatasetBindingResult
486+ if opt == nil {
487+ return nil , nil , fmt .Errorf ("opt param nil" )
488+ }
489+ buf , resp , err := s .baseSend (ctx , opt , opt .OptHeaders , "/datasetbinding" , http .MethodDelete )
490+ if buf .Len () > 0 {
491+ err = json .Unmarshal (buf .Bytes (), & res )
492+ }
493+ return & res , resp , err
494+ }
0 commit comments