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 v20180420 16 17import ( 18 "encoding/json" 19 tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" 20 tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" 21) 22 23type CdsAuditInstance struct { 24 25 // 实例ID 26 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 27 28 // 用户AppId 29 AppId *string `json:"AppId,omitempty" name:"AppId"` 30 31 // 用户Uin 32 Uin *string `json:"Uin,omitempty" name:"Uin"` 33 34 // 项目ID 35 ProjectId *uint64 `json:"ProjectId,omitempty" name:"ProjectId"` 36 37 // 续费标识 38 RenewFlag *uint64 `json:"RenewFlag,omitempty" name:"RenewFlag"` 39 40 // 所属地域 41 Region *string `json:"Region,omitempty" name:"Region"` 42 43 // 付费模式(数据安全审计只支持预付费:1) 44 PayMode *uint64 `json:"PayMode,omitempty" name:"PayMode"` 45 46 // 实例状态: 0,未生效;1:正常运行; 2:被隔离; 3,已过期 47 Status *uint64 `json:"Status,omitempty" name:"Status"` 48 49 // 实例被隔离时间,格式:yyyy-mm-dd HH:ii:ss 50 IsolatedTimestamp *string `json:"IsolatedTimestamp,omitempty" name:"IsolatedTimestamp"` 51 52 // 实例创建时间,格式: yyyy-mm-dd HH:ii:ss 53 CreateTime *string `json:"CreateTime,omitempty" name:"CreateTime"` 54 55 // 实例过期时间,格式:yyyy-mm-dd HH:ii:ss 56 ExpireTime *string `json:"ExpireTime,omitempty" name:"ExpireTime"` 57 58 // 实例名称 59 // 注意:此字段可能返回 null,表示取不到有效值。 60 InstanceName *string `json:"InstanceName,omitempty" name:"InstanceName"` 61 62 // 实例公网IP 63 // 注意:此字段可能返回 null,表示取不到有效值。 64 PublicIp *string `json:"PublicIp,omitempty" name:"PublicIp"` 65 66 // 实例私网IP 67 // 注意:此字段可能返回 null,表示取不到有效值。 68 PrivateIp *string `json:"PrivateIp,omitempty" name:"PrivateIp"` 69 70 // 实例类型(版本) 71 InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"` 72 73 // 实例域名 74 // 注意:此字段可能返回 null,表示取不到有效值。 75 Pdomain *string `json:"Pdomain,omitempty" name:"Pdomain"` 76} 77 78type DbauditTypesInfo struct { 79 80 // 规格描述 81 InstanceVersionName *string `json:"InstanceVersionName,omitempty" name:"InstanceVersionName"` 82 83 // 规格名称 84 InstanceVersionKey *string `json:"InstanceVersionKey,omitempty" name:"InstanceVersionKey"` 85 86 // 最大吞吐量 87 Qps *uint64 `json:"Qps,omitempty" name:"Qps"` 88 89 // 最大实例数 90 MaxInstances *uint64 `json:"MaxInstances,omitempty" name:"MaxInstances"` 91 92 // 入库速率(每小时) 93 InsertSpeed *uint64 `json:"InsertSpeed,omitempty" name:"InsertSpeed"` 94 95 // 最大在线存储量,单位:条 96 OnlineStorageCapacity *uint64 `json:"OnlineStorageCapacity,omitempty" name:"OnlineStorageCapacity"` 97 98 // 最大归档存储量,单位:条 99 ArchivingStorageCapacity *uint64 `json:"ArchivingStorageCapacity,omitempty" name:"ArchivingStorageCapacity"` 100} 101 102type DescribeDasbImageIdsRequest struct { 103 *tchttp.BaseRequest 104} 105 106func (r *DescribeDasbImageIdsRequest) ToJsonString() string { 107 b, _ := json.Marshal(r) 108 return string(b) 109} 110 111// FromJsonString It is highly **NOT** recommended to use this function 112// because it has no param check, nor strict type check 113func (r *DescribeDasbImageIdsRequest) FromJsonString(s string) error { 114 f := make(map[string]interface{}) 115 if err := json.Unmarshal([]byte(s), &f); err != nil { 116 return err 117 } 118 if len(f) > 0 { 119 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDasbImageIdsRequest has unknown keys!", "") 120 } 121 return json.Unmarshal([]byte(s), &r) 122} 123 124type DescribeDasbImageIdsResponse struct { 125 *tchttp.BaseResponse 126 Response *struct { 127 128 // 基础镜像ID 129 BaseImageId *string `json:"BaseImageId,omitempty" name:"BaseImageId"` 130 131 // AI镜像ID 132 AiImageId *string `json:"AiImageId,omitempty" name:"AiImageId"` 133 134 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 135 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 136 } `json:"Response"` 137} 138 139func (r *DescribeDasbImageIdsResponse) ToJsonString() string { 140 b, _ := json.Marshal(r) 141 return string(b) 142} 143 144// FromJsonString It is highly **NOT** recommended to use this function 145// because it has no param check, nor strict type check 146func (r *DescribeDasbImageIdsResponse) FromJsonString(s string) error { 147 return json.Unmarshal([]byte(s), &r) 148} 149 150type DescribeDbauditInstanceTypeRequest struct { 151 *tchttp.BaseRequest 152} 153 154func (r *DescribeDbauditInstanceTypeRequest) ToJsonString() string { 155 b, _ := json.Marshal(r) 156 return string(b) 157} 158 159// FromJsonString It is highly **NOT** recommended to use this function 160// because it has no param check, nor strict type check 161func (r *DescribeDbauditInstanceTypeRequest) FromJsonString(s string) error { 162 f := make(map[string]interface{}) 163 if err := json.Unmarshal([]byte(s), &f); err != nil { 164 return err 165 } 166 if len(f) > 0 { 167 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDbauditInstanceTypeRequest has unknown keys!", "") 168 } 169 return json.Unmarshal([]byte(s), &r) 170} 171 172type DescribeDbauditInstanceTypeResponse struct { 173 *tchttp.BaseResponse 174 Response *struct { 175 176 // 数据安全审计产品规格信息列表 177 DbauditTypesSet []*DbauditTypesInfo `json:"DbauditTypesSet,omitempty" name:"DbauditTypesSet"` 178 179 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 180 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 181 } `json:"Response"` 182} 183 184func (r *DescribeDbauditInstanceTypeResponse) ToJsonString() string { 185 b, _ := json.Marshal(r) 186 return string(b) 187} 188 189// FromJsonString It is highly **NOT** recommended to use this function 190// because it has no param check, nor strict type check 191func (r *DescribeDbauditInstanceTypeResponse) FromJsonString(s string) error { 192 return json.Unmarshal([]byte(s), &r) 193} 194 195type DescribeDbauditInstancesRequest struct { 196 *tchttp.BaseRequest 197 198 // 查询条件地域 199 SearchRegion *string `json:"SearchRegion,omitempty" name:"SearchRegion"` 200 201 // 限制数目,默认10, 最大50 202 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` 203 204 // 偏移量,默认1 205 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` 206} 207 208func (r *DescribeDbauditInstancesRequest) ToJsonString() string { 209 b, _ := json.Marshal(r) 210 return string(b) 211} 212 213// FromJsonString It is highly **NOT** recommended to use this function 214// because it has no param check, nor strict type check 215func (r *DescribeDbauditInstancesRequest) FromJsonString(s string) error { 216 f := make(map[string]interface{}) 217 if err := json.Unmarshal([]byte(s), &f); err != nil { 218 return err 219 } 220 delete(f, "SearchRegion") 221 delete(f, "Limit") 222 delete(f, "Offset") 223 if len(f) > 0 { 224 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDbauditInstancesRequest has unknown keys!", "") 225 } 226 return json.Unmarshal([]byte(s), &r) 227} 228 229type DescribeDbauditInstancesResponse struct { 230 *tchttp.BaseResponse 231 Response *struct { 232 233 // 总实例数 234 TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` 235 236 // 数据安全审计实例信息列表 237 CdsAuditInstanceSet []*CdsAuditInstance `json:"CdsAuditInstanceSet,omitempty" name:"CdsAuditInstanceSet"` 238 239 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 240 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 241 } `json:"Response"` 242} 243 244func (r *DescribeDbauditInstancesResponse) ToJsonString() string { 245 b, _ := json.Marshal(r) 246 return string(b) 247} 248 249// FromJsonString It is highly **NOT** recommended to use this function 250// because it has no param check, nor strict type check 251func (r *DescribeDbauditInstancesResponse) FromJsonString(s string) error { 252 return json.Unmarshal([]byte(s), &r) 253} 254 255type DescribeDbauditUsedRegionsRequest struct { 256 *tchttp.BaseRequest 257} 258 259func (r *DescribeDbauditUsedRegionsRequest) ToJsonString() string { 260 b, _ := json.Marshal(r) 261 return string(b) 262} 263 264// FromJsonString It is highly **NOT** recommended to use this function 265// because it has no param check, nor strict type check 266func (r *DescribeDbauditUsedRegionsRequest) FromJsonString(s string) error { 267 f := make(map[string]interface{}) 268 if err := json.Unmarshal([]byte(s), &f); err != nil { 269 return err 270 } 271 if len(f) > 0 { 272 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeDbauditUsedRegionsRequest has unknown keys!", "") 273 } 274 return json.Unmarshal([]byte(s), &r) 275} 276 277type DescribeDbauditUsedRegionsResponse struct { 278 *tchttp.BaseResponse 279 Response *struct { 280 281 // 可售卖地域信息列表 282 RegionSet []*RegionInfo `json:"RegionSet,omitempty" name:"RegionSet"` 283 284 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 285 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 286 } `json:"Response"` 287} 288 289func (r *DescribeDbauditUsedRegionsResponse) ToJsonString() string { 290 b, _ := json.Marshal(r) 291 return string(b) 292} 293 294// FromJsonString It is highly **NOT** recommended to use this function 295// because it has no param check, nor strict type check 296func (r *DescribeDbauditUsedRegionsResponse) FromJsonString(s string) error { 297 return json.Unmarshal([]byte(s), &r) 298} 299 300type InquiryPriceDbauditInstanceRequest struct { 301 *tchttp.BaseRequest 302 303 // 实例规格,取值范围: cdsaudit,cdsaudit_adv, cdsaudit_ent 分别为合规版,高级版,企业版 304 InstanceVersion *string `json:"InstanceVersion,omitempty" name:"InstanceVersion"` 305 306 // 询价类型: renew,续费;newbuy,新购 307 InquiryType *string `json:"InquiryType,omitempty" name:"InquiryType"` 308 309 // 购买实例的时长。取值范围:1(y/m),2(y/m),,3(y/m),4(m), 5(m),6(m), 7(m),8(m),9(m), 10(m) 310 TimeSpan *uint64 `json:"TimeSpan,omitempty" name:"TimeSpan"` 311 312 // 购买时长单位,y:年;m:月 313 TimeUnit *string `json:"TimeUnit,omitempty" name:"TimeUnit"` 314 315 // 实例所在地域 316 ServiceRegion *string `json:"ServiceRegion,omitempty" name:"ServiceRegion"` 317} 318 319func (r *InquiryPriceDbauditInstanceRequest) ToJsonString() string { 320 b, _ := json.Marshal(r) 321 return string(b) 322} 323 324// FromJsonString It is highly **NOT** recommended to use this function 325// because it has no param check, nor strict type check 326func (r *InquiryPriceDbauditInstanceRequest) FromJsonString(s string) error { 327 f := make(map[string]interface{}) 328 if err := json.Unmarshal([]byte(s), &f); err != nil { 329 return err 330 } 331 delete(f, "InstanceVersion") 332 delete(f, "InquiryType") 333 delete(f, "TimeSpan") 334 delete(f, "TimeUnit") 335 delete(f, "ServiceRegion") 336 if len(f) > 0 { 337 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "InquiryPriceDbauditInstanceRequest has unknown keys!", "") 338 } 339 return json.Unmarshal([]byte(s), &r) 340} 341 342type InquiryPriceDbauditInstanceResponse struct { 343 *tchttp.BaseResponse 344 Response *struct { 345 346 // 总价,单位:元 347 TotalPrice *float64 `json:"TotalPrice,omitempty" name:"TotalPrice"` 348 349 // 真实价钱,预支费用的折扣价,单位:元 350 RealTotalCost *float64 `json:"RealTotalCost,omitempty" name:"RealTotalCost"` 351 352 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 353 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 354 } `json:"Response"` 355} 356 357func (r *InquiryPriceDbauditInstanceResponse) ToJsonString() string { 358 b, _ := json.Marshal(r) 359 return string(b) 360} 361 362// FromJsonString It is highly **NOT** recommended to use this function 363// because it has no param check, nor strict type check 364func (r *InquiryPriceDbauditInstanceResponse) FromJsonString(s string) error { 365 return json.Unmarshal([]byte(s), &r) 366} 367 368type ModifyDbauditInstancesRenewFlagRequest struct { 369 *tchttp.BaseRequest 370 371 // 实例ID 372 InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"` 373 374 // 0,表示默认状态(用户未设置,即初始状态);1,表示自动续费;2,表示明确不自动续费 375 AutoRenewFlag *int64 `json:"AutoRenewFlag,omitempty" name:"AutoRenewFlag"` 376} 377 378func (r *ModifyDbauditInstancesRenewFlagRequest) ToJsonString() string { 379 b, _ := json.Marshal(r) 380 return string(b) 381} 382 383// FromJsonString It is highly **NOT** recommended to use this function 384// because it has no param check, nor strict type check 385func (r *ModifyDbauditInstancesRenewFlagRequest) FromJsonString(s string) error { 386 f := make(map[string]interface{}) 387 if err := json.Unmarshal([]byte(s), &f); err != nil { 388 return err 389 } 390 delete(f, "InstanceId") 391 delete(f, "AutoRenewFlag") 392 if len(f) > 0 { 393 return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyDbauditInstancesRenewFlagRequest has unknown keys!", "") 394 } 395 return json.Unmarshal([]byte(s), &r) 396} 397 398type ModifyDbauditInstancesRenewFlagResponse struct { 399 *tchttp.BaseResponse 400 Response *struct { 401 402 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 403 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 404 } `json:"Response"` 405} 406 407func (r *ModifyDbauditInstancesRenewFlagResponse) ToJsonString() string { 408 b, _ := json.Marshal(r) 409 return string(b) 410} 411 412// FromJsonString It is highly **NOT** recommended to use this function 413// because it has no param check, nor strict type check 414func (r *ModifyDbauditInstancesRenewFlagResponse) FromJsonString(s string) error { 415 return json.Unmarshal([]byte(s), &r) 416} 417 418type RegionInfo struct { 419 420 // 地域ID 421 RegionId *int64 `json:"RegionId,omitempty" name:"RegionId"` 422 423 // 地域名称 424 Region *string `json:"Region,omitempty" name:"Region"` 425 426 // 地域描述 427 RegionName *string `json:"RegionName,omitempty" name:"RegionName"` 428 429 // 地域可用状态 430 RegionState *int64 `json:"RegionState,omitempty" name:"RegionState"` 431} 432