github.com/Files-com/files-sdk-go/v3@v3.1.81/actionnotificationexportresult.go (about) 1 package files_sdk 2 3 import ( 4 "encoding/json" 5 6 lib "github.com/Files-com/files-sdk-go/v3/lib" 7 ) 8 9 type ActionNotificationExportResult struct { 10 Id int64 `json:"id,omitempty" path:"id,omitempty" url:"id,omitempty"` 11 CreatedAt int64 `json:"created_at,omitempty" path:"created_at,omitempty" url:"created_at,omitempty"` 12 Status int64 `json:"status,omitempty" path:"status,omitempty" url:"status,omitempty"` 13 Message string `json:"message,omitempty" path:"message,omitempty" url:"message,omitempty"` 14 Success *bool `json:"success,omitempty" path:"success,omitempty" url:"success,omitempty"` 15 RequestHeaders string `json:"request_headers,omitempty" path:"request_headers,omitempty" url:"request_headers,omitempty"` 16 RequestMethod string `json:"request_method,omitempty" path:"request_method,omitempty" url:"request_method,omitempty"` 17 RequestUrl string `json:"request_url,omitempty" path:"request_url,omitempty" url:"request_url,omitempty"` 18 Path string `json:"path,omitempty" path:"path,omitempty" url:"path,omitempty"` 19 Folder string `json:"folder,omitempty" path:"folder,omitempty" url:"folder,omitempty"` 20 } 21 22 func (a ActionNotificationExportResult) Identifier() interface{} { 23 return a.Id 24 } 25 26 type ActionNotificationExportResultCollection []ActionNotificationExportResult 27 28 type ActionNotificationExportResultListParams struct { 29 UserId int64 `url:"user_id,omitempty" required:"false" json:"user_id,omitempty" path:"user_id"` 30 ActionNotificationExportId int64 `url:"action_notification_export_id,omitempty" required:"true" json:"action_notification_export_id,omitempty" path:"action_notification_export_id"` 31 ListParams 32 } 33 34 func (a *ActionNotificationExportResult) UnmarshalJSON(data []byte) error { 35 type actionNotificationExportResult ActionNotificationExportResult 36 var v actionNotificationExportResult 37 if err := json.Unmarshal(data, &v); err != nil { 38 return lib.ErrorWithOriginalResponse{}.ProcessError(data, err, map[string]interface{}{}) 39 } 40 41 *a = ActionNotificationExportResult(v) 42 return nil 43 } 44 45 func (a *ActionNotificationExportResultCollection) UnmarshalJSON(data []byte) error { 46 type actionNotificationExportResults ActionNotificationExportResultCollection 47 var v actionNotificationExportResults 48 if err := json.Unmarshal(data, &v); err != nil { 49 return lib.ErrorWithOriginalResponse{}.ProcessError(data, err, []map[string]interface{}{}) 50 } 51 52 *a = ActionNotificationExportResultCollection(v) 53 return nil 54 } 55 56 func (a *ActionNotificationExportResultCollection) ToSlice() *[]interface{} { 57 ret := make([]interface{}, len(*a)) 58 for i, v := range *a { 59 ret[i] = v 60 } 61 62 return &ret 63 }