@huaweicloud/huaweicloud-sdk-image 3.0.49-rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +1 -0
  3. package/huaweicloud-sdk-image.d.ts +1 -0
  4. package/huaweicloud-sdk-image.js +17 -0
  5. package/package.json +19 -0
  6. package/v2/ImageClient.d.ts +137 -0
  7. package/v2/ImageClient.js +265 -0
  8. package/v2/ImageRegion.d.ts +10 -0
  9. package/v2/ImageRegion.js +35 -0
  10. package/v2/model/CelebrityRecognitionReq.d.ts +9 -0
  11. package/v2/model/CelebrityRecognitionReq.js +21 -0
  12. package/v2/model/CelebrityRecognitionResultBody.d.ts +11 -0
  13. package/v2/model/CelebrityRecognitionResultBody.js +31 -0
  14. package/v2/model/ImageMainObjectDetectionInstance.d.ts +9 -0
  15. package/v2/model/ImageMainObjectDetectionInstance.js +21 -0
  16. package/v2/model/ImageMainObjectDetectionReq.d.ts +9 -0
  17. package/v2/model/ImageMainObjectDetectionReq.js +21 -0
  18. package/v2/model/ImageMediaTaggingItemBody.d.ts +22 -0
  19. package/v2/model/ImageMediaTaggingItemBody.js +53 -0
  20. package/v2/model/ImageMediaTaggingItemBodyI18nTag.d.ts +7 -0
  21. package/v2/model/ImageMediaTaggingItemBodyI18nTag.js +17 -0
  22. package/v2/model/ImageMediaTaggingItemBodyI18nType.d.ts +7 -0
  23. package/v2/model/ImageMediaTaggingItemBodyI18nType.js +17 -0
  24. package/v2/model/ImageMediaTaggingReq.d.ts +17 -0
  25. package/v2/model/ImageMediaTaggingReq.js +43 -0
  26. package/v2/model/ImageMediaTaggingResponseResult.d.ts +6 -0
  27. package/v2/model/ImageMediaTaggingResponseResult.js +13 -0
  28. package/v2/model/ImageTaggingInstance.d.ts +9 -0
  29. package/v2/model/ImageTaggingInstance.js +27 -0
  30. package/v2/model/ImageTaggingItemBody.d.ts +22 -0
  31. package/v2/model/ImageTaggingItemBody.js +53 -0
  32. package/v2/model/ImageTaggingItemBodyI18nTag.d.ts +7 -0
  33. package/v2/model/ImageTaggingItemBodyI18nTag.js +17 -0
  34. package/v2/model/ImageTaggingItemBodyI18nType.d.ts +7 -0
  35. package/v2/model/ImageTaggingItemBodyI18nType.js +17 -0
  36. package/v2/model/ImageTaggingReq.d.ts +13 -0
  37. package/v2/model/ImageTaggingReq.js +29 -0
  38. package/v2/model/ImageTaggingResponseResult.d.ts +6 -0
  39. package/v2/model/ImageTaggingResponseResult.js +13 -0
  40. package/v2/model/RunCelebrityRecognitionRequest.d.ts +6 -0
  41. package/v2/model/RunCelebrityRecognitionRequest.js +13 -0
  42. package/v2/model/RunCelebrityRecognitionResponse.d.ts +7 -0
  43. package/v2/model/RunCelebrityRecognitionResponse.js +31 -0
  44. package/v2/model/RunImageMainObjectDetectionRequest.d.ts +6 -0
  45. package/v2/model/RunImageMainObjectDetectionRequest.js +13 -0
  46. package/v2/model/RunImageMainObjectDetectionResponse.d.ts +7 -0
  47. package/v2/model/RunImageMainObjectDetectionResponse.js +31 -0
  48. package/v2/model/RunImageMediaTaggingRequest.d.ts +6 -0
  49. package/v2/model/RunImageMediaTaggingRequest.js +13 -0
  50. package/v2/model/RunImageMediaTaggingResponse.d.ts +7 -0
  51. package/v2/model/RunImageMediaTaggingResponse.js +31 -0
  52. package/v2/model/RunImageTaggingRequest.d.ts +6 -0
  53. package/v2/model/RunImageTaggingRequest.js +13 -0
  54. package/v2/model/RunImageTaggingResponse.d.ts +7 -0
  55. package/v2/model/RunImageTaggingResponse.js +31 -0
  56. package/v2/public-api.d.ts +25 -0
  57. package/v2/public-api.js +41 -0
package/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright (c) Huawei Technologies Co., Ltd. 2020-present. All rights reserved.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ See detailed information in [huaweicloud-sdk-nodejs-v3](https://github.com/huaweicloud/huaweicloud-sdk-nodejs-v3).
@@ -0,0 +1 @@
1
+ export * from './v2/public-api';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./v2/public-api"), exports);
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@huaweicloud/huaweicloud-sdk-image",
3
+ "version": "3.0.49-rc",
4
+ "description": "Huaweicloud SDK for image",
5
+ "main": "huaweicloud-sdk-image.js",
6
+ "typings": "huaweicloud-sdk-image.d.ts",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/huaweicloud/huaweicloud-sdk-nodejs-v3"
13
+ },
14
+ "author": "HuaweiCloud_SDK",
15
+ "license": "Apache-2.0",
16
+ "dependencies": {
17
+ "@huaweicloud/huaweicloud-sdk-core": "^3.0.49-rc"
18
+ }
19
+ }
@@ -0,0 +1,137 @@
1
+ import { HcClient } from "@huaweicloud/huaweicloud-sdk-core/HcClient";
2
+ import { ClientBuilder } from "@huaweicloud/huaweicloud-sdk-core/ClientBuilder";
3
+ import { RunCelebrityRecognitionRequest } from './model/RunCelebrityRecognitionRequest';
4
+ import { RunCelebrityRecognitionResponse } from './model/RunCelebrityRecognitionResponse';
5
+ import { RunImageMainObjectDetectionRequest } from './model/RunImageMainObjectDetectionRequest';
6
+ import { RunImageMainObjectDetectionResponse } from './model/RunImageMainObjectDetectionResponse';
7
+ import { RunImageMediaTaggingRequest } from './model/RunImageMediaTaggingRequest';
8
+ import { RunImageMediaTaggingResponse } from './model/RunImageMediaTaggingResponse';
9
+ import { RunImageTaggingRequest } from './model/RunImageTaggingRequest';
10
+ import { RunImageTaggingResponse } from './model/RunImageTaggingResponse';
11
+ export declare class ImageClient {
12
+ static newBuilder(): ClientBuilder<ImageClient>;
13
+ private hcClient;
14
+ constructor(client: HcClient);
15
+ getPath(): any;
16
+ /**
17
+ * 分析并识别图片中包含的政治人物、明星及网红人物,返回人物信息及人脸坐标。
18
+ *
19
+ * 详细说明请参考华为云API Explorer。
20
+ * Please refer to Huawei cloud API Explorer for details.
21
+ *
22
+ * @summary 名人识别
23
+ * @param {CelebrityRecognitionReq} runCelebrityRecognitionRequestBody 名人识别接口请求体
24
+ * @param {*} [options] Override http request option.
25
+ * @throws {RequiredError}
26
+ */
27
+ runCelebrityRecognition(runCelebrityRecognitionRequest?: RunCelebrityRecognitionRequest): Promise<RunCelebrityRecognitionResponse>;
28
+ /**
29
+ * 检测图像中的主要内容,返回主要内容的坐标信息,这里的主要内容包括两方面:bounding_box和main_object_box
30
+ *
31
+ * 详细说明请参考华为云API Explorer。
32
+ * Please refer to Huawei cloud API Explorer for details.
33
+ *
34
+ * @summary 图像主体识别
35
+ * @param {ImageMainObjectDetectionReq} runImageMainObjectDetectionRequestBody 图像主体识别接口请求体
36
+ * @param {*} [options] Override http request option.
37
+ * @throws {RequiredError}
38
+ */
39
+ runImageMainObjectDetection(runImageMainObjectDetectionRequest?: RunImageMainObjectDetectionRequest): Promise<RunImageMainObjectDetectionResponse>;
40
+ /**
41
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
42
+ *
43
+ * 详细说明请参考华为云API Explorer。
44
+ * Please refer to Huawei cloud API Explorer for details.
45
+ *
46
+ * @summary 媒资图像标签
47
+ * @param {ImageMediaTaggingReq} runImageMediaTaggingRequestBody 媒资图像标签接口请求体
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ runImageMediaTagging(runImageMediaTaggingRequest?: RunImageMediaTaggingRequest): Promise<RunImageMediaTaggingResponse>;
52
+ /**
53
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
54
+ *
55
+ * 详细说明请参考华为云API Explorer。
56
+ * Please refer to Huawei cloud API Explorer for details.
57
+ *
58
+ * @summary 图像标签
59
+ * @param {ImageTaggingReq} runImageTaggingRequestBody 图像标签接口请求体
60
+ * @param {*} [options] Override http request option.
61
+ * @throws {RequiredError}
62
+ */
63
+ runImageTagging(runImageTaggingRequest?: RunImageTaggingRequest): Promise<RunImageTaggingResponse>;
64
+ }
65
+ export declare const ParamCreater: () => {
66
+ /**
67
+ * 分析并识别图片中包含的政治人物、明星及网红人物,返回人物信息及人脸坐标。
68
+ *
69
+ * 详细说明请参考华为云API Explorer。
70
+ * Please refer to Huawei cloud API Explorer for details.
71
+ */
72
+ runCelebrityRecognition(runCelebrityRecognitionRequest?: RunCelebrityRecognitionRequest): {
73
+ method: string;
74
+ url: string;
75
+ contentType: string;
76
+ queryParams: {};
77
+ pathParams: {};
78
+ headers: {};
79
+ data: {};
80
+ };
81
+ /**
82
+ * 检测图像中的主要内容,返回主要内容的坐标信息,这里的主要内容包括两方面:bounding_box和main_object_box
83
+ *
84
+ * 详细说明请参考华为云API Explorer。
85
+ * Please refer to Huawei cloud API Explorer for details.
86
+ */
87
+ runImageMainObjectDetection(runImageMainObjectDetectionRequest?: RunImageMainObjectDetectionRequest): {
88
+ method: string;
89
+ url: string;
90
+ contentType: string;
91
+ queryParams: {};
92
+ pathParams: {};
93
+ headers: {};
94
+ data: {};
95
+ };
96
+ /**
97
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
98
+ *
99
+ * 详细说明请参考华为云API Explorer。
100
+ * Please refer to Huawei cloud API Explorer for details.
101
+ */
102
+ runImageMediaTagging(runImageMediaTaggingRequest?: RunImageMediaTaggingRequest): {
103
+ method: string;
104
+ url: string;
105
+ contentType: string;
106
+ queryParams: {};
107
+ pathParams: {};
108
+ headers: {};
109
+ data: {};
110
+ };
111
+ /**
112
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
113
+ *
114
+ * 详细说明请参考华为云API Explorer。
115
+ * Please refer to Huawei cloud API Explorer for details.
116
+ */
117
+ runImageTagging(runImageTaggingRequest?: RunImageTaggingRequest): {
118
+ method: string;
119
+ url: string;
120
+ contentType: string;
121
+ queryParams: {};
122
+ pathParams: {};
123
+ headers: {};
124
+ data: {};
125
+ };
126
+ };
127
+ /**
128
+ *
129
+ * @export
130
+ * @class RequiredError
131
+ * @extends {Error}
132
+ */
133
+ export declare class RequiredError extends Error {
134
+ field: string;
135
+ name: "RequiredError";
136
+ constructor(field: string, msg?: string);
137
+ }
@@ -0,0 +1,265 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RequiredError = exports.ParamCreater = exports.ImageClient = void 0;
19
+ var ClientBuilder_1 = require("@huaweicloud/huaweicloud-sdk-core/ClientBuilder");
20
+ var RunCelebrityRecognitionRequest_1 = require("./model/RunCelebrityRecognitionRequest");
21
+ var RunImageMainObjectDetectionRequest_1 = require("./model/RunImageMainObjectDetectionRequest");
22
+ var RunImageMediaTaggingRequest_1 = require("./model/RunImageMediaTaggingRequest");
23
+ var RunImageTaggingRequest_1 = require("./model/RunImageTaggingRequest");
24
+ var ImageClient = /** @class */ (function () {
25
+ function ImageClient(client) {
26
+ this.hcClient = client;
27
+ }
28
+ ImageClient.newBuilder = function () {
29
+ return new ClientBuilder_1.ClientBuilder(newClient);
30
+ };
31
+ ImageClient.prototype.getPath = function () {
32
+ return __dirname;
33
+ };
34
+ /**
35
+ * 分析并识别图片中包含的政治人物、明星及网红人物,返回人物信息及人脸坐标。
36
+ *
37
+ * 详细说明请参考华为云API Explorer。
38
+ * Please refer to Huawei cloud API Explorer for details.
39
+ *
40
+ * @summary 名人识别
41
+ * @param {CelebrityRecognitionReq} runCelebrityRecognitionRequestBody 名人识别接口请求体
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ ImageClient.prototype.runCelebrityRecognition = function (runCelebrityRecognitionRequest) {
46
+ var options = (0, exports.ParamCreater)().runCelebrityRecognition(runCelebrityRecognitionRequest);
47
+ options['responseHeaders'] = [''];
48
+ // @ts-ignore
49
+ return this.hcClient.sendRequest(options);
50
+ };
51
+ /**
52
+ * 检测图像中的主要内容,返回主要内容的坐标信息,这里的主要内容包括两方面:bounding_box和main_object_box
53
+ *
54
+ * 详细说明请参考华为云API Explorer。
55
+ * Please refer to Huawei cloud API Explorer for details.
56
+ *
57
+ * @summary 图像主体识别
58
+ * @param {ImageMainObjectDetectionReq} runImageMainObjectDetectionRequestBody 图像主体识别接口请求体
59
+ * @param {*} [options] Override http request option.
60
+ * @throws {RequiredError}
61
+ */
62
+ ImageClient.prototype.runImageMainObjectDetection = function (runImageMainObjectDetectionRequest) {
63
+ var options = (0, exports.ParamCreater)().runImageMainObjectDetection(runImageMainObjectDetectionRequest);
64
+ options['responseHeaders'] = [''];
65
+ // @ts-ignore
66
+ return this.hcClient.sendRequest(options);
67
+ };
68
+ /**
69
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
70
+ *
71
+ * 详细说明请参考华为云API Explorer。
72
+ * Please refer to Huawei cloud API Explorer for details.
73
+ *
74
+ * @summary 媒资图像标签
75
+ * @param {ImageMediaTaggingReq} runImageMediaTaggingRequestBody 媒资图像标签接口请求体
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
78
+ */
79
+ ImageClient.prototype.runImageMediaTagging = function (runImageMediaTaggingRequest) {
80
+ var options = (0, exports.ParamCreater)().runImageMediaTagging(runImageMediaTaggingRequest);
81
+ options['responseHeaders'] = [''];
82
+ // @ts-ignore
83
+ return this.hcClient.sendRequest(options);
84
+ };
85
+ /**
86
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
87
+ *
88
+ * 详细说明请参考华为云API Explorer。
89
+ * Please refer to Huawei cloud API Explorer for details.
90
+ *
91
+ * @summary 图像标签
92
+ * @param {ImageTaggingReq} runImageTaggingRequestBody 图像标签接口请求体
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ ImageClient.prototype.runImageTagging = function (runImageTaggingRequest) {
97
+ var options = (0, exports.ParamCreater)().runImageTagging(runImageTaggingRequest);
98
+ options['responseHeaders'] = [''];
99
+ // @ts-ignore
100
+ return this.hcClient.sendRequest(options);
101
+ };
102
+ return ImageClient;
103
+ }());
104
+ exports.ImageClient = ImageClient;
105
+ var ParamCreater = function () {
106
+ return {
107
+ /**
108
+ * 分析并识别图片中包含的政治人物、明星及网红人物,返回人物信息及人脸坐标。
109
+ *
110
+ * 详细说明请参考华为云API Explorer。
111
+ * Please refer to Huawei cloud API Explorer for details.
112
+ */
113
+ runCelebrityRecognition: function (runCelebrityRecognitionRequest) {
114
+ var options = {
115
+ method: "POST",
116
+ url: "/v2/{project_id}/image/celebrity-recognition",
117
+ contentType: "application/json;charset=UTF-8",
118
+ queryParams: {},
119
+ pathParams: {},
120
+ headers: {},
121
+ data: {}
122
+ };
123
+ var localVarHeaderParameter = {};
124
+ var body;
125
+ if (runCelebrityRecognitionRequest !== null && runCelebrityRecognitionRequest !== undefined) {
126
+ if (runCelebrityRecognitionRequest instanceof RunCelebrityRecognitionRequest_1.RunCelebrityRecognitionRequest) {
127
+ body = runCelebrityRecognitionRequest.body;
128
+ }
129
+ else {
130
+ body = runCelebrityRecognitionRequest['body'];
131
+ }
132
+ }
133
+ if (body === null || body === undefined) {
134
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
135
+ }
136
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
137
+ options.data = body !== undefined ? body : {};
138
+ options.headers = localVarHeaderParameter;
139
+ return options;
140
+ },
141
+ /**
142
+ * 检测图像中的主要内容,返回主要内容的坐标信息,这里的主要内容包括两方面:bounding_box和main_object_box
143
+ *
144
+ * 详细说明请参考华为云API Explorer。
145
+ * Please refer to Huawei cloud API Explorer for details.
146
+ */
147
+ runImageMainObjectDetection: function (runImageMainObjectDetectionRequest) {
148
+ var options = {
149
+ method: "POST",
150
+ url: "/v3/{project_id}/image/main-object-detection",
151
+ contentType: "application/json;charset=UTF-8",
152
+ queryParams: {},
153
+ pathParams: {},
154
+ headers: {},
155
+ data: {}
156
+ };
157
+ var localVarHeaderParameter = {};
158
+ var body;
159
+ if (runImageMainObjectDetectionRequest !== null && runImageMainObjectDetectionRequest !== undefined) {
160
+ if (runImageMainObjectDetectionRequest instanceof RunImageMainObjectDetectionRequest_1.RunImageMainObjectDetectionRequest) {
161
+ body = runImageMainObjectDetectionRequest.body;
162
+ }
163
+ else {
164
+ body = runImageMainObjectDetectionRequest['body'];
165
+ }
166
+ }
167
+ if (body === null || body === undefined) {
168
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
169
+ }
170
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
171
+ options.data = body !== undefined ? body : {};
172
+ options.headers = localVarHeaderParameter;
173
+ return options;
174
+ },
175
+ /**
176
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
177
+ *
178
+ * 详细说明请参考华为云API Explorer。
179
+ * Please refer to Huawei cloud API Explorer for details.
180
+ */
181
+ runImageMediaTagging: function (runImageMediaTaggingRequest) {
182
+ var options = {
183
+ method: "POST",
184
+ url: "/v2/{project_id}/image/media-tagging",
185
+ contentType: "application/json;charset=UTF-8",
186
+ queryParams: {},
187
+ pathParams: {},
188
+ headers: {},
189
+ data: {}
190
+ };
191
+ var localVarHeaderParameter = {};
192
+ var body;
193
+ if (runImageMediaTaggingRequest !== null && runImageMediaTaggingRequest !== undefined) {
194
+ if (runImageMediaTaggingRequest instanceof RunImageMediaTaggingRequest_1.RunImageMediaTaggingRequest) {
195
+ body = runImageMediaTaggingRequest.body;
196
+ }
197
+ else {
198
+ body = runImageMediaTaggingRequest['body'];
199
+ }
200
+ }
201
+ if (body === null || body === undefined) {
202
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
203
+ }
204
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
205
+ options.data = body !== undefined ? body : {};
206
+ options.headers = localVarHeaderParameter;
207
+ return options;
208
+ },
209
+ /**
210
+ * 自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。
211
+ *
212
+ * 详细说明请参考华为云API Explorer。
213
+ * Please refer to Huawei cloud API Explorer for details.
214
+ */
215
+ runImageTagging: function (runImageTaggingRequest) {
216
+ var options = {
217
+ method: "POST",
218
+ url: "/v2/{project_id}/image/tagging",
219
+ contentType: "application/json;charset=UTF-8",
220
+ queryParams: {},
221
+ pathParams: {},
222
+ headers: {},
223
+ data: {}
224
+ };
225
+ var localVarHeaderParameter = {};
226
+ var body;
227
+ if (runImageTaggingRequest !== null && runImageTaggingRequest !== undefined) {
228
+ if (runImageTaggingRequest instanceof RunImageTaggingRequest_1.RunImageTaggingRequest) {
229
+ body = runImageTaggingRequest.body;
230
+ }
231
+ else {
232
+ body = runImageTaggingRequest['body'];
233
+ }
234
+ }
235
+ if (body === null || body === undefined) {
236
+ throw new RequiredError('body', 'Required parameter body was null or undefined when calling body.');
237
+ }
238
+ localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8';
239
+ options.data = body !== undefined ? body : {};
240
+ options.headers = localVarHeaderParameter;
241
+ return options;
242
+ },
243
+ };
244
+ };
245
+ exports.ParamCreater = ParamCreater;
246
+ function newClient(client) {
247
+ return new ImageClient(client);
248
+ }
249
+ /**
250
+ *
251
+ * @export
252
+ * @class RequiredError
253
+ * @extends {Error}
254
+ */
255
+ var RequiredError = /** @class */ (function (_super) {
256
+ __extends(RequiredError, _super);
257
+ function RequiredError(field, msg) {
258
+ var _this = _super.call(this, msg) || this;
259
+ _this.field = field;
260
+ _this.name = "RequiredError";
261
+ return _this;
262
+ }
263
+ return RequiredError;
264
+ }(Error));
265
+ exports.RequiredError = RequiredError;
@@ -0,0 +1,10 @@
1
+ export declare class ImageRegion {
2
+ static CN_NORTH_4: any;
3
+ static CN_NORTH_1: any;
4
+ static AP_SOUTHEAST_1: any;
5
+ static AP_SOUTHEAST_3: any;
6
+ static CN_EAST_3: any;
7
+ private static STATIC_FIELDS;
8
+ private static createStaticFields;
9
+ static valueOf(regionId: String): any;
10
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageRegion = void 0;
4
+ var region_1 = require("@huaweicloud/huaweicloud-sdk-core/region/region");
5
+ var ImageRegion = /** @class */ (function () {
6
+ function ImageRegion() {
7
+ }
8
+ ImageRegion.createStaticFields = function () {
9
+ var map = new Map();
10
+ map.set("cn-north-4", ImageRegion.CN_NORTH_4);
11
+ map.set("cn-north-1", ImageRegion.CN_NORTH_1);
12
+ map.set("ap-southeast-1", ImageRegion.AP_SOUTHEAST_1);
13
+ map.set("ap-southeast-3", ImageRegion.AP_SOUTHEAST_3);
14
+ map.set("cn-east-3", ImageRegion.CN_EAST_3);
15
+ return map;
16
+ };
17
+ ImageRegion.valueOf = function (regionId) {
18
+ if (!regionId) {
19
+ throw new Error("Unexpected empty parameter: regionId.");
20
+ }
21
+ var result = this.STATIC_FIELDS.get(regionId);
22
+ if (result) {
23
+ return result;
24
+ }
25
+ throw new Error("Unexpected regionId: ".concat(regionId, "."));
26
+ };
27
+ ImageRegion.CN_NORTH_4 = new region_1.Region("cn-north-4", "https://image.cn-north-4.myhuaweicloud.com");
28
+ ImageRegion.CN_NORTH_1 = new region_1.Region("cn-north-1", "https://image.cn-north-1.myhuaweicloud.com");
29
+ ImageRegion.AP_SOUTHEAST_1 = new region_1.Region("ap-southeast-1", "https://image.ap-southeast-1.myhuaweicloud.com");
30
+ ImageRegion.AP_SOUTHEAST_3 = new region_1.Region("ap-southeast-3", "https://image.ap-southeast-3.myhuaweicloud.com");
31
+ ImageRegion.CN_EAST_3 = new region_1.Region("cn-east-3", "https://image.cn-east-3.myhuaweicloud.com");
32
+ ImageRegion.STATIC_FIELDS = ImageRegion.createStaticFields();
33
+ return ImageRegion;
34
+ }());
35
+ exports.ImageRegion = ImageRegion;
@@ -0,0 +1,9 @@
1
+ export declare class CelebrityRecognitionReq {
2
+ image?: string;
3
+ url?: string;
4
+ threshold?: number;
5
+ constructor();
6
+ withImage(image: string): CelebrityRecognitionReq;
7
+ withUrl(url: string): CelebrityRecognitionReq;
8
+ withThreshold(threshold: number): CelebrityRecognitionReq;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CelebrityRecognitionReq = void 0;
4
+ var CelebrityRecognitionReq = /** @class */ (function () {
5
+ function CelebrityRecognitionReq() {
6
+ }
7
+ CelebrityRecognitionReq.prototype.withImage = function (image) {
8
+ this['image'] = image;
9
+ return this;
10
+ };
11
+ CelebrityRecognitionReq.prototype.withUrl = function (url) {
12
+ this['url'] = url;
13
+ return this;
14
+ };
15
+ CelebrityRecognitionReq.prototype.withThreshold = function (threshold) {
16
+ this['threshold'] = threshold;
17
+ return this;
18
+ };
19
+ return CelebrityRecognitionReq;
20
+ }());
21
+ exports.CelebrityRecognitionReq = CelebrityRecognitionReq;
@@ -0,0 +1,11 @@
1
+ export declare class CelebrityRecognitionResultBody {
2
+ confidence?: number;
3
+ private 'face_detail'?;
4
+ label?: string;
5
+ constructor();
6
+ withConfidence(confidence: number): CelebrityRecognitionResultBody;
7
+ withFaceDetail(faceDetail: object): CelebrityRecognitionResultBody;
8
+ set faceDetail(faceDetail: object | undefined);
9
+ get faceDetail(): object | undefined;
10
+ withLabel(label: string): CelebrityRecognitionResultBody;
11
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CelebrityRecognitionResultBody = void 0;
4
+ var CelebrityRecognitionResultBody = /** @class */ (function () {
5
+ function CelebrityRecognitionResultBody() {
6
+ }
7
+ CelebrityRecognitionResultBody.prototype.withConfidence = function (confidence) {
8
+ this['confidence'] = confidence;
9
+ return this;
10
+ };
11
+ CelebrityRecognitionResultBody.prototype.withFaceDetail = function (faceDetail) {
12
+ this['face_detail'] = faceDetail;
13
+ return this;
14
+ };
15
+ Object.defineProperty(CelebrityRecognitionResultBody.prototype, "faceDetail", {
16
+ get: function () {
17
+ return this['face_detail'];
18
+ },
19
+ set: function (faceDetail) {
20
+ this['face_detail'] = faceDetail;
21
+ },
22
+ enumerable: false,
23
+ configurable: true
24
+ });
25
+ CelebrityRecognitionResultBody.prototype.withLabel = function (label) {
26
+ this['label'] = label;
27
+ return this;
28
+ };
29
+ return CelebrityRecognitionResultBody;
30
+ }());
31
+ exports.CelebrityRecognitionResultBody = CelebrityRecognitionResultBody;
@@ -0,0 +1,9 @@
1
+ export declare class ImageMainObjectDetectionInstance {
2
+ label?: string;
3
+ location?: object;
4
+ confidence?: string;
5
+ constructor();
6
+ withLabel(label: string): ImageMainObjectDetectionInstance;
7
+ withLocation(location: object): ImageMainObjectDetectionInstance;
8
+ withConfidence(confidence: string): ImageMainObjectDetectionInstance;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageMainObjectDetectionInstance = void 0;
4
+ var ImageMainObjectDetectionInstance = /** @class */ (function () {
5
+ function ImageMainObjectDetectionInstance() {
6
+ }
7
+ ImageMainObjectDetectionInstance.prototype.withLabel = function (label) {
8
+ this['label'] = label;
9
+ return this;
10
+ };
11
+ ImageMainObjectDetectionInstance.prototype.withLocation = function (location) {
12
+ this['location'] = location;
13
+ return this;
14
+ };
15
+ ImageMainObjectDetectionInstance.prototype.withConfidence = function (confidence) {
16
+ this['confidence'] = confidence;
17
+ return this;
18
+ };
19
+ return ImageMainObjectDetectionInstance;
20
+ }());
21
+ exports.ImageMainObjectDetectionInstance = ImageMainObjectDetectionInstance;
@@ -0,0 +1,9 @@
1
+ export declare class ImageMainObjectDetectionReq {
2
+ image?: string;
3
+ url?: string;
4
+ threshold?: number;
5
+ constructor();
6
+ withImage(image: string): ImageMainObjectDetectionReq;
7
+ withUrl(url: string): ImageMainObjectDetectionReq;
8
+ withThreshold(threshold: number): ImageMainObjectDetectionReq;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageMainObjectDetectionReq = void 0;
4
+ var ImageMainObjectDetectionReq = /** @class */ (function () {
5
+ function ImageMainObjectDetectionReq() {
6
+ }
7
+ ImageMainObjectDetectionReq.prototype.withImage = function (image) {
8
+ this['image'] = image;
9
+ return this;
10
+ };
11
+ ImageMainObjectDetectionReq.prototype.withUrl = function (url) {
12
+ this['url'] = url;
13
+ return this;
14
+ };
15
+ ImageMainObjectDetectionReq.prototype.withThreshold = function (threshold) {
16
+ this['threshold'] = threshold;
17
+ return this;
18
+ };
19
+ return ImageMainObjectDetectionReq;
20
+ }());
21
+ exports.ImageMainObjectDetectionReq = ImageMainObjectDetectionReq;