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. + */ +package cn.ucloud.udi.client; + +import cn.ucloud.common.client.DefaultClient; +import cn.ucloud.common.config.Config; +import cn.ucloud.common.credential.Credential; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.udi.models.CreateFunctionTemplateRequest; +import cn.ucloud.udi.models.CreateFunctionTemplateResponse; +import cn.ucloud.udi.models.CreateMediaTaskRequest; +import cn.ucloud.udi.models.CreateMediaTaskResponse; +import cn.ucloud.udi.models.DeleteFunctionTemplateRequest; +import cn.ucloud.udi.models.DeleteFunctionTemplateResponse; +import cn.ucloud.udi.models.DescribeFunctionTemplateRequest; +import cn.ucloud.udi.models.DescribeFunctionTemplateResponse; +import cn.ucloud.udi.models.DescribeMediaFunctionsRequest; +import cn.ucloud.udi.models.DescribeMediaFunctionsResponse; +import cn.ucloud.udi.models.DescribeMediaTaskRequest; +import cn.ucloud.udi.models.DescribeMediaTaskResponse; + +/** This client is used to call actions of **UDI** service */ +public class UDIClient extends DefaultClient implements UDIClientInterface { + public UDIClient(Config config, Credential credential) { + super(config, credential); + } + + /** + * CreateFunctionTemplate - 创建功能模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateFunctionTemplateResponse createFunctionTemplate( + CreateFunctionTemplateRequest request) throws UCloudException { + request.setAction("CreateFunctionTemplate"); + return (CreateFunctionTemplateResponse) + this.invoke(request, CreateFunctionTemplateResponse.class); + } + + /** + * CreateMediaTask - 创建媒体任务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateMediaTaskResponse createMediaTask(CreateMediaTaskRequest request) + throws UCloudException { + request.setAction("CreateMediaTask"); + return (CreateMediaTaskResponse) this.invoke(request, CreateMediaTaskResponse.class); + } + + /** + * DeleteFunctionTemplate - 删除功能模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteFunctionTemplateResponse deleteFunctionTemplate( + DeleteFunctionTemplateRequest request) throws UCloudException { + request.setAction("DeleteFunctionTemplate"); + return (DeleteFunctionTemplateResponse) + this.invoke(request, DeleteFunctionTemplateResponse.class); + } + + /** + * DescribeFunctionTemplate - 获取功能模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeFunctionTemplateResponse describeFunctionTemplate( + DescribeFunctionTemplateRequest request) throws UCloudException { + request.setAction("DescribeFunctionTemplate"); + return (DescribeFunctionTemplateResponse) + this.invoke(request, DescribeFunctionTemplateResponse.class); + } + + /** + * DescribeMediaFunctions - 获取多媒体功能 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeMediaFunctionsResponse describeMediaFunctions( + DescribeMediaFunctionsRequest request) throws UCloudException { + request.setAction("DescribeMediaFunctions"); + return (DescribeMediaFunctionsResponse) + this.invoke(request, DescribeMediaFunctionsResponse.class); + } + + /** + * DescribeMediaTask - 描述媒体任务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeMediaTaskResponse describeMediaTask(DescribeMediaTaskRequest request) + throws UCloudException { + request.setAction("DescribeMediaTask"); + return (DescribeMediaTaskResponse) this.invoke(request, DescribeMediaTaskResponse.class); + } +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/client/UDIClientInterface.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/client/UDIClientInterface.java new file mode 100644 index 00000000..12d60974 --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/client/UDIClientInterface.java @@ -0,0 +1,87 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.client; + +import cn.ucloud.common.client.Client; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.udi.models.CreateFunctionTemplateRequest; +import cn.ucloud.udi.models.CreateFunctionTemplateResponse; +import cn.ucloud.udi.models.CreateMediaTaskRequest; +import cn.ucloud.udi.models.CreateMediaTaskResponse; +import cn.ucloud.udi.models.DeleteFunctionTemplateRequest; +import cn.ucloud.udi.models.DeleteFunctionTemplateResponse; +import cn.ucloud.udi.models.DescribeFunctionTemplateRequest; +import cn.ucloud.udi.models.DescribeFunctionTemplateResponse; +import cn.ucloud.udi.models.DescribeMediaFunctionsRequest; +import cn.ucloud.udi.models.DescribeMediaFunctionsResponse; +import cn.ucloud.udi.models.DescribeMediaTaskRequest; +import cn.ucloud.udi.models.DescribeMediaTaskResponse; + +/** This client is used to call actions of **UDI** service */ +public interface UDIClientInterface extends Client { + + /** + * CreateFunctionTemplate - 创建功能模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateFunctionTemplateResponse createFunctionTemplate( + CreateFunctionTemplateRequest request) throws UCloudException; + + /** + * CreateMediaTask - 创建媒体任务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateMediaTaskResponse createMediaTask(CreateMediaTaskRequest request) + throws UCloudException; + + /** + * DeleteFunctionTemplate - 删除功能模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteFunctionTemplateResponse deleteFunctionTemplate( + DeleteFunctionTemplateRequest request) throws UCloudException; + + /** + * DescribeFunctionTemplate - 获取功能模板 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeFunctionTemplateResponse describeFunctionTemplate( + DescribeFunctionTemplateRequest request) throws UCloudException; + + /** + * DescribeMediaFunctions - 获取多媒体功能 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeMediaFunctionsResponse describeMediaFunctions( + DescribeMediaFunctionsRequest request) throws UCloudException; + + /** + * DescribeMediaTask - 描述媒体任务 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeMediaTaskResponse describeMediaTask(DescribeMediaTaskRequest request) + throws UCloudException; +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateFunctionTemplateRequest.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateFunctionTemplateRequest.java new file mode 100644 index 00000000..0faf0f80 --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateFunctionTemplateRequest.java @@ -0,0 +1,284 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CreateFunctionTemplateRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Zone") + private String zone; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 项目名称 */ + @NotEmpty + @UCloudParam("ProjectName") + private String projectName; + + /** 模板名称 */ + @NotEmpty + @UCloudParam("TemplateName") + private String templateName; + + /** 功能名称 */ + @NotEmpty + @UCloudParam("Function") + private String function; + + /** 文件输出格式 */ + @NotEmpty + @UCloudParam("ContainerFormat") + private String containerFormat; + + /** 编码格式 */ + @NotEmpty + @UCloudParam("EncodeFormat") + private String encodeFormat; + + /** 视频比特率 */ + @UCloudParam("VideoBitRate") + private String videoBitRate; + + /** 自定义视频比特率 */ + @UCloudParam("VideoBitRateCustom") + private String videoBitRateCustom; + + /** 分辨率 */ + @UCloudParam("Resolution") + private String resolution; + + /** 分辨率宽 */ + @UCloudParam("ResolutionWidth") + private String resolutionWidth; + + /** 分辨率高 */ + @UCloudParam("ResolutionHeight") + private String resolutionHeight; + + /** 音频比特率 */ + @UCloudParam("AudioBitRate") + private String audioBitRate; + + /** 自定义音频比特率 */ + @UCloudParam("AudioBitRateCustom") + private String audioBitRateCustom; + + /** 音频采样率 */ + @UCloudParam("AudioSampleRate") + private String audioSampleRate; + + /** 音频声道 */ + @UCloudParam("AudioChannel") + private String audioChannel; + + /** CRF压缩率 */ + @UCloudParam("CRF") + private String crf; + + /** 自定义CRF压缩率 */ + @UCloudParam("CRFCustom") + private String crfCustom; + + /** 帧率 */ + @UCloudParam("FrameRate") + private String frameRate; + + /** 自定义帧率 */ + @UCloudParam("FrameRateCustom") + private String frameRateCustom; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getTemplateName() { + return templateName; + } + + public void setTemplateName(String templateName) { + this.templateName = templateName; + } + + public String getFunction() { + return function; + } + + public void setFunction(String function) { + this.function = function; + } + + public String getContainerFormat() { + return containerFormat; + } + + public void setContainerFormat(String containerFormat) { + this.containerFormat = containerFormat; + } + + public String getEncodeFormat() { + return encodeFormat; + } + + public void setEncodeFormat(String encodeFormat) { + this.encodeFormat = encodeFormat; + } + + public String getVideoBitRate() { + return videoBitRate; + } + + public void setVideoBitRate(String videoBitRate) { + this.videoBitRate = videoBitRate; + } + + public String getVideoBitRateCustom() { + return videoBitRateCustom; + } + + public void setVideoBitRateCustom(String videoBitRateCustom) { + this.videoBitRateCustom = videoBitRateCustom; + } + + public String getResolution() { + return resolution; + } + + public void setResolution(String resolution) { + this.resolution = resolution; + } + + public String getResolutionWidth() { + return resolutionWidth; + } + + public void setResolutionWidth(String resolutionWidth) { + this.resolutionWidth = resolutionWidth; + } + + public String getResolutionHeight() { + return resolutionHeight; + } + + public void setResolutionHeight(String resolutionHeight) { + this.resolutionHeight = resolutionHeight; + } + + public String getAudioBitRate() { + return audioBitRate; + } + + public void setAudioBitRate(String audioBitRate) { + this.audioBitRate = audioBitRate; + } + + public String getAudioBitRateCustom() { + return audioBitRateCustom; + } + + public void setAudioBitRateCustom(String audioBitRateCustom) { + this.audioBitRateCustom = audioBitRateCustom; + } + + public String getAudioSampleRate() { + return audioSampleRate; + } + + public void setAudioSampleRate(String audioSampleRate) { + this.audioSampleRate = audioSampleRate; + } + + public String getAudioChannel() { + return audioChannel; + } + + public void setAudioChannel(String audioChannel) { + this.audioChannel = audioChannel; + } + + public String getCRF() { + return crf; + } + + public void setCRF(String crf) { + this.crf = crf; + } + + public String getCRFCustom() { + return crfCustom; + } + + public void setCRFCustom(String crfCustom) { + this.crfCustom = crfCustom; + } + + public String getFrameRate() { + return frameRate; + } + + public void setFrameRate(String frameRate) { + this.frameRate = frameRate; + } + + public String getFrameRateCustom() { + return frameRateCustom; + } + + public void setFrameRateCustom(String frameRateCustom) { + this.frameRateCustom = frameRateCustom; + } +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateFunctionTemplateResponse.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateFunctionTemplateResponse.java new file mode 100644 index 00000000..9c5e2fbe --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateFunctionTemplateResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class CreateFunctionTemplateResponse extends Response { + + /** 创建的模板ID */ + @SerializedName("TemplateId") + private String templateId; + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateMediaTaskRequest.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateMediaTaskRequest.java new file mode 100644 index 00000000..3a563c10 --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateMediaTaskRequest.java @@ -0,0 +1,141 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CreateMediaTaskRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Zone") + private String zone; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 存储源 */ + @NotEmpty + @UCloudParam("StorageBackend") + private String storageBackend; + + /** Bucket名称 */ + @NotEmpty + @UCloudParam("Bucket") + private String bucket; + + /** 源文件 */ + @NotEmpty + @UCloudParam("SrcKey") + private String srcKey; + + /** 目标生成文件 */ + @NotEmpty + @UCloudParam("DstKey") + private String dstKey; + + /** 功能名称:例VideoTranscode */ + @NotEmpty + @UCloudParam("Function") + private String function; + + /** 功能的参数模板ID,需要事先创建模板才可用,也可以使用预设模板,详细可通过DescribeFunctionTemplate接口查询 */ + @NotEmpty + @UCloudParam("FunctionParamTemplateId") + private String functionParamTemplateId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getStorageBackend() { + return storageBackend; + } + + public void setStorageBackend(String storageBackend) { + this.storageBackend = storageBackend; + } + + public String getBucket() { + return bucket; + } + + public void setBucket(String bucket) { + this.bucket = bucket; + } + + public String getSrcKey() { + return srcKey; + } + + public void setSrcKey(String srcKey) { + this.srcKey = srcKey; + } + + public String getDstKey() { + return dstKey; + } + + public void setDstKey(String dstKey) { + this.dstKey = dstKey; + } + + public String getFunction() { + return function; + } + + public void setFunction(String function) { + this.function = function; + } + + public String getFunctionParamTemplateId() { + return functionParamTemplateId; + } + + public void setFunctionParamTemplateId(String functionParamTemplateId) { + this.functionParamTemplateId = functionParamTemplateId; + } +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateMediaTaskResponse.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateMediaTaskResponse.java new file mode 100644 index 00000000..bfb255e2 --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/CreateMediaTaskResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class CreateMediaTaskResponse extends Response { + + /** 任务ID */ + @SerializedName("TaskId") + private String taskId; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DeleteFunctionTemplateRequest.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DeleteFunctionTemplateRequest.java new file mode 100644 index 00000000..00d166b3 --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DeleteFunctionTemplateRequest.java @@ -0,0 +1,76 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DeleteFunctionTemplateRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Zone") + private String zone; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 要删除的模板ID */ + @NotEmpty + @UCloudParam("TemplateId") + private String templateId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DeleteFunctionTemplateResponse.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DeleteFunctionTemplateResponse.java new file mode 100644 index 00000000..64141602 --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DeleteFunctionTemplateResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.models; + + + +import cn.ucloud.common.response.Response; + +public class DeleteFunctionTemplateResponse extends Response {} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeFunctionTemplateRequest.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeFunctionTemplateRequest.java new file mode 100644 index 00000000..7ff99be2 --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeFunctionTemplateRequest.java @@ -0,0 +1,75 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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. + */ +package cn.ucloud.udi.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DescribeFunctionTemplateRequest extends Request { + + /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ + @NotEmpty + @UCloudParam("Zone") + private String zone; + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 功能模板类型:预设(preset)自定义(custom),为空则获取两种类型 */ + @UCloudParam("Type") + private String type; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +} diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeFunctionTemplateResponse.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeFunctionTemplateResponse.java new file mode 100644 index 00000000..102e28ec --- /dev/null +++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeFunctionTemplateResponse.java @@ -0,0 +1,74 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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.
+ */
+package cn.ucloud.udi.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class DescribeFunctionTemplateResponse extends Response {
+
+ /** 功能模板 */
+ @SerializedName("Templates")
+ private List 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.
+ */
+package cn.ucloud.udi.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class DescribeMediaFunctionsRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Zone")
+ private String zone;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 要查询的Function名称,为空则返回所有支持的Function */
+ @UCloudParam("Function")
+ private String function;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getZone() {
+ return zone;
+ }
+
+ public void setZone(String zone) {
+ this.zone = zone;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getFunction() {
+ return function;
+ }
+
+ public void setFunction(String function) {
+ this.function = function;
+ }
+}
diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeMediaFunctionsResponse.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeMediaFunctionsResponse.java
new file mode 100644
index 00000000..d1988ab3
--- /dev/null
+++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeMediaFunctionsResponse.java
@@ -0,0 +1,212 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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.
+ */
+package cn.ucloud.udi.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class DescribeMediaFunctionsResponse extends Response {
+
+ /** 功能列表 */
+ @SerializedName("Functions")
+ private List 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.
+ */
+package cn.ucloud.udi.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class DescribeMediaTaskRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Zone")
+ private String zone;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 要查询的任务ID,为空则查询所有 */
+ @UCloudParam("TaskId")
+ private String taskId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getZone() {
+ return zone;
+ }
+
+ public void setZone(String zone) {
+ this.zone = zone;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+}
diff --git a/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeMediaTaskResponse.java b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeMediaTaskResponse.java
new file mode 100644
index 00000000..3f6c3017
--- /dev/null
+++ b/ucloud-sdk-java-udi/src/main/java/cn/ucloud/udi/models/DescribeMediaTaskResponse.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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.
+ */
+package cn.ucloud.udi.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class DescribeMediaTaskResponse extends Response {
+
+ /** 任务 */
+ @SerializedName("Tasks")
+ private List