diff --git a/ChangeLog.txt b/ChangeLog.txt index 116ed3aa07..0d47e04608 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +2024-12-06 Version: v1.63.64 +- Generated 2017-03-21 for `vod`. +-Release GetJobDetail, ListJobInfo. +-Modify GetTranscodeTask. + 2024-12-03 Version: v1.63.63 - Generated 2022-01-17 for `Safe`. undefined diff --git a/services/vod/get_job_detail.go b/services/vod/get_job_detail.go new file mode 100644 index 0000000000..92b2b4ebf9 --- /dev/null +++ b/services/vod/get_job_detail.go @@ -0,0 +1,104 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// GetJobDetail invokes the vod.GetJobDetail API synchronously +func (client *Client) GetJobDetail(request *GetJobDetailRequest) (response *GetJobDetailResponse, err error) { + response = CreateGetJobDetailResponse() + err = client.DoAction(request, response) + return +} + +// GetJobDetailWithChan invokes the vod.GetJobDetail API asynchronously +func (client *Client) GetJobDetailWithChan(request *GetJobDetailRequest) (<-chan *GetJobDetailResponse, <-chan error) { + responseChan := make(chan *GetJobDetailResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetJobDetail(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetJobDetailWithCallback invokes the vod.GetJobDetail API asynchronously +func (client *Client) GetJobDetailWithCallback(request *GetJobDetailRequest, callback func(response *GetJobDetailResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetJobDetailResponse + var err error + defer close(result) + response, err = client.GetJobDetail(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetJobDetailRequest is the request struct for api GetJobDetail +type GetJobDetailRequest struct { + *requests.RpcRequest + JobType string `position:"Query" name:"JobType"` + JobId string `position:"Query" name:"JobId"` +} + +// GetJobDetailResponse is the response struct for api GetJobDetail +type GetJobDetailResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + JobType string `json:"JobType" xml:"JobType"` + TranscodeJobDetail TranscodeJobDetail `json:"TranscodeJobDetail" xml:"TranscodeJobDetail"` + SnapshotJobDetail SnapshotJobDetail `json:"SnapshotJobDetail" xml:"SnapshotJobDetail"` + AIJobDetail AIJobDetail `json:"AIJobDetail" xml:"AIJobDetail"` +} + +// CreateGetJobDetailRequest creates a request to invoke GetJobDetail API +func CreateGetJobDetailRequest() (request *GetJobDetailRequest) { + request = &GetJobDetailRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("vod", "2017-03-21", "GetJobDetail", "vod", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetJobDetailResponse creates a response to parse from GetJobDetail response +func CreateGetJobDetailResponse() (response *GetJobDetailResponse) { + response = &GetJobDetailResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vod/get_transcode_task.go b/services/vod/get_transcode_task.go index f51fa6290f..2544b7a5c5 100644 --- a/services/vod/get_transcode_task.go +++ b/services/vod/get_transcode_task.go @@ -72,13 +72,16 @@ func (client *Client) GetTranscodeTaskWithCallback(request *GetTranscodeTaskRequ type GetTranscodeTaskRequest struct { *requests.RpcRequest TranscodeTaskId string `position:"Query" name:"TranscodeTaskId"` + JobIds string `position:"Query" name:"JobIds"` } // GetTranscodeTaskResponse is the response struct for api GetTranscodeTask type GetTranscodeTaskResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - TranscodeTask TranscodeTask `json:"TranscodeTask" xml:"TranscodeTask"` + RequestId string `json:"RequestId" xml:"RequestId"` + NonExistJobIds []string `json:"NonExistJobIds" xml:"NonExistJobIds"` + TranscodeTask TranscodeTask `json:"TranscodeTask" xml:"TranscodeTask"` + TranscodeJobInfoList []TranscodeJobInfo `json:"TranscodeJobInfoList" xml:"TranscodeJobInfoList"` } // CreateGetTranscodeTaskRequest creates a request to invoke GetTranscodeTask API diff --git a/services/vod/list_job_info.go b/services/vod/list_job_info.go new file mode 100644 index 0000000000..fc5430ef20 --- /dev/null +++ b/services/vod/list_job_info.go @@ -0,0 +1,103 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListJobInfo invokes the vod.ListJobInfo API synchronously +func (client *Client) ListJobInfo(request *ListJobInfoRequest) (response *ListJobInfoResponse, err error) { + response = CreateListJobInfoResponse() + err = client.DoAction(request, response) + return +} + +// ListJobInfoWithChan invokes the vod.ListJobInfo API asynchronously +func (client *Client) ListJobInfoWithChan(request *ListJobInfoRequest) (<-chan *ListJobInfoResponse, <-chan error) { + responseChan := make(chan *ListJobInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListJobInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListJobInfoWithCallback invokes the vod.ListJobInfo API asynchronously +func (client *Client) ListJobInfoWithCallback(request *ListJobInfoRequest, callback func(response *ListJobInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListJobInfoResponse + var err error + defer close(result) + response, err = client.ListJobInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListJobInfoRequest is the request struct for api ListJobInfo +type ListJobInfoRequest struct { + *requests.RpcRequest + MediaId string `position:"Query" name:"MediaId"` + JobType string `position:"Query" name:"JobType"` +} + +// ListJobInfoResponse is the response struct for api ListJobInfo +type ListJobInfoResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + MediaId string `json:"MediaId" xml:"MediaId"` + JobType string `json:"JobType" xml:"JobType"` + JobInfoList []JobInfoDO `json:"JobInfoList" xml:"JobInfoList"` +} + +// CreateListJobInfoRequest creates a request to invoke ListJobInfo API +func CreateListJobInfoRequest() (request *ListJobInfoRequest) { + request = &ListJobInfoRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("vod", "2017-03-21", "ListJobInfo", "vod", "openAPI") + request.Method = requests.POST + return +} + +// CreateListJobInfoResponse creates a response to parse from ListJobInfo response +func CreateListJobInfoResponse() (response *ListJobInfoResponse) { + response = &ListJobInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vod/struct_ai_job_detail.go b/services/vod/struct_ai_job_detail.go new file mode 100644 index 0000000000..85a0dd81c4 --- /dev/null +++ b/services/vod/struct_ai_job_detail.go @@ -0,0 +1,29 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AIJobDetail is a nested struct in vod response +type AIJobDetail struct { + JobId string `json:"JobId" xml:"JobId"` + UserId int64 `json:"UserId" xml:"UserId"` + MediaId string `json:"MediaId" xml:"MediaId"` + JobType string `json:"JobType" xml:"JobType"` + Status string `json:"Status" xml:"Status"` + Trigger string `json:"Trigger" xml:"Trigger"` + TemplateConfig string `json:"TemplateConfig" xml:"TemplateConfig"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + CompleteTime string `json:"CompleteTime" xml:"CompleteTime"` +} diff --git a/services/vod/struct_job_info_do.go b/services/vod/struct_job_info_do.go new file mode 100644 index 0000000000..0210af068a --- /dev/null +++ b/services/vod/struct_job_info_do.go @@ -0,0 +1,25 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// JobInfoDO is a nested struct in vod response +type JobInfoDO struct { + JobId string `json:"JobId" xml:"JobId"` + Status string `json:"Status" xml:"Status"` + UserId int64 `json:"UserId" xml:"UserId"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + CompleteTime string `json:"CompleteTime" xml:"CompleteTime"` +} diff --git a/services/vod/struct_job_info_list.go b/services/vod/struct_job_info_list.go new file mode 100644 index 0000000000..f29c45f870 --- /dev/null +++ b/services/vod/struct_job_info_list.go @@ -0,0 +1,21 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// JobInfoList is a nested struct in vod response +type JobInfoList struct { + JobInfoDO []JobInfoDO `json:"JobInfoDO" xml:"JobInfoDO"` +} diff --git a/services/vod/struct_non_exist_job_ids.go b/services/vod/struct_non_exist_job_ids.go new file mode 100644 index 0000000000..02f701709f --- /dev/null +++ b/services/vod/struct_non_exist_job_ids.go @@ -0,0 +1,21 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// NonExistJobIds is a nested struct in vod response +type NonExistJobIds struct { + JobId []string `json:"JobId" xml:"JobId"` +} diff --git a/services/vod/struct_output_file.go b/services/vod/struct_output_file.go index a4dc0f1e9e..512e37b488 100644 --- a/services/vod/struct_output_file.go +++ b/services/vod/struct_output_file.go @@ -17,17 +17,17 @@ package vod // OutputFile is a nested struct in vod response type OutputFile struct { - VideoStreamList string `json:"VideoStreamList" xml:"VideoStreamList"` - OutputFileUrl string `json:"OutputFileUrl" xml:"OutputFileUrl"` - Encryption string `json:"Encryption" xml:"Encryption"` Height string `json:"Height" xml:"Height"` - SubtitleStreamList string `json:"SubtitleStreamList" xml:"SubtitleStreamList"` + Format string `json:"Format" xml:"Format"` + Fps string `json:"Fps" xml:"Fps"` Bitrate string `json:"Bitrate" xml:"Bitrate"` - AudioStreamList string `json:"AudioStreamList" xml:"AudioStreamList"` + SubtitleStreamList string `json:"SubtitleStreamList" xml:"SubtitleStreamList"` + Filesize int64 `json:"Filesize" xml:"Filesize"` + Encryption string `json:"Encryption" xml:"Encryption"` + OutputFileUrl string `json:"OutputFileUrl" xml:"OutputFileUrl"` Width string `json:"Width" xml:"Width"` - Fps string `json:"Fps" xml:"Fps"` + AudioStreamList string `json:"AudioStreamList" xml:"AudioStreamList"` Duration string `json:"Duration" xml:"Duration"` - Format string `json:"Format" xml:"Format"` - Filesize int64 `json:"Filesize" xml:"Filesize"` + VideoStreamList string `json:"VideoStreamList" xml:"VideoStreamList"` WatermarkIdList []string `json:"WatermarkIdList" xml:"WatermarkIdList"` } diff --git a/services/vod/struct_snapshot_job_detail.go b/services/vod/struct_snapshot_job_detail.go new file mode 100644 index 0000000000..d21cce5104 --- /dev/null +++ b/services/vod/struct_snapshot_job_detail.go @@ -0,0 +1,29 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SnapshotJobDetail is a nested struct in vod response +type SnapshotJobDetail struct { + JobId string `json:"JobId" xml:"JobId"` + UserId int64 `json:"UserId" xml:"UserId"` + VideoId string `json:"VideoId" xml:"VideoId"` + Status string `json:"Status" xml:"Status"` + Trigger string `json:"Trigger" xml:"Trigger"` + NormalConfig string `json:"NormalConfig" xml:"NormalConfig"` + SpriteConfig string `json:"SpriteConfig" xml:"SpriteConfig"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + CompleteTime string `json:"CompleteTime" xml:"CompleteTime"` +} diff --git a/services/vod/struct_transcode_job_detail.go b/services/vod/struct_transcode_job_detail.go new file mode 100644 index 0000000000..754d0bc622 --- /dev/null +++ b/services/vod/struct_transcode_job_detail.go @@ -0,0 +1,28 @@ +package vod + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TranscodeJobDetail is a nested struct in vod response +type TranscodeJobDetail struct { + JobId string `json:"JobId" xml:"JobId"` + UserId int64 `json:"UserId" xml:"UserId"` + VideoId string `json:"VideoId" xml:"VideoId"` + Status string `json:"Status" xml:"Status"` + TemplateId string `json:"TemplateId" xml:"TemplateId"` + Definition string `json:"Definition" xml:"Definition"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + CompleteTime string `json:"CompleteTime" xml:"CompleteTime"` +} diff --git a/services/vod/struct_transcode_job_info.go b/services/vod/struct_transcode_job_info.go index be83ecd318..a23a5f1daf 100644 --- a/services/vod/struct_transcode_job_info.go +++ b/services/vod/struct_transcode_job_info.go @@ -17,16 +17,16 @@ package vod // TranscodeJobInfo is a nested struct in vod response type TranscodeJobInfo struct { - Definition string `json:"Definition" xml:"Definition"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - InputFileUrl string `json:"InputFileUrl" xml:"InputFileUrl"` + TranscodeJobStatus string `json:"TranscodeJobStatus" xml:"TranscodeJobStatus"` ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` - ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + TranscodeJobId string `json:"TranscodeJobId" xml:"TranscodeJobId"` + InputFileUrl string `json:"InputFileUrl" xml:"InputFileUrl"` + TranscodeTemplateId string `json:"TranscodeTemplateId" xml:"TranscodeTemplateId"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` CompleteTime string `json:"CompleteTime" xml:"CompleteTime"` - TranscodeProgress int64 `json:"TranscodeProgress" xml:"TranscodeProgress"` Priority string `json:"Priority" xml:"Priority"` - TranscodeJobStatus string `json:"TranscodeJobStatus" xml:"TranscodeJobStatus"` - TranscodeTemplateId string `json:"TranscodeTemplateId" xml:"TranscodeTemplateId"` - TranscodeJobId string `json:"TranscodeJobId" xml:"TranscodeJobId"` + TranscodeProgress int64 `json:"TranscodeProgress" xml:"TranscodeProgress"` + Definition string `json:"Definition" xml:"Definition"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` OutputFile OutputFile `json:"OutputFile" xml:"OutputFile"` } diff --git a/services/vod/struct_transcode_job_info_list.go b/services/vod/struct_transcode_job_info_list_in_get_transcode_task.go similarity index 85% rename from services/vod/struct_transcode_job_info_list.go rename to services/vod/struct_transcode_job_info_list_in_get_transcode_task.go index 3ef54a8292..eb358fc7fd 100644 --- a/services/vod/struct_transcode_job_info_list.go +++ b/services/vod/struct_transcode_job_info_list_in_get_transcode_task.go @@ -15,7 +15,7 @@ package vod // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// TranscodeJobInfoList is a nested struct in vod response -type TranscodeJobInfoList struct { +// TranscodeJobInfoListInGetTranscodeTask is a nested struct in vod response +type TranscodeJobInfoListInGetTranscodeTask struct { TranscodeJobInfo []TranscodeJobInfo `json:"TranscodeJobInfo" xml:"TranscodeJobInfo"` }