1// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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. 14 15package v20190411 16 17import ( 18 "encoding/json" 19 "errors" 20 21 tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" 22) 23 24type AuthTestTidRequest struct { 25 *tchttp.BaseRequest 26 27 // 设备端SDK填入测试TID参数后生成的加密数据串 28 Data *string `json:"Data,omitempty" name:"Data"` 29} 30 31func (r *AuthTestTidRequest) ToJsonString() string { 32 b, _ := json.Marshal(r) 33 return string(b) 34} 35 36// It is highly **NOT** recommended to use this function 37// because it has no param check, nor strict type check 38func (r *AuthTestTidRequest) FromJsonString(s string) error { 39 f := make(map[string]interface{}) 40 if err := json.Unmarshal([]byte(s), &f); err != nil { 41 return err 42 } 43 delete(f, "Data") 44 if len(f) > 0 { 45 return errors.New("AuthTestTidRequest has unknown keys!") 46 } 47 return json.Unmarshal([]byte(s), &r) 48} 49 50type AuthTestTidResponse struct { 51 *tchttp.BaseResponse 52 Response *struct { 53 54 // 认证结果 55 Pass *bool `json:"Pass,omitempty" name:"Pass"` 56 57 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 58 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 59 } `json:"Response"` 60} 61 62func (r *AuthTestTidResponse) ToJsonString() string { 63 b, _ := json.Marshal(r) 64 return string(b) 65} 66 67// It is highly **NOT** recommended to use this function 68// because it has no param check, nor strict type check 69func (r *AuthTestTidResponse) FromJsonString(s string) error { 70 return json.Unmarshal([]byte(s), &r) 71} 72 73type BurnTidNotifyRequest struct { 74 *tchttp.BaseRequest 75 76 // 订单编号 77 OrderId *string `json:"OrderId,omitempty" name:"OrderId"` 78 79 // TID编号 80 Tid *string `json:"Tid,omitempty" name:"Tid"` 81} 82 83func (r *BurnTidNotifyRequest) ToJsonString() string { 84 b, _ := json.Marshal(r) 85 return string(b) 86} 87 88// It is highly **NOT** recommended to use this function 89// because it has no param check, nor strict type check 90func (r *BurnTidNotifyRequest) FromJsonString(s string) error { 91 f := make(map[string]interface{}) 92 if err := json.Unmarshal([]byte(s), &f); err != nil { 93 return err 94 } 95 delete(f, "OrderId") 96 delete(f, "Tid") 97 if len(f) > 0 { 98 return errors.New("BurnTidNotifyRequest has unknown keys!") 99 } 100 return json.Unmarshal([]byte(s), &r) 101} 102 103type BurnTidNotifyResponse struct { 104 *tchttp.BaseResponse 105 Response *struct { 106 107 // 接收回执成功的TID 108 Tid *string `json:"Tid,omitempty" name:"Tid"` 109 110 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 111 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 112 } `json:"Response"` 113} 114 115func (r *BurnTidNotifyResponse) ToJsonString() string { 116 b, _ := json.Marshal(r) 117 return string(b) 118} 119 120// It is highly **NOT** recommended to use this function 121// because it has no param check, nor strict type check 122func (r *BurnTidNotifyResponse) FromJsonString(s string) error { 123 return json.Unmarshal([]byte(s), &r) 124} 125 126type DeliverTidNotifyRequest struct { 127 *tchttp.BaseRequest 128 129 // 订单编号 130 OrderId *string `json:"OrderId,omitempty" name:"OrderId"` 131 132 // TID编号 133 Tid *string `json:"Tid,omitempty" name:"Tid"` 134} 135 136func (r *DeliverTidNotifyRequest) ToJsonString() string { 137 b, _ := json.Marshal(r) 138 return string(b) 139} 140 141// It is highly **NOT** recommended to use this function 142// because it has no param check, nor strict type check 143func (r *DeliverTidNotifyRequest) FromJsonString(s string) error { 144 f := make(map[string]interface{}) 145 if err := json.Unmarshal([]byte(s), &f); err != nil { 146 return err 147 } 148 delete(f, "OrderId") 149 delete(f, "Tid") 150 if len(f) > 0 { 151 return errors.New("DeliverTidNotifyRequest has unknown keys!") 152 } 153 return json.Unmarshal([]byte(s), &r) 154} 155 156type DeliverTidNotifyResponse struct { 157 *tchttp.BaseResponse 158 Response *struct { 159 160 // 剩余空发数量 161 RemaindCount *uint64 `json:"RemaindCount,omitempty" name:"RemaindCount"` 162 163 // 已回执的TID编码 164 Tid *string `json:"Tid,omitempty" name:"Tid"` 165 166 // 产品公钥 167 ProductKey *string `json:"ProductKey,omitempty" name:"ProductKey"` 168 169 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 170 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 171 } `json:"Response"` 172} 173 174func (r *DeliverTidNotifyResponse) ToJsonString() string { 175 b, _ := json.Marshal(r) 176 return string(b) 177} 178 179// It is highly **NOT** recommended to use this function 180// because it has no param check, nor strict type check 181func (r *DeliverTidNotifyResponse) FromJsonString(s string) error { 182 return json.Unmarshal([]byte(s), &r) 183} 184 185type DeliverTidsRequest struct { 186 *tchttp.BaseRequest 187 188 // 订单ID 189 OrderId *string `json:"OrderId,omitempty" name:"OrderId"` 190 191 // 数量,1~100 192 Quantity *uint64 `json:"Quantity,omitempty" name:"Quantity"` 193} 194 195func (r *DeliverTidsRequest) ToJsonString() string { 196 b, _ := json.Marshal(r) 197 return string(b) 198} 199 200// It is highly **NOT** recommended to use this function 201// because it has no param check, nor strict type check 202func (r *DeliverTidsRequest) FromJsonString(s string) error { 203 f := make(map[string]interface{}) 204 if err := json.Unmarshal([]byte(s), &f); err != nil { 205 return err 206 } 207 delete(f, "OrderId") 208 delete(f, "Quantity") 209 if len(f) > 0 { 210 return errors.New("DeliverTidsRequest has unknown keys!") 211 } 212 return json.Unmarshal([]byte(s), &r) 213} 214 215type DeliverTidsResponse struct { 216 *tchttp.BaseResponse 217 Response *struct { 218 219 // 空发的TID信息 220 // 注意:此字段可能返回 null,表示取不到有效值。 221 TidSet []*TidKeysInfo `json:"TidSet,omitempty" name:"TidSet" list` 222 223 // 产品公钥 224 ProductKey *string `json:"ProductKey,omitempty" name:"ProductKey"` 225 226 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 227 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 228 } `json:"Response"` 229} 230 231func (r *DeliverTidsResponse) ToJsonString() string { 232 b, _ := json.Marshal(r) 233 return string(b) 234} 235 236// It is highly **NOT** recommended to use this function 237// because it has no param check, nor strict type check 238func (r *DeliverTidsResponse) FromJsonString(s string) error { 239 return json.Unmarshal([]byte(s), &r) 240} 241 242type DescribeAvailableLibCountRequest struct { 243 *tchttp.BaseRequest 244 245 // 订单编号 246 OrderId *string `json:"OrderId,omitempty" name:"OrderId"` 247} 248 249func (r *DescribeAvailableLibCountRequest) ToJsonString() string { 250 b, _ := json.Marshal(r) 251 return string(b) 252} 253 254// It is highly **NOT** recommended to use this function 255// because it has no param check, nor strict type check 256func (r *DescribeAvailableLibCountRequest) FromJsonString(s string) error { 257 f := make(map[string]interface{}) 258 if err := json.Unmarshal([]byte(s), &f); err != nil { 259 return err 260 } 261 delete(f, "OrderId") 262 if len(f) > 0 { 263 return errors.New("DescribeAvailableLibCountRequest has unknown keys!") 264 } 265 return json.Unmarshal([]byte(s), &r) 266} 267 268type DescribeAvailableLibCountResponse struct { 269 *tchttp.BaseResponse 270 Response *struct { 271 272 // 可空发的白盒密钥数量 273 Quantity *uint64 `json:"Quantity,omitempty" name:"Quantity"` 274 275 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 276 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 277 } `json:"Response"` 278} 279 280func (r *DescribeAvailableLibCountResponse) ToJsonString() string { 281 b, _ := json.Marshal(r) 282 return string(b) 283} 284 285// It is highly **NOT** recommended to use this function 286// because it has no param check, nor strict type check 287func (r *DescribeAvailableLibCountResponse) FromJsonString(s string) error { 288 return json.Unmarshal([]byte(s), &r) 289} 290 291type DescribePermissionRequest struct { 292 *tchttp.BaseRequest 293} 294 295func (r *DescribePermissionRequest) ToJsonString() string { 296 b, _ := json.Marshal(r) 297 return string(b) 298} 299 300// It is highly **NOT** recommended to use this function 301// because it has no param check, nor strict type check 302func (r *DescribePermissionRequest) FromJsonString(s string) error { 303 f := make(map[string]interface{}) 304 if err := json.Unmarshal([]byte(s), &f); err != nil { 305 return err 306 } 307 if len(f) > 0 { 308 return errors.New("DescribePermissionRequest has unknown keys!") 309 } 310 return json.Unmarshal([]byte(s), &r) 311} 312 313type DescribePermissionResponse struct { 314 *tchttp.BaseResponse 315 Response *struct { 316 317 // 企业用户 318 EnterpriseUser *bool `json:"EnterpriseUser,omitempty" name:"EnterpriseUser"` 319 320 // 下载控制台权限 321 DownloadPermission *string `json:"DownloadPermission,omitempty" name:"DownloadPermission"` 322 323 // 使用控制台权限 324 UsePermission *string `json:"UsePermission,omitempty" name:"UsePermission"` 325 326 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 327 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 328 } `json:"Response"` 329} 330 331func (r *DescribePermissionResponse) ToJsonString() string { 332 b, _ := json.Marshal(r) 333 return string(b) 334} 335 336// It is highly **NOT** recommended to use this function 337// because it has no param check, nor strict type check 338func (r *DescribePermissionResponse) FromJsonString(s string) error { 339 return json.Unmarshal([]byte(s), &r) 340} 341 342type DownloadTidsRequest struct { 343 *tchttp.BaseRequest 344 345 // 订单编号 346 OrderId *string `json:"OrderId,omitempty" name:"OrderId"` 347 348 // 下载数量:1~10 349 Quantity *uint64 `json:"Quantity,omitempty" name:"Quantity"` 350} 351 352func (r *DownloadTidsRequest) ToJsonString() string { 353 b, _ := json.Marshal(r) 354 return string(b) 355} 356 357// It is highly **NOT** recommended to use this function 358// because it has no param check, nor strict type check 359func (r *DownloadTidsRequest) FromJsonString(s string) error { 360 f := make(map[string]interface{}) 361 if err := json.Unmarshal([]byte(s), &f); err != nil { 362 return err 363 } 364 delete(f, "OrderId") 365 delete(f, "Quantity") 366 if len(f) > 0 { 367 return errors.New("DownloadTidsRequest has unknown keys!") 368 } 369 return json.Unmarshal([]byte(s), &r) 370} 371 372type DownloadTidsResponse struct { 373 *tchttp.BaseResponse 374 Response *struct { 375 376 // 下载的TID信息列表 377 // 注意:此字段可能返回 null,表示取不到有效值。 378 TidSet []*TidKeysInfo `json:"TidSet,omitempty" name:"TidSet" list` 379 380 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 381 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 382 } `json:"Response"` 383} 384 385func (r *DownloadTidsResponse) ToJsonString() string { 386 b, _ := json.Marshal(r) 387 return string(b) 388} 389 390// It is highly **NOT** recommended to use this function 391// because it has no param check, nor strict type check 392func (r *DownloadTidsResponse) FromJsonString(s string) error { 393 return json.Unmarshal([]byte(s), &r) 394} 395 396type TidKeysInfo struct { 397 398 // TID号码 399 Tid *string `json:"Tid,omitempty" name:"Tid"` 400 401 // 公钥 402 PublicKey *string `json:"PublicKey,omitempty" name:"PublicKey"` 403 404 // 私钥 405 PrivateKey *string `json:"PrivateKey,omitempty" name:"PrivateKey"` 406 407 // 共享密钥 408 Psk *string `json:"Psk,omitempty" name:"Psk"` 409 410 // 软加固白盒密钥下载地址 411 DownloadUrl *string `json:"DownloadUrl,omitempty" name:"DownloadUrl"` 412 413 // 软加固设备标识码 414 DeviceCode *string `json:"DeviceCode,omitempty" name:"DeviceCode"` 415} 416 417type UploadDeviceUniqueCodeRequest struct { 418 *tchttp.BaseRequest 419 420 // 硬件唯一标识码 421 CodeSet []*string `json:"CodeSet,omitempty" name:"CodeSet" list` 422 423 // 硬件标识码绑定的申请编号 424 OrderId *string `json:"OrderId,omitempty" name:"OrderId"` 425} 426 427func (r *UploadDeviceUniqueCodeRequest) ToJsonString() string { 428 b, _ := json.Marshal(r) 429 return string(b) 430} 431 432// It is highly **NOT** recommended to use this function 433// because it has no param check, nor strict type check 434func (r *UploadDeviceUniqueCodeRequest) FromJsonString(s string) error { 435 f := make(map[string]interface{}) 436 if err := json.Unmarshal([]byte(s), &f); err != nil { 437 return err 438 } 439 delete(f, "CodeSet") 440 delete(f, "OrderId") 441 if len(f) > 0 { 442 return errors.New("UploadDeviceUniqueCodeRequest has unknown keys!") 443 } 444 return json.Unmarshal([]byte(s), &r) 445} 446 447type UploadDeviceUniqueCodeResponse struct { 448 *tchttp.BaseResponse 449 Response *struct { 450 451 // 本次已上传数量 452 Count *uint64 `json:"Count,omitempty" name:"Count"` 453 454 // 重复的硬件唯一标识码 455 // 注意:此字段可能返回 null,表示取不到有效值。 456 ExistedCodeSet []*string `json:"ExistedCodeSet,omitempty" name:"ExistedCodeSet" list` 457 458 // 剩余可上传数量 459 LeftQuantity *uint64 `json:"LeftQuantity,omitempty" name:"LeftQuantity"` 460 461 // 错误的硬件唯一标识码 462 // 注意:此字段可能返回 null,表示取不到有效值。 463 IllegalCodeSet []*string `json:"IllegalCodeSet,omitempty" name:"IllegalCodeSet" list` 464 465 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 466 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 467 } `json:"Response"` 468} 469 470func (r *UploadDeviceUniqueCodeResponse) ToJsonString() string { 471 b, _ := json.Marshal(r) 472 return string(b) 473} 474 475// It is highly **NOT** recommended to use this function 476// because it has no param check, nor strict type check 477func (r *UploadDeviceUniqueCodeResponse) FromJsonString(s string) error { 478 return json.Unmarshal([]byte(s), &r) 479} 480 481type VerifyChipBurnInfoRequest struct { 482 *tchttp.BaseRequest 483 484 // 验证数据 485 Data *string `json:"Data,omitempty" name:"Data"` 486} 487 488func (r *VerifyChipBurnInfoRequest) ToJsonString() string { 489 b, _ := json.Marshal(r) 490 return string(b) 491} 492 493// It is highly **NOT** recommended to use this function 494// because it has no param check, nor strict type check 495func (r *VerifyChipBurnInfoRequest) FromJsonString(s string) error { 496 f := make(map[string]interface{}) 497 if err := json.Unmarshal([]byte(s), &f); err != nil { 498 return err 499 } 500 delete(f, "Data") 501 if len(f) > 0 { 502 return errors.New("VerifyChipBurnInfoRequest has unknown keys!") 503 } 504 return json.Unmarshal([]byte(s), &r) 505} 506 507type VerifyChipBurnInfoResponse struct { 508 *tchttp.BaseResponse 509 Response *struct { 510 511 // 验证结果 512 Pass *bool `json:"Pass,omitempty" name:"Pass"` 513 514 // 已验证次数 515 VerifiedTimes *uint64 `json:"VerifiedTimes,omitempty" name:"VerifiedTimes"` 516 517 // 剩余验证次数 518 LeftTimes *uint64 `json:"LeftTimes,omitempty" name:"LeftTimes"` 519 520 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 521 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 522 } `json:"Response"` 523} 524 525func (r *VerifyChipBurnInfoResponse) ToJsonString() string { 526 b, _ := json.Marshal(r) 527 return string(b) 528} 529 530// It is highly **NOT** recommended to use this function 531// because it has no param check, nor strict type check 532func (r *VerifyChipBurnInfoResponse) FromJsonString(s string) error { 533 return json.Unmarshal([]byte(s), &r) 534} 535