diff --git a/CHANGELOG.md b/CHANGELOG.md index 285816b33f..711d6c4303 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,226 @@ +# 0.1.121 2024-11-07 + +### HuaweiCloud SDK AAD + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **UpgradeInstanceSpec** + - changes of request param + - `+ upgrade_data.elastic_service_bandwidth_type` + - `+ upgrade_data.elastic_service_bandwidth` + +### HuaweiCloud SDK CC + +- _API Version_ + - V3 +- _Features_ + - Support the following APIs: + - `CreateP2PSiteNetwork` + - `ListSiteNetworks` + - `ShowSiteNetwork` + - `UpdateSiteNetwork` + - `DeleteSiteNetwork` + - `DisassociateSiteNetworkBandwidth` + - `AssociateSiteNetworkBandwidth` + - `UpdateSiteNetworkBandwidthSize` + - `UpdateSiteNetworkBandwidth` + - `ListSiteNetworkQuotas` + - `ListSiteNetworkCapabilities` + - `ListBandwidthPackageSites` + - `ListBandwidthPackageLevels` + - `ListBandwidthPackageLines` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK DDM + +- _API Version_ + - V1 +- _Features_ + - Support the APIs `ChangeDatabaseVersion`, `ListDatabaseAvailableVersions`, `RollBackDatabaseVersion` +- _Bug Fix_ + - None +- _Change_ + - **CreateInstance** + - changes of response param + - `+ job_id` + - **ShowProcessesAuditLog** + - changes of response param + - `+ process_audit_logs.execute_time` + - `- process_audit_logs.excute_time` + - **ExpandDdmInstanceNodes** + - changes of response param + - `- instance_id` + +### HuaweiCloud SDK GA + +- _API Version_ + - V1 +- _Features_ + - Support the following APIs: + - `ListLogtanks` + - `CreateLogtank` + - `ShowLogtank` + - `UpdateLogtank` + - `DeleteLogtank` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK GaussDBforNoSQL + +- _API Version_ + - V3 +- _Features_ + - Support the API `BatchUpgradeDatabaseVersion` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK IAMAccessAnalyzer + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListFindings** + - changes of response param + - `+ findings.finding_type: enum value [unused_permission]` + - **ShowFinding** + - changes of response param + - `+ finding.finding_type: enum value [unused_permission]` + - `+ finding.finding_details.unused_permission_details` + - **ValidatePolicy** + - changes of request param + - `- validate_policy_resource_type: enum value [obs:bucket]` + +### HuaweiCloud SDK IoTDA + +- _API Version_ + - V5 +- _Features_ + - Support the following APIs: + - `ListAsyncHistoryCommands` + - `CountAsyncHistoryCommands` + - `ListFunctions` + - `AddFunctions` + - `DeleteFunctions` + - `ListAsyncCommands` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK KVS + +- _API Version_ + - V1 +- _Features_ + - Support the API `CheckHealth` +- _Bug Fix_ + - None +- _Change_ + - **CreateTable** + - changes of request param + - `+ ttl_options` + - **DescribeTable** + - changes of response param + - `+ ttl_options` + +### HuaweiCloud SDK MetaStudio + +- _API Version_ + - V1 +- _Features_ + - Support the API `ValidateRobot` +- _Bug Fix_ + - None +- _Change_ + - **ListTenantResources** + - changes of request param + - `- resource_name` + - **ShowAsset** + - changes of response param + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - **UpdateDigitalAsset** + - changes of request param + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - changes of response param + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - **CreateDigitalAsset** + - changes of request param + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - **ListAssets** + - changes of response param + - `+ assets.system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + +### HuaweiCloud SDK MPC + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateExtractTask** + - changes of request param + - `+ encryption` + - **CreateTranscodingTask** + - changes of request param + - `+ av_parameters.video.crf` + - `+ av_parameters.video.max_bitrate` + - **ListTranscodingTask** + - changes of response param + - `+ task_array.av_parameters.video.crf` + - `+ task_array.av_parameters.video.max_bitrate` + - **CreateEditingJob** + - changes of request param + - `+ concats.av_parameters.video.crf` + - `+ concats.av_parameters.video.max_bitrate` + - **ListEditingJob** + - changes of response param + - `+ jobs.edit_task_req.concats.av_parameters.video.crf` + - `+ jobs.edit_task_req.concats.av_parameters.video.max_bitrate` + +### HuaweiCloud SDK VPCEP + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListEndpointInfoDetails** + - changes of response param + - `* error: object -> list` + +### HuaweiCloud SDK WAF + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListHost** + - changes of response param + - `+ items.server` + # 0.1.120 2024-10-31 ### HuaweiCloud SDK APIG diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 5115556305..b383e936d8 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,226 @@ +# 0.1.121 2024-11-07 + +### HuaweiCloud SDK AAD + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **UpgradeInstanceSpec** + - 请求参数变更 + - `+ upgrade_data.elastic_service_bandwidth_type` + - `+ upgrade_data.elastic_service_bandwidth` + +### HuaweiCloud SDK CC + +- _接口版本_ + - V3 +- _新增特性_ + - 支持以下接口: + - `CreateP2PSiteNetwork` + - `ListSiteNetworks` + - `ShowSiteNetwork` + - `UpdateSiteNetwork` + - `DeleteSiteNetwork` + - `DisassociateSiteNetworkBandwidth` + - `AssociateSiteNetworkBandwidth` + - `UpdateSiteNetworkBandwidthSize` + - `UpdateSiteNetworkBandwidth` + - `ListSiteNetworkQuotas` + - `ListSiteNetworkCapabilities` + - `ListBandwidthPackageSites` + - `ListBandwidthPackageLevels` + - `ListBandwidthPackageLines` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK DDM + +- _接口版本_ + - V1 +- _新增特性_ + - 支持接口`ChangeDatabaseVersion`、`ListDatabaseAvailableVersions`、`RollBackDatabaseVersion` +- _解决问题_ + - 无 +- _特性变更_ + - **CreateInstance** + - 响应参数变更 + - `+ job_id` + - **ShowProcessesAuditLog** + - 响应参数变更 + - `+ process_audit_logs.execute_time` + - `- process_audit_logs.excute_time` + - **ExpandDdmInstanceNodes** + - 响应参数变更 + - `- instance_id` + +### HuaweiCloud SDK GA + +- _接口版本_ + - V1 +- _新增特性_ + - 支持以下接口: + - `ListLogtanks` + - `CreateLogtank` + - `ShowLogtank` + - `UpdateLogtank` + - `DeleteLogtank` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK GaussDBforNoSQL + +- _接口版本_ + - V3 +- _新增特性_ + - 支持接口`BatchUpgradeDatabaseVersion` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK IAMAccessAnalyzer + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListFindings** + - 响应参数变更 + - `+ findings.finding_type: enum value [unused_permission]` + - **ShowFinding** + - 响应参数变更 + - `+ finding.finding_type: enum value [unused_permission]` + - `+ finding.finding_details.unused_permission_details` + - **ValidatePolicy** + - 请求参数变更 + - `- validate_policy_resource_type: enum value [obs:bucket]` + +### HuaweiCloud SDK IoTDA + +- _接口版本_ + - V5 +- _新增特性_ + - 支持以下接口: + - `ListAsyncHistoryCommands` + - `CountAsyncHistoryCommands` + - `ListFunctions` + - `AddFunctions` + - `DeleteFunctions` + - `ListAsyncCommands` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK KVS + +- _接口版本_ + - V1 +- _新增特性_ + - 支持接口`CheckHealth` +- _解决问题_ + - 无 +- _特性变更_ + - **CreateTable** + - 请求参数变更 + - `+ ttl_options` + - **DescribeTable** + - 响应参数变更 + - `+ ttl_options` + +### HuaweiCloud SDK MetaStudio + +- _接口版本_ + - V1 +- _新增特性_ + - 支持接口`ValidateRobot` +- _解决问题_ + - 无 +- _特性变更_ + - **ListTenantResources** + - 请求参数变更 + - `- resource_name` + - **ShowAsset** + - 响应参数变更 + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - **UpdateDigitalAsset** + - 请求参数变更 + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - 响应参数变更 + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - **CreateDigitalAsset** + - 请求参数变更 + - `+ system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + - **ListAssets** + - 响应参数变更 + - `+ assets.system_properties.key: enum value [MEITUAN_MATERIAL_APPROVED]` + +### HuaweiCloud SDK MPC + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateExtractTask** + - 请求参数变更 + - `+ encryption` + - **CreateTranscodingTask** + - 请求参数变更 + - `+ av_parameters.video.crf` + - `+ av_parameters.video.max_bitrate` + - **ListTranscodingTask** + - 响应参数变更 + - `+ task_array.av_parameters.video.crf` + - `+ task_array.av_parameters.video.max_bitrate` + - **CreateEditingJob** + - 请求参数变更 + - `+ concats.av_parameters.video.crf` + - `+ concats.av_parameters.video.max_bitrate` + - **ListEditingJob** + - 响应参数变更 + - `+ jobs.edit_task_req.concats.av_parameters.video.crf` + - `+ jobs.edit_task_req.concats.av_parameters.video.max_bitrate` + +### HuaweiCloud SDK VPCEP + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListEndpointInfoDetails** + - 响应参数变更 + - `* error: object -> list` + +### HuaweiCloud SDK WAF + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListHost** + - 响应参数变更 + - `+ items.server` + # 0.1.120 2024-10-31 ### HuaweiCloud SDK APIG diff --git a/VERSION b/VERSION index 27f3bc3e90..025c316660 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.120 +0.1.121 diff --git a/services/aad/v2/aad_client.go b/services/aad/v2/aad_client.go index 58bae9fba2..3b503348e1 100644 --- a/services/aad/v2/aad_client.go +++ b/services/aad/v2/aad_client.go @@ -40,6 +40,27 @@ func (c *AadClient) CreateDomainInvoker(request *model.CreateDomainRequest) *Cre return &CreateDomainInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// DeleteDomain 删除防护域名 +// +// 删除防护域名 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *AadClient) DeleteDomain(request *model.DeleteDomainRequest) (*model.DeleteDomainResponse, error) { + requestDef := GenReqDefForDeleteDomain() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.DeleteDomainResponse), nil + } +} + +// DeleteDomainInvoker 删除防护域名 +func (c *AadClient) DeleteDomainInvoker(request *model.DeleteDomainRequest) *DeleteDomainInvoker { + requestDef := GenReqDefForDeleteDomain() + return &DeleteDomainInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // ListDDoSAttackEvent 查询DDoS攻击事件列表 // // 查询DDoS攻击事件列表 @@ -396,24 +417,3 @@ func (c *AadClient) UpgradeInstanceSpecInvoker(request *model.UpgradeInstanceSpe requestDef := GenReqDefForUpgradeInstanceSpec() return &UpgradeInstanceSpecInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } - -// DeleteDomain 删除防护域名 -// -// 删除防护域名 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *AadClient) DeleteDomain(request *model.DeleteDomainRequest) (*model.DeleteDomainResponse, error) { - requestDef := GenReqDefForDeleteDomain() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeleteDomainResponse), nil - } -} - -// DeleteDomainInvoker 删除防护域名 -func (c *AadClient) DeleteDomainInvoker(request *model.DeleteDomainRequest) *DeleteDomainInvoker { - requestDef := GenReqDefForDeleteDomain() - return &DeleteDomainInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} diff --git a/services/aad/v2/aad_invoker.go b/services/aad/v2/aad_invoker.go index 17973b850d..afb3d90c04 100644 --- a/services/aad/v2/aad_invoker.go +++ b/services/aad/v2/aad_invoker.go @@ -21,6 +21,22 @@ func (i *CreateDomainInvoker) Invoke() (*model.CreateDomainResponse, error) { } } +type DeleteDomainInvoker struct { + *invoker.BaseInvoker +} + +func (i *DeleteDomainInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *DeleteDomainInvoker) Invoke() (*model.DeleteDomainResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.DeleteDomainResponse), nil + } +} + type ListDDoSAttackEventInvoker struct { *invoker.BaseInvoker } @@ -292,19 +308,3 @@ func (i *UpgradeInstanceSpecInvoker) Invoke() (*model.UpgradeInstanceSpecRespons return result.(*model.UpgradeInstanceSpecResponse), nil } } - -type DeleteDomainInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeleteDomainInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeleteDomainInvoker) Invoke() (*model.DeleteDomainResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeleteDomainResponse), nil - } -} diff --git a/services/aad/v2/aad_meta.go b/services/aad/v2/aad_meta.go index 8ce845c2e6..48fd6d2c5f 100644 --- a/services/aad/v2/aad_meta.go +++ b/services/aad/v2/aad_meta.go @@ -22,6 +22,21 @@ func GenReqDefForCreateDomain() *def.HttpRequestDef { return requestDef } +func GenReqDefForDeleteDomain() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodDelete). + WithPath("/v2/aad/domains"). + WithResponse(new(model.DeleteDomainResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForListDDoSAttackEvent() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodPost). @@ -430,18 +445,3 @@ func GenReqDefForUpgradeInstanceSpec() *def.HttpRequestDef { requestDef := reqDefBuilder.Build() return requestDef } - -func GenReqDefForDeleteDomain() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2/aad/domains"). - WithResponse(new(model.DeleteDomainResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} diff --git a/services/aad/v2/model/model_upgrade_instance_data.go b/services/aad/v2/model/model_upgrade_instance_data.go index 2e7cb5714e..62feeaa309 100644 --- a/services/aad/v2/model/model_upgrade_instance_data.go +++ b/services/aad/v2/model/model_upgrade_instance_data.go @@ -22,6 +22,12 @@ type UpgradeInstanceData struct { // 域名数 BindDomainNum *int32 `json:"bind_domain_num,omitempty"` + + // 弹性业务带宽,0-关闭,3-月95 + ElasticServiceBandwidthType *int32 `json:"elastic_service_bandwidth_type,omitempty"` + + // 弹性业务带宽增加值 + ElasticServiceBandwidth *int32 `json:"elastic_service_bandwidth,omitempty"` } func (o UpgradeInstanceData) String() string { diff --git a/services/cc/v3/cc_client.go b/services/cc/v3/cc_client.go index dc2802a534..6f4d018cdf 100644 --- a/services/cc/v3/cc_client.go +++ b/services/cc/v3/cc_client.go @@ -1842,3 +1842,298 @@ func (c *CcClient) UpdateNetworkInstanceInvoker(request *model.UpdateNetworkInst requestDef := GenReqDefForUpdateNetworkInstance() return &UpdateNetworkInstanceInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } + +// AssociateSiteNetworkBandwidth 关联分支连接带宽 +// +// 关联分支连接带宽。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) AssociateSiteNetworkBandwidth(request *model.AssociateSiteNetworkBandwidthRequest) (*model.AssociateSiteNetworkBandwidthResponse, error) { + requestDef := GenReqDefForAssociateSiteNetworkBandwidth() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.AssociateSiteNetworkBandwidthResponse), nil + } +} + +// AssociateSiteNetworkBandwidthInvoker 关联分支连接带宽 +func (c *CcClient) AssociateSiteNetworkBandwidthInvoker(request *model.AssociateSiteNetworkBandwidthRequest) *AssociateSiteNetworkBandwidthInvoker { + requestDef := GenReqDefForAssociateSiteNetworkBandwidth() + return &AssociateSiteNetworkBandwidthInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// DisassociateSiteNetworkBandwidth 解关联分支连接带宽 +// +// 解关联分支连接带宽。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) DisassociateSiteNetworkBandwidth(request *model.DisassociateSiteNetworkBandwidthRequest) (*model.DisassociateSiteNetworkBandwidthResponse, error) { + requestDef := GenReqDefForDisassociateSiteNetworkBandwidth() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.DisassociateSiteNetworkBandwidthResponse), nil + } +} + +// DisassociateSiteNetworkBandwidthInvoker 解关联分支连接带宽 +func (c *CcClient) DisassociateSiteNetworkBandwidthInvoker(request *model.DisassociateSiteNetworkBandwidthRequest) *DisassociateSiteNetworkBandwidthInvoker { + requestDef := GenReqDefForDisassociateSiteNetworkBandwidth() + return &DisassociateSiteNetworkBandwidthInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// UpdateSiteNetworkBandwidth 更改分支连接带宽包 +// +// 更改分支连接带宽包。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) UpdateSiteNetworkBandwidth(request *model.UpdateSiteNetworkBandwidthRequest) (*model.UpdateSiteNetworkBandwidthResponse, error) { + requestDef := GenReqDefForUpdateSiteNetworkBandwidth() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.UpdateSiteNetworkBandwidthResponse), nil + } +} + +// UpdateSiteNetworkBandwidthInvoker 更改分支连接带宽包 +func (c *CcClient) UpdateSiteNetworkBandwidthInvoker(request *model.UpdateSiteNetworkBandwidthRequest) *UpdateSiteNetworkBandwidthInvoker { + requestDef := GenReqDefForUpdateSiteNetworkBandwidth() + return &UpdateSiteNetworkBandwidthInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// UpdateSiteNetworkBandwidthSize 更改分支连接带宽大小 +// +// 更改分支连接带宽大小。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) UpdateSiteNetworkBandwidthSize(request *model.UpdateSiteNetworkBandwidthSizeRequest) (*model.UpdateSiteNetworkBandwidthSizeResponse, error) { + requestDef := GenReqDefForUpdateSiteNetworkBandwidthSize() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.UpdateSiteNetworkBandwidthSizeResponse), nil + } +} + +// UpdateSiteNetworkBandwidthSizeInvoker 更改分支连接带宽大小 +func (c *CcClient) UpdateSiteNetworkBandwidthSizeInvoker(request *model.UpdateSiteNetworkBandwidthSizeRequest) *UpdateSiteNetworkBandwidthSizeInvoker { + requestDef := GenReqDefForUpdateSiteNetworkBandwidthSize() + return &UpdateSiteNetworkBandwidthSizeInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// CreateP2PSiteNetwork 创建P2P类型的分支网络 +// +// 创建P2P类型的分支网络。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) CreateP2PSiteNetwork(request *model.CreateP2PSiteNetworkRequest) (*model.CreateP2PSiteNetworkResponse, error) { + requestDef := GenReqDefForCreateP2PSiteNetwork() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.CreateP2PSiteNetworkResponse), nil + } +} + +// CreateP2PSiteNetworkInvoker 创建P2P类型的分支网络 +func (c *CcClient) CreateP2PSiteNetworkInvoker(request *model.CreateP2PSiteNetworkRequest) *CreateP2PSiteNetworkInvoker { + requestDef := GenReqDefForCreateP2PSiteNetwork() + return &CreateP2PSiteNetworkInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// DeleteSiteNetwork 删除分支网络 +// +// 删除分支网络。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) DeleteSiteNetwork(request *model.DeleteSiteNetworkRequest) (*model.DeleteSiteNetworkResponse, error) { + requestDef := GenReqDefForDeleteSiteNetwork() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.DeleteSiteNetworkResponse), nil + } +} + +// DeleteSiteNetworkInvoker 删除分支网络 +func (c *CcClient) DeleteSiteNetworkInvoker(request *model.DeleteSiteNetworkRequest) *DeleteSiteNetworkInvoker { + requestDef := GenReqDefForDeleteSiteNetwork() + return &DeleteSiteNetworkInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListSiteNetworks 查询分支网络列表 +// +// 查询分支网络列表。 +// 分页查询使用的参数为marker、limit。limit默认值为0,没有指定marker时返回第一条数据。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) ListSiteNetworks(request *model.ListSiteNetworksRequest) (*model.ListSiteNetworksResponse, error) { + requestDef := GenReqDefForListSiteNetworks() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListSiteNetworksResponse), nil + } +} + +// ListSiteNetworksInvoker 查询分支网络列表 +func (c *CcClient) ListSiteNetworksInvoker(request *model.ListSiteNetworksRequest) *ListSiteNetworksInvoker { + requestDef := GenReqDefForListSiteNetworks() + return &ListSiteNetworksInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ShowSiteNetwork 查询分支网络详情 +// +// 查询分支网络详情。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) ShowSiteNetwork(request *model.ShowSiteNetworkRequest) (*model.ShowSiteNetworkResponse, error) { + requestDef := GenReqDefForShowSiteNetwork() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ShowSiteNetworkResponse), nil + } +} + +// ShowSiteNetworkInvoker 查询分支网络详情 +func (c *CcClient) ShowSiteNetworkInvoker(request *model.ShowSiteNetworkRequest) *ShowSiteNetworkInvoker { + requestDef := GenReqDefForShowSiteNetwork() + return &ShowSiteNetworkInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// UpdateSiteNetwork 更新分支网络详情 +// +// 更新分支网络详情。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) UpdateSiteNetwork(request *model.UpdateSiteNetworkRequest) (*model.UpdateSiteNetworkResponse, error) { + requestDef := GenReqDefForUpdateSiteNetwork() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.UpdateSiteNetworkResponse), nil + } +} + +// UpdateSiteNetworkInvoker 更新分支网络详情 +func (c *CcClient) UpdateSiteNetworkInvoker(request *model.UpdateSiteNetworkRequest) *UpdateSiteNetworkInvoker { + requestDef := GenReqDefForUpdateSiteNetwork() + return &UpdateSiteNetworkInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListSiteNetworkCapabilities 查询分支网络的能力列表 +// +// 查询分支网络的能力列表。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) ListSiteNetworkCapabilities(request *model.ListSiteNetworkCapabilitiesRequest) (*model.ListSiteNetworkCapabilitiesResponse, error) { + requestDef := GenReqDefForListSiteNetworkCapabilities() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListSiteNetworkCapabilitiesResponse), nil + } +} + +// ListSiteNetworkCapabilitiesInvoker 查询分支网络的能力列表 +func (c *CcClient) ListSiteNetworkCapabilitiesInvoker(request *model.ListSiteNetworkCapabilitiesRequest) *ListSiteNetworkCapabilitiesInvoker { + requestDef := GenReqDefForListSiteNetworkCapabilities() + return &ListSiteNetworkCapabilitiesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListSiteNetworkQuotas 查询分支网络配额 +// +// 查询分支网络配额。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) ListSiteNetworkQuotas(request *model.ListSiteNetworkQuotasRequest) (*model.ListSiteNetworkQuotasResponse, error) { + requestDef := GenReqDefForListSiteNetworkQuotas() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListSiteNetworkQuotasResponse), nil + } +} + +// ListSiteNetworkQuotasInvoker 查询分支网络配额 +func (c *CcClient) ListSiteNetworkQuotasInvoker(request *model.ListSiteNetworkQuotasRequest) *ListSiteNetworkQuotasInvoker { + requestDef := GenReqDefForListSiteNetworkQuotas() + return &ListSiteNetworkQuotasInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListBandwidthPackageLevels 查询带宽包等级列表 +// +// 查询带宽包等级列表 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) ListBandwidthPackageLevels(request *model.ListBandwidthPackageLevelsRequest) (*model.ListBandwidthPackageLevelsResponse, error) { + requestDef := GenReqDefForListBandwidthPackageLevels() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListBandwidthPackageLevelsResponse), nil + } +} + +// ListBandwidthPackageLevelsInvoker 查询带宽包等级列表 +func (c *CcClient) ListBandwidthPackageLevelsInvoker(request *model.ListBandwidthPackageLevelsRequest) *ListBandwidthPackageLevelsInvoker { + requestDef := GenReqDefForListBandwidthPackageLevels() + return &ListBandwidthPackageLevelsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListBandwidthPackageLines 查询带宽包线路列表 +// +// 查询带宽包线路列表 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) ListBandwidthPackageLines(request *model.ListBandwidthPackageLinesRequest) (*model.ListBandwidthPackageLinesResponse, error) { + requestDef := GenReqDefForListBandwidthPackageLines() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListBandwidthPackageLinesResponse), nil + } +} + +// ListBandwidthPackageLinesInvoker 查询带宽包线路列表 +func (c *CcClient) ListBandwidthPackageLinesInvoker(request *model.ListBandwidthPackageLinesRequest) *ListBandwidthPackageLinesInvoker { + requestDef := GenReqDefForListBandwidthPackageLines() + return &ListBandwidthPackageLinesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListBandwidthPackageSites 查询带宽包站点列表 +// +// 查询带宽包站点列表 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *CcClient) ListBandwidthPackageSites(request *model.ListBandwidthPackageSitesRequest) (*model.ListBandwidthPackageSitesResponse, error) { + requestDef := GenReqDefForListBandwidthPackageSites() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListBandwidthPackageSitesResponse), nil + } +} + +// ListBandwidthPackageSitesInvoker 查询带宽包站点列表 +func (c *CcClient) ListBandwidthPackageSitesInvoker(request *model.ListBandwidthPackageSitesRequest) *ListBandwidthPackageSitesInvoker { + requestDef := GenReqDefForListBandwidthPackageSites() + return &ListBandwidthPackageSitesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} diff --git a/services/cc/v3/cc_invoker.go b/services/cc/v3/cc_invoker.go index c549d25b6a..02dde8c85d 100644 --- a/services/cc/v3/cc_invoker.go +++ b/services/cc/v3/cc_invoker.go @@ -1380,3 +1380,227 @@ func (i *UpdateNetworkInstanceInvoker) Invoke() (*model.UpdateNetworkInstanceRes return result.(*model.UpdateNetworkInstanceResponse), nil } } + +type AssociateSiteNetworkBandwidthInvoker struct { + *invoker.BaseInvoker +} + +func (i *AssociateSiteNetworkBandwidthInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *AssociateSiteNetworkBandwidthInvoker) Invoke() (*model.AssociateSiteNetworkBandwidthResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.AssociateSiteNetworkBandwidthResponse), nil + } +} + +type DisassociateSiteNetworkBandwidthInvoker struct { + *invoker.BaseInvoker +} + +func (i *DisassociateSiteNetworkBandwidthInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *DisassociateSiteNetworkBandwidthInvoker) Invoke() (*model.DisassociateSiteNetworkBandwidthResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.DisassociateSiteNetworkBandwidthResponse), nil + } +} + +type UpdateSiteNetworkBandwidthInvoker struct { + *invoker.BaseInvoker +} + +func (i *UpdateSiteNetworkBandwidthInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *UpdateSiteNetworkBandwidthInvoker) Invoke() (*model.UpdateSiteNetworkBandwidthResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.UpdateSiteNetworkBandwidthResponse), nil + } +} + +type UpdateSiteNetworkBandwidthSizeInvoker struct { + *invoker.BaseInvoker +} + +func (i *UpdateSiteNetworkBandwidthSizeInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *UpdateSiteNetworkBandwidthSizeInvoker) Invoke() (*model.UpdateSiteNetworkBandwidthSizeResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.UpdateSiteNetworkBandwidthSizeResponse), nil + } +} + +type CreateP2PSiteNetworkInvoker struct { + *invoker.BaseInvoker +} + +func (i *CreateP2PSiteNetworkInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *CreateP2PSiteNetworkInvoker) Invoke() (*model.CreateP2PSiteNetworkResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.CreateP2PSiteNetworkResponse), nil + } +} + +type DeleteSiteNetworkInvoker struct { + *invoker.BaseInvoker +} + +func (i *DeleteSiteNetworkInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *DeleteSiteNetworkInvoker) Invoke() (*model.DeleteSiteNetworkResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.DeleteSiteNetworkResponse), nil + } +} + +type ListSiteNetworksInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListSiteNetworksInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListSiteNetworksInvoker) Invoke() (*model.ListSiteNetworksResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListSiteNetworksResponse), nil + } +} + +type ShowSiteNetworkInvoker struct { + *invoker.BaseInvoker +} + +func (i *ShowSiteNetworkInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ShowSiteNetworkInvoker) Invoke() (*model.ShowSiteNetworkResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ShowSiteNetworkResponse), nil + } +} + +type UpdateSiteNetworkInvoker struct { + *invoker.BaseInvoker +} + +func (i *UpdateSiteNetworkInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *UpdateSiteNetworkInvoker) Invoke() (*model.UpdateSiteNetworkResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.UpdateSiteNetworkResponse), nil + } +} + +type ListSiteNetworkCapabilitiesInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListSiteNetworkCapabilitiesInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListSiteNetworkCapabilitiesInvoker) Invoke() (*model.ListSiteNetworkCapabilitiesResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListSiteNetworkCapabilitiesResponse), nil + } +} + +type ListSiteNetworkQuotasInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListSiteNetworkQuotasInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListSiteNetworkQuotasInvoker) Invoke() (*model.ListSiteNetworkQuotasResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListSiteNetworkQuotasResponse), nil + } +} + +type ListBandwidthPackageLevelsInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListBandwidthPackageLevelsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListBandwidthPackageLevelsInvoker) Invoke() (*model.ListBandwidthPackageLevelsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListBandwidthPackageLevelsResponse), nil + } +} + +type ListBandwidthPackageLinesInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListBandwidthPackageLinesInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListBandwidthPackageLinesInvoker) Invoke() (*model.ListBandwidthPackageLinesResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListBandwidthPackageLinesResponse), nil + } +} + +type ListBandwidthPackageSitesInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListBandwidthPackageSitesInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListBandwidthPackageSitesInvoker) Invoke() (*model.ListBandwidthPackageSitesResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListBandwidthPackageSitesResponse), nil + } +} diff --git a/services/cc/v3/cc_meta.go b/services/cc/v3/cc_meta.go index e8fb50cfc6..cd041394dc 100644 --- a/services/cc/v3/cc_meta.go +++ b/services/cc/v3/cc_meta.go @@ -2110,3 +2110,322 @@ func GenReqDefForUpdateNetworkInstance() *def.HttpRequestDef { requestDef := reqDefBuilder.Build() return requestDef } + +func GenReqDefForAssociateSiteNetworkBandwidth() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{domain_id}/dcaas/site-network/{site_network_id}/connections/{site_connection_id}/associate"). + WithResponse(new(model.AssociateSiteNetworkBandwidthResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteNetworkId"). + WithJsonTag("site_network_id"). + WithLocationType(def.Path)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteConnectionId"). + WithJsonTag("site_connection_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForDisassociateSiteNetworkBandwidth() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{domain_id}/dcaas/site-network/{site_network_id}/connections/{site_connection_id}/disassociate"). + WithResponse(new(model.DisassociateSiteNetworkBandwidthResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteNetworkId"). + WithJsonTag("site_network_id"). + WithLocationType(def.Path)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteConnectionId"). + WithJsonTag("site_connection_id"). + WithLocationType(def.Path)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForUpdateSiteNetworkBandwidth() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{domain_id}/dcaas/site-network/{site_network_id}/connections/{site_connection_id}/update-bandwidth"). + WithResponse(new(model.UpdateSiteNetworkBandwidthResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteNetworkId"). + WithJsonTag("site_network_id"). + WithLocationType(def.Path)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteConnectionId"). + WithJsonTag("site_connection_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForUpdateSiteNetworkBandwidthSize() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{domain_id}/dcaas/site-network/{site_network_id}/connections/{site_connection_id}/update-bandwidth-size"). + WithResponse(new(model.UpdateSiteNetworkBandwidthSizeResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteNetworkId"). + WithJsonTag("site_network_id"). + WithLocationType(def.Path)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteConnectionId"). + WithJsonTag("site_connection_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForCreateP2PSiteNetwork() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{domain_id}/dcaas/p2p-site-networks"). + WithResponse(new(model.CreateP2PSiteNetworkResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForDeleteSiteNetwork() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodDelete). + WithPath("/v3/{domain_id}/dcaas/site-networks/{site_network_id}"). + WithResponse(new(model.DeleteSiteNetworkResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteNetworkId"). + WithJsonTag("site_network_id"). + WithLocationType(def.Path)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListSiteNetworks() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{domain_id}/dcaas/site-networks"). + WithResponse(new(model.ListSiteNetworksResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Limit"). + WithJsonTag("limit"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Marker"). + WithJsonTag("marker"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SortKey"). + WithJsonTag("sort_key"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SortDir"). + WithJsonTag("sort_dir"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Id"). + WithJsonTag("id"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Name"). + WithJsonTag("name"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("State"). + WithJsonTag("state"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("EnterpriseProjectId"). + WithJsonTag("enterprise_project_id"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("GlobalDcGatewayId"). + WithJsonTag("global_dc_gateway_id"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("GlobalConnectionBandwidthId"). + WithJsonTag("global_connection_bandwidth_id"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("ConnectionId"). + WithJsonTag("connection_id"). + WithLocationType(def.Query)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForShowSiteNetwork() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{domain_id}/dcaas/site-networks/{site_network_id}"). + WithResponse(new(model.ShowSiteNetworkResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteNetworkId"). + WithJsonTag("site_network_id"). + WithLocationType(def.Path)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForUpdateSiteNetwork() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPut). + WithPath("/v3/{domain_id}/dcaas/site-networks/{site_network_id}"). + WithResponse(new(model.UpdateSiteNetworkResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteNetworkId"). + WithJsonTag("site_network_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListSiteNetworkCapabilities() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{domain_id}/dcaas/site-network/capabilities"). + WithResponse(new(model.ListSiteNetworkCapabilitiesResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Specification"). + WithJsonTag("specification"). + WithLocationType(def.Query)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListSiteNetworkQuotas() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{domain_id}/dcaas/site-network/quotas"). + WithResponse(new(model.ListSiteNetworkQuotasResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("QuotaType"). + WithJsonTag("quota_type"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Limit"). + WithJsonTag("limit"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Marker"). + WithJsonTag("marker"). + WithLocationType(def.Query)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListBandwidthPackageLevels() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{domain_id}/ccaas/bandwidth-packages/levels"). + WithResponse(new(model.ListBandwidthPackageLevelsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Level"). + WithJsonTag("level"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Name"). + WithJsonTag("name"). + WithLocationType(def.Query)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListBandwidthPackageLines() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{domain_id}/ccaas/bandwidth-packages/lines"). + WithResponse(new(model.ListBandwidthPackageLinesResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Level"). + WithJsonTag("level"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Name"). + WithJsonTag("name"). + WithLocationType(def.Query)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListBandwidthPackageSites() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{domain_id}/ccaas/bandwidth-packages/sites"). + WithResponse(new(model.ListBandwidthPackageSitesResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SiteCode"). + WithJsonTag("site_code"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("RegionId"). + WithJsonTag("region_id"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Name"). + WithJsonTag("name"). + WithLocationType(def.Query)) + + requestDef := reqDefBuilder.Build() + return requestDef +} diff --git a/services/cc/v3/model/model_apply_policy_id.go b/services/cc/v3/model/model_apply_policy_id.go new file mode 100644 index 0000000000..6f461ef2e3 --- /dev/null +++ b/services/cc/v3/model/model_apply_policy_id.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type ApplyPolicyId struct { + + // 实例ID。 + ApplyPolicyId string `json:"apply_policy_id"` +} + +func (o ApplyPolicyId) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ApplyPolicyId struct{}" + } + + return strings.Join([]string{"ApplyPolicyId", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_associate_site_connection_bandwidth.go b/services/cc/v3/model/model_associate_site_connection_bandwidth.go new file mode 100644 index 0000000000..704ff243e6 --- /dev/null +++ b/services/cc/v3/model/model_associate_site_connection_bandwidth.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type AssociateSiteConnectionBandwidth struct { + + // 全域互联带宽ID。 + GlobalConnectionBandwidthId *string `json:"global_connection_bandwidth_id,omitempty"` + + // 带宽值,单位Mbps。 + BandwidthSize *int64 `json:"bandwidth_size,omitempty"` +} + +func (o AssociateSiteConnectionBandwidth) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "AssociateSiteConnectionBandwidth struct{}" + } + + return strings.Join([]string{"AssociateSiteConnectionBandwidth", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_associate_site_connection_bandwidth_request_body.go b/services/cc/v3/model/model_associate_site_connection_bandwidth_request_body.go new file mode 100644 index 0000000000..289ebbf7a2 --- /dev/null +++ b/services/cc/v3/model/model_associate_site_connection_bandwidth_request_body.go @@ -0,0 +1,20 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type AssociateSiteConnectionBandwidthRequestBody struct { + SiteConnection *AssociateSiteConnectionBandwidth `json:"site_connection"` +} + +func (o AssociateSiteConnectionBandwidthRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "AssociateSiteConnectionBandwidthRequestBody struct{}" + } + + return strings.Join([]string{"AssociateSiteConnectionBandwidthRequestBody", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_associate_site_network_bandwidth_request.go b/services/cc/v3/model/model_associate_site_network_bandwidth_request.go new file mode 100644 index 0000000000..468b90761c --- /dev/null +++ b/services/cc/v3/model/model_associate_site_network_bandwidth_request.go @@ -0,0 +1,28 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// AssociateSiteNetworkBandwidthRequest Request Object +type AssociateSiteNetworkBandwidthRequest struct { + + // 分支网络的ID。 + SiteNetworkId string `json:"site_network_id"` + + // 实例ID。 + SiteConnectionId string `json:"site_connection_id"` + + Body *AssociateSiteConnectionBandwidthRequestBody `json:"body,omitempty"` +} + +func (o AssociateSiteNetworkBandwidthRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "AssociateSiteNetworkBandwidthRequest struct{}" + } + + return strings.Join([]string{"AssociateSiteNetworkBandwidthRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_associate_site_network_bandwidth_response.go b/services/cc/v3/model/model_associate_site_network_bandwidth_response.go new file mode 100644 index 0000000000..81c3872d6f --- /dev/null +++ b/services/cc/v3/model/model_associate_site_network_bandwidth_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// AssociateSiteNetworkBandwidthResponse Response Object +type AssociateSiteNetworkBandwidthResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteConnection *SiteConnection `json:"site_connection"` + HttpStatusCode int `json:"-"` +} + +func (o AssociateSiteNetworkBandwidthResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "AssociateSiteNetworkBandwidthResponse struct{}" + } + + return strings.Join([]string{"AssociateSiteNetworkBandwidthResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_bandwidth_package_level.go b/services/cc/v3/model/model_bandwidth_package_level.go new file mode 100644 index 0000000000..e954e2bbe0 --- /dev/null +++ b/services/cc/v3/model/model_bandwidth_package_level.go @@ -0,0 +1,45 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/sdktime" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// BandwidthPackageLevel 带宽包等级 +type BandwidthPackageLevel struct { + + // 实例ID。 + Id *string `json:"id,omitempty"` + + // 带宽包等级 + Level *string `json:"level,omitempty"` + + // 实例名字。 + NameCn *string `json:"name_cn,omitempty"` + + // 实例名字。 + NameEn *string `json:"name_en,omitempty"` + + // 展示优先级,数值越低,优先级越高。 铂金系列优先级范围:1-50 金牌系列优先级范围:51-100 银牌系列优先级范围:101-150 其他:大于151 + DisplayPriority *int32 `json:"display_priority,omitempty"` + + // 描述。不支持 <>。 + Description *string `json:"description,omitempty"` + + // 创建时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + CreatedAt *sdktime.SdkTime `json:"created_at,omitempty"` + + // 更新时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + UpdatedAt *sdktime.SdkTime `json:"updated_at,omitempty"` +} + +func (o BandwidthPackageLevel) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "BandwidthPackageLevel struct{}" + } + + return strings.Join([]string{"BandwidthPackageLevel", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_bandwidth_package_line.go b/services/cc/v3/model/model_bandwidth_package_line.go new file mode 100644 index 0000000000..2075ca8369 --- /dev/null +++ b/services/cc/v3/model/model_bandwidth_package_line.go @@ -0,0 +1,38 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// BandwidthPackageLine 带宽包线路 +type BandwidthPackageLine struct { + + // RegionID。 + LocalRegionId *string `json:"local_region_id,omitempty"` + + // RegionID。 + RemoteRegionId *string `json:"remote_region_id,omitempty"` + + // 站点编码 + LocalSiteCode *string `json:"local_site_code,omitempty"` + + // 站点编码 + RemoteSiteCode *string `json:"remote_site_code,omitempty"` + + // 支持的等级列表 + SupportLevels *[]string `json:"support_levels,omitempty"` + + // 产品编码列表 + SpecCodes *[]BandwidthPackageLineSpecCode `json:"spec_codes,omitempty"` +} + +func (o BandwidthPackageLine) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "BandwidthPackageLine struct{}" + } + + return strings.Join([]string{"BandwidthPackageLine", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_bandwidth_package_line_spec_code.go b/services/cc/v3/model/model_bandwidth_package_line_spec_code.go new file mode 100644 index 0000000000..a8c372bf4e --- /dev/null +++ b/services/cc/v3/model/model_bandwidth_package_line_spec_code.go @@ -0,0 +1,41 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// BandwidthPackageLineSpecCode 带宽包线路产品 +type BandwidthPackageLineSpecCode struct { + + // 带宽包等级 + Level *string `json:"level,omitempty"` + + // 实例名字。 + NameCn *string `json:"name_cn,omitempty"` + + // 实例名字。 + NameEn *string `json:"name_en,omitempty"` + + // 带宽包实例的规格编码。 + SpecCode *string `json:"spec_code,omitempty"` + + // 最大带宽。 + MaxBandwidth *int32 `json:"max_bandwidth,omitempty"` + + // 最小带宽。 + MinBandwidth *int32 `json:"min_bandwidth,omitempty"` + + // 支持的计费模式。 + SupportBillingModes *[]BillingModeEnum `json:"support_billing_modes,omitempty"` +} + +func (o BandwidthPackageLineSpecCode) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "BandwidthPackageLineSpecCode struct{}" + } + + return strings.Join([]string{"BandwidthPackageLineSpecCode", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_bandwidth_package_site.go b/services/cc/v3/model/model_bandwidth_package_site.go new file mode 100644 index 0000000000..c6e60f6d81 --- /dev/null +++ b/services/cc/v3/model/model_bandwidth_package_site.go @@ -0,0 +1,48 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/sdktime" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// BandwidthPackageSite 带宽包站点 +type BandwidthPackageSite struct { + + // 实例ID。 + Id *string `json:"id,omitempty"` + + // 站点编码 + SiteCode *string `json:"site_code,omitempty"` + + // RegionID。 + RegionId *string `json:"region_id,omitempty"` + + // 站点类型。默认Region级别 + SiteType *string `json:"site_type,omitempty"` + + // 实例名字。 + NameCn *string `json:"name_cn,omitempty"` + + // 实例名字。 + NameEn *string `json:"name_en,omitempty"` + + // 描述。不支持 <>。 + Description *string `json:"description,omitempty"` + + // 创建时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + CreatedAt *sdktime.SdkTime `json:"created_at,omitempty"` + + // 更新时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + UpdatedAt *sdktime.SdkTime `json:"updated_at,omitempty"` +} + +func (o BandwidthPackageSite) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "BandwidthPackageSite struct{}" + } + + return strings.Join([]string{"BandwidthPackageSite", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_connection_bandwidth_charge_mode_enum.go b/services/cc/v3/model/model_connection_bandwidth_charge_mode_enum.go new file mode 100644 index 0000000000..cb103c0718 --- /dev/null +++ b/services/cc/v3/model/model_connection_bandwidth_charge_mode_enum.go @@ -0,0 +1,66 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// ConnectionBandwidthChargeModeEnum - bwd (按需按带宽计费) - trf (按流量计费) - 95 (传统95计费) - 95avr (日95计费) +type ConnectionBandwidthChargeModeEnum struct { + value string +} + +type ConnectionBandwidthChargeModeEnumEnum struct { + BWD ConnectionBandwidthChargeModeEnum + TRF ConnectionBandwidthChargeModeEnum + E_95 ConnectionBandwidthChargeModeEnum + E_95AVR ConnectionBandwidthChargeModeEnum +} + +func GetConnectionBandwidthChargeModeEnumEnum() ConnectionBandwidthChargeModeEnumEnum { + return ConnectionBandwidthChargeModeEnumEnum{ + BWD: ConnectionBandwidthChargeModeEnum{ + value: "bwd", + }, + TRF: ConnectionBandwidthChargeModeEnum{ + value: "trf", + }, + E_95: ConnectionBandwidthChargeModeEnum{ + value: "95", + }, + E_95AVR: ConnectionBandwidthChargeModeEnum{ + value: "95avr", + }, + } +} + +func (c ConnectionBandwidthChargeModeEnum) Value() string { + return c.value +} + +func (c ConnectionBandwidthChargeModeEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *ConnectionBandwidthChargeModeEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_connection_bandwidth_size_range.go b/services/cc/v3/model/model_connection_bandwidth_size_range.go new file mode 100644 index 0000000000..e3bab46f2d --- /dev/null +++ b/services/cc/v3/model/model_connection_bandwidth_size_range.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ConnectionBandwidthSizeRange json类型 +type ConnectionBandwidthSizeRange struct { + + // 最小值 + Min int64 `json:"min"` + + // 最大值 + Max int64 `json:"max"` +} + +func (o ConnectionBandwidthSizeRange) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ConnectionBandwidthSizeRange struct{}" + } + + return strings.Join([]string{"ConnectionBandwidthSizeRange", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_create_p2_p_site_network.go b/services/cc/v3/model/model_create_p2_p_site_network.go new file mode 100644 index 0000000000..a72f720784 --- /dev/null +++ b/services/cc/v3/model/model_create_p2_p_site_network.go @@ -0,0 +1,34 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type CreateP2PSiteNetwork struct { + + // 实例名字。 + Name string `json:"name"` + + // 实例描述。不支持 <>。 + Description *string `json:"description,omitempty"` + + // 实例标签。 + Tags *[]Tag `json:"tags,omitempty"` + + // 实例所属企业项目ID。 + EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` + + // 端到端(P2P)类型分支网络连接的两个端点定义,长度固定为2的数组。 + Sites []CreateSiteInformation `json:"sites"` +} + +func (o CreateP2PSiteNetwork) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateP2PSiteNetwork struct{}" + } + + return strings.Join([]string{"CreateP2PSiteNetwork", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_create_p2_p_site_network_request.go b/services/cc/v3/model/model_create_p2_p_site_network_request.go new file mode 100644 index 0000000000..85010ed028 --- /dev/null +++ b/services/cc/v3/model/model_create_p2_p_site_network_request.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CreateP2PSiteNetworkRequest Request Object +type CreateP2PSiteNetworkRequest struct { + Body *CreateP2PSiteNetworkRequestBody `json:"body,omitempty"` +} + +func (o CreateP2PSiteNetworkRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateP2PSiteNetworkRequest struct{}" + } + + return strings.Join([]string{"CreateP2PSiteNetworkRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_create_p2_p_site_network_request_body.go b/services/cc/v3/model/model_create_p2_p_site_network_request_body.go new file mode 100644 index 0000000000..409826a1f6 --- /dev/null +++ b/services/cc/v3/model/model_create_p2_p_site_network_request_body.go @@ -0,0 +1,20 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type CreateP2PSiteNetworkRequestBody struct { + P2pSiteNetwork *CreateP2PSiteNetwork `json:"p2p_site_network"` +} + +func (o CreateP2PSiteNetworkRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateP2PSiteNetworkRequestBody struct{}" + } + + return strings.Join([]string{"CreateP2PSiteNetworkRequestBody", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_create_p2_p_site_network_response.go b/services/cc/v3/model/model_create_p2_p_site_network_response.go new file mode 100644 index 0000000000..020caa7022 --- /dev/null +++ b/services/cc/v3/model/model_create_p2_p_site_network_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CreateP2PSiteNetworkResponse Response Object +type CreateP2PSiteNetworkResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteNetwork *SiteNetworkEntry `json:"site_network"` + HttpStatusCode int `json:"-"` +} + +func (o CreateP2PSiteNetworkResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateP2PSiteNetworkResponse struct{}" + } + + return strings.Join([]string{"CreateP2PSiteNetworkResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_create_site_information.go b/services/cc/v3/model/model_create_site_information.go new file mode 100644 index 0000000000..e13e4b6f66 --- /dev/null +++ b/services/cc/v3/model/model_create_site_information.go @@ -0,0 +1,30 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type CreateSiteInformation struct { + + // RegionID。 + RegionId string `json:"region_id"` + + // 实例所属项目ID。 + ProjectId string `json:"project_id"` + + GatewayType *GatewayTypeEnum `json:"gateway_type"` + + // 实例ID。 + GatewayId string `json:"gateway_id"` +} + +func (o CreateSiteInformation) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateSiteInformation struct{}" + } + + return strings.Join([]string{"CreateSiteInformation", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_create_site_information_pair.go b/services/cc/v3/model/model_create_site_information_pair.go new file mode 100644 index 0000000000..d3d7ce4142 --- /dev/null +++ b/services/cc/v3/model/model_create_site_information_pair.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type CreateSiteInformationPair struct { + + // 端到端(P2P)类型分支网络连接的两个端点定义,长度固定为2的数组。 + Sites []CreateSiteInformation `json:"sites"` +} + +func (o CreateSiteInformationPair) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateSiteInformationPair struct{}" + } + + return strings.Join([]string{"CreateSiteInformationPair", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_cross_region_type.go b/services/cc/v3/model/model_cross_region_type.go new file mode 100644 index 0000000000..ecdfd944b1 --- /dev/null +++ b/services/cc/v3/model/model_cross_region_type.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CrossRegionType 跨地域类型。 +type CrossRegionType struct { + CrossRegionType *CrossRegionTypeEnum `json:"cross_region_type"` +} + +func (o CrossRegionType) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CrossRegionType struct{}" + } + + return strings.Join([]string{"CrossRegionType", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_cross_region_type_enum.go b/services/cc/v3/model/model_cross_region_type_enum.go new file mode 100644 index 0000000000..ff68c39c0c --- /dev/null +++ b/services/cc/v3/model/model_cross_region_type_enum.go @@ -0,0 +1,58 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// CrossRegionTypeEnum 跨地域类型。 - intra-region (域内) - inter-region (跨域) +type CrossRegionTypeEnum struct { + value string +} + +type CrossRegionTypeEnumEnum struct { + INTRA_REGION CrossRegionTypeEnum + INTER_REGION CrossRegionTypeEnum +} + +func GetCrossRegionTypeEnumEnum() CrossRegionTypeEnumEnum { + return CrossRegionTypeEnumEnum{ + INTRA_REGION: CrossRegionTypeEnum{ + value: "intra-region", + }, + INTER_REGION: CrossRegionTypeEnum{ + value: "inter-region", + }, + } +} + +func (c CrossRegionTypeEnum) Value() string { + return c.value +} + +func (c CrossRegionTypeEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *CrossRegionTypeEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_delete_site_network_request.go b/services/cc/v3/model/model_delete_site_network_request.go new file mode 100644 index 0000000000..2143821f52 --- /dev/null +++ b/services/cc/v3/model/model_delete_site_network_request.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DeleteSiteNetworkRequest Request Object +type DeleteSiteNetworkRequest struct { + + // 分支网络的ID。 + SiteNetworkId string `json:"site_network_id"` +} + +func (o DeleteSiteNetworkRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DeleteSiteNetworkRequest struct{}" + } + + return strings.Join([]string{"DeleteSiteNetworkRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_delete_site_network_response.go b/services/cc/v3/model/model_delete_site_network_response.go new file mode 100644 index 0000000000..e72f700ee8 --- /dev/null +++ b/services/cc/v3/model/model_delete_site_network_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DeleteSiteNetworkResponse Response Object +type DeleteSiteNetworkResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteNetwork *SiteNetworkEntry `json:"site_network"` + HttpStatusCode int `json:"-"` +} + +func (o DeleteSiteNetworkResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DeleteSiteNetworkResponse struct{}" + } + + return strings.Join([]string{"DeleteSiteNetworkResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_directed_edge.go b/services/cc/v3/model/model_directed_edge.go new file mode 100644 index 0000000000..1c7259c25d --- /dev/null +++ b/services/cc/v3/model/model_directed_edge.go @@ -0,0 +1,36 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type DirectedEdge struct { + + // 实例ID。 + Id string `json:"id"` + + // RegionID。 + RegionId string `json:"region_id"` + + // 实例ID。 + GatewayId string `json:"gateway_id"` + + GatewayType *GatewayTypeEnum `json:"gateway_type"` + + // 站点编码定义 + SiteCode string `json:"site_code"` + + // 实例所属项目ID。 + ProjectId string `json:"project_id"` +} + +func (o DirectedEdge) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DirectedEdge struct{}" + } + + return strings.Join([]string{"DirectedEdge", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_directed_edge_pair.go b/services/cc/v3/model/model_directed_edge_pair.go new file mode 100644 index 0000000000..ec693b6697 --- /dev/null +++ b/services/cc/v3/model/model_directed_edge_pair.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DirectedEdgePair 分支网络两端接入对象。 +type DirectedEdgePair struct { + + // 分支网络连接的两个端点定义,可能为两个点,也可能为两个单向边,长度固定为2的数组。 + EdgePair []DirectedEdge `json:"edge_pair"` +} + +func (o DirectedEdgePair) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DirectedEdgePair struct{}" + } + + return strings.Join([]string{"DirectedEdgePair", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_disassociate_site_network_bandwidth_request.go b/services/cc/v3/model/model_disassociate_site_network_bandwidth_request.go new file mode 100644 index 0000000000..9a99e8c1d9 --- /dev/null +++ b/services/cc/v3/model/model_disassociate_site_network_bandwidth_request.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DisassociateSiteNetworkBandwidthRequest Request Object +type DisassociateSiteNetworkBandwidthRequest struct { + + // 分支网络的ID。 + SiteNetworkId string `json:"site_network_id"` + + // 实例ID。 + SiteConnectionId string `json:"site_connection_id"` +} + +func (o DisassociateSiteNetworkBandwidthRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DisassociateSiteNetworkBandwidthRequest struct{}" + } + + return strings.Join([]string{"DisassociateSiteNetworkBandwidthRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_disassociate_site_network_bandwidth_response.go b/services/cc/v3/model/model_disassociate_site_network_bandwidth_response.go new file mode 100644 index 0000000000..ba62aa14b1 --- /dev/null +++ b/services/cc/v3/model/model_disassociate_site_network_bandwidth_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DisassociateSiteNetworkBandwidthResponse Response Object +type DisassociateSiteNetworkBandwidthResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteConnection *SiteConnection `json:"site_connection"` + HttpStatusCode int `json:"-"` +} + +func (o DisassociateSiteNetworkBandwidthResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DisassociateSiteNetworkBandwidthResponse struct{}" + } + + return strings.Join([]string{"DisassociateSiteNetworkBandwidthResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_frozen_effect.go b/services/cc/v3/model/model_frozen_effect.go new file mode 100644 index 0000000000..c73c1488f0 --- /dev/null +++ b/services/cc/v3/model/model_frozen_effect.go @@ -0,0 +1,20 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type FrozenEffect struct { + FrozenEffect *FrozenEffectEnum `json:"frozen_effect,omitempty"` +} + +func (o FrozenEffect) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "FrozenEffect struct{}" + } + + return strings.Join([]string{"FrozenEffect", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_frozen_effect_enum.go b/services/cc/v3/model/model_frozen_effect_enum.go new file mode 100644 index 0000000000..1649490f56 --- /dev/null +++ b/services/cc/v3/model/model_frozen_effect_enum.go @@ -0,0 +1,58 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// FrozenEffectEnum 冻结效果。 - RELEASABLE(冻结可释放) - UNRELEASABLE(冻结不可释放) +type FrozenEffectEnum struct { + value string +} + +type FrozenEffectEnumEnum struct { + RELEASABLE FrozenEffectEnum + UNRELEASABLE FrozenEffectEnum +} + +func GetFrozenEffectEnumEnum() FrozenEffectEnumEnum { + return FrozenEffectEnumEnum{ + RELEASABLE: FrozenEffectEnum{ + value: "RELEASABLE", + }, + UNRELEASABLE: FrozenEffectEnum{ + value: "UNRELEASABLE", + }, + } +} + +func (c FrozenEffectEnum) Value() string { + return c.value +} + +func (c FrozenEffectEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *FrozenEffectEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_gateway_id.go b/services/cc/v3/model/model_gateway_id.go new file mode 100644 index 0000000000..dc0e169eea --- /dev/null +++ b/services/cc/v3/model/model_gateway_id.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// GatewayId 网关的ID。 +type GatewayId struct { + + // 实例ID。 + GatewayId string `json:"gateway_id"` +} + +func (o GatewayId) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "GatewayId struct{}" + } + + return strings.Join([]string{"GatewayId", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_gateway_type.go b/services/cc/v3/model/model_gateway_type.go new file mode 100644 index 0000000000..2dfb82dc0d --- /dev/null +++ b/services/cc/v3/model/model_gateway_type.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// GatewayType 网关的类型。 +type GatewayType struct { + GatewayType *GatewayTypeEnum `json:"gateway_type"` +} + +func (o GatewayType) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "GatewayType struct{}" + } + + return strings.Join([]string{"GatewayType", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_gateway_type_enum.go b/services/cc/v3/model/model_gateway_type_enum.go new file mode 100644 index 0000000000..5b17231db1 --- /dev/null +++ b/services/cc/v3/model/model_gateway_type_enum.go @@ -0,0 +1,54 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// GatewayTypeEnum 网关的类型。 - GDGW +type GatewayTypeEnum struct { + value string +} + +type GatewayTypeEnumEnum struct { + GDGW GatewayTypeEnum +} + +func GetGatewayTypeEnumEnum() GatewayTypeEnumEnum { + return GatewayTypeEnumEnum{ + GDGW: GatewayTypeEnum{ + value: "GDGW", + }, + } +} + +func (c GatewayTypeEnum) Value() string { + return c.value +} + +func (c GatewayTypeEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *GatewayTypeEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_list_bandwidth_package_levels_request.go b/services/cc/v3/model/model_list_bandwidth_package_levels_request.go new file mode 100644 index 0000000000..4cd7ed6f3f --- /dev/null +++ b/services/cc/v3/model/model_list_bandwidth_package_levels_request.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListBandwidthPackageLevelsRequest Request Object +type ListBandwidthPackageLevelsRequest struct { + + // 根据带宽包等级进行查询 + Level *string `json:"level,omitempty"` + + // 根据名称进行模糊查询 + Name *string `json:"name,omitempty"` +} + +func (o ListBandwidthPackageLevelsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListBandwidthPackageLevelsRequest struct{}" + } + + return strings.Join([]string{"ListBandwidthPackageLevelsRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_bandwidth_package_levels_response.go b/services/cc/v3/model/model_list_bandwidth_package_levels_response.go new file mode 100644 index 0000000000..6b4b355b17 --- /dev/null +++ b/services/cc/v3/model/model_list_bandwidth_package_levels_response.go @@ -0,0 +1,29 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListBandwidthPackageLevelsResponse Response Object +type ListBandwidthPackageLevelsResponse struct { + + // 带宽包等级列表。 + BandwidthPackageLevels *[]BandwidthPackageLevel `json:"bandwidth_package_levels,omitempty"` + + // 请求ID。 + RequestId *string `json:"request_id,omitempty"` + + PageInfo *PageInfo `json:"page_info,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListBandwidthPackageLevelsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListBandwidthPackageLevelsResponse struct{}" + } + + return strings.Join([]string{"ListBandwidthPackageLevelsResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_bandwidth_package_lines_request.go b/services/cc/v3/model/model_list_bandwidth_package_lines_request.go new file mode 100644 index 0000000000..e4bd74a156 --- /dev/null +++ b/services/cc/v3/model/model_list_bandwidth_package_lines_request.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListBandwidthPackageLinesRequest Request Object +type ListBandwidthPackageLinesRequest struct { + + // 根据带宽包等级进行查询 + Level *string `json:"level,omitempty"` + + // 根据名称进行模糊查询 + Name *string `json:"name,omitempty"` +} + +func (o ListBandwidthPackageLinesRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListBandwidthPackageLinesRequest struct{}" + } + + return strings.Join([]string{"ListBandwidthPackageLinesRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_bandwidth_package_lines_response.go b/services/cc/v3/model/model_list_bandwidth_package_lines_response.go new file mode 100644 index 0000000000..fd91cbd8f3 --- /dev/null +++ b/services/cc/v3/model/model_list_bandwidth_package_lines_response.go @@ -0,0 +1,27 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListBandwidthPackageLinesResponse Response Object +type ListBandwidthPackageLinesResponse struct { + + // 带宽包线路列表。 + BandwidthPackageLines *[]BandwidthPackageLine `json:"bandwidth_package_lines,omitempty"` + + // 请求ID。 + RequestId *string `json:"request_id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListBandwidthPackageLinesResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListBandwidthPackageLinesResponse struct{}" + } + + return strings.Join([]string{"ListBandwidthPackageLinesResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_bandwidth_package_sites_request.go b/services/cc/v3/model/model_list_bandwidth_package_sites_request.go new file mode 100644 index 0000000000..354c9d8ebe --- /dev/null +++ b/services/cc/v3/model/model_list_bandwidth_package_sites_request.go @@ -0,0 +1,29 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListBandwidthPackageSitesRequest Request Object +type ListBandwidthPackageSitesRequest struct { + + // 根据站点编码进行查询 + SiteCode *string `json:"site_code,omitempty"` + + // 根据区域ID进行查询 + RegionId *string `json:"region_id,omitempty"` + + // 根据名称模糊查询 + Name *string `json:"name,omitempty"` +} + +func (o ListBandwidthPackageSitesRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListBandwidthPackageSitesRequest struct{}" + } + + return strings.Join([]string{"ListBandwidthPackageSitesRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_bandwidth_package_sites_response.go b/services/cc/v3/model/model_list_bandwidth_package_sites_response.go new file mode 100644 index 0000000000..b881280849 --- /dev/null +++ b/services/cc/v3/model/model_list_bandwidth_package_sites_response.go @@ -0,0 +1,29 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListBandwidthPackageSitesResponse Response Object +type ListBandwidthPackageSitesResponse struct { + + // 站点列表表。 + BandwidthPackageSites *[]BandwidthPackageSite `json:"bandwidth_package_sites,omitempty"` + + // 请求ID。 + RequestId *string `json:"request_id,omitempty"` + + PageInfo *PageInfo `json:"page_info,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListBandwidthPackageSitesResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListBandwidthPackageSitesResponse struct{}" + } + + return strings.Join([]string{"ListBandwidthPackageSitesResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_site_network_capabilities_request.go b/services/cc/v3/model/model_list_site_network_capabilities_request.go new file mode 100644 index 0000000000..b4df31899a --- /dev/null +++ b/services/cc/v3/model/model_list_site_network_capabilities_request.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListSiteNetworkCapabilitiesRequest Request Object +type ListSiteNetworkCapabilitiesRequest struct { + + // 根据分支网络租户能力名查询,可查询多个类型。 + Specification *[]SiteNetworkSpecificationEnum `json:"specification,omitempty"` +} + +func (o ListSiteNetworkCapabilitiesRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListSiteNetworkCapabilitiesRequest struct{}" + } + + return strings.Join([]string{"ListSiteNetworkCapabilitiesRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_site_network_capabilities_response.go b/services/cc/v3/model/model_list_site_network_capabilities_response.go new file mode 100644 index 0000000000..25229b38aa --- /dev/null +++ b/services/cc/v3/model/model_list_site_network_capabilities_response.go @@ -0,0 +1,27 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListSiteNetworkCapabilitiesResponse Response Object +type ListSiteNetworkCapabilitiesResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + // 分支网络租户能力列表。 + Capabilities []SiteNetworkCapabilityEntry `json:"capabilities"` + HttpStatusCode int `json:"-"` +} + +func (o ListSiteNetworkCapabilitiesResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListSiteNetworkCapabilitiesResponse struct{}" + } + + return strings.Join([]string{"ListSiteNetworkCapabilitiesResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_site_network_quotas_request.go b/services/cc/v3/model/model_list_site_network_quotas_request.go new file mode 100644 index 0000000000..81e1995bad --- /dev/null +++ b/services/cc/v3/model/model_list_site_network_quotas_request.go @@ -0,0 +1,29 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListSiteNetworkQuotasRequest Request Object +type ListSiteNetworkQuotasRequest struct { + + // 根据配额类型查询,可查询多个类型。 + QuotaType *[]SiteNetworkQuotaKeyEnum `json:"quota_type,omitempty"` + + // 每页返回的个数。 取值范围:1~1000。 + Limit *int32 `json:"limit,omitempty"` + + // 翻页信息,从上次API调用返回的翻页数据中获取,可填写前一页marker或者后一页marker,填入前一页previous_marker就向前翻页,后一页next_marker就向翻页。 翻页过程中,查询条件不能修改,包括过滤条件,排序条件,limit。 + Marker *string `json:"marker,omitempty"` +} + +func (o ListSiteNetworkQuotasRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListSiteNetworkQuotasRequest struct{}" + } + + return strings.Join([]string{"ListSiteNetworkQuotasRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_site_network_quotas_response.go b/services/cc/v3/model/model_list_site_network_quotas_response.go new file mode 100644 index 0000000000..b940b18cb7 --- /dev/null +++ b/services/cc/v3/model/model_list_site_network_quotas_response.go @@ -0,0 +1,27 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListSiteNetworkQuotasResponse Response Object +type ListSiteNetworkQuotasResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + // 分支网络的配额列表。 + Quotas []SiteNetworkQuota `json:"quotas"` + HttpStatusCode int `json:"-"` +} + +func (o ListSiteNetworkQuotasResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListSiteNetworkQuotasResponse struct{}" + } + + return strings.Join([]string{"ListSiteNetworkQuotasResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_site_networks_request.go b/services/cc/v3/model/model_list_site_networks_request.go new file mode 100644 index 0000000000..b6e2b33c60 --- /dev/null +++ b/services/cc/v3/model/model_list_site_networks_request.go @@ -0,0 +1,53 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListSiteNetworksRequest Request Object +type ListSiteNetworksRequest struct { + + // 每页返回的个数。 取值范围:1~1000。 + Limit *int32 `json:"limit,omitempty"` + + // 翻页信息,从上次API调用返回的翻页数据中获取,可填写前一页marker或者后一页marker,填入前一页previous_marker就向前翻页,后一页next_marker就向翻页。 翻页过程中,查询条件不能修改,包括过滤条件,排序条件,limit。 + Marker *string `json:"marker,omitempty"` + + // 排序字段。 + SortKey *string `json:"sort_key,omitempty"` + + // 指定排序是升序还是降序(asc为升序,desc为降序)。 + SortDir *SortDir `json:"sort_dir,omitempty"` + + // 根据id查询,可查询多个id。 + Id *[]string `json:"id,omitempty"` + + // 根据名字查询,可查询多个名字。 + Name *[]string `json:"name,omitempty"` + + // 根据状态查询,可查询多个状态。 + State *[]SiteNetworkStateEnum `json:"state,omitempty"` + + // 根据企业项目ID过滤列表。 + EnterpriseProjectId *[]string `json:"enterprise_project_id,omitempty"` + + // 根据GDW实例ID过滤列表。 + GlobalDcGatewayId *[]string `json:"global_dc_gateway_id,omitempty"` + + // 根据带宽包ID过滤。 + GlobalConnectionBandwidthId *[]string `json:"global_connection_bandwidth_id,omitempty"` + + // 分支连接的ID。 + ConnectionId *[]string `json:"connection_id,omitempty"` +} + +func (o ListSiteNetworksRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListSiteNetworksRequest struct{}" + } + + return strings.Join([]string{"ListSiteNetworksRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_list_site_networks_response.go b/services/cc/v3/model/model_list_site_networks_response.go new file mode 100644 index 0000000000..a4d442a9e0 --- /dev/null +++ b/services/cc/v3/model/model_list_site_networks_response.go @@ -0,0 +1,29 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListSiteNetworksResponse Response Object +type ListSiteNetworksResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + PageInfo *PageInfo `json:"page_info,omitempty"` + + // 分支网络列表。 + SiteNetworks []SiteNetworkEntry `json:"site_networks"` + HttpStatusCode int `json:"-"` +} + +func (o ListSiteNetworksResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListSiteNetworksResponse struct{}" + } + + return strings.Join([]string{"ListSiteNetworksResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_show_site_network_request.go b/services/cc/v3/model/model_show_site_network_request.go new file mode 100644 index 0000000000..f800a3043b --- /dev/null +++ b/services/cc/v3/model/model_show_site_network_request.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ShowSiteNetworkRequest Request Object +type ShowSiteNetworkRequest struct { + + // 分支网络的ID。 + SiteNetworkId string `json:"site_network_id"` +} + +func (o ShowSiteNetworkRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ShowSiteNetworkRequest struct{}" + } + + return strings.Join([]string{"ShowSiteNetworkRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_show_site_network_response.go b/services/cc/v3/model/model_show_site_network_response.go new file mode 100644 index 0000000000..f2437a2247 --- /dev/null +++ b/services/cc/v3/model/model_show_site_network_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ShowSiteNetworkResponse Response Object +type ShowSiteNetworkResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteNetwork *SiteNetworkEntry `json:"site_network"` + HttpStatusCode int `json:"-"` +} + +func (o ShowSiteNetworkResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ShowSiteNetworkResponse struct{}" + } + + return strings.Join([]string{"ShowSiteNetworkResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_connection.go b/services/cc/v3/model/model_site_connection.go new file mode 100644 index 0000000000..900df21b94 --- /dev/null +++ b/services/cc/v3/model/model_site_connection.go @@ -0,0 +1,54 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/sdktime" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteConnection 分支连接。 +type SiteConnection struct { + + // 实例ID。 + Id string `json:"id"` + + // 实例ID。 + SiteNetworkId string `json:"site_network_id"` + + State *SiteConnectionStateEnum `json:"state"` + + // 实例创建时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + CreatedAt *sdktime.SdkTime `json:"created_at"` + + // 实例更新时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + UpdatedAt *sdktime.SdkTime `json:"updated_at"` + + // 分支网络连接的两个端点定义,可能为两个点,也可能为两个单向边,长度固定为2的数组。 + EdgePair []DirectedEdge `json:"edge_pair"` + + CrossRegionType *CrossRegionTypeEnum `json:"cross_region_type"` + + // 全域互联带宽ID。 + GlobalConnectionBandwidthId *string `json:"global_connection_bandwidth_id,omitempty"` + + // 带宽值,单位Mbps。 + BandwidthSize *int64 `json:"bandwidth_size,omitempty"` + + // 是否冻结 + IsFrozen bool `json:"is_frozen"` + + FrozenEffect *FrozenEffectEnum `json:"frozen_effect,omitempty"` + + // 是否绑定带宽包。 + IsBindBandwidth *bool `json:"is_bind_bandwidth,omitempty"` +} + +func (o SiteConnection) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteConnection struct{}" + } + + return strings.Join([]string{"SiteConnection", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_connection_state.go b/services/cc/v3/model/model_site_connection_state.go new file mode 100644 index 0000000000..ab0aeb397e --- /dev/null +++ b/services/cc/v3/model/model_site_connection_state.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteConnectionState 实例状态。 +type SiteConnectionState struct { + State *SiteConnectionStateEnum `json:"state"` +} + +func (o SiteConnectionState) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteConnectionState struct{}" + } + + return strings.Join([]string{"SiteConnectionState", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_connection_state_enum.go b/services/cc/v3/model/model_site_connection_state_enum.go new file mode 100644 index 0000000000..9e890ec062 --- /dev/null +++ b/services/cc/v3/model/model_site_connection_state_enum.go @@ -0,0 +1,90 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// SiteConnectionStateEnum 中心网络连接状态。 - AVAILABLE (可用) - CREATING (创建中) - UPDATING (更新中) - DELETING (删除中) - FREEZING (冻结中) - UNFREEZING (解冻中) - RECOVERING (恢复中) - FAILED (失败) - FREEZED (冻结) - DELETED (已刪除) +type SiteConnectionStateEnum struct { + value string +} + +type SiteConnectionStateEnumEnum struct { + AVAILABLE SiteConnectionStateEnum + CREATING SiteConnectionStateEnum + UPDATING SiteConnectionStateEnum + DELETING SiteConnectionStateEnum + FREEZING SiteConnectionStateEnum + UNFREEZING SiteConnectionStateEnum + RECOVERING SiteConnectionStateEnum + FAILED SiteConnectionStateEnum + FREEZED SiteConnectionStateEnum + DELETED SiteConnectionStateEnum +} + +func GetSiteConnectionStateEnumEnum() SiteConnectionStateEnumEnum { + return SiteConnectionStateEnumEnum{ + AVAILABLE: SiteConnectionStateEnum{ + value: "AVAILABLE", + }, + CREATING: SiteConnectionStateEnum{ + value: "CREATING", + }, + UPDATING: SiteConnectionStateEnum{ + value: "UPDATING", + }, + DELETING: SiteConnectionStateEnum{ + value: "DELETING", + }, + FREEZING: SiteConnectionStateEnum{ + value: "FREEZING", + }, + UNFREEZING: SiteConnectionStateEnum{ + value: "UNFREEZING", + }, + RECOVERING: SiteConnectionStateEnum{ + value: "RECOVERING", + }, + FAILED: SiteConnectionStateEnum{ + value: "FAILED", + }, + FREEZED: SiteConnectionStateEnum{ + value: "FREEZED", + }, + DELETED: SiteConnectionStateEnum{ + value: "DELETED", + }, + } +} + +func (c SiteConnectionStateEnum) Value() string { + return c.value +} + +func (c SiteConnectionStateEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *SiteConnectionStateEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_site_information.go b/services/cc/v3/model/model_site_information.go new file mode 100644 index 0000000000..a14b1d6c7b --- /dev/null +++ b/services/cc/v3/model/model_site_information.go @@ -0,0 +1,37 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteInformation 分支信息。 +type SiteInformation struct { + + // RegionID。 + RegionId string `json:"region_id"` + + // 实例所属项目ID。 + ProjectId string `json:"project_id"` + + GatewayType *GatewayTypeEnum `json:"gateway_type"` + + // 实例ID。 + GatewayId string `json:"gateway_id"` + + // 站点编码定义 + SiteCode string `json:"site_code"` + + // 网络实例BGP协议的AS号。 + Asn int64 `json:"asn"` +} + +func (o SiteInformation) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteInformation struct{}" + } + + return strings.Join([]string{"SiteInformation", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_capability_entry.go b/services/cc/v3/model/model_site_network_capability_entry.go new file mode 100644 index 0000000000..f87766d297 --- /dev/null +++ b/services/cc/v3/model/model_site_network_capability_entry.go @@ -0,0 +1,60 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteNetworkCapabilityEntry 分支网络租户能力详情条目。 +type SiteNetworkCapabilityEntry struct { + + // 实例ID。 + Id string `json:"id"` + + // 实例所属账号ID。 + DomainId string `json:"domain_id"` + + Specification *SiteNetworkSpecificationEnum `json:"specification"` + + // 是否支持分支网络。 + IsSupport *bool `json:"is_support,omitempty"` + + // 是否支持分支网络企业项目。 + IsSupportEnterpriseProject *bool `json:"is_support_enterprise_project,omitempty"` + + // 是否支持分支网络标签。 + IsSupportTag *bool `json:"is_support_tag,omitempty"` + + // 是否支持创建同region分支网络。 + IsSupportIntraRegion *bool `json:"is_support_intra_region,omitempty"` + + // 分支网络的拓扑列表。 + SupportTopologies *[]SiteNetworkTopologyEnum `json:"support_topologies,omitempty"` + + // list类型 + SupportRegions *[]string `json:"support_regions,omitempty"` + + // list类型 + SupportDscpRegions *[]string `json:"support_dscp_regions,omitempty"` + + // list类型 + SupportFreezeRegions *[]string `json:"support_freeze_regions,omitempty"` + + // list类型 + SupportLocations *[]string `json:"support_locations,omitempty"` + + SizeRange *ConnectionBandwidthSizeRange `json:"size_range,omitempty"` + + // list类型 + ChargeMode *[]ConnectionBandwidthChargeModeEnum `json:"charge_mode,omitempty"` +} + +func (o SiteNetworkCapabilityEntry) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteNetworkCapabilityEntry struct{}" + } + + return strings.Join([]string{"SiteNetworkCapabilityEntry", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_entry.go b/services/cc/v3/model/model_site_network_entry.go new file mode 100644 index 0000000000..00e86f9973 --- /dev/null +++ b/services/cc/v3/model/model_site_network_entry.go @@ -0,0 +1,63 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/sdktime" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteNetworkEntry 分支网络。 +type SiteNetworkEntry struct { + + // 实例ID。 + Id string `json:"id"` + + // 实例名字。 + Name string `json:"name"` + + // 实例描述。不支持 <>。 + Description *string `json:"description,omitempty"` + + // 实例创建时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + CreatedAt *sdktime.SdkTime `json:"created_at"` + + // 实例更新时间。UTC时间格式,yyyy-MM-ddTHH:mm:ss。 + UpdatedAt *sdktime.SdkTime `json:"updated_at"` + + // 实例所属账号ID。 + DomainId string `json:"domain_id"` + + State *SiteNetworkStateEnum `json:"state"` + + // 实例所属企业项目ID。 + EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` + + // 实例ID。 + ApplyPolicyId string `json:"apply_policy_id"` + + // 实例标签。 + Tags *[]Tag `json:"tags,omitempty"` + + Topology *SiteNetworkTopologyEnum `json:"topology"` + + // 分支连接列表。 + Connections []SiteConnection `json:"connections"` + + // p2p拓扑或者网状(mesh)拓扑中的节点。 + Sites *[]SiteInformation `json:"sites,omitempty"` + + HubSite *SiteInformation `json:"hub_site,omitempty"` + + // 分支列表。 + SpokeSites *[]SiteInformation `json:"spoke_sites,omitempty"` +} + +func (o SiteNetworkEntry) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteNetworkEntry struct{}" + } + + return strings.Join([]string{"SiteNetworkEntry", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_id.go b/services/cc/v3/model/model_site_network_id.go new file mode 100644 index 0000000000..a87f72142a --- /dev/null +++ b/services/cc/v3/model/model_site_network_id.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteNetworkId 分支网络ID。 +type SiteNetworkId struct { + + // 实例ID。 + SiteNetworkId string `json:"site_network_id"` +} + +func (o SiteNetworkId) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteNetworkId struct{}" + } + + return strings.Join([]string{"SiteNetworkId", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_quota.go b/services/cc/v3/model/model_site_network_quota.go new file mode 100644 index 0000000000..1b17498573 --- /dev/null +++ b/services/cc/v3/model/model_site_network_quota.go @@ -0,0 +1,30 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteNetworkQuota 分支网络租户配额详情。 +type SiteNetworkQuota struct { + QuotaKey *SiteNetworkQuotaKeyEnum `json:"quota_key"` + + // 配额大小。 + QuotaLimit int32 `json:"quota_limit"` + + // 已使用配额。 + Used int32 `json:"used"` + + // 配额值的单位。 + Unit string `json:"unit"` +} + +func (o SiteNetworkQuota) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteNetworkQuota struct{}" + } + + return strings.Join([]string{"SiteNetworkQuota", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_quota_key.go b/services/cc/v3/model/model_site_network_quota_key.go new file mode 100644 index 0000000000..f41f5bccce --- /dev/null +++ b/services/cc/v3/model/model_site_network_quota_key.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteNetworkQuotaKey 带宽值,单位Mbps。 +type SiteNetworkQuotaKey struct { + QuotaKey *SiteNetworkQuotaKeyEnum `json:"quota_key"` +} + +func (o SiteNetworkQuotaKey) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteNetworkQuotaKey struct{}" + } + + return strings.Join([]string{"SiteNetworkQuotaKey", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_quota_key_enum.go b/services/cc/v3/model/model_site_network_quota_key_enum.go new file mode 100644 index 0000000000..65b2a4e005 --- /dev/null +++ b/services/cc/v3/model/model_site_network_quota_key_enum.go @@ -0,0 +1,66 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// SiteNetworkQuotaKeyEnum 分支网络配额类型。 - site_networks_per_account (每个账户的分支网络数) - sites_per_mesh_site_network (网状分支网络的分支数) - spoke_sites_per_star_site_network (星状分支网络的Spoke分支数) - sites_per_hybrid_site_network (混合分支网络的分支数) +type SiteNetworkQuotaKeyEnum struct { + value string +} + +type SiteNetworkQuotaKeyEnumEnum struct { + SITE_NETWORKS_PER_ACCOUNT SiteNetworkQuotaKeyEnum + SITES_PER_MESH_SITE_NETWORK SiteNetworkQuotaKeyEnum + SPOKE_SITES_PER_STAR_SITE_NETWORK SiteNetworkQuotaKeyEnum + SITES_PER_HYBRID_SITE_NETWORK SiteNetworkQuotaKeyEnum +} + +func GetSiteNetworkQuotaKeyEnumEnum() SiteNetworkQuotaKeyEnumEnum { + return SiteNetworkQuotaKeyEnumEnum{ + SITE_NETWORKS_PER_ACCOUNT: SiteNetworkQuotaKeyEnum{ + value: "site_networks_per_account", + }, + SITES_PER_MESH_SITE_NETWORK: SiteNetworkQuotaKeyEnum{ + value: "sites_per_mesh_site_network", + }, + SPOKE_SITES_PER_STAR_SITE_NETWORK: SiteNetworkQuotaKeyEnum{ + value: "spoke_sites_per_star_site_network", + }, + SITES_PER_HYBRID_SITE_NETWORK: SiteNetworkQuotaKeyEnum{ + value: "sites_per_hybrid_site_network", + }, + } +} + +func (c SiteNetworkQuotaKeyEnum) Value() string { + return c.value +} + +func (c SiteNetworkQuotaKeyEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *SiteNetworkQuotaKeyEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_site_network_specification_enum.go b/services/cc/v3/model/model_site_network_specification_enum.go new file mode 100644 index 0000000000..9c5706de1f --- /dev/null +++ b/services/cc/v3/model/model_site_network_specification_enum.go @@ -0,0 +1,98 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// SiteNetworkSpecificationEnum 分支网络的规格类型定义: - site-network.is-support: 支持分支网络。 - site-network.is-support-enterprise-project: 支持分支网络的企业项目。 - site-network.is-support-tag: 支持分支网络的标签能力。 - site-network.is-support-intra-region: 支持同region创建分支网络。 - site-network.support-topologies: 支持分支网络拓扑。 - site-network.support-regions: 支持分支接入的Region列表。 - site-network.support-dscp-regions: 支持分支接入的Region列表 - site-network.support-freeze-regions: 支持分支网络冻结的Region列表 - site-network.support-locations: 支持分支接入点列表。 - site-connection-bandwidth.size-range: 分支连接带宽大小的范围。 - site-connection-bandwidth.charge-mode: 分支连接带宽计费类型。 - site-connection-bandwidth.free-line: 分支连接带宽免费线路。 +type SiteNetworkSpecificationEnum struct { + value string +} + +type SiteNetworkSpecificationEnumEnum struct { + SITE_NETWORK_IS_SUPPORT SiteNetworkSpecificationEnum + SITE_NETWORK_IS_SUPPORT_ENTERPRISE_PROJECT SiteNetworkSpecificationEnum + SITE_NETWORK_IS_SUPPORT_TAG SiteNetworkSpecificationEnum + SITE_NETWORK_IS_SUPPORT_INTRA_REGION SiteNetworkSpecificationEnum + SITE_NETWORK_SUPPORT_TOPOLOGIES SiteNetworkSpecificationEnum + SITE_NETWORK_SUPPORT_REGIONS SiteNetworkSpecificationEnum + SITE_NETWORK_SUPPORT_DSCP_REGIONS SiteNetworkSpecificationEnum + SITE_NETWORK_SUPPORT_FREEZE_REGIONS SiteNetworkSpecificationEnum + SITE_NETWORK_SUPPORT_LOCATIONS SiteNetworkSpecificationEnum + SITE_CONNECTION_BANDWIDTH_SIZE_RANGE SiteNetworkSpecificationEnum + SITE_CONNECTION_BANDWIDTH_CHARGE_MODE SiteNetworkSpecificationEnum + SITE_CONNECTION_BANDWIDTH_FREE_LINE SiteNetworkSpecificationEnum +} + +func GetSiteNetworkSpecificationEnumEnum() SiteNetworkSpecificationEnumEnum { + return SiteNetworkSpecificationEnumEnum{ + SITE_NETWORK_IS_SUPPORT: SiteNetworkSpecificationEnum{ + value: "site-network.is-support", + }, + SITE_NETWORK_IS_SUPPORT_ENTERPRISE_PROJECT: SiteNetworkSpecificationEnum{ + value: "site-network.is-support-enterprise-project", + }, + SITE_NETWORK_IS_SUPPORT_TAG: SiteNetworkSpecificationEnum{ + value: "site-network.is-support-tag", + }, + SITE_NETWORK_IS_SUPPORT_INTRA_REGION: SiteNetworkSpecificationEnum{ + value: "site-network.is-support-intra-region", + }, + SITE_NETWORK_SUPPORT_TOPOLOGIES: SiteNetworkSpecificationEnum{ + value: "site-network.support-topologies", + }, + SITE_NETWORK_SUPPORT_REGIONS: SiteNetworkSpecificationEnum{ + value: "site-network.support-regions", + }, + SITE_NETWORK_SUPPORT_DSCP_REGIONS: SiteNetworkSpecificationEnum{ + value: "site-network.support-dscp-regions", + }, + SITE_NETWORK_SUPPORT_FREEZE_REGIONS: SiteNetworkSpecificationEnum{ + value: "site-network.support-freeze-regions", + }, + SITE_NETWORK_SUPPORT_LOCATIONS: SiteNetworkSpecificationEnum{ + value: "site-network.support-locations", + }, + SITE_CONNECTION_BANDWIDTH_SIZE_RANGE: SiteNetworkSpecificationEnum{ + value: "site-connection-bandwidth.size-range", + }, + SITE_CONNECTION_BANDWIDTH_CHARGE_MODE: SiteNetworkSpecificationEnum{ + value: "site-connection-bandwidth.charge-mode", + }, + SITE_CONNECTION_BANDWIDTH_FREE_LINE: SiteNetworkSpecificationEnum{ + value: "site-connection-bandwidth.free-line", + }, + } +} + +func (c SiteNetworkSpecificationEnum) Value() string { + return c.value +} + +func (c SiteNetworkSpecificationEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *SiteNetworkSpecificationEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_site_network_state.go b/services/cc/v3/model/model_site_network_state.go new file mode 100644 index 0000000000..192130783e --- /dev/null +++ b/services/cc/v3/model/model_site_network_state.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteNetworkState 分支网络状态。 +type SiteNetworkState struct { + State *SiteNetworkStateEnum `json:"state"` +} + +func (o SiteNetworkState) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteNetworkState struct{}" + } + + return strings.Join([]string{"SiteNetworkState", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_state_enum.go b/services/cc/v3/model/model_site_network_state_enum.go new file mode 100644 index 0000000000..f71e0599d9 --- /dev/null +++ b/services/cc/v3/model/model_site_network_state_enum.go @@ -0,0 +1,82 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// SiteNetworkStateEnum 中心网络状态。 - AVAILABLE (可用) - UPDATING (处理中) - FAILED (失败) - CREATING (创建中) - DELETING (删除中) - DELETED (已刪除) - NON-COMPLETE (配置未完成) - RESTORING (恢复中) +type SiteNetworkStateEnum struct { + value string +} + +type SiteNetworkStateEnumEnum struct { + AVAILABLE SiteNetworkStateEnum + UPDATING SiteNetworkStateEnum + FAILED SiteNetworkStateEnum + CREATING SiteNetworkStateEnum + DELETING SiteNetworkStateEnum + DELETED SiteNetworkStateEnum + NON_COMPLETE SiteNetworkStateEnum + RESTORING SiteNetworkStateEnum +} + +func GetSiteNetworkStateEnumEnum() SiteNetworkStateEnumEnum { + return SiteNetworkStateEnumEnum{ + AVAILABLE: SiteNetworkStateEnum{ + value: "AVAILABLE", + }, + UPDATING: SiteNetworkStateEnum{ + value: "UPDATING", + }, + FAILED: SiteNetworkStateEnum{ + value: "FAILED", + }, + CREATING: SiteNetworkStateEnum{ + value: "CREATING", + }, + DELETING: SiteNetworkStateEnum{ + value: "DELETING", + }, + DELETED: SiteNetworkStateEnum{ + value: "DELETED", + }, + NON_COMPLETE: SiteNetworkStateEnum{ + value: "NON-COMPLETE", + }, + RESTORING: SiteNetworkStateEnum{ + value: "RESTORING", + }, + } +} + +func (c SiteNetworkStateEnum) Value() string { + return c.value +} + +func (c SiteNetworkStateEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *SiteNetworkStateEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_site_network_topology.go b/services/cc/v3/model/model_site_network_topology.go new file mode 100644 index 0000000000..1843ec1cd6 --- /dev/null +++ b/services/cc/v3/model/model_site_network_topology.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// SiteNetworkTopology 拓扑结构。 +type SiteNetworkTopology struct { + Topology *SiteNetworkTopologyEnum `json:"topology"` +} + +func (o SiteNetworkTopology) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "SiteNetworkTopology struct{}" + } + + return strings.Join([]string{"SiteNetworkTopology", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_site_network_topology_enum.go b/services/cc/v3/model/model_site_network_topology_enum.go new file mode 100644 index 0000000000..01fb4b914e --- /dev/null +++ b/services/cc/v3/model/model_site_network_topology_enum.go @@ -0,0 +1,66 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// SiteNetworkTopologyEnum 拓扑结构。 - p2p(点对点拓扑) - mesh (网状拓扑) - star (星形拓扑) - hybrid (混合拓扑) +type SiteNetworkTopologyEnum struct { + value string +} + +type SiteNetworkTopologyEnumEnum struct { + P2P SiteNetworkTopologyEnum + MESH SiteNetworkTopologyEnum + STAR SiteNetworkTopologyEnum + HYBRID SiteNetworkTopologyEnum +} + +func GetSiteNetworkTopologyEnumEnum() SiteNetworkTopologyEnumEnum { + return SiteNetworkTopologyEnumEnum{ + P2P: SiteNetworkTopologyEnum{ + value: "p2p", + }, + MESH: SiteNetworkTopologyEnum{ + value: "mesh", + }, + STAR: SiteNetworkTopologyEnum{ + value: "star", + }, + HYBRID: SiteNetworkTopologyEnum{ + value: "hybrid", + }, + } +} + +func (c SiteNetworkTopologyEnum) Value() string { + return c.value +} + +func (c SiteNetworkTopologyEnum) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *SiteNetworkTopologyEnum) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/cc/v3/model/model_update_site_connection_bandwidth_size.go b/services/cc/v3/model/model_update_site_connection_bandwidth_size.go new file mode 100644 index 0000000000..8b340e0669 --- /dev/null +++ b/services/cc/v3/model/model_update_site_connection_bandwidth_size.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type UpdateSiteConnectionBandwidthSize struct { + + // 带宽值,单位Mbps。 + BandwidthSize *int64 `json:"bandwidth_size,omitempty"` +} + +func (o UpdateSiteConnectionBandwidthSize) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteConnectionBandwidthSize struct{}" + } + + return strings.Join([]string{"UpdateSiteConnectionBandwidthSize", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_connection_bandwidth_size_request_body.go b/services/cc/v3/model/model_update_site_connection_bandwidth_size_request_body.go new file mode 100644 index 0000000000..2e060eee6d --- /dev/null +++ b/services/cc/v3/model/model_update_site_connection_bandwidth_size_request_body.go @@ -0,0 +1,20 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type UpdateSiteConnectionBandwidthSizeRequestBody struct { + SiteConnection *UpdateSiteConnectionBandwidthSize `json:"site_connection"` +} + +func (o UpdateSiteConnectionBandwidthSizeRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteConnectionBandwidthSizeRequestBody struct{}" + } + + return strings.Join([]string{"UpdateSiteConnectionBandwidthSizeRequestBody", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network.go b/services/cc/v3/model/model_update_site_network.go new file mode 100644 index 0000000000..eed253333f --- /dev/null +++ b/services/cc/v3/model/model_update_site_network.go @@ -0,0 +1,29 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetwork 更新分支网络的详细信息。 +type UpdateSiteNetwork struct { + + // 实例名字。 + Name *string `json:"name,omitempty"` + + // 实例描述。不支持 <>。 + Description *string `json:"description,omitempty"` + + // 实例标签。 + Tags *[]Tag `json:"tags,omitempty"` +} + +func (o UpdateSiteNetwork) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetwork struct{}" + } + + return strings.Join([]string{"UpdateSiteNetwork", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network_bandwidth_request.go b/services/cc/v3/model/model_update_site_network_bandwidth_request.go new file mode 100644 index 0000000000..faa840674c --- /dev/null +++ b/services/cc/v3/model/model_update_site_network_bandwidth_request.go @@ -0,0 +1,28 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetworkBandwidthRequest Request Object +type UpdateSiteNetworkBandwidthRequest struct { + + // 分支网络的ID。 + SiteNetworkId string `json:"site_network_id"` + + // 实例ID。 + SiteConnectionId string `json:"site_connection_id"` + + Body *AssociateSiteConnectionBandwidthRequestBody `json:"body,omitempty"` +} + +func (o UpdateSiteNetworkBandwidthRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetworkBandwidthRequest struct{}" + } + + return strings.Join([]string{"UpdateSiteNetworkBandwidthRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network_bandwidth_response.go b/services/cc/v3/model/model_update_site_network_bandwidth_response.go new file mode 100644 index 0000000000..93f1956a25 --- /dev/null +++ b/services/cc/v3/model/model_update_site_network_bandwidth_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetworkBandwidthResponse Response Object +type UpdateSiteNetworkBandwidthResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteConnection *SiteConnection `json:"site_connection"` + HttpStatusCode int `json:"-"` +} + +func (o UpdateSiteNetworkBandwidthResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetworkBandwidthResponse struct{}" + } + + return strings.Join([]string{"UpdateSiteNetworkBandwidthResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network_bandwidth_size_request.go b/services/cc/v3/model/model_update_site_network_bandwidth_size_request.go new file mode 100644 index 0000000000..7d50031901 --- /dev/null +++ b/services/cc/v3/model/model_update_site_network_bandwidth_size_request.go @@ -0,0 +1,28 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetworkBandwidthSizeRequest Request Object +type UpdateSiteNetworkBandwidthSizeRequest struct { + + // 分支网络的ID。 + SiteNetworkId string `json:"site_network_id"` + + // 实例ID。 + SiteConnectionId string `json:"site_connection_id"` + + Body *UpdateSiteConnectionBandwidthSizeRequestBody `json:"body,omitempty"` +} + +func (o UpdateSiteNetworkBandwidthSizeRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetworkBandwidthSizeRequest struct{}" + } + + return strings.Join([]string{"UpdateSiteNetworkBandwidthSizeRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network_bandwidth_size_response.go b/services/cc/v3/model/model_update_site_network_bandwidth_size_response.go new file mode 100644 index 0000000000..05152b5e05 --- /dev/null +++ b/services/cc/v3/model/model_update_site_network_bandwidth_size_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetworkBandwidthSizeResponse Response Object +type UpdateSiteNetworkBandwidthSizeResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteConnection *SiteConnection `json:"site_connection"` + HttpStatusCode int `json:"-"` +} + +func (o UpdateSiteNetworkBandwidthSizeResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetworkBandwidthSizeResponse struct{}" + } + + return strings.Join([]string{"UpdateSiteNetworkBandwidthSizeResponse", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network_request.go b/services/cc/v3/model/model_update_site_network_request.go new file mode 100644 index 0000000000..284411e44c --- /dev/null +++ b/services/cc/v3/model/model_update_site_network_request.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetworkRequest Request Object +type UpdateSiteNetworkRequest struct { + + // 分支网络的ID。 + SiteNetworkId string `json:"site_network_id"` + + Body *UpdateSiteNetworkRequestBody `json:"body,omitempty"` +} + +func (o UpdateSiteNetworkRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetworkRequest struct{}" + } + + return strings.Join([]string{"UpdateSiteNetworkRequest", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network_request_body.go b/services/cc/v3/model/model_update_site_network_request_body.go new file mode 100644 index 0000000000..baddd64f82 --- /dev/null +++ b/services/cc/v3/model/model_update_site_network_request_body.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetworkRequestBody 更新分支网络的请求体。 +type UpdateSiteNetworkRequestBody struct { + SiteNetwork *UpdateSiteNetwork `json:"site_network"` +} + +func (o UpdateSiteNetworkRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetworkRequestBody struct{}" + } + + return strings.Join([]string{"UpdateSiteNetworkRequestBody", string(data)}, " ") +} diff --git a/services/cc/v3/model/model_update_site_network_response.go b/services/cc/v3/model/model_update_site_network_response.go new file mode 100644 index 0000000000..0c7a5f2961 --- /dev/null +++ b/services/cc/v3/model/model_update_site_network_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateSiteNetworkResponse Response Object +type UpdateSiteNetworkResponse struct { + + // 请求ID。 + RequestId string `json:"request_id"` + + SiteNetwork *SiteNetworkEntry `json:"site_network"` + HttpStatusCode int `json:"-"` +} + +func (o UpdateSiteNetworkResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateSiteNetworkResponse struct{}" + } + + return strings.Join([]string{"UpdateSiteNetworkResponse", string(data)}, " ") +} diff --git a/services/ddm/v1/ddm_client.go b/services/ddm/v1/ddm_client.go index 113f70354f..868cb25536 100644 --- a/services/ddm/v1/ddm_client.go +++ b/services/ddm/v1/ddm_client.go @@ -19,6 +19,69 @@ func DdmClientBuilder() *httpclient.HcHttpClientBuilder { return builder } +// ChangeDatabaseVersion 变更内核版本 +// +// 变更内核版本 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *DdmClient) ChangeDatabaseVersion(request *model.ChangeDatabaseVersionRequest) (*model.ChangeDatabaseVersionResponse, error) { + requestDef := GenReqDefForChangeDatabaseVersion() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ChangeDatabaseVersionResponse), nil + } +} + +// ChangeDatabaseVersionInvoker 变更内核版本 +func (c *DdmClient) ChangeDatabaseVersionInvoker(request *model.ChangeDatabaseVersionRequest) *ChangeDatabaseVersionInvoker { + requestDef := GenReqDefForChangeDatabaseVersion() + return &ChangeDatabaseVersionInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListDatabaseAvailableVersions 查询可变更内核版本 +// +// 查询可变更内核版本 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *DdmClient) ListDatabaseAvailableVersions(request *model.ListDatabaseAvailableVersionsRequest) (*model.ListDatabaseAvailableVersionsResponse, error) { + requestDef := GenReqDefForListDatabaseAvailableVersions() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListDatabaseAvailableVersionsResponse), nil + } +} + +// ListDatabaseAvailableVersionsInvoker 查询可变更内核版本 +func (c *DdmClient) ListDatabaseAvailableVersionsInvoker(request *model.ListDatabaseAvailableVersionsRequest) *ListDatabaseAvailableVersionsInvoker { + requestDef := GenReqDefForListDatabaseAvailableVersions() + return &ListDatabaseAvailableVersionsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// RollBackDatabaseVersion 回滚内核版本 +// +// 回滚内核版本 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *DdmClient) RollBackDatabaseVersion(request *model.RollBackDatabaseVersionRequest) (*model.RollBackDatabaseVersionResponse, error) { + requestDef := GenReqDefForRollBackDatabaseVersion() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.RollBackDatabaseVersionResponse), nil + } +} + +// RollBackDatabaseVersionInvoker 回滚内核版本 +func (c *DdmClient) RollBackDatabaseVersionInvoker(request *model.RollBackDatabaseVersionRequest) *RollBackDatabaseVersionInvoker { + requestDef := GenReqDefForRollBackDatabaseVersion() + return &RollBackDatabaseVersionInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // ListApiVersion 查询API版本列表 // // 查询API版本列表。 diff --git a/services/ddm/v1/ddm_invoker.go b/services/ddm/v1/ddm_invoker.go index c974266e5e..7b4e8196bb 100644 --- a/services/ddm/v1/ddm_invoker.go +++ b/services/ddm/v1/ddm_invoker.go @@ -5,6 +5,54 @@ import ( "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ddm/v1/model" ) +type ChangeDatabaseVersionInvoker struct { + *invoker.BaseInvoker +} + +func (i *ChangeDatabaseVersionInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ChangeDatabaseVersionInvoker) Invoke() (*model.ChangeDatabaseVersionResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ChangeDatabaseVersionResponse), nil + } +} + +type ListDatabaseAvailableVersionsInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListDatabaseAvailableVersionsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListDatabaseAvailableVersionsInvoker) Invoke() (*model.ListDatabaseAvailableVersionsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListDatabaseAvailableVersionsResponse), nil + } +} + +type RollBackDatabaseVersionInvoker struct { + *invoker.BaseInvoker +} + +func (i *RollBackDatabaseVersionInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *RollBackDatabaseVersionInvoker) Invoke() (*model.RollBackDatabaseVersionResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.RollBackDatabaseVersionResponse), nil + } +} + type ListApiVersionInvoker struct { *invoker.BaseInvoker } diff --git a/services/ddm/v1/ddm_meta.go b/services/ddm/v1/ddm_meta.go index 9acd08e4e0..54640efc28 100644 --- a/services/ddm/v1/ddm_meta.go +++ b/services/ddm/v1/ddm_meta.go @@ -7,6 +7,58 @@ import ( "net/http" ) +func GenReqDefForChangeDatabaseVersion() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{project_id}/instances/{instance_id}/database-version/change-version"). + WithResponse(new(model.ChangeDatabaseVersionResponse)). + WithContentType("application/json;charset=UTF-8") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("instance_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListDatabaseAvailableVersions() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v3/{project_id}/instances/{instance_id}/database-version/available-versions"). + WithResponse(new(model.ListDatabaseAvailableVersionsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("instance_id"). + WithLocationType(def.Path)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForRollBackDatabaseVersion() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{project_id}/instances/{instance_id}/database-version/rollback-version"). + WithResponse(new(model.RollBackDatabaseVersionResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("instance_id"). + WithLocationType(def.Path)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForListApiVersion() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodGet). diff --git a/services/ddm/v1/model/model_change_database_version_request.go b/services/ddm/v1/model/model_change_database_version_request.go new file mode 100644 index 0000000000..248673acd4 --- /dev/null +++ b/services/ddm/v1/model/model_change_database_version_request.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ChangeDatabaseVersionRequest Request Object +type ChangeDatabaseVersionRequest struct { + + // DDM实例ID。 + InstanceId string `json:"instance_id"` + + Body *DatabaseVersionRequest `json:"body,omitempty"` +} + +func (o ChangeDatabaseVersionRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ChangeDatabaseVersionRequest struct{}" + } + + return strings.Join([]string{"ChangeDatabaseVersionRequest", string(data)}, " ") +} diff --git a/services/ddm/v1/model/model_change_database_version_response.go b/services/ddm/v1/model/model_change_database_version_response.go new file mode 100644 index 0000000000..b5e0e2cd5c --- /dev/null +++ b/services/ddm/v1/model/model_change_database_version_response.go @@ -0,0 +1,27 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ChangeDatabaseVersionResponse Response Object +type ChangeDatabaseVersionResponse struct { + + // 实例ID + InstanceId *string `json:"instance_id,omitempty"` + + // 任务ID + JobId *string `json:"job_id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ChangeDatabaseVersionResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ChangeDatabaseVersionResponse struct{}" + } + + return strings.Join([]string{"ChangeDatabaseVersionResponse", string(data)}, " ") +} diff --git a/services/ddm/v1/model/model_create_instance_response.go b/services/ddm/v1/model/model_create_instance_response.go index 70f685a15f..f68f2ac761 100644 --- a/services/ddm/v1/model/model_create_instance_response.go +++ b/services/ddm/v1/model/model_create_instance_response.go @@ -9,11 +9,14 @@ import ( // CreateInstanceResponse Response Object type CreateInstanceResponse struct { - // 实例ID。创建按需付费实例时返回该参数。 + // 实例ID,创建按需付费实例时返回该参数。 Id *string `json:"id,omitempty"` // 订单号,创建包年/包月实例时返回该参数。 - OrderId *string `json:"order_id,omitempty"` + OrderId *string `json:"order_id,omitempty"` + + // 任务id,创建按需付费实例时返回该参数 + JobId *string `json:"job_id,omitempty"` HttpStatusCode int `json:"-"` } diff --git a/services/ddm/v1/model/model_database_version_request.go b/services/ddm/v1/model/model_database_version_request.go new file mode 100644 index 0000000000..af26567686 --- /dev/null +++ b/services/ddm/v1/model/model_database_version_request.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type DatabaseVersionRequest struct { + + // 目标版本 + TargetVersion string `json:"target_version"` +} + +func (o DatabaseVersionRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DatabaseVersionRequest struct{}" + } + + return strings.Join([]string{"DatabaseVersionRequest", string(data)}, " ") +} diff --git a/services/ddm/v1/model/model_expand_ddm_instance_nodes_response.go b/services/ddm/v1/model/model_expand_ddm_instance_nodes_response.go index d2960a2115..7b0c182b40 100644 --- a/services/ddm/v1/model/model_expand_ddm_instance_nodes_response.go +++ b/services/ddm/v1/model/model_expand_ddm_instance_nodes_response.go @@ -9,9 +9,6 @@ import ( // ExpandDdmInstanceNodesResponse Response Object type ExpandDdmInstanceNodesResponse struct { - // DDM实例ID。 - InstanceId *string `json:"instance_id,omitempty"` - // 任务ID,仅创建按需实例时会返回该参数。 JobId *string `json:"job_id,omitempty"` diff --git a/services/ddm/v1/model/model_list_database_available_versions_request.go b/services/ddm/v1/model/model_list_database_available_versions_request.go new file mode 100644 index 0000000000..9a5c7d4146 --- /dev/null +++ b/services/ddm/v1/model/model_list_database_available_versions_request.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListDatabaseAvailableVersionsRequest Request Object +type ListDatabaseAvailableVersionsRequest struct { + + // DDM实例ID。 + InstanceId string `json:"instance_id"` +} + +func (o ListDatabaseAvailableVersionsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListDatabaseAvailableVersionsRequest struct{}" + } + + return strings.Join([]string{"ListDatabaseAvailableVersionsRequest", string(data)}, " ") +} diff --git a/services/ddm/v1/model/model_list_database_available_versions_response.go b/services/ddm/v1/model/model_list_database_available_versions_response.go new file mode 100644 index 0000000000..4f42b2f721 --- /dev/null +++ b/services/ddm/v1/model/model_list_database_available_versions_response.go @@ -0,0 +1,36 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListDatabaseAvailableVersionsResponse Response Object +type ListDatabaseAvailableVersionsResponse struct { + + // 可变更版本 + Versions *[]string `json:"versions,omitempty"` + + // 当前版本 + CurrentVersion *string `json:"current_version,omitempty"` + + // 最新优选版本 + LatestVersion *string `json:"latest_version,omitempty"` + + // 本系列优选版本,如3.0.8系列优选版本为3.0.8.5 + CurrentFavoredVersion *string `json:"current_favored_version,omitempty"` + + // 当前实例上一个版本 + PreviousVersion *string `json:"previous_version,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListDatabaseAvailableVersionsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListDatabaseAvailableVersionsResponse struct{}" + } + + return strings.Join([]string{"ListDatabaseAvailableVersionsResponse", string(data)}, " ") +} diff --git a/services/ddm/v1/model/model_roll_back_database_version_request.go b/services/ddm/v1/model/model_roll_back_database_version_request.go new file mode 100644 index 0000000000..a6cf4aa822 --- /dev/null +++ b/services/ddm/v1/model/model_roll_back_database_version_request.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// RollBackDatabaseVersionRequest Request Object +type RollBackDatabaseVersionRequest struct { + + // DDM实例ID。 + InstanceId string `json:"instance_id"` +} + +func (o RollBackDatabaseVersionRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "RollBackDatabaseVersionRequest struct{}" + } + + return strings.Join([]string{"RollBackDatabaseVersionRequest", string(data)}, " ") +} diff --git a/services/ddm/v1/model/model_roll_back_database_version_response.go b/services/ddm/v1/model/model_roll_back_database_version_response.go new file mode 100644 index 0000000000..cd36fe28ed --- /dev/null +++ b/services/ddm/v1/model/model_roll_back_database_version_response.go @@ -0,0 +1,27 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// RollBackDatabaseVersionResponse Response Object +type RollBackDatabaseVersionResponse struct { + + // 实例ID + InstanceId *string `json:"instance_id,omitempty"` + + // 任务ID + JobId *string `json:"job_id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o RollBackDatabaseVersionResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "RollBackDatabaseVersionResponse struct{}" + } + + return strings.Join([]string{"RollBackDatabaseVersionResponse", string(data)}, " ") +} diff --git a/services/ddm/v1/model/model_user_process_audit_log.go b/services/ddm/v1/model/model_user_process_audit_log.go index a5dea9a081..64409f70a4 100644 --- a/services/ddm/v1/model/model_user_process_audit_log.go +++ b/services/ddm/v1/model/model_user_process_audit_log.go @@ -21,7 +21,7 @@ type UserProcessAuditLog struct { ExecuteUserName *string `json:"execute_user_name,omitempty"` // 发生时间,UTC时间 - ExcuteTime *string `json:"excute_time,omitempty"` + ExecuteTime *string `json:"execute_time,omitempty"` } func (o UserProcessAuditLog) String() string { diff --git a/services/ga/v1/ga_client.go b/services/ga/v1/ga_client.go index e60b9c7014..8baa2a17aa 100644 --- a/services/ga/v1/ga_client.go +++ b/services/ga/v1/ga_client.go @@ -739,6 +739,111 @@ func (c *GaClient) UpdateListenerInvoker(request *model.UpdateListenerRequest) * return &UpdateListenerInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// CreateLogtank 创建云日志 +// +// 创建云日志。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *GaClient) CreateLogtank(request *model.CreateLogtankRequest) (*model.CreateLogtankResponse, error) { + requestDef := GenReqDefForCreateLogtank() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.CreateLogtankResponse), nil + } +} + +// CreateLogtankInvoker 创建云日志 +func (c *GaClient) CreateLogtankInvoker(request *model.CreateLogtankRequest) *CreateLogtankInvoker { + requestDef := GenReqDefForCreateLogtank() + return &CreateLogtankInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// DeleteLogtank 删除云日志 +// +// 删除云日志。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *GaClient) DeleteLogtank(request *model.DeleteLogtankRequest) (*model.DeleteLogtankResponse, error) { + requestDef := GenReqDefForDeleteLogtank() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.DeleteLogtankResponse), nil + } +} + +// DeleteLogtankInvoker 删除云日志 +func (c *GaClient) DeleteLogtankInvoker(request *model.DeleteLogtankRequest) *DeleteLogtankInvoker { + requestDef := GenReqDefForDeleteLogtank() + return &DeleteLogtankInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListLogtanks 查询云日志列表 +// +// 查询云日志列表。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *GaClient) ListLogtanks(request *model.ListLogtanksRequest) (*model.ListLogtanksResponse, error) { + requestDef := GenReqDefForListLogtanks() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListLogtanksResponse), nil + } +} + +// ListLogtanksInvoker 查询云日志列表 +func (c *GaClient) ListLogtanksInvoker(request *model.ListLogtanksRequest) *ListLogtanksInvoker { + requestDef := GenReqDefForListLogtanks() + return &ListLogtanksInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ShowLogtank 查询云日志详情 +// +// 查询云日志详情。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *GaClient) ShowLogtank(request *model.ShowLogtankRequest) (*model.ShowLogtankResponse, error) { + requestDef := GenReqDefForShowLogtank() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ShowLogtankResponse), nil + } +} + +// ShowLogtankInvoker 查询云日志详情 +func (c *GaClient) ShowLogtankInvoker(request *model.ShowLogtankRequest) *ShowLogtankInvoker { + requestDef := GenReqDefForShowLogtank() + return &ShowLogtankInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// UpdateLogtank 更新云日志 +// +// 更新云日志。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *GaClient) UpdateLogtank(request *model.UpdateLogtankRequest) (*model.UpdateLogtankResponse, error) { + requestDef := GenReqDefForUpdateLogtank() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.UpdateLogtankResponse), nil + } +} + +// UpdateLogtankInvoker 更新云日志 +func (c *GaClient) UpdateLogtankInvoker(request *model.UpdateLogtankRequest) *UpdateLogtankInvoker { + requestDef := GenReqDefForUpdateLogtank() + return &UpdateLogtankInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // ListRegions 查询区域列表 // // 查询区域列表。 diff --git a/services/ga/v1/ga_invoker.go b/services/ga/v1/ga_invoker.go index e1b345bca0..2a10c26e7c 100644 --- a/services/ga/v1/ga_invoker.go +++ b/services/ga/v1/ga_invoker.go @@ -549,6 +549,86 @@ func (i *UpdateListenerInvoker) Invoke() (*model.UpdateListenerResponse, error) } } +type CreateLogtankInvoker struct { + *invoker.BaseInvoker +} + +func (i *CreateLogtankInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *CreateLogtankInvoker) Invoke() (*model.CreateLogtankResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.CreateLogtankResponse), nil + } +} + +type DeleteLogtankInvoker struct { + *invoker.BaseInvoker +} + +func (i *DeleteLogtankInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *DeleteLogtankInvoker) Invoke() (*model.DeleteLogtankResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.DeleteLogtankResponse), nil + } +} + +type ListLogtanksInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListLogtanksInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListLogtanksInvoker) Invoke() (*model.ListLogtanksResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListLogtanksResponse), nil + } +} + +type ShowLogtankInvoker struct { + *invoker.BaseInvoker +} + +func (i *ShowLogtankInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ShowLogtankInvoker) Invoke() (*model.ShowLogtankResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ShowLogtankResponse), nil + } +} + +type UpdateLogtankInvoker struct { + *invoker.BaseInvoker +} + +func (i *UpdateLogtankInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *UpdateLogtankInvoker) Invoke() (*model.UpdateLogtankResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.UpdateLogtankResponse), nil + } +} + type ListRegionsInvoker struct { *invoker.BaseInvoker } diff --git a/services/ga/v1/ga_meta.go b/services/ga/v1/ga_meta.go index 48064e0c95..75f21f3d82 100644 --- a/services/ga/v1/ga_meta.go +++ b/services/ga/v1/ga_meta.go @@ -723,6 +723,109 @@ func GenReqDefForUpdateListener() *def.HttpRequestDef { return requestDef } +func GenReqDefForCreateLogtank() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v1/logtanks"). + WithResponse(new(model.CreateLogtankResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForDeleteLogtank() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodDelete). + WithPath("/v1/logtanks/{logtank_id}"). + WithResponse(new(model.DeleteLogtankResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("LogtankId"). + WithJsonTag("logtank_id"). + WithLocationType(def.Path)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListLogtanks() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v1/logtanks"). + WithResponse(new(model.ListLogtanksResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Limit"). + WithJsonTag("limit"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Marker"). + WithJsonTag("marker"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Id"). + WithJsonTag("id"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Status"). + WithJsonTag("status"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("ResourceIds"). + WithJsonTag("resource_ids"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("ResourceType"). + WithJsonTag("resource_type"). + WithLocationType(def.Query)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForShowLogtank() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v1/logtanks/{logtank_id}"). + WithResponse(new(model.ShowLogtankResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("LogtankId"). + WithJsonTag("logtank_id"). + WithLocationType(def.Path)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForUpdateLogtank() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPut). + WithPath("/v1/logtanks/{logtank_id}"). + WithResponse(new(model.UpdateLogtankResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("LogtankId"). + WithJsonTag("logtank_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForListRegions() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodGet). diff --git a/services/ga/v1/model/model_create_logtank_option.go b/services/ga/v1/model/model_create_logtank_option.go new file mode 100644 index 0000000000..55f477b719 --- /dev/null +++ b/services/ga/v1/model/model_create_logtank_option.go @@ -0,0 +1,30 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CreateLogtankOption 创建云日志的详细信息。 +type CreateLogtankOption struct { + ResourceType *LogtankResourceType `json:"resource_type"` + + // 开启云日志的资源ID。 + ResourceId string `json:"resource_id"` + + // 云日志服务提供的日志组ID。 + LogGroupId string `json:"log_group_id"` + + // 云日志服务提供的日志流ID。 + LogStreamId string `json:"log_stream_id"` +} + +func (o CreateLogtankOption) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateLogtankOption struct{}" + } + + return strings.Join([]string{"CreateLogtankOption", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_create_logtank_request.go b/services/ga/v1/model/model_create_logtank_request.go new file mode 100644 index 0000000000..69b5d6b8b1 --- /dev/null +++ b/services/ga/v1/model/model_create_logtank_request.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CreateLogtankRequest Request Object +type CreateLogtankRequest struct { + Body *CreateLogtankRequestBody `json:"body,omitempty"` +} + +func (o CreateLogtankRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateLogtankRequest struct{}" + } + + return strings.Join([]string{"CreateLogtankRequest", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_create_logtank_request_body.go b/services/ga/v1/model/model_create_logtank_request_body.go new file mode 100644 index 0000000000..34d3398cdb --- /dev/null +++ b/services/ga/v1/model/model_create_logtank_request_body.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CreateLogtankRequestBody 创建云日志请求体。 +type CreateLogtankRequestBody struct { + Logtank *CreateLogtankOption `json:"logtank"` +} + +func (o CreateLogtankRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateLogtankRequestBody struct{}" + } + + return strings.Join([]string{"CreateLogtankRequestBody", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_create_logtank_response.go b/services/ga/v1/model/model_create_logtank_response.go new file mode 100644 index 0000000000..333aebf5ca --- /dev/null +++ b/services/ga/v1/model/model_create_logtank_response.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CreateLogtankResponse Response Object +type CreateLogtankResponse struct { + Logtank *LogtankDetail `json:"logtank,omitempty"` + + // 请求ID。 + RequestId *string `json:"request_id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o CreateLogtankResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CreateLogtankResponse struct{}" + } + + return strings.Join([]string{"CreateLogtankResponse", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_delete_logtank_request.go b/services/ga/v1/model/model_delete_logtank_request.go new file mode 100644 index 0000000000..9f391a72ce --- /dev/null +++ b/services/ga/v1/model/model_delete_logtank_request.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DeleteLogtankRequest Request Object +type DeleteLogtankRequest struct { + + // 云日志ID。 + LogtankId string `json:"logtank_id"` +} + +func (o DeleteLogtankRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DeleteLogtankRequest struct{}" + } + + return strings.Join([]string{"DeleteLogtankRequest", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_delete_logtank_response.go b/services/ga/v1/model/model_delete_logtank_response.go new file mode 100644 index 0000000000..303aa9eb15 --- /dev/null +++ b/services/ga/v1/model/model_delete_logtank_response.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DeleteLogtankResponse Response Object +type DeleteLogtankResponse struct { + HttpStatusCode int `json:"-"` +} + +func (o DeleteLogtankResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DeleteLogtankResponse struct{}" + } + + return strings.Join([]string{"DeleteLogtankResponse", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_list_logtanks_request.go b/services/ga/v1/model/model_list_logtanks_request.go new file mode 100644 index 0000000000..cd3b869f97 --- /dev/null +++ b/services/ga/v1/model/model_list_logtanks_request.go @@ -0,0 +1,139 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// ListLogtanksRequest Request Object +type ListLogtanksRequest struct { + + // 分页查询每页的资源个数。如果不设置,则默认为500。 + Limit *int32 `json:"limit,omitempty"` + + // 分页查询的起始的资源ID,表示上一页最后一条查询资源记录的ID。不指定时表示查询第一页。 必须与limit一起使用。 + Marker *string `json:"marker,omitempty"` + + // 资源ID。 + Id *string `json:"id,omitempty"` + + // 配置状态,可选范围: - ACTIVE:运行中 - PENDING:待定 - ERROR:错误 - DELETING:正在删除 + Status *ListLogtanksRequestStatus `json:"status,omitempty"` + + // 资源ID列表。 + ResourceIds *[]string `json:"resource_ids,omitempty"` + + // 关联云日志的资源类型。 + ResourceType *ListLogtanksRequestResourceType `json:"resource_type,omitempty"` +} + +func (o ListLogtanksRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListLogtanksRequest struct{}" + } + + return strings.Join([]string{"ListLogtanksRequest", string(data)}, " ") +} + +type ListLogtanksRequestStatus struct { + value string +} + +type ListLogtanksRequestStatusEnum struct { + ACTIVE ListLogtanksRequestStatus + PENDING ListLogtanksRequestStatus + ERROR ListLogtanksRequestStatus + DELETING ListLogtanksRequestStatus +} + +func GetListLogtanksRequestStatusEnum() ListLogtanksRequestStatusEnum { + return ListLogtanksRequestStatusEnum{ + ACTIVE: ListLogtanksRequestStatus{ + value: "ACTIVE", + }, + PENDING: ListLogtanksRequestStatus{ + value: "PENDING", + }, + ERROR: ListLogtanksRequestStatus{ + value: "ERROR", + }, + DELETING: ListLogtanksRequestStatus{ + value: "DELETING", + }, + } +} + +func (c ListLogtanksRequestStatus) Value() string { + return c.value +} + +func (c ListLogtanksRequestStatus) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *ListLogtanksRequestStatus) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} + +type ListLogtanksRequestResourceType struct { + value string +} + +type ListLogtanksRequestResourceTypeEnum struct { + LISTENER ListLogtanksRequestResourceType +} + +func GetListLogtanksRequestResourceTypeEnum() ListLogtanksRequestResourceTypeEnum { + return ListLogtanksRequestResourceTypeEnum{ + LISTENER: ListLogtanksRequestResourceType{ + value: "LISTENER", + }, + } +} + +func (c ListLogtanksRequestResourceType) Value() string { + return c.value +} + +func (c ListLogtanksRequestResourceType) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *ListLogtanksRequestResourceType) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/ga/v1/model/model_list_logtanks_response.go b/services/ga/v1/model/model_list_logtanks_response.go new file mode 100644 index 0000000000..85de1c6e8e --- /dev/null +++ b/services/ga/v1/model/model_list_logtanks_response.go @@ -0,0 +1,27 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListLogtanksResponse Response Object +type ListLogtanksResponse struct { + Logtanks *[]LogtankDetail `json:"logtanks,omitempty"` + + PageInfo *PageInfo `json:"page_info,omitempty"` + + // 请求ID。 + RequestId *string `json:"request_id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListLogtanksResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListLogtanksResponse struct{}" + } + + return strings.Join([]string{"ListLogtanksResponse", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_logtank_detail.go b/services/ga/v1/model/model_logtank_detail.go new file mode 100644 index 0000000000..7be6d3bf22 --- /dev/null +++ b/services/ga/v1/model/model_logtank_detail.go @@ -0,0 +1,49 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/sdktime" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// LogtankDetail 云日志配置详情。 +type LogtankDetail struct { + + // 云日志ID。 + Id *string `json:"id,omitempty"` + + // 租户ID。 + DomainId *string `json:"domain_id,omitempty"` + + // 项目ID。 + ProjectId *string `json:"project_id,omitempty"` + + ResourceType *LogtankResourceType `json:"resource_type,omitempty"` + + // 开启云日志的资源ID。 + ResourceId *string `json:"resource_id,omitempty"` + + // 云日志组ID。 + LogGroupId *string `json:"log_group_id,omitempty"` + + // 云日志流ID。 + LogStreamId *string `json:"log_stream_id,omitempty"` + + Status *ConfigStatus `json:"status,omitempty"` + + // 创建时间。 + CreatedAt *sdktime.SdkTime `json:"created_at,omitempty"` + + // 更新时间。 + UpdatedAt *string `json:"updated_at,omitempty"` +} + +func (o LogtankDetail) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "LogtankDetail struct{}" + } + + return strings.Join([]string{"LogtankDetail", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_logtank_resource_type.go b/services/ga/v1/model/model_logtank_resource_type.go new file mode 100644 index 0000000000..ebe9ff34a3 --- /dev/null +++ b/services/ga/v1/model/model_logtank_resource_type.go @@ -0,0 +1,54 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "errors" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/converter" + + "strings" +) + +// LogtankResourceType 云日志的资源类型。 +type LogtankResourceType struct { + value string +} + +type LogtankResourceTypeEnum struct { + LISTENER LogtankResourceType +} + +func GetLogtankResourceTypeEnum() LogtankResourceTypeEnum { + return LogtankResourceTypeEnum{ + LISTENER: LogtankResourceType{ + value: "LISTENER", + }, + } +} + +func (c LogtankResourceType) Value() string { + return c.value +} + +func (c LogtankResourceType) MarshalJSON() ([]byte, error) { + return utils.Marshal(c.value) +} + +func (c *LogtankResourceType) UnmarshalJSON(b []byte) error { + myConverter := converter.StringConverterFactory("string") + if myConverter == nil { + return errors.New("unsupported StringConverter type: string") + } + + interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) + if err != nil { + return err + } + + if val, ok := interf.(string); ok { + c.value = val + return nil + } else { + return errors.New("convert enum data to string error") + } +} diff --git a/services/ga/v1/model/model_show_logtank_request.go b/services/ga/v1/model/model_show_logtank_request.go new file mode 100644 index 0000000000..5d5ed7eaf2 --- /dev/null +++ b/services/ga/v1/model/model_show_logtank_request.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ShowLogtankRequest Request Object +type ShowLogtankRequest struct { + + // 云日志ID。 + LogtankId string `json:"logtank_id"` +} + +func (o ShowLogtankRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ShowLogtankRequest struct{}" + } + + return strings.Join([]string{"ShowLogtankRequest", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_show_logtank_response.go b/services/ga/v1/model/model_show_logtank_response.go new file mode 100644 index 0000000000..95983fb73c --- /dev/null +++ b/services/ga/v1/model/model_show_logtank_response.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ShowLogtankResponse Response Object +type ShowLogtankResponse struct { + Logtank *LogtankDetail `json:"logtank,omitempty"` + + // 请求ID。 + RequestId *string `json:"request_id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ShowLogtankResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ShowLogtankResponse struct{}" + } + + return strings.Join([]string{"ShowLogtankResponse", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_update_logtank_option.go b/services/ga/v1/model/model_update_logtank_option.go new file mode 100644 index 0000000000..1ddb166bf9 --- /dev/null +++ b/services/ga/v1/model/model_update_logtank_option.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateLogtankOption 更新云日志的详细信息。 +type UpdateLogtankOption struct { + + // 云日志服务提供的日志组ID。 + LogGroupId string `json:"log_group_id"` + + // 云日志服务提供的日志流ID。 + LogStreamId string `json:"log_stream_id"` +} + +func (o UpdateLogtankOption) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateLogtankOption struct{}" + } + + return strings.Join([]string{"UpdateLogtankOption", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_update_logtank_request.go b/services/ga/v1/model/model_update_logtank_request.go new file mode 100644 index 0000000000..489e07266c --- /dev/null +++ b/services/ga/v1/model/model_update_logtank_request.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateLogtankRequest Request Object +type UpdateLogtankRequest struct { + + // 云日志ID。 + LogtankId string `json:"logtank_id"` + + Body *UpdateLogtankRequestBody `json:"body,omitempty"` +} + +func (o UpdateLogtankRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateLogtankRequest struct{}" + } + + return strings.Join([]string{"UpdateLogtankRequest", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_update_logtank_request_body.go b/services/ga/v1/model/model_update_logtank_request_body.go new file mode 100644 index 0000000000..498be7dfde --- /dev/null +++ b/services/ga/v1/model/model_update_logtank_request_body.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateLogtankRequestBody 更新云日志请求体。 +type UpdateLogtankRequestBody struct { + Logtank *UpdateLogtankOption `json:"logtank"` +} + +func (o UpdateLogtankRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateLogtankRequestBody struct{}" + } + + return strings.Join([]string{"UpdateLogtankRequestBody", string(data)}, " ") +} diff --git a/services/ga/v1/model/model_update_logtank_response.go b/services/ga/v1/model/model_update_logtank_response.go new file mode 100644 index 0000000000..cd75be2cda --- /dev/null +++ b/services/ga/v1/model/model_update_logtank_response.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpdateLogtankResponse Response Object +type UpdateLogtankResponse struct { + Logtank *LogtankDetail `json:"logtank,omitempty"` + + // 请求ID。 + RequestId *string `json:"request_id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o UpdateLogtankResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpdateLogtankResponse struct{}" + } + + return strings.Join([]string{"UpdateLogtankResponse", string(data)}, " ") +} diff --git a/services/gaussdbfornosql/v3/gaussDBforNoSQL_client.go b/services/gaussdbfornosql/v3/gaussDBforNoSQL_client.go index 853750705d..c478aec58d 100644 --- a/services/gaussdbfornosql/v3/gaussDBforNoSQL_client.go +++ b/services/gaussdbfornosql/v3/gaussDBforNoSQL_client.go @@ -61,6 +61,27 @@ func (c *GaussDBforNoSQLClient) BatchTagActionInvoker(request *model.BatchTagAct return &BatchTagActionInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// BatchUpgradeDatabaseVersion 批量数据库补丁升级 +// +// 批量升级数据库补丁版本。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *GaussDBforNoSQLClient) BatchUpgradeDatabaseVersion(request *model.BatchUpgradeDatabaseVersionRequest) (*model.BatchUpgradeDatabaseVersionResponse, error) { + requestDef := GenReqDefForBatchUpgradeDatabaseVersion() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.BatchUpgradeDatabaseVersionResponse), nil + } +} + +// BatchUpgradeDatabaseVersionInvoker 批量数据库补丁升级 +func (c *GaussDBforNoSQLClient) BatchUpgradeDatabaseVersionInvoker(request *model.BatchUpgradeDatabaseVersionRequest) *BatchUpgradeDatabaseVersionInvoker { + requestDef := GenReqDefForBatchUpgradeDatabaseVersion() + return &BatchUpgradeDatabaseVersionInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // CheckDisasterRecoveryOperation 校验实例是否可以与指定实例建立/解除容灾关系 // // 校验实例是否可以与指定实例建立/解除容灾关系。若接口返回成功,表示可以与指定实例建立/解除容灾关系。 diff --git a/services/gaussdbfornosql/v3/gaussDBforNoSQL_invoker.go b/services/gaussdbfornosql/v3/gaussDBforNoSQL_invoker.go index 5443c7c302..a821f63c4a 100644 --- a/services/gaussdbfornosql/v3/gaussDBforNoSQL_invoker.go +++ b/services/gaussdbfornosql/v3/gaussDBforNoSQL_invoker.go @@ -37,6 +37,22 @@ func (i *BatchTagActionInvoker) Invoke() (*model.BatchTagActionResponse, error) } } +type BatchUpgradeDatabaseVersionInvoker struct { + *invoker.BaseInvoker +} + +func (i *BatchUpgradeDatabaseVersionInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *BatchUpgradeDatabaseVersionInvoker) Invoke() (*model.BatchUpgradeDatabaseVersionResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.BatchUpgradeDatabaseVersionResponse), nil + } +} + type CheckDisasterRecoveryOperationInvoker struct { *invoker.BaseInvoker } diff --git a/services/gaussdbfornosql/v3/gaussDBforNoSQL_meta.go b/services/gaussdbfornosql/v3/gaussDBforNoSQL_meta.go index 72647d206d..097884cc31 100644 --- a/services/gaussdbfornosql/v3/gaussDBforNoSQL_meta.go +++ b/services/gaussdbfornosql/v3/gaussDBforNoSQL_meta.go @@ -47,6 +47,21 @@ func GenReqDefForBatchTagAction() *def.HttpRequestDef { return requestDef } +func GenReqDefForBatchUpgradeDatabaseVersion() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v3/{project_id}/instances/db-upgrade"). + WithResponse(new(model.BatchUpgradeDatabaseVersionResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForCheckDisasterRecoveryOperation() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodPost). diff --git a/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_request.go b/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_request.go new file mode 100644 index 0000000000..a21c428991 --- /dev/null +++ b/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_request.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// BatchUpgradeDatabaseVersionRequest Request Object +type BatchUpgradeDatabaseVersionRequest struct { + Body *BatchUpgradeDatabaseVersionRequestBody `json:"body,omitempty"` +} + +func (o BatchUpgradeDatabaseVersionRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "BatchUpgradeDatabaseVersionRequest struct{}" + } + + return strings.Join([]string{"BatchUpgradeDatabaseVersionRequest", string(data)}, " ") +} diff --git a/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_request_body.go b/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_request_body.go new file mode 100644 index 0000000000..072379490e --- /dev/null +++ b/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_request_body.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type BatchUpgradeDatabaseVersionRequestBody struct { + + // 指定需要升级数据库补丁版本的实例ID列表。 一次最多可传入10个实例ID,且为同一引擎的实例。 + InstanceIds []string `json:"instance_ids"` +} + +func (o BatchUpgradeDatabaseVersionRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "BatchUpgradeDatabaseVersionRequestBody struct{}" + } + + return strings.Join([]string{"BatchUpgradeDatabaseVersionRequestBody", string(data)}, " ") +} diff --git a/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_response.go b/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_response.go new file mode 100644 index 0000000000..da44249f1a --- /dev/null +++ b/services/gaussdbfornosql/v3/model/model_batch_upgrade_database_version_response.go @@ -0,0 +1,24 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// BatchUpgradeDatabaseVersionResponse Response Object +type BatchUpgradeDatabaseVersionResponse struct { + + // 批量升级结果。 + UpgradeResults *[]UpgradeResult `json:"upgrade_results,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o BatchUpgradeDatabaseVersionResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "BatchUpgradeDatabaseVersionResponse struct{}" + } + + return strings.Join([]string{"BatchUpgradeDatabaseVersionResponse", string(data)}, " ") +} diff --git a/services/gaussdbfornosql/v3/model/model_upgrade_result.go b/services/gaussdbfornosql/v3/model/model_upgrade_result.go new file mode 100644 index 0000000000..1f1860f5e6 --- /dev/null +++ b/services/gaussdbfornosql/v3/model/model_upgrade_result.go @@ -0,0 +1,32 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// UpgradeResult 数据库补丁升级结果 +type UpgradeResult struct { + + // 任务ID。仅当补丁版本升级任务提交成功时返回该字段。 + JobId *string `json:"job_id,omitempty"` + + // 实例ID。 + InstanceId string `json:"instance_id"` + + // 错误码。仅当补丁版本升级任务提交失败时返回该字段。 + ErrorCode *string `json:"error_code,omitempty"` + + // 失败原因。仅当补丁版本升级任务提交失败时返回该字段。 + ErrorMessage *string `json:"error_message,omitempty"` +} + +func (o UpgradeResult) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UpgradeResult struct{}" + } + + return strings.Join([]string{"UpgradeResult", string(data)}, " ") +} diff --git a/services/iamaccessanalyzer/v1/model/model_finding_details.go b/services/iamaccessanalyzer/v1/model/model_finding_details.go index 26f2f0cebd..ac576f52d4 100644 --- a/services/iamaccessanalyzer/v1/model/model_finding_details.go +++ b/services/iamaccessanalyzer/v1/model/model_finding_details.go @@ -13,6 +13,8 @@ type FindingDetails struct { UnusedIamUserAccessKeyDetails *UnusedIamUserAccessKeyDetails `json:"unused_iam_user_access_key_details,omitempty"` UnusedIamUserPasswordDetails *UnusedIamUserPasswordDetails `json:"unused_iam_user_password_details,omitempty"` + + UnusedPermissionDetails *UnusedPermissionDetails `json:"unused_permission_details,omitempty"` } func (o FindingDetails) String() string { diff --git a/services/iamaccessanalyzer/v1/model/model_finding_type.go b/services/iamaccessanalyzer/v1/model/model_finding_type.go index eb01d4bcee..27663096f3 100644 --- a/services/iamaccessanalyzer/v1/model/model_finding_type.go +++ b/services/iamaccessanalyzer/v1/model/model_finding_type.go @@ -18,6 +18,7 @@ type FindingTypeEnum struct { EXTERNAL_ACCESS FindingType UNUSED_IAM_USER_ACCESS_KEY FindingType UNUSED_IAM_USER_PASSWORD FindingType + UNUSED_PERMISSION FindingType } func GetFindingTypeEnum() FindingTypeEnum { @@ -31,6 +32,9 @@ func GetFindingTypeEnum() FindingTypeEnum { UNUSED_IAM_USER_PASSWORD: FindingType{ value: "unused_iam_user_password", }, + UNUSED_PERMISSION: FindingType{ + value: "unused_permission", + }, } } diff --git a/services/iamaccessanalyzer/v1/model/model_unused_action.go b/services/iamaccessanalyzer/v1/model/model_unused_action.go new file mode 100644 index 0000000000..92e0537555 --- /dev/null +++ b/services/iamaccessanalyzer/v1/model/model_unused_action.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type UnusedAction struct { + + // Action 名称。 + Action string `json:"action"` +} + +func (o UnusedAction) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UnusedAction struct{}" + } + + return strings.Join([]string{"UnusedAction", string(data)}, " ") +} diff --git a/services/iamaccessanalyzer/v1/model/model_unused_permission_details.go b/services/iamaccessanalyzer/v1/model/model_unused_permission_details.go new file mode 100644 index 0000000000..905ab5240b --- /dev/null +++ b/services/iamaccessanalyzer/v1/model/model_unused_permission_details.go @@ -0,0 +1,25 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type UnusedPermissionDetails struct { + + // 权限对应的云服务名称。 + Service string `json:"service"` + + // 未使用的操作列表。 + Actions []UnusedAction `json:"actions"` +} + +func (o UnusedPermissionDetails) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "UnusedPermissionDetails struct{}" + } + + return strings.Join([]string{"UnusedPermissionDetails", string(data)}, " ") +} diff --git a/services/iamaccessanalyzer/v1/model/model_validate_policy_resource_type.go b/services/iamaccessanalyzer/v1/model/model_validate_policy_resource_type.go index 78de11d90a..101176f8c6 100644 --- a/services/iamaccessanalyzer/v1/model/model_validate_policy_resource_type.go +++ b/services/iamaccessanalyzer/v1/model/model_validate_policy_resource_type.go @@ -15,15 +15,11 @@ type ValidatePolicyResourceType struct { } type ValidatePolicyResourceTypeEnum struct { - OBSBUCKET ValidatePolicyResourceType IAMAGENCY ValidatePolicyResourceType } func GetValidatePolicyResourceTypeEnum() ValidatePolicyResourceTypeEnum { return ValidatePolicyResourceTypeEnum{ - OBSBUCKET: ValidatePolicyResourceType{ - value: "obs:bucket", - }, IAMAGENCY: ValidatePolicyResourceType{ value: "iam:agency", }, diff --git a/services/iotda/v5/ioTDA_client.go b/services/iotda/v5/ioTDA_client.go index 752dcc8474..07cc57469a 100644 --- a/services/iotda/v5/ioTDA_client.go +++ b/services/iotda/v5/ioTDA_client.go @@ -229,6 +229,27 @@ func (c *IoTDAClient) UpdateApplicationInvoker(request *model.UpdateApplicationR return &UpdateApplicationInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// CountAsyncHistoryCommands 统计设备下的历史命令总数 +// +// 统计设备下的历史命令总数。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *IoTDAClient) CountAsyncHistoryCommands(request *model.CountAsyncHistoryCommandsRequest) (*model.CountAsyncHistoryCommandsResponse, error) { + requestDef := GenReqDefForCountAsyncHistoryCommands() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.CountAsyncHistoryCommandsResponse), nil + } +} + +// CountAsyncHistoryCommandsInvoker 统计设备下的历史命令总数 +func (c *IoTDAClient) CountAsyncHistoryCommandsInvoker(request *model.CountAsyncHistoryCommandsRequest) *CountAsyncHistoryCommandsInvoker { + requestDef := GenReqDefForCountAsyncHistoryCommands() + return &CountAsyncHistoryCommandsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // CreateAsyncCommand 下发异步设备命令 // // 设备的产品模型中定义了物联网平台可向设备下发的命令,应用服务器可调用此接口向指定设备下发异步命令,以实现对设备的控制。平台负责将命令发送给设备,并将设备执行命令结果异步通知应用服务器。 命令执行结果支持灵活的数据流转,应用服务器通过调用物联网平台的创建规则触发条件(Resource:device.command.status,Event:update)、创建规则动作并激活规则后,当命令状态变更时,物联网平台会根据规则将结果发送到规则指定的服务器,如用户自定义的HTTP服务器,AMQP服务器,以及华为云的其他储存服务器等, 详情参考[[设备命令状态变更通知](https://support.huaweicloud.com/api-iothub/iot_06_v5_01212.html)](tag:hws)[[设备命令状态变更通知](https://support.huaweicloud.com/intl/zh-cn/api-iothub/iot_06_v5_01212.html)](tag:hws_hk)。 @@ -253,6 +274,48 @@ func (c *IoTDAClient) CreateAsyncCommandInvoker(request *model.CreateAsyncComman return &CreateAsyncCommandInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// ListAsyncCommands 查询设备下队列中的命令 +// +// 查询设备下队列中的命令(处理中的命令),包含PENDING、SENT、DELIVERED三种状态,注意:DELIVERED状态的命令经过系统设定的一段时间(具体以系统配置为准)仍然没有更新,就会从队列中移除,变为历史命令。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *IoTDAClient) ListAsyncCommands(request *model.ListAsyncCommandsRequest) (*model.ListAsyncCommandsResponse, error) { + requestDef := GenReqDefForListAsyncCommands() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListAsyncCommandsResponse), nil + } +} + +// ListAsyncCommandsInvoker 查询设备下队列中的命令 +func (c *IoTDAClient) ListAsyncCommandsInvoker(request *model.ListAsyncCommandsRequest) *ListAsyncCommandsInvoker { + requestDef := GenReqDefForListAsyncCommands() + return &ListAsyncCommandsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListAsyncHistoryCommands 查询设备下的历史命令 +// +// 查询设备下发的历史异步命令,包含EXPIRED、SUCCESSFUL、FAILED、TIMEOUT、DELIVERED五种状态。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *IoTDAClient) ListAsyncHistoryCommands(request *model.ListAsyncHistoryCommandsRequest) (*model.ListAsyncHistoryCommandsResponse, error) { + requestDef := GenReqDefForListAsyncHistoryCommands() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListAsyncHistoryCommandsResponse), nil + } +} + +// ListAsyncHistoryCommandsInvoker 查询设备下的历史命令 +func (c *IoTDAClient) ListAsyncHistoryCommandsInvoker(request *model.ListAsyncHistoryCommandsRequest) *ListAsyncHistoryCommandsInvoker { + requestDef := GenReqDefForListAsyncHistoryCommands() + return &ListAsyncHistoryCommandsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // ShowAsyncDeviceCommand 查询指定id的命令 // // 物联网平台可查询指定id的命令。 @@ -1692,6 +1755,69 @@ func (c *IoTDAClient) UpdateRoutingFlowControlPolicyInvoker(request *model.Updat return &UpdateRoutingFlowControlPolicyInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// AddFunctions 创建编解码函数 +// +// 提供创建编解码函数的功能。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *IoTDAClient) AddFunctions(request *model.AddFunctionsRequest) (*model.AddFunctionsResponse, error) { + requestDef := GenReqDefForAddFunctions() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.AddFunctionsResponse), nil + } +} + +// AddFunctionsInvoker 创建编解码函数 +func (c *IoTDAClient) AddFunctionsInvoker(request *model.AddFunctionsRequest) *AddFunctionsInvoker { + requestDef := GenReqDefForAddFunctions() + return &AddFunctionsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// DeleteFunctions 删除编解码函数 +// +// 提供删除编解码函数的功能。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *IoTDAClient) DeleteFunctions(request *model.DeleteFunctionsRequest) (*model.DeleteFunctionsResponse, error) { + requestDef := GenReqDefForDeleteFunctions() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.DeleteFunctionsResponse), nil + } +} + +// DeleteFunctionsInvoker 删除编解码函数 +func (c *IoTDAClient) DeleteFunctionsInvoker(request *model.DeleteFunctionsRequest) *DeleteFunctionsInvoker { + requestDef := GenReqDefForDeleteFunctions() + return &DeleteFunctionsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + +// ListFunctions 查询编解码函数 +// +// 提供查询编解码函数的功能。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *IoTDAClient) ListFunctions(request *model.ListFunctionsRequest) (*model.ListFunctionsResponse, error) { + requestDef := GenReqDefForListFunctions() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ListFunctionsResponse), nil + } +} + +// ListFunctionsInvoker 查询编解码函数 +func (c *IoTDAClient) ListFunctionsInvoker(request *model.ListFunctionsRequest) *ListFunctionsInvoker { + requestDef := GenReqDefForListFunctions() + return &ListFunctionsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // CreateMessage 下发设备消息 // // 物联网平台可向设备下发消息,应用服务器可调用此接口向指定设备下发消息,以实现对设备的控制。应用将消息下发给平台后,平台返回应用响应结果,平台再将消息发送给设备。平台返回应用响应结果不一定是设备接收结果,建议用户应用通过订阅[[设备消息状态变更通知](https://support.huaweicloud.com/api-iothub/iot_06_v5_01203.html)](tag:hws)[[设备消息状态变更通知](https://support.huaweicloud.com/intl/zh-cn/api-iothub/iot_06_v5_01203.html)](tag:hws_hk),订阅后平台会将设备接收结果推送给订阅的应用。 diff --git a/services/iotda/v5/ioTDA_invoker.go b/services/iotda/v5/ioTDA_invoker.go index eee4670740..44ab87af40 100644 --- a/services/iotda/v5/ioTDA_invoker.go +++ b/services/iotda/v5/ioTDA_invoker.go @@ -165,6 +165,22 @@ func (i *UpdateApplicationInvoker) Invoke() (*model.UpdateApplicationResponse, e } } +type CountAsyncHistoryCommandsInvoker struct { + *invoker.BaseInvoker +} + +func (i *CountAsyncHistoryCommandsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *CountAsyncHistoryCommandsInvoker) Invoke() (*model.CountAsyncHistoryCommandsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.CountAsyncHistoryCommandsResponse), nil + } +} + type CreateAsyncCommandInvoker struct { *invoker.BaseInvoker } @@ -181,6 +197,38 @@ func (i *CreateAsyncCommandInvoker) Invoke() (*model.CreateAsyncCommandResponse, } } +type ListAsyncCommandsInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListAsyncCommandsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListAsyncCommandsInvoker) Invoke() (*model.ListAsyncCommandsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListAsyncCommandsResponse), nil + } +} + +type ListAsyncHistoryCommandsInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListAsyncHistoryCommandsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListAsyncHistoryCommandsInvoker) Invoke() (*model.ListAsyncHistoryCommandsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListAsyncHistoryCommandsResponse), nil + } +} + type ShowAsyncDeviceCommandInvoker struct { *invoker.BaseInvoker } @@ -1157,6 +1205,54 @@ func (i *UpdateRoutingFlowControlPolicyInvoker) Invoke() (*model.UpdateRoutingFl } } +type AddFunctionsInvoker struct { + *invoker.BaseInvoker +} + +func (i *AddFunctionsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *AddFunctionsInvoker) Invoke() (*model.AddFunctionsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.AddFunctionsResponse), nil + } +} + +type DeleteFunctionsInvoker struct { + *invoker.BaseInvoker +} + +func (i *DeleteFunctionsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *DeleteFunctionsInvoker) Invoke() (*model.DeleteFunctionsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.DeleteFunctionsResponse), nil + } +} + +type ListFunctionsInvoker struct { + *invoker.BaseInvoker +} + +func (i *ListFunctionsInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ListFunctionsInvoker) Invoke() (*model.ListFunctionsResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ListFunctionsResponse), nil + } +} + type CreateMessageInvoker struct { *invoker.BaseInvoker } diff --git a/services/iotda/v5/ioTDA_meta.go b/services/iotda/v5/ioTDA_meta.go index 4d5fc1ac4b..b6f7f43bb8 100644 --- a/services/iotda/v5/ioTDA_meta.go +++ b/services/iotda/v5/ioTDA_meta.go @@ -238,6 +238,44 @@ func GenReqDefForUpdateApplication() *def.HttpRequestDef { return requestDef } +func GenReqDefForCountAsyncHistoryCommands() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v5/iot/{project_id}/devices/{device_id}/async-commands-history/count"). + WithResponse(new(model.CountAsyncHistoryCommandsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("DeviceId"). + WithJsonTag("device_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("StartTime"). + WithJsonTag("start_time"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("EndTime"). + WithJsonTag("end_time"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Status"). + WithJsonTag("status"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("CommandName"). + WithJsonTag("command_name"). + WithLocationType(def.Query)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("Instance-Id"). + WithLocationType(def.Header)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForCreateAsyncCommand() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodPost). @@ -263,6 +301,106 @@ func GenReqDefForCreateAsyncCommand() *def.HttpRequestDef { return requestDef } +func GenReqDefForListAsyncCommands() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v5/iot/{project_id}/devices/{device_id}/async-commands"). + WithResponse(new(model.ListAsyncCommandsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("DeviceId"). + WithJsonTag("device_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Limit"). + WithJsonTag("limit"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Marker"). + WithJsonTag("marker"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Offset"). + WithJsonTag("offset"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("StartTime"). + WithJsonTag("start_time"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("EndTime"). + WithJsonTag("end_time"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Status"). + WithJsonTag("status"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("CommandName"). + WithJsonTag("command_name"). + WithLocationType(def.Query)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("Instance-Id"). + WithLocationType(def.Header)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListAsyncHistoryCommands() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v5/iot/{project_id}/devices/{device_id}/async-commands-history"). + WithResponse(new(model.ListAsyncHistoryCommandsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("DeviceId"). + WithJsonTag("device_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Limit"). + WithJsonTag("limit"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Marker"). + WithJsonTag("marker"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Offset"). + WithJsonTag("offset"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("StartTime"). + WithJsonTag("start_time"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("EndTime"). + WithJsonTag("end_time"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Status"). + WithJsonTag("status"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("CommandName"). + WithJsonTag("command_name"). + WithLocationType(def.Query)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("Instance-Id"). + WithLocationType(def.Header)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForShowAsyncDeviceCommand() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodGet). @@ -1896,6 +2034,100 @@ func GenReqDefForUpdateRoutingFlowControlPolicy() *def.HttpRequestDef { return requestDef } +func GenReqDefForAddFunctions() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v5/iot/{project_id}/product-functions"). + WithResponse(new(model.AddFunctionsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("Instance-Id"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SpAuthToken"). + WithJsonTag("Sp-Auth-Token"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("StageAuthToken"). + WithJsonTag("Stage-Auth-Token"). + WithLocationType(def.Header)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForDeleteFunctions() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodDelete). + WithPath("/v5/iot/{project_id}/product-functions/{function_id}"). + WithResponse(new(model.DeleteFunctionsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("FunctionId"). + WithJsonTag("function_id"). + WithLocationType(def.Path)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("Instance-Id"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SpAuthToken"). + WithJsonTag("Sp-Auth-Token"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("StageAuthToken"). + WithJsonTag("Stage-Auth-Token"). + WithLocationType(def.Header)) + + reqDefBuilder.WithResponseField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + +func GenReqDefForListFunctions() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodGet). + WithPath("/v5/iot/{project_id}/product-functions"). + WithResponse(new(model.ListFunctionsResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("AppId"). + WithJsonTag("app_id"). + WithLocationType(def.Query)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("ProductId"). + WithJsonTag("product_id"). + WithLocationType(def.Query)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("InstanceId"). + WithJsonTag("Instance-Id"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("SpAuthToken"). + WithJsonTag("Sp-Auth-Token"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("StageAuthToken"). + WithJsonTag("Stage-Auth-Token"). + WithLocationType(def.Header)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForCreateMessage() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodPost). diff --git a/services/iotda/v5/model/model_add_functions_request.go b/services/iotda/v5/model/model_add_functions_request.go new file mode 100644 index 0000000000..038db3125e --- /dev/null +++ b/services/iotda/v5/model/model_add_functions_request.go @@ -0,0 +1,31 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// AddFunctionsRequest Request Object +type AddFunctionsRequest struct { + + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 + InstanceId *string `json:"Instance-Id,omitempty"` + + // **参数说明**:Sp用户Token。通过调用IoBPS服务获取SP用户Token。 + SpAuthToken *string `json:"Sp-Auth-Token,omitempty"` + + // **参数说明**:Stage用户的Token, 仅提供给IoStage服务使用。 + StageAuthToken *string `json:"Stage-Auth-Token,omitempty"` + + Body *FunctionRequestDto `json:"body,omitempty"` +} + +func (o AddFunctionsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "AddFunctionsRequest struct{}" + } + + return strings.Join([]string{"AddFunctionsRequest", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_add_functions_response.go b/services/iotda/v5/model/model_add_functions_response.go new file mode 100644 index 0000000000..dafb7a92a1 --- /dev/null +++ b/services/iotda/v5/model/model_add_functions_response.go @@ -0,0 +1,39 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// AddFunctionsResponse Response Object +type AddFunctionsResponse struct { + + // **参数说明**:资源空间ID。此参数为非必选参数,存在多资源空间的用户需要使用该接口时,可以携带该参数查询指定资源空间下的产品列表,不携带该参数则会查询该用户下所有产品列表。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + AppId *string `json:"app_id,omitempty"` + + // **参数说明**:设备关联的产品ID,用于唯一标识一个产品模型,创建产品后获得。方法请参见 [[创建产品](https://support.huaweicloud.com/api-iothub/iot_06_v5_0050.html)](tag:hws)[[创建产品](https://support.huaweicloud.com/intl/zh-cn/api-iothub/iot_06_v5_0050.html)](tag:hws_hk)。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + ProductId *string `json:"product_id,omitempty"` + + // **参数说明**:函数ID,产品配置函数后生成的唯一标识。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + FunctionId *string `json:"function_id,omitempty"` + + // **参数说明**:产品关联函数的URN(Uniform Resource Name)。 **取值范围**:长度不超过128,只允许字母、数字、下划线(_)、连接符(-)、分隔符(:)的组合。 + Urn *string `json:"urn,omitempty"` + + // **参数说明**:编解码函数描述信息。 **取值范围**:128,只允许中文、字母、数字、以及_? '#().,&%@!-等字符的组合。 + Description *string `json:"description,omitempty"` + + // **参数说明**:产品函数创建时间。**格式**:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + CreateTime *string `json:"create_time,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o AddFunctionsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "AddFunctionsResponse struct{}" + } + + return strings.Join([]string{"AddFunctionsResponse", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_async_device_list_command.go b/services/iotda/v5/model/model_async_device_list_command.go new file mode 100644 index 0000000000..b00c4afc32 --- /dev/null +++ b/services/iotda/v5/model/model_async_device_list_command.go @@ -0,0 +1,52 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type AsyncDeviceListCommand struct { + + // 设备ID,用于唯一标识一个设备,在注册设备时由物联网平台分配获得。 + DeviceId *string `json:"device_id,omitempty"` + + // 设备命令ID,用于唯一标识一条命令,在下发设备命令时由物联网平台分配获得。 + CommandId *string `json:"command_id,omitempty"` + + // 设备命令所属的设备服务ID,在设备关联的产品模型中定义。 + ServiceId *string `json:"service_id,omitempty"` + + // 设备命令名称,在设备关联的产品模型中定义。 + CommandName *string `json:"command_name,omitempty"` + + // 物联网平台缓存命令的时长, 单位秒。 + ExpireTime *int32 `json:"expire_time,omitempty"` + + // 下发命令的状态。 ·PENDING表示未下发,在物联网平台缓存着 ·EXPIRED表示命令已经过期,即缓存的时间超过设定的expire_time ·SENT表示命令正在下发 ·DELIVERED表示命令已送达设备 ·SUCCESSFUL表示命令已经成功执行 ·FAILED表示命令执行失败 ·TIMEOUT表示命令下发之后,没有收到设备确认或者响应结果一定时间后超时 + Status *string `json:"status,omitempty"` + + // 命令的创建时间,\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串。 + CreatedTime *string `json:"created_time,omitempty"` + + // 物联网平台发送命令的时间,如果命令是立即下发, 则该时间与命令创建时间一致, 如果是缓存命令, 则是命令实际下发的时间。\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串。 + SentTime *string `json:"sent_time,omitempty"` + + // 物联网平台将命令送达到设备的时间,\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串。 + DeliveredTime *string `json:"delivered_time,omitempty"` + + // 下发策略, immediately表示立即下发,delay表示缓存起来,等数据上报或者设备上线之后下发。 + SendStrategy *string `json:"send_strategy,omitempty"` + + // 设备响应命令的时间,\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串。 + ResponseTime *string `json:"response_time,omitempty"` +} + +func (o AsyncDeviceListCommand) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "AsyncDeviceListCommand struct{}" + } + + return strings.Join([]string{"AsyncDeviceListCommand", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_count_async_history_commands_request.go b/services/iotda/v5/model/model_count_async_history_commands_request.go new file mode 100644 index 0000000000..f68ec77c58 --- /dev/null +++ b/services/iotda/v5/model/model_count_async_history_commands_request.go @@ -0,0 +1,38 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CountAsyncHistoryCommandsRequest Request Object +type CountAsyncHistoryCommandsRequest struct { + + // **参数说明**:下发命令的设备ID,用于唯一标识一个设备,在注册设备时由物联网平台分配获得。 **取值范围**:长度不超过128,只允许字母、数字、下划线(_)、连接符(-)的组合。 + DeviceId string `json:"device_id"` + + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 + InstanceId *string `json:"Instance-Id,omitempty"` + + // **参数说明**:查询命令下发时间在startTime之后的记录,格式:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + StartTime *string `json:"start_time,omitempty"` + + // **参数说明**:查询命令下发时间在endTime之前的记录,格式:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + EndTime *string `json:"end_time,omitempty"` + + // **参数说明**:命令状态。 + Status *string `json:"status,omitempty"` + + // **参数说明**:命令名称。 + CommandName *string `json:"command_name,omitempty"` +} + +func (o CountAsyncHistoryCommandsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CountAsyncHistoryCommandsRequest struct{}" + } + + return strings.Join([]string{"CountAsyncHistoryCommandsRequest", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_count_async_history_commands_response.go b/services/iotda/v5/model/model_count_async_history_commands_response.go new file mode 100644 index 0000000000..964b6ea3d9 --- /dev/null +++ b/services/iotda/v5/model/model_count_async_history_commands_response.go @@ -0,0 +1,24 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CountAsyncHistoryCommandsResponse Response Object +type CountAsyncHistoryCommandsResponse struct { + + // 满足查询条件的记录总数。 + Count *int64 `json:"count,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o CountAsyncHistoryCommandsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CountAsyncHistoryCommandsResponse struct{}" + } + + return strings.Join([]string{"CountAsyncHistoryCommandsResponse", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_create_async_command_request.go b/services/iotda/v5/model/model_create_async_command_request.go index 9ae5bf4e46..722dab56e4 100644 --- a/services/iotda/v5/model/model_create_async_command_request.go +++ b/services/iotda/v5/model/model_create_async_command_request.go @@ -12,7 +12,7 @@ type CreateAsyncCommandRequest struct { // **参数说明**:下发命令的设备ID,用于唯一标识一个设备,在注册设备时由物联网平台分配获得。 **取值范围**:长度不超过128,只允许字母、数字、下划线(_)、连接符(-)的组合。 DeviceId string `json:"device_id"` - // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0121.html)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0121.html)](tag:hws_hk)。 + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 InstanceId *string `json:"Instance-Id,omitempty"` Body *AsyncDeviceCommandRequest `json:"body,omitempty"` diff --git a/services/iotda/v5/model/model_delete_functions_request.go b/services/iotda/v5/model/model_delete_functions_request.go new file mode 100644 index 0000000000..4048b9f464 --- /dev/null +++ b/services/iotda/v5/model/model_delete_functions_request.go @@ -0,0 +1,32 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DeleteFunctionsRequest Request Object +type DeleteFunctionsRequest struct { + + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 + InstanceId *string `json:"Instance-Id,omitempty"` + + // **参数说明**:Sp用户Token。通过调用IoBPS服务获取SP用户Token。 + SpAuthToken *string `json:"Sp-Auth-Token,omitempty"` + + // **参数说明**:Stage用户的Token, 仅提供给IoStage服务使用。 + StageAuthToken *string `json:"Stage-Auth-Token,omitempty"` + + // **参数说明**:函数ID。 + FunctionId string `json:"function_id"` +} + +func (o DeleteFunctionsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DeleteFunctionsRequest struct{}" + } + + return strings.Join([]string{"DeleteFunctionsRequest", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_delete_functions_response.go b/services/iotda/v5/model/model_delete_functions_response.go new file mode 100644 index 0000000000..0280e597b5 --- /dev/null +++ b/services/iotda/v5/model/model_delete_functions_response.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// DeleteFunctionsResponse Response Object +type DeleteFunctionsResponse struct { + Body *string `json:"body,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o DeleteFunctionsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "DeleteFunctionsResponse struct{}" + } + + return strings.Join([]string{"DeleteFunctionsResponse", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_function_dto.go b/services/iotda/v5/model/model_function_dto.go new file mode 100644 index 0000000000..e14b0eb5d8 --- /dev/null +++ b/services/iotda/v5/model/model_function_dto.go @@ -0,0 +1,38 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// FunctionDto 编解码函数信息 +type FunctionDto struct { + + // **参数说明**:资源空间ID。此参数为非必选参数,存在多资源空间的用户需要使用该接口时,可以携带该参数查询指定资源空间下的产品列表,不携带该参数则会查询该用户下所有产品列表。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + AppId *string `json:"app_id,omitempty"` + + // **参数说明**:设备关联的产品ID,用于唯一标识一个产品模型,创建产品后获得。方法请参见 [[创建产品](https://support.huaweicloud.com/api-iothub/iot_06_v5_0050.html)](tag:hws)[[创建产品](https://support.huaweicloud.com/intl/zh-cn/api-iothub/iot_06_v5_0050.html)](tag:hws_hk)。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + ProductId string `json:"product_id"` + + // **参数说明**:函数ID,产品配置函数后生成的唯一标识。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + FunctionId string `json:"function_id"` + + // **参数说明**:产品关联函数的URN(Uniform Resource Name)。 **取值范围**:长度不超过128,只允许字母、数字、下划线(_)、连接符(-)、分隔符(:)的组合。 + Urn string `json:"urn"` + + // **参数说明**:编解码函数描述信息。 **取值范围**:128,只允许中文、字母、数字、以及_? '#().,&%@!-等字符的组合。 + Description *string `json:"description,omitempty"` + + // **参数说明**:产品函数创建时间。**格式**:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + CreateTime *string `json:"create_time,omitempty"` +} + +func (o FunctionDto) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "FunctionDto struct{}" + } + + return strings.Join([]string{"FunctionDto", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_function_request_dto.go b/services/iotda/v5/model/model_function_request_dto.go new file mode 100644 index 0000000000..89f923c39b --- /dev/null +++ b/services/iotda/v5/model/model_function_request_dto.go @@ -0,0 +1,32 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// FunctionRequestDto 编解码函数信息 +type FunctionRequestDto struct { + + // **参数说明**:资源空间ID。此参数为非必选参数,存在多资源空间的用户需要使用该接口时,可以携带该参数查询指定资源空间下的产品列表,不携带该参数则会查询该用户下所有产品列表。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + AppId *string `json:"app_id,omitempty"` + + // **参数说明**:设备关联的产品ID,用于唯一标识一个产品模型,创建产品后获得。方法请参见 [[创建产品](https://support.huaweicloud.com/api-iothub/iot_06_v5_0050.html)](tag:hws)[[创建产品](https://support.huaweicloud.com/intl/zh-cn/api-iothub/iot_06_v5_0050.html)](tag:hws_hk)。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + ProductId string `json:"product_id"` + + // **参数说明**:产品关联函数的URN(Uniform Resource Name)。 **取值范围**:长度不超过256,只允许字母、数字、下划线(_)、连接符(-)、分隔符(:)的组合。 + Urn string `json:"urn"` + + // **参数说明**:编解码函数描述信息。 **取值范围**:128,只允许中文、字母、数字、以及_? '#().,&%@!-等字符的组合。 + Description *string `json:"description,omitempty"` +} + +func (o FunctionRequestDto) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "FunctionRequestDto struct{}" + } + + return strings.Join([]string{"FunctionRequestDto", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_history_command_page.go b/services/iotda/v5/model/model_history_command_page.go new file mode 100644 index 0000000000..e31a5c0a59 --- /dev/null +++ b/services/iotda/v5/model/model_history_command_page.go @@ -0,0 +1,23 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// HistoryCommandPage 查询批量分页结构体,定义了分页页码、每页记录数、该页记录的最大Id。 +type HistoryCommandPage struct { + + // 本次分页查询结果中最后一条记录的ID,可在下一次分页查询时使用。 + Marker *string `json:"marker,omitempty"` +} + +func (o HistoryCommandPage) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "HistoryCommandPage struct{}" + } + + return strings.Join([]string{"HistoryCommandPage", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_list_async_commands_request.go b/services/iotda/v5/model/model_list_async_commands_request.go new file mode 100644 index 0000000000..6a9e3d9c5c --- /dev/null +++ b/services/iotda/v5/model/model_list_async_commands_request.go @@ -0,0 +1,47 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListAsyncCommandsRequest Request Object +type ListAsyncCommandsRequest struct { + + // **参数说明**:下发命令的设备ID,用于唯一标识一个设备,在注册设备时由物联网平台分配获得。 **取值范围**:长度不超过128,只允许字母、数字、下划线(_)、连接符(-)的组合。 + DeviceId string `json:"device_id"` + + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 + InstanceId *string `json:"Instance-Id,omitempty"` + + // **参数说明**:分页查询时每页显示的记录数,默认值为10,取值范围为1-50的整数。 + Limit *int32 `json:"limit,omitempty"` + + // **参数说明**:上一次分页查询结果中最后一条记录的ID,在上一次分页查询时由物联网平台返回获得。分页查询时物联网平台是按marker也就是记录ID降序查询的,越新的数据记录ID也会越大。若填写marker,则本次只查询记录ID小于marker的数据记录。若不填写,则从记录ID最大也就是最新的一条数据开始查询。如果需要依次查询所有数据,则每次查询时必须填写上一次查询响应中的marker值。 + Marker *string `json:"marker,omitempty"` + + // **参数说明**:表示从marker后偏移offset条记录开始查询。默认为0,取值范围为0-500的整数。当offset为0时,表示从marker后第一条记录开始输出。限制offset最大值是出于API性能考虑,您可以搭配marker使用该参数实现翻页,例如每页50条记录,1-11页内都可以直接使用offset跳转到指定页,但到11页后,由于offset限制为500,您需要使用第11页返回的marker作为下次查询的marker,以实现翻页到12-22页。 + Offset *int32 `json:"offset,omitempty"` + + // **参数说明**:查询命令下发时间在startTime之后的记录,格式:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + StartTime *string `json:"start_time,omitempty"` + + // **参数说明**:查询命令下发时间在endTime之前的记录,格式:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + EndTime *string `json:"end_time,omitempty"` + + // **参数说明**:命令状态。 + Status *string `json:"status,omitempty"` + + // **参数说明**:命令名称。 + CommandName *string `json:"command_name,omitempty"` +} + +func (o ListAsyncCommandsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListAsyncCommandsRequest struct{}" + } + + return strings.Join([]string{"ListAsyncCommandsRequest", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_list_async_commands_response.go b/services/iotda/v5/model/model_list_async_commands_response.go new file mode 100644 index 0000000000..7bc8fe6bf1 --- /dev/null +++ b/services/iotda/v5/model/model_list_async_commands_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListAsyncCommandsResponse Response Object +type ListAsyncCommandsResponse struct { + + // 设备队列命令列表。 + Commands *[]AsyncDeviceListCommand `json:"commands,omitempty"` + + Page *QueueCommandPage `json:"page,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListAsyncCommandsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListAsyncCommandsResponse struct{}" + } + + return strings.Join([]string{"ListAsyncCommandsResponse", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_list_async_history_commands_request.go b/services/iotda/v5/model/model_list_async_history_commands_request.go new file mode 100644 index 0000000000..4171942676 --- /dev/null +++ b/services/iotda/v5/model/model_list_async_history_commands_request.go @@ -0,0 +1,47 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListAsyncHistoryCommandsRequest Request Object +type ListAsyncHistoryCommandsRequest struct { + + // **参数说明**:下发命令的设备ID,用于唯一标识一个设备,在注册设备时由物联网平台分配获得。 **取值范围**:长度不超过128,只允许字母、数字、下划线(_)、连接符(-)的组合。 + DeviceId string `json:"device_id"` + + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 + InstanceId *string `json:"Instance-Id,omitempty"` + + // **参数说明**:分页查询时每页显示的记录数,默认值为10,取值范围为1-50的整数。 + Limit *int32 `json:"limit,omitempty"` + + // **参数说明**:上一次分页查询结果中最后一条记录的ID,在上一次分页查询时由物联网平台返回获得。分页查询时物联网平台是按marker也就是记录ID降序查询的,越新的数据记录ID也会越大。若填写marker,则本次只查询记录ID小于marker的数据记录。若不填写,则从记录ID最大也就是最新的一条数据开始查询。如果需要依次查询所有数据,则每次查询时必须填写上一次查询响应中的marker值。 + Marker *string `json:"marker,omitempty"` + + // **参数说明**:表示从marker后偏移offset条记录开始查询。默认为0,取值范围为0-500的整数。当offset为0时,表示从marker后第一条记录开始输出。限制offset最大值是出于API性能考虑,您可以搭配marker使用该参数实现翻页,例如每页50条记录,1-11页内都可以直接使用offset跳转到指定页,但到11页后,由于offset限制为500,您需要使用第11页返回的marker作为下次查询的marker,以实现翻页到12-22页。 + Offset *int32 `json:"offset,omitempty"` + + // **参数说明**:查询命令下发时间在startTime之后的记录,格式:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + StartTime *string `json:"start_time,omitempty"` + + // **参数说明**:查询命令下发时间在endTime之前的记录,格式:yyyyMMdd'T'HHmmss'Z',如20151212T121212Z。 + EndTime *string `json:"end_time,omitempty"` + + // **参数说明**:命令状态。 + Status *string `json:"status,omitempty"` + + // **参数说明**:命令名称。 + CommandName *string `json:"command_name,omitempty"` +} + +func (o ListAsyncHistoryCommandsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListAsyncHistoryCommandsRequest struct{}" + } + + return strings.Join([]string{"ListAsyncHistoryCommandsRequest", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_list_async_history_commands_response.go b/services/iotda/v5/model/model_list_async_history_commands_response.go new file mode 100644 index 0000000000..cccd511ab2 --- /dev/null +++ b/services/iotda/v5/model/model_list_async_history_commands_response.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListAsyncHistoryCommandsResponse Response Object +type ListAsyncHistoryCommandsResponse struct { + + // 设备历史命令列表。 + Commands *[]AsyncDeviceListCommand `json:"commands,omitempty"` + + Page *HistoryCommandPage `json:"page,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListAsyncHistoryCommandsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListAsyncHistoryCommandsResponse struct{}" + } + + return strings.Join([]string{"ListAsyncHistoryCommandsResponse", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_list_functions_request.go b/services/iotda/v5/model/model_list_functions_request.go new file mode 100644 index 0000000000..eaba7dd61b --- /dev/null +++ b/services/iotda/v5/model/model_list_functions_request.go @@ -0,0 +1,35 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListFunctionsRequest Request Object +type ListFunctionsRequest struct { + + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 + InstanceId *string `json:"Instance-Id,omitempty"` + + // **参数说明**:Sp用户Token。通过调用IoBPS服务获取SP用户Token。 + SpAuthToken *string `json:"Sp-Auth-Token,omitempty"` + + // **参数说明**:Stage用户的Token, 仅提供给IoStage服务使用。 + StageAuthToken *string `json:"Stage-Auth-Token,omitempty"` + + // **参数说明**:资源空间ID。此参数为非必选参数,存在多资源空间的用户需要使用该接口时,可以携带该参数查询指定资源空间下的产品列表,不携带该参数则会查询该用户下所有产品列表。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + AppId *string `json:"app_id,omitempty"` + + // **参数说明**:设备关联的产品ID,用于唯一标识一个产品模型,创建产品后获得。方法请参见 [[创建产品](https://support.huaweicloud.com/api-iothub/iot_06_v5_0050.html)](tag:hws)[[创建产品](https://support.huaweicloud.com/intl/zh-cn/api-iothub/iot_06_v5_0050.html)](tag:hws_hk)。 **取值范围**:长度不超过36,只允许字母、数字、下划线(_)、连接符(-)的组合。 + ProductId string `json:"product_id"` +} + +func (o ListFunctionsRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListFunctionsRequest struct{}" + } + + return strings.Join([]string{"ListFunctionsRequest", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_list_functions_response.go b/services/iotda/v5/model/model_list_functions_response.go new file mode 100644 index 0000000000..71c56809a0 --- /dev/null +++ b/services/iotda/v5/model/model_list_functions_response.go @@ -0,0 +1,27 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ListFunctionsResponse Response Object +type ListFunctionsResponse struct { + + // **参数说明**:编解码函数列表。 + ProductFunctions *[]FunctionDto `json:"product_functions,omitempty"` + + // **参数说明**:满足查询条件的记录总数。 + Count *int64 `json:"count,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ListFunctionsResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ListFunctionsResponse struct{}" + } + + return strings.Join([]string{"ListFunctionsResponse", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_queue_command_page.go b/services/iotda/v5/model/model_queue_command_page.go new file mode 100644 index 0000000000..9e36a5a6b3 --- /dev/null +++ b/services/iotda/v5/model/model_queue_command_page.go @@ -0,0 +1,26 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// QueueCommandPage 查询批量分页结构体,定义了分页页码、每页记录数、记录总数、该页记录的最大Id。 +type QueueCommandPage struct { + + // 满足查询条件的记录总数。 + Count *int64 `json:"count,omitempty"` + + // 本次分页查询结果中最后一条记录的ID,可在下一次分页查询时使用。 + Marker *string `json:"marker,omitempty"` +} + +func (o QueueCommandPage) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "QueueCommandPage struct{}" + } + + return strings.Join([]string{"QueueCommandPage", string(data)}, " ") +} diff --git a/services/iotda/v5/model/model_show_async_device_command_request.go b/services/iotda/v5/model/model_show_async_device_command_request.go index 13a9a363b4..ebe10e2e5f 100644 --- a/services/iotda/v5/model/model_show_async_device_command_request.go +++ b/services/iotda/v5/model/model_show_async_device_command_request.go @@ -12,7 +12,7 @@ type ShowAsyncDeviceCommandRequest struct { // **参数说明**:下发命令的设备ID,用于唯一标识一个设备,在注册设备时由物联网平台分配获得。 **取值范围**:长度不超过128,只允许字母、数字、下划线(_)、连接符(-)的组合。 DeviceId string `json:"device_id"` - // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0121.html)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0121.html)](tag:hws_hk)。 + // **参数说明**:实例ID。物理多租下各实例的唯一标识,建议携带该参数,在使用专业版时必须携带该参数。您可以在IoTDA管理控制台界面,选择左侧导航栏“总览”页签查看当前实例的ID,具体获取方式请参考[[查看实例详情](https://support.huaweicloud.com/usermanual-iothub/iot_01_0079.html#section1)](tag:hws) [[查看实例详情](https://support.huaweicloud.com/intl/zh-cn/usermanual-iothub/iot_01_0079.html#section1)](tag:hws_hk)。 InstanceId *string `json:"Instance-Id,omitempty"` // **参数说明**:下发命令的命令id,用于唯一标识一个消息,在下发命令时由物联网平台分配获得。 **取值范围**:长度不超过100,只允许字母、数字、下划线(_)、连接符(-)的组合。 diff --git a/services/iotda/v5/model/model_show_async_device_command_response.go b/services/iotda/v5/model/model_show_async_device_command_response.go index b3fa671539..254d196479 100644 --- a/services/iotda/v5/model/model_show_async_device_command_response.go +++ b/services/iotda/v5/model/model_show_async_device_command_response.go @@ -39,13 +39,13 @@ type ShowAsyncDeviceCommandResponse struct { // 物联网平台发送命令的时间,如果命令是立即下发, 则该时间与命令创建时间一致, 如果是缓存命令, 则是命令实际下发的时间。\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串。 SentTime *string `json:"sent_time,omitempty"` - // 物联网平台将命令送达到设备的时间,\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串 + // 物联网平台将命令送达到设备的时间,\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串。 DeliveredTime *string `json:"delivered_time,omitempty"` // 下发策略, immediately表示立即下发,delay表示缓存起来,等数据上报或者设备上线之后下发。 SendStrategy *string `json:"send_strategy,omitempty"` - // 设备响应命令的时间,\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串 + // 设备响应命令的时间,\"yyyyMMdd'T'HHmmss'Z'\"格式的UTC字符串。 ResponseTime *string `json:"response_time,omitempty"` HttpStatusCode int `json:"-"` } diff --git a/services/kvs/v1/kvs_client.go b/services/kvs/v1/kvs_client.go index 8dc12d3218..d7182dc6ac 100644 --- a/services/kvs/v1/kvs_client.go +++ b/services/kvs/v1/kvs_client.go @@ -103,6 +103,27 @@ func (c *KvsClient) ListTableInvoker(request *model.ListTableRequest) *ListTable return &ListTableInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// CheckHealth 网络信道健康检查 +// +// 网络信道健康检查,返回response未抛出网络异常即为成功 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *KvsClient) CheckHealth(request *model.CheckHealthRequest) (*model.CheckHealthResponse, error) { + requestDef := GenReqDefForCheckHealth() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.CheckHealthResponse), nil + } +} + +// CheckHealthInvoker 网络信道健康检查 +func (c *KvsClient) CheckHealthInvoker(request *model.CheckHealthRequest) *CheckHealthInvoker { + requestDef := GenReqDefForCheckHealth() + return &CheckHealthInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // BatchWriteKv 批量写请求 // // 批量写请求,其中可以携带一或多个表的不同kv的写操作,上传kv/删除kv。 diff --git a/services/kvs/v1/kvs_invoker.go b/services/kvs/v1/kvs_invoker.go index a80c9396ba..9ab443cdc0 100644 --- a/services/kvs/v1/kvs_invoker.go +++ b/services/kvs/v1/kvs_invoker.go @@ -69,6 +69,22 @@ func (i *ListTableInvoker) Invoke() (*model.ListTableResponse, error) { } } +type CheckHealthInvoker struct { + *invoker.BaseInvoker +} + +func (i *CheckHealthInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *CheckHealthInvoker) Invoke() (*model.CheckHealthResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.CheckHealthResponse), nil + } +} + type BatchWriteKvInvoker struct { *invoker.BaseInvoker } diff --git a/services/kvs/v1/kvs_meta.go b/services/kvs/v1/kvs_meta.go index a52e8623e2..e40d711302 100644 --- a/services/kvs/v1/kvs_meta.go +++ b/services/kvs/v1/kvs_meta.go @@ -82,6 +82,21 @@ func GenReqDefForListTable() *def.HttpRequestDef { return requestDef } +func GenReqDefForCheckHealth() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v1/check-health"). + WithResponse(new(model.CheckHealthResponse)). + WithContentType("application/bson") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForBatchWriteKv() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodPost). diff --git a/services/kvs/v1/model/model_check_health_request.go b/services/kvs/v1/model/model_check_health_request.go new file mode 100644 index 0000000000..2df822a23d --- /dev/null +++ b/services/kvs/v1/model/model_check_health_request.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CheckHealthRequest Request Object +type CheckHealthRequest struct { + Body *CheckHealthRequestBody `bson:"body,omitempty"` +} + +func (o CheckHealthRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CheckHealthRequest struct{}" + } + + return strings.Join([]string{"CheckHealthRequest", string(data)}, " ") +} diff --git a/services/kvs/v1/model/model_check_health_request_body.go b/services/kvs/v1/model/model_check_health_request_body.go new file mode 100644 index 0000000000..0009e63817 --- /dev/null +++ b/services/kvs/v1/model/model_check_health_request_body.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type CheckHealthRequestBody struct { + + // version + Version *int32 `bson:"version,omitempty"` +} + +func (o CheckHealthRequestBody) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CheckHealthRequestBody struct{}" + } + + return strings.Join([]string{"CheckHealthRequestBody", string(data)}, " ") +} diff --git a/services/kvs/v1/model/model_check_health_response.go b/services/kvs/v1/model/model_check_health_response.go new file mode 100644 index 0000000000..5c40cd5ed1 --- /dev/null +++ b/services/kvs/v1/model/model_check_health_response.go @@ -0,0 +1,21 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// CheckHealthResponse Response Object +type CheckHealthResponse struct { + HttpStatusCode int `bson:"-"` +} + +func (o CheckHealthResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "CheckHealthResponse struct{}" + } + + return strings.Join([]string{"CheckHealthResponse", string(data)}, " ") +} diff --git a/services/kvs/v1/model/model_create_table_request_body.go b/services/kvs/v1/model/model_create_table_request_body.go index 37946219ff..6480fa23f3 100644 --- a/services/kvs/v1/model/model_create_table_request_body.go +++ b/services/kvs/v1/model/model_create_table_request_body.go @@ -25,6 +25,8 @@ type CreateTableRequestBody struct { GlobalSecondaryIndexSchema *[]GlobalSecondaryIndex `bson:"global_secondary_index_schema,omitempty"` PreSplitKeyOptions *PreSplitKeyOptions `bson:"pre_split_key_options,omitempty"` + + TtlOptions *TtlOptions `bson:"ttl_options,omitempty"` } func (o CreateTableRequestBody) String() string { diff --git a/services/kvs/v1/model/model_describe_table_response.go b/services/kvs/v1/model/model_describe_table_response.go index a30a42d73c..4c984b3f01 100644 --- a/services/kvs/v1/model/model_describe_table_response.go +++ b/services/kvs/v1/model/model_describe_table_response.go @@ -20,8 +20,10 @@ type DescribeTableResponse struct { // 全局二级索引模板。 GlobalSecondaryIndexSchema *[]GlobalSecondaryIndex `bson:"global_secondary_index_schema,omitempty"` - RunTimeInfo *RunTimeInfo `bson:"run_time_info,omitempty"` - HttpStatusCode int `bson:"-"` + RunTimeInfo *RunTimeInfo `bson:"run_time_info,omitempty"` + + TtlOptions *TtlOptions `bson:"ttl_options,omitempty"` + HttpStatusCode int `bson:"-"` } func (o DescribeTableResponse) String() string { diff --git a/services/kvs/v1/model/model_ttl_options.go b/services/kvs/v1/model/model_ttl_options.go new file mode 100644 index 0000000000..db5a674fd8 --- /dev/null +++ b/services/kvs/v1/model/model_ttl_options.go @@ -0,0 +1,28 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +type TtlOptions struct { + + // TTL开关 + TtlSwitch bool `bson:"ttl_switch"` + + // 生存时间,以秒为单位 + ExpireAfterSeconds *int32 `bson:"expire_after_seconds,omitempty"` + + // 文档中记录TTL过期时间的字段名,字段值为UTC时间,单位秒 + TtlFieldName *string `bson:"ttl_field_name,omitempty"` +} + +func (o TtlOptions) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "TtlOptions struct{}" + } + + return strings.Join([]string{"TtlOptions", string(data)}, " ") +} diff --git a/services/metastudio/v1/metaStudio_client.go b/services/metastudio/v1/metaStudio_client.go index a33ec63205..ba017bdc64 100644 --- a/services/metastudio/v1/metaStudio_client.go +++ b/services/metastudio/v1/metaStudio_client.go @@ -1872,6 +1872,27 @@ func (c *MetaStudioClient) UpdateRobotInvoker(request *model.UpdateRobotRequest) return &UpdateRobotInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } +// ValidateRobot 校验应用 +// +// 该接口用于校验应用。 +// +// Please refer to HUAWEI cloud API Explorer for details. +func (c *MetaStudioClient) ValidateRobot(request *model.ValidateRobotRequest) (*model.ValidateRobotResponse, error) { + requestDef := GenReqDefForValidateRobot() + + if resp, err := c.HcClient.Sync(request, requestDef); err != nil { + return nil, err + } else { + return resp.(*model.ValidateRobotResponse), nil + } +} + +// ValidateRobotInvoker 校验应用 +func (c *MetaStudioClient) ValidateRobotInvoker(request *model.ValidateRobotRequest) *ValidateRobotInvoker { + requestDef := GenReqDefForValidateRobot() + return &ValidateRobotInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} +} + // CreateSmartChatRoom 创建智能交互对话 // // 该接口用于创建智能交互对话。 @@ -2334,9 +2355,9 @@ func (c *MetaStudioClient) ListStylesInvoker(request *model.ListStylesRequest) * return &ListStylesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} } -// CountTenantResources 统计时间段内资源数量 +// CountTenantResources 统计时间段内过期的资源数量 // -// 统计时间段内资源数量 +// 统计指定时间段内即将过期的包周期与一次性资源数量。 // // Please refer to HUAWEI cloud API Explorer for details. func (c *MetaStudioClient) CountTenantResources(request *model.CountTenantResourcesRequest) (*model.CountTenantResourcesResponse, error) { @@ -2349,7 +2370,7 @@ func (c *MetaStudioClient) CountTenantResources(request *model.CountTenantResour } } -// CountTenantResourcesInvoker 统计时间段内资源数量 +// CountTenantResourcesInvoker 统计时间段内过期的资源数量 func (c *MetaStudioClient) CountTenantResourcesInvoker(request *model.CountTenantResourcesRequest) *CountTenantResourcesInvoker { requestDef := GenReqDefForCountTenantResources() return &CountTenantResourcesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} @@ -2357,7 +2378,9 @@ func (c *MetaStudioClient) CountTenantResourcesInvoker(request *model.CountTenan // ListTenantResources 查看租户资源列表 // -// 查看租户资源列表 +// 查看租户资源列表。 +// > 按需套餐包用量本接口无法查询,需要调用CBC接口查询。[按需套餐包用量查询](https://cbc.huaweicloud.com/bm/support/api-apidt/CBCInterface_0001239.html)和[查询资源包信息](https://cbc.huaweicloud.com/bm/support/api-apidt/CBCInterface_0000511.html)。 +// > 各种资源的计费方式请参考[计费说明](https://support.huaweicloud.com/productdesc-metastudio/metastudio_01_0006.html)。 // // Please refer to HUAWEI cloud API Explorer for details. func (c *MetaStudioClient) ListTenantResources(request *model.ListTenantResourcesRequest) (*model.ListTenantResourcesResponse, error) { @@ -2378,7 +2401,9 @@ func (c *MetaStudioClient) ListTenantResourcesInvoker(request *model.ListTenantR // ShowResourceUsage 查看租户资源用量信息 // -// 查看租户资源用量信息 +// 查询租户一次性和包周期(包年/包月)资源用量信息。 +// > 按需套餐包用量本接口无法查询,需要调用CBC接口查询。[按需套餐包用量查询](https://cbc.huaweicloud.com/bm/support/api-apidt/CBCInterface_0001239.html)和[查询资源包信息](https://cbc.huaweicloud.com/bm/support/api-apidt/CBCInterface_0000511.html)。 +// > 各种资源的计费方式请参考[计费说明](https://support.huaweicloud.com/productdesc-metastudio/metastudio_01_0006.html)。 // // Please refer to HUAWEI cloud API Explorer for details. func (c *MetaStudioClient) ShowResourceUsage(request *model.ShowResourceUsageRequest) (*model.ShowResourceUsageResponse, error) { diff --git a/services/metastudio/v1/metaStudio_invoker.go b/services/metastudio/v1/metaStudio_invoker.go index 68328040c7..a33aa008ad 100644 --- a/services/metastudio/v1/metaStudio_invoker.go +++ b/services/metastudio/v1/metaStudio_invoker.go @@ -1413,6 +1413,22 @@ func (i *UpdateRobotInvoker) Invoke() (*model.UpdateRobotResponse, error) { } } +type ValidateRobotInvoker struct { + *invoker.BaseInvoker +} + +func (i *ValidateRobotInvoker) GetBaseInvoker() *invoker.BaseInvoker { + return i.BaseInvoker +} + +func (i *ValidateRobotInvoker) Invoke() (*model.ValidateRobotResponse, error) { + if result, err := i.BaseInvoker.Invoke(); err != nil { + return nil, err + } else { + return result.(*model.ValidateRobotResponse), nil + } +} + type CreateSmartChatRoomInvoker struct { *invoker.BaseInvoker } diff --git a/services/metastudio/v1/metaStudio_meta.go b/services/metastudio/v1/metaStudio_meta.go index e3050386ac..2060a6d4d3 100644 --- a/services/metastudio/v1/metaStudio_meta.go +++ b/services/metastudio/v1/metaStudio_meta.go @@ -3693,6 +3693,44 @@ func GenReqDefForUpdateRobot() *def.HttpRequestDef { return requestDef } +func GenReqDefForValidateRobot() *def.HttpRequestDef { + reqDefBuilder := def.NewHttpRequestDefBuilder(). + WithMethod(http.MethodPost). + WithPath("/v1/{project_id}/digital-human-chat/robot/validate"). + WithResponse(new(model.ValidateRobotResponse)). + WithContentType("application/json") + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Authorization"). + WithJsonTag("Authorization"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("XSdkDate"). + WithJsonTag("X-Sdk-Date"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("XProjectId"). + WithJsonTag("X-Project-Id"). + WithLocationType(def.Header)) + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("XAppUserId"). + WithJsonTag("X-App-UserId"). + WithLocationType(def.Header)) + + reqDefBuilder.WithRequestField(def.NewFieldDef(). + WithName("Body"). + WithLocationType(def.Body)) + + reqDefBuilder.WithResponseField(def.NewFieldDef(). + WithName("XRequestId"). + WithJsonTag("X-Request-Id"). + WithKindName("string"). + WithLocationType(def.Header)) + + requestDef := reqDefBuilder.Build() + return requestDef +} + func GenReqDefForCreateSmartChatRoom() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodPost). @@ -4824,10 +4862,6 @@ func GenReqDefForListTenantResources() *def.HttpRequestDef { WithName("ResourceSource"). WithJsonTag("resource_source"). WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceName"). - WithJsonTag("resource_name"). - WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("ResourceId"). WithJsonTag("resource_id"). diff --git a/services/metastudio/v1/model/model_count_tenant_resources_request.go b/services/metastudio/v1/model/model_count_tenant_resources_request.go index 49f94e92cc..2683ccf57b 100644 --- a/services/metastudio/v1/model/model_count_tenant_resources_request.go +++ b/services/metastudio/v1/model/model_count_tenant_resources_request.go @@ -18,7 +18,7 @@ type CountTenantResourcesRequest struct { // 使用AK/SK方式认证时必选,携带项目ID信息。 XProjectId *string `json:"X-Project-Id,omitempty"` - // 业务类型。 + // 业务类型。可填多个用\",\"分隔 * VOICE_CLONE:声音制作 * SYNTHETICS_SOUND:声音合成 * ASSET_MANAGER:资产管理 * MODELING_2D:形象制作 * LIVE_2D:分身数字人视频直播 * VIDEO_2D:分身数字人视频制作 * CHAT_2D:分身数字人智能交互 * BUSINESS_CARD_2D:分身数字人名片 * PICTURE_2D:照片数字人视频 * MODELING_3D:3D照片建模 * VDS_3D:3D视觉驱动 * TTSA_3D:3D语音驱动 * FLEXUS_2D:FLEXUS版本资源 Business *string `json:"business,omitempty"` // 资源过期时间段 开始时间。格式遵循:RFC 3339 如\"2021-01-10T08:43:17Z\" diff --git a/services/metastudio/v1/model/model_execute_smart_live_command_response.go b/services/metastudio/v1/model/model_execute_smart_live_command_response.go index 2256393825..84376afa3f 100644 --- a/services/metastudio/v1/model/model_execute_smart_live_command_response.go +++ b/services/metastudio/v1/model/model_execute_smart_live_command_response.go @@ -15,7 +15,7 @@ type ExecuteSmartLiveCommandResponse struct { // 控制命令ID CommandId *string `json:"command_id,omitempty"` - // 命令名称。 - INSERT_PLAY_SCRIPT:插入表演脚本。用于互动回复。数字人不变,背景不变。params结构定义:ShootScript。 - REWRITE_PLAY_SCRIPT:动态编辑未播放剧本。params结构定义:scene_scripts。 - INSERT_PLAY_AUDIO:插入驱动音频。用于音频直接驱动。数字人不变,背景不变。params结构定义:PlayAudioInfo。 - GET_CURRENT_PLAYING_SCRIPTS:查询本轮剧本列表。响应为LivePlayingScriptList结构。 - REFRESH_OUTPUT_URL:更新当前任务的rtmp推流信息。params结构定义: RefreshOutputUrlConfig。 - REWRITE_INTERACTION_RULES:动态修改互动规则。params结构定义:interaction_rules。 - GET_LIVE_JOB_CONFIG_INFO:获取任务中的房间信息。params结构定义:SmartLiveRoomInfo。 - CLEAN_UP_INSERT_COMMAND:清理未播放的插入命令。params结构定义:[CleanUpInsertCommand](metastudio_02_0014.html#section3) + // 命令名称。 - INSERT_PLAY_SCRIPT:插入表演脚本。用于互动回复。数字人不变,背景不变。params结构定义:ShootScript。 - REWRITE_PLAY_SCRIPT:动态编辑未播放剧本。params结构定义:scene_scripts。 - INSERT_PLAY_AUDIO:插入驱动音频。用于音频直接驱动。数字人不变,背景不变。params结构定义:PlayAudioInfo。 - GET_CURRENT_PLAYING_SCRIPTS:查询本轮剧本列表。响应为LivePlayingScriptList结构。 - REFRESH_OUTPUT_URL:更新当前任务的rtmp推流信息。params结构定义: RefreshOutputUrlConfig。 - REWRITE_INTERACTION_RULES:动态修改互动规则。params结构定义:interaction_rules。 - GET_LIVE_JOB_CONFIG_INFO:获取任务中的房间信息。params结构定义:SmartLiveRoomInfo。 - CLEAN_UP_INSERT_COMMAND:清理未播放的插入命令。params结构定义:[CleanUpInsertCommand](metastudio_02_0014.xml) Command *ExecuteSmartLiveCommandResponseCommand `json:"command,omitempty"` // 命令执行结果 diff --git a/services/metastudio/v1/model/model_layer_position_config.go b/services/metastudio/v1/model/model_layer_position_config.go index 624ab232bf..d5d71a4dc4 100644 --- a/services/metastudio/v1/model/model_layer_position_config.go +++ b/services/metastudio/v1/model/model_layer_position_config.go @@ -15,7 +15,7 @@ type LayerPositionConfig struct { // **参数解释**: 图层图片左上角像素点的Y轴位置值(画布左上角坐标是0x0)。 横屏(16:9)画布像素为1920x1080;竖屏(9:16)画布像素为1080x1920。 **约束限制**: 该值为相对于画布的像素值,仅表示布局位置关系,与输出画面分辨率无关。 Dy int32 `json:"dy"` - // **参数解释**: 图片、视频、人物图的层顺序。 > 图层顺序为0从1开始的整数,底层图层顺序是1,往上依次增加。 **约束限制**: 如果出现重复则重复图层叠加关系随机。 + // **参数解释**: 图片、视频、人物图的层顺序。 > 图层顺序为从1开始的整数,底层图层顺序是1,往上依次增加。 **约束限制**: 如果出现重复则重复图层叠加关系随机。 LayerIndex int32 `json:"layer_index"` } diff --git a/services/metastudio/v1/model/model_list_tenant_resources_request.go b/services/metastudio/v1/model/model_list_tenant_resources_request.go index 7288c5fefc..13db5d642c 100644 --- a/services/metastudio/v1/model/model_list_tenant_resources_request.go +++ b/services/metastudio/v1/model/model_list_tenant_resources_request.go @@ -24,25 +24,22 @@ type ListTenantResourcesRequest struct { // 偏移量,表示从此偏移量开始查询。 Offset *int32 `json:"offset,omitempty"` - // 资源类型。 + // 资源类型。可填多个,用\",\"分隔。详见[资源类型](metastudio_02_0042.xml)。 Resource *string `json:"resource,omitempty"` - // 业务类型。 + // 业务类型。可填多个,用\",\"分隔。 * VOICE_CLONE:声音制作 * SYNTHETICS_SOUND:声音合成 * ASSET_MANAGER:资产管理 * MODELING_2D:形象制作 * LIVE_2D:分身数字人视频直播 * VIDEO_2D:分身数字人视频制作 * CHAT_2D:分身数字人智能交互 * BUSINESS_CARD_2D:分身数字人名片 * PICTURE_2D:照片数字人视频 * MODELING_3D:3D照片建模 * VDS_3D:3D视觉驱动 * TTSA_3D:3D语音驱动 * FLEXUS_2D:FLEXUS版本资源 Business *string `json:"business,omitempty"` - // 资源来源。 + // 资源来源,可填多个 例如:PURCHASED,ADMIN_ALLOCATED,将返回商用资源与管理员分配资源。 * PURCHASED: 用户购买的资源 * SP_ALLOCATED: SP分配的资源 * ADMIN_ALLOCATED: 系统管理员分配的资源 ResourceSource string `json:"resource_source"` - // 资源名称。 - ResourceName *string `json:"resource_name,omitempty"` - // 资源id。 ResourceId *string `json:"resource_id,omitempty"` // 订单id。 OrderId *string `json:"order_id,omitempty"` - // 计费模式。 + // 计费类型。 * PERIODIC: 包周期 * ONE_TIME:一次性 * ON_DEMAND:按需 计费模式。 ChargingMode *string `json:"charging_mode,omitempty"` // 资源过期时间段 开始时间。格式遵循:RFC 3339 如\"2021-01-10T08:43:17Z\" @@ -51,7 +48,7 @@ type ListTenantResourcesRequest struct { // 资源过期时间段 结束时间。格式遵循:RFC 3339 如\"2021-01-10T08:43:17Z\" ResourceExpireEndTime *string `json:"resource_expire_end_time,omitempty"` - // 子资源类型。 + // 子资源类型。当前只有flexus套餐包存在该字段 * voice_clone_flexus: 语音克隆Flexus版 * modeling_count_2d_model_flexus: 分身数字人形象制作Flexus版 * video_time_flexus_2d_model: 分身数字人Flexus版本视频制作 SubResource *string `json:"sub_resource,omitempty"` } diff --git a/services/metastudio/v1/model/model_live_event_report_request.go b/services/metastudio/v1/model/model_live_event_report_request.go index 394b2fcbc0..52b00e3f17 100644 --- a/services/metastudio/v1/model/model_live_event_report_request.go +++ b/services/metastudio/v1/model/model_live_event_report_request.go @@ -30,7 +30,7 @@ type LiveEventReportRequest struct { // 鉴权Key。通过HmacSHA256生成的鉴权key AuthKey *string `json:"auth_key,omitempty"` - // **参数解释**: 鉴权key过期时间。从1970年1月1日(UTC/GMT的午夜)开始所经过的豪秒数。 + // **参数解释**: 鉴权key过期时间。从1970年1月1日(UTC/GMT的午夜)开始所经过的毫秒数。 ExpiresTime *int64 `json:"expires_time,omitempty"` // 是否刷新URL diff --git a/services/metastudio/v1/model/model_operation_log_info.go b/services/metastudio/v1/model/model_operation_log_info.go index 7dc0e94626..3dc0d5ce6c 100644 --- a/services/metastudio/v1/model/model_operation_log_info.go +++ b/services/metastudio/v1/model/model_operation_log_info.go @@ -15,7 +15,7 @@ type OperationLogInfo struct { // 操作时间,格式遵循:RFC 3339。 例 “2020-07-30T10:43:17Z” OperateTime *string `json:"operate_time,omitempty"` - // 命令执行结果。 * USER_CREATE_JOD:用户开始分身数字人定制 * USER_VERIFYING_SUBMITTED:用户提交审核 * SYSTEM_VERIFY_FAILED:自动审核失败 * SYSTEM_VERIFY_SUCCESS:自动审核成功 * ADMIN_VERIFY_SUCCESS:人工审核通过 * ADMIN_VERIFY_FAILED:人工审核不通过 * SYSTEM_TRAIN_DATA_PREPROCESSING:训练数据预处理中 * SYSTEM_TRAIN_DATA_PREPROCESS_FAILED:训练数据预处理失 * SYSTEM_TRAIN_DATA_PREPROCESS_SUCCESS:训练数据预处理成功 * SYSTEM_ACTION_GENERATE_DATA_PREPROCESSING:动作编排原子动作生成中 * SYSTEM_ACTION_GENERATE_DATA_SUCCESS:动作编排原子动作生成成功 * SYSTEM_ACTION_GENERATE_ORI_SUCCESS:动作编排资产数据生成成功 * SYSTEM_ACTION_GENERATE_DATA_FAILED:动作编排原子动作生成失败 * SYSTEM_ACTION_GENERATE_ORI_FAILED:动作编排资产数据生成失败 * SYSTEM_ACTION_GENERATE_ORI_PREPROCESSING:动作编排资产数据生成中 * SYSTEM_TRAINING:开始训练 * ADMIN_STOP_TRAINING_DATA_PREPROCESS:人工中止训练 * ADMIN_STOP_INFERENCE_DATA_PREPROCESS:人工中止推理预处理 * ADMIN_STOP_TRAIN:人工终止训练 * SYSTEM_TRAIN_FAILED:训练失败 * SYSTEM_TRAIN_SUCCESS:训练成功 * SYSTEM_INFERENCE_DATA_PREPROCESSING:推理数据预处理中 * SYSTEM_INFERENCE_DATA_PREPROCESS_FAILED:推理数据预处理失败 * SYSTEM_INFERENCE_DATA_PREPROCESS_SUCCESS:推理数据预处理成功 * SYSTEM_JOB_SUCCESS:任务处理完成 * ADMIN_MASK_UPLOADED:遮罩文件上传完成(已废弃) * ADMIN_UPDATE_VIDEO:管理员更换视频 * ADMIN_UPDATE_ACTION_VIDEO:管理员更换动作编排视频 * ADMIN_RESET:管理员一键重置 * ADMIN_ACCEPT:管理员通过 * USER_REPAIR:用户修复 * SYSTEM_UPDATE_COVER:更换封面 * ADMIN_SET_SILENCE_REPEAT_NUM:管理员设置静默轮数 * SYSTEM_MARKABLE_VIDEO:标记视频生成任务 * SYSTEM_MASK_VERIFY_VIDEO:校验视频生成任务 * SYSTEM_MASK_VERIFY_VIDEO_SUCCESS:校验视频生成成功 * SYSTEM_MASK_VERIFY_VIDEO_FAILED:校验视频生成失败 * SYSTEM_MARKABLE_VIDEO_SUCCESS:标记视频生成成功 * ADMIN_CONFIRM_ACTION:管理员确认动作 * ADMIN_STOP_ACTION_GENERATE_DATA_PREPROCESS:人工中止原子动作生成 * ADMIN_STOP_ACTION_GENERATE_ORI_PREPROCESS:人工中止动作编排 * SYSTEM_COMPILE_FAILED:转编译失败 * SYSTEM_COMPILE_SUCCESS:转编译成功 * SYSTEM_MARKABLE_VIDEO_FAILED:标记视频生成失败 * ADMIN_UPDATE_COMPILE:管理员更新转编译配置 * ADMIN_UPDATE_INFERENCE_DATA_PROCESS_VIDEO:管理员更新推理预处里时间段信息 * SYSTEM_EXECUTE_COMPILE:执行转编译 * SYSTEM_MASK_VIDEO_AND_ACTION_TIME_SUCCESS:自动标记成功 * SYSTEM_MASK_VIDEO_AND_ACTION_TIME_FAILED:自动标记失败 * USER_UPDATE_VIDEO:用户更换视频 * ADMIN_UPDATE_GENERAL_CONFIG:管理员更新通用配置 * ADMIN_MASK_ACTION_TIME:管理员标记 * STOP_COMPILE:人工中止转编译 + // 命令执行结果。 * USER_CREATE_JOD:用户开始分身数字人定制 * USER_VERIFYING_SUBMITTED:用户提交审核 * SYSTEM_VERIFY_FAILED:自动审核失败 * SYSTEM_VERIFY_SUCCESS:自动审核成功 * ADMIN_VERIFY_SUCCESS:人工审核通过 * ADMIN_VERIFY_FAILED:人工审核不通过 * SYSTEM_TRAIN_DATA_PREPROCESSING:训练数据预处理中 * SYSTEM_TRAIN_DATA_PREPROCESS_FAILED:训练数据预处理失败 * SYSTEM_TRAIN_DATA_PREPROCESS_SUCCESS:训练数据预处理成功 * SYSTEM_ACTION_GENERATE_DATA_PREPROCESSING:动作编排原子动作生成中 * SYSTEM_ACTION_GENERATE_DATA_SUCCESS:动作编排原子动作生成成功 * SYSTEM_ACTION_GENERATE_ORI_SUCCESS:动作编排资产数据生成成功 * SYSTEM_ACTION_GENERATE_DATA_FAILED:动作编排原子动作生成失败 * SYSTEM_ACTION_GENERATE_ORI_FAILED:动作编排资产数据生成失败 * SYSTEM_ACTION_GENERATE_ORI_PREPROCESSING:动作编排资产数据生成中 * SYSTEM_TRAINING:开始训练 * ADMIN_STOP_TRAINING_DATA_PREPROCESS:人工中止训练 * ADMIN_STOP_INFERENCE_DATA_PREPROCESS:人工中止推理预处理 * ADMIN_STOP_TRAIN:人工终止训练 * SYSTEM_TRAIN_FAILED:训练失败 * SYSTEM_TRAIN_SUCCESS:训练成功 * SYSTEM_INFERENCE_DATA_PREPROCESSING:推理数据预处理中 * SYSTEM_INFERENCE_DATA_PREPROCESS_FAILED:推理数据预处理失败 * SYSTEM_INFERENCE_DATA_PREPROCESS_SUCCESS:推理数据预处理成功 * SYSTEM_JOB_SUCCESS:任务处理完成 * ADMIN_MASK_UPLOADED:遮罩文件上传完成(已废弃) * ADMIN_UPDATE_VIDEO:管理员更换视频 * ADMIN_UPDATE_ACTION_VIDEO:管理员更换动作编排视频 * ADMIN_RESET:管理员一键重置 * ADMIN_ACCEPT:管理员通过 * USER_REPAIR:用户修复 * SYSTEM_UPDATE_COVER:更换封面 * ADMIN_SET_SILENCE_REPEAT_NUM:管理员设置静默轮数 * SYSTEM_MARKABLE_VIDEO:标记视频生成任务 * SYSTEM_MASK_VERIFY_VIDEO:校验视频生成任务 * SYSTEM_MASK_VERIFY_VIDEO_SUCCESS:校验视频生成成功 * SYSTEM_MASK_VERIFY_VIDEO_FAILED:校验视频生成失败 * SYSTEM_MARKABLE_VIDEO_SUCCESS:标记视频生成成功 * ADMIN_CONFIRM_ACTION:管理员确认动作 * ADMIN_STOP_ACTION_GENERATE_DATA_PREPROCESS:人工中止原子动作生成 * ADMIN_STOP_ACTION_GENERATE_ORI_PREPROCESS:人工中止动作编排 * SYSTEM_COMPILE_FAILED:转编译失败 * SYSTEM_COMPILE_SUCCESS:转编译成功 * SYSTEM_MARKABLE_VIDEO_FAILED:标记视频生成失败 * ADMIN_UPDATE_COMPILE:管理员更新转编译配置 * ADMIN_UPDATE_INFERENCE_DATA_PROCESS_VIDEO:管理员更新推理预处理时间段信息 * SYSTEM_EXECUTE_COMPILE:执行转编译 * SYSTEM_MASK_VIDEO_AND_ACTION_TIME_SUCCESS:自动标记成功 * SYSTEM_MASK_VIDEO_AND_ACTION_TIME_FAILED:自动标记失败 * USER_UPDATE_VIDEO:用户更换视频 * ADMIN_UPDATE_GENERAL_CONFIG:管理员更新通用配置 * ADMIN_MASK_ACTION_TIME:管理员标记 * STOP_COMPILE:人工中止转编译 LogType *OperationLogInfoLogType `json:"log_type,omitempty"` // 日志描述。用于记录人工审核不通过时的审核意见和DHTS、DHPS上报的错误信息。 diff --git a/services/metastudio/v1/model/model_resource_item_info.go b/services/metastudio/v1/model/model_resource_item_info.go index b41f1898b1..529e98ac2e 100644 --- a/services/metastudio/v1/model/model_resource_item_info.go +++ b/services/metastudio/v1/model/model_resource_item_info.go @@ -21,13 +21,13 @@ type ResourceItemInfo struct { // 资源截止时间。格式遵循:RFC 3339 如\"2021-01-10T08:43:17Z\" ResourceExpireTime *string `json:"resource_expire_time,omitempty"` - // 资源类型。resource_spec_code/quota字段。 + // 资源类型。详见[资源类型](metastudio_02_0042.xml)。 ResourceType *string `json:"resource_type,omitempty"` // 业务类型。 * VOICE_CLONE:声音制作 * SYNTHETICS_SOUND:声音合成 * ASSET_MANAGER:资产管理 * MODELING_2D:形象制作 * LIVE_2D:分身数字人视频直播 * VIDEO_2D:分身数字人视频制作 * CHAT_2D:分身数字人智能交互 * BUSINESS_CARD_2D:分身数字人名片 * PICTURE_2D:照片数字人视频 * MODELING_3D:3D照片建模 * VDS_3D:3D视觉驱动 * TTSA_3D:3D语音驱动 * FLEXUS_2D:flexus版本资源 BusinessType *ResourceItemInfoBusinessType `json:"business_type,omitempty"` - // 子资源类型。 + // 子资源类型。当前只有flexus套餐包存在该字段 * voice_clone_flexus: 语音克隆Flexus版 * modeling_count_2d_model_flexus: 分身数字人形象制作Flexus版 * video_time_flexus_2d_model: 分身数字人Flexus版本视频制作 SubResourceType *string `json:"sub_resource_type,omitempty"` // 是否子资源。子资源描述的是子资源的数量和单位 diff --git a/services/metastudio/v1/model/model_resource_usage_info.go b/services/metastudio/v1/model/model_resource_usage_info.go index 53535e8317..712a8295b7 100644 --- a/services/metastudio/v1/model/model_resource_usage_info.go +++ b/services/metastudio/v1/model/model_resource_usage_info.go @@ -12,7 +12,7 @@ import ( // ResourceUsageInfo 资源使用信息 type ResourceUsageInfo struct { - // 资源类型。resource_spec_code/quota字段。 + // 资源类型。详见[资源类型](metastudio_02_0042.xml)。 ResourceType *string `json:"resource_type,omitempty"` // 业务类型。 * VOICE_CLONE:声音制作 * SYNTHETICS_SOUND:声音合成 * ASSET_MANAGER:资产管理 * MODELING_2D:形象制作 * LIVE_2D:分身数字人视频直播 * VIDEO_2D:分身数字人视频制作 * CHAT_2D:分身数字人智能交互 * BUSINESS_CARD_2D:分身数字人名片 * PICTURE_2D:照片数字人视频 * MODELING_3D:3D照片建模 * VDS_3D:3D视觉驱动 * TTSA_3D:3D语音驱动 * FLEXUS_2D:FLEXUS版本资源 diff --git a/services/metastudio/v1/model/model_show_resource_usage_request.go b/services/metastudio/v1/model/model_show_resource_usage_request.go index c83ab97a06..50bdcc5ec3 100644 --- a/services/metastudio/v1/model/model_show_resource_usage_request.go +++ b/services/metastudio/v1/model/model_show_resource_usage_request.go @@ -18,10 +18,10 @@ type ShowResourceUsageRequest struct { // 使用AK/SK方式认证时必选,携带项目ID信息。 XProjectId *string `json:"X-Project-Id,omitempty"` - // 资源类型。 + // 资源类型。可填多个,用\",\"分隔。详见[资源类型](metastudio_02_0042.xml)。 Resource *string `json:"resource,omitempty"` - // 业务类型。 + // 业务类型。可填多个,用\",\"分隔。 * VOICE_CLONE:声音制作 * SYNTHETICS_SOUND:声音合成 * ASSET_MANAGER:资产管理 * MODELING_2D:形象制作 * LIVE_2D:分身数字人视频直播 * VIDEO_2D:分身数字人视频制作 * CHAT_2D:分身数字人智能交互 * BUSINESS_CARD_2D:分身数字人名片 * PICTURE_2D:照片数字人视频 * MODELING_3D:3D照片建模 * VDS_3D:3D视觉驱动 * TTSA_3D:3D语音驱动 * FLEXUS_2D:FLEXUS版本资源 Business *string `json:"business,omitempty"` } diff --git a/services/metastudio/v1/model/model_system_property.go b/services/metastudio/v1/model/model_system_property.go index 1baa5f63d8..c90ae8ac5c 100644 --- a/services/metastudio/v1/model/model_system_property.go +++ b/services/metastudio/v1/model/model_system_property.go @@ -14,7 +14,7 @@ type SystemProperty struct { // **参数解释**: 操作。 **约束限制**: 系统属性仅为系统设置,普通用户无法修改。 **取值范围**: * ADD:增加 * DELETE:删除 **默认取值**: 不涉及 Action *SystemPropertyAction `json:"action,omitempty"` - // **参数解释**: 系统属性条目。 **约束限制**: 系统属性仅为系统设置,普通用户无法修改。 **取值范围**: 公共资产属性: * BACKGROUND_IMG:视频制作的背景图片。value设置成Yes * CREATED_BY_PLATFORM: 是否平台生成。 分身数字人资产属性: * MATERIAL_IMG:素材图片,用作图片图层。value设置成Yes。 * MATERIAL_VIDEO:素材视频,用作视频图层。value设置成Yes。 * DIGITAL_HUMAN_2D_VIDEO:分身数字人视频。 * DIGITAL_HUMAN_3D_VIDEO:3D数字人视频。 * BUSINESS_CARD_VIDEO:名片视频。 * BUSSINESS_CARD_VIDEO:名片视频(过期) * PHOTO_VIDEO:照片数字人视频。 视频翻译资产属性: * TO_BE_TRANSLATED_VIDEO: 视频翻译的源视频。可取值Yes。 * TRANSLATED_VIDEO: 视频翻译后的视频 3D数字人资产属性: * STYLE_ID:风格Id。 * DH_ID:数字人ID(尚未启用)。 * PLATFORM_AVAILABLE:是否平台可用(尚未启用)。 * RENDER_ENGINE:引擎类型。value可选UE或MetaEngine。 * BACKGROUND_SCENE:视频制作的2D背景场景。value可选Horizontal(横屏)或者Vertical(竖屏)。 * LAYER_CONFIG_ENABLE: 可用前景图层配置 **默认取值**: 不涉及 + // **参数解释**: 系统属性条目。 **约束限制**: 系统属性仅为系统设置,普通用户无法修改。 **取值范围**: 公共资产属性: * BACKGROUND_IMG:视频制作的背景图片。value设置成Yes * CREATED_BY_PLATFORM: 是否平台生成。 分身数字人资产属性: * MATERIAL_IMG:素材图片,用作图片图层。value设置成Yes。 * MATERIAL_VIDEO:素材视频,用作视频图层。value设置成Yes。 * DIGITAL_HUMAN_2D_VIDEO:分身数字人视频。 * DIGITAL_HUMAN_3D_VIDEO:3D数字人视频。 * BUSINESS_CARD_VIDEO:名片视频。 * BUSSINESS_CARD_VIDEO:名片视频(过期) * PHOTO_VIDEO:照片数字人视频。 视频翻译资产属性: * TO_BE_TRANSLATED_VIDEO: 视频翻译的源视频。可取值Yes。 * TRANSLATED_VIDEO: 视频翻译后的视频 3D数字人资产属性: * STYLE_ID:风格Id。 * DH_ID:数字人ID(尚未启用)。 * PLATFORM_AVAILABLE:是否平台可用(尚未启用)。 * RENDER_ENGINE:引擎类型。value可选UE或MetaEngine。 * BACKGROUND_SCENE:视频制作的2D背景场景。value可选Horizontal(横屏)或者Vertical(竖屏)。 * LAYER_CONFIG_ENABLE: 可用前景图层配置 * MEITUAN_MATERIAL_APPROVED: 美团平台已审核标识,value设置成YES。 **默认取值**: 不涉及 Key *SystemPropertyKey `json:"key,omitempty"` // **参数解释**: 系统属性属性值。 **约束限制**: 系统属性仅为系统设置,普通用户无法修改。 **取值范围**: 字符长度1-1024位 **默认取值** 不涉及 @@ -82,23 +82,24 @@ type SystemPropertyKey struct { } type SystemPropertyKeyEnum struct { - STYLE_ID SystemPropertyKey - DH_ID SystemPropertyKey - PLATFORM_AVAILABLE SystemPropertyKey - RENDER_ENGINE SystemPropertyKey - BACKGROUND_IMG SystemPropertyKey - BACKGROUND_SCENE SystemPropertyKey - CREATED_BY_PLATFORM SystemPropertyKey - MATERIAL_IMG SystemPropertyKey - MATERIAL_VIDEO SystemPropertyKey - DIGITAL_HUMAN_2_D_VIDEO SystemPropertyKey - DIGITAL_HUMAN_3_D_VIDEO SystemPropertyKey - BUSSINESS_CARD_VIDEO SystemPropertyKey - BUSINESS_CARD_VIDEO SystemPropertyKey - PHOTO_VIDEO SystemPropertyKey - TO_BE_TRANSLATED_VIDEO SystemPropertyKey - TRANSLATED_VIDEO SystemPropertyKey - LAYER_CONFIG_ENABLE SystemPropertyKey + STYLE_ID SystemPropertyKey + DH_ID SystemPropertyKey + PLATFORM_AVAILABLE SystemPropertyKey + RENDER_ENGINE SystemPropertyKey + BACKGROUND_IMG SystemPropertyKey + BACKGROUND_SCENE SystemPropertyKey + CREATED_BY_PLATFORM SystemPropertyKey + MATERIAL_IMG SystemPropertyKey + MATERIAL_VIDEO SystemPropertyKey + DIGITAL_HUMAN_2_D_VIDEO SystemPropertyKey + DIGITAL_HUMAN_3_D_VIDEO SystemPropertyKey + BUSSINESS_CARD_VIDEO SystemPropertyKey + BUSINESS_CARD_VIDEO SystemPropertyKey + PHOTO_VIDEO SystemPropertyKey + TO_BE_TRANSLATED_VIDEO SystemPropertyKey + TRANSLATED_VIDEO SystemPropertyKey + LAYER_CONFIG_ENABLE SystemPropertyKey + MEITUAN_MATERIAL_APPROVED SystemPropertyKey } func GetSystemPropertyKeyEnum() SystemPropertyKeyEnum { @@ -154,6 +155,9 @@ func GetSystemPropertyKeyEnum() SystemPropertyKeyEnum { LAYER_CONFIG_ENABLE: SystemPropertyKey{ value: "LAYER_CONFIG_ENABLE", }, + MEITUAN_MATERIAL_APPROVED: SystemPropertyKey{ + value: "MEITUAN_MATERIAL_APPROVED", + }, } } diff --git a/services/metastudio/v1/model/model_validate_robot_req.go b/services/metastudio/v1/model/model_validate_robot_req.go new file mode 100644 index 0000000000..f9ef248932 --- /dev/null +++ b/services/metastudio/v1/model/model_validate_robot_req.go @@ -0,0 +1,33 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ValidateRobotReq 校验应用请求。 +type ValidateRobotReq struct { + + // 对接第三方应用厂商类型。 > 0:科大讯飞AIUI;1:华为云CBS;2:科大讯飞星火交互认知大模型;6:第三方语言模型;8:奇妙问 + AppType *int32 `json:"app_type,omitempty"` + + HuaweiEiCbs *HuaweiEiCbs `json:"huawei_ei_cbs,omitempty"` + + IflytekAiuiConfig *IflytekAiuiConfig `json:"iflytek_aiui_config,omitempty"` + + IflytekSpark *IflytekSpark `json:"iflytek_spark,omitempty"` + + ThirdPartyModelConfig *ThirdPartyModelConfig `json:"third_party_model_config,omitempty"` + + MobvoiConfig *MobvoiConfig `json:"mobvoi_config,omitempty"` +} + +func (o ValidateRobotReq) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ValidateRobotReq struct{}" + } + + return strings.Join([]string{"ValidateRobotReq", string(data)}, " ") +} diff --git a/services/metastudio/v1/model/model_validate_robot_request.go b/services/metastudio/v1/model/model_validate_robot_request.go new file mode 100644 index 0000000000..11f1922276 --- /dev/null +++ b/services/metastudio/v1/model/model_validate_robot_request.go @@ -0,0 +1,34 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ValidateRobotRequest Request Object +type ValidateRobotRequest struct { + + // 使用AK/SK方式认证时必选,携带的鉴权信息。 + Authorization *string `json:"Authorization,omitempty"` + + // 使用AK/SK方式认证时必选,请求的发生时间。 + XSdkDate *string `json:"X-Sdk-Date,omitempty"` + + // 使用AK/SK方式认证时必选,携带项目ID信息。 + XProjectId *string `json:"X-Project-Id,omitempty"` + + // 第三方用户ID。不允许输入中文。 + XAppUserId *string `json:"X-App-UserId,omitempty"` + + Body *ValidateRobotReq `json:"body,omitempty"` +} + +func (o ValidateRobotRequest) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ValidateRobotRequest struct{}" + } + + return strings.Join([]string{"ValidateRobotRequest", string(data)}, " ") +} diff --git a/services/metastudio/v1/model/model_validate_robot_response.go b/services/metastudio/v1/model/model_validate_robot_response.go new file mode 100644 index 0000000000..2d37a7244c --- /dev/null +++ b/services/metastudio/v1/model/model_validate_robot_response.go @@ -0,0 +1,22 @@ +package model + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils" + + "strings" +) + +// ValidateRobotResponse Response Object +type ValidateRobotResponse struct { + XRequestId *string `json:"X-Request-Id,omitempty"` + HttpStatusCode int `json:"-"` +} + +func (o ValidateRobotResponse) String() string { + data, err := utils.Marshal(o) + if err != nil { + return "ValidateRobotResponse struct{}" + } + + return strings.Join([]string{"ValidateRobotResponse", string(data)}, " ") +} diff --git a/services/metastudio/v1/model/model_verify_video_matting_info.go b/services/metastudio/v1/model/model_verify_video_matting_info.go index ab68e7f05e..c593ffbf42 100644 --- a/services/metastudio/v1/model/model_verify_video_matting_info.go +++ b/services/metastudio/v1/model/model_verify_video_matting_info.go @@ -24,7 +24,7 @@ type VerifyVideoMattingInfo struct { // 区域高度像素值。 Height *int32 `json:"height,omitempty"` - // 资源操作类型。 * RESERVED: 保留区域 * DELETE:删除区域 * NO_DEGREEN:无区域 + // 资源操作类型。 * RESERVED: 视频不需要抠绿的区域。 * DELETE:视频需要抠绿的区域。 * NO_DEGREEN:视频不需要去绿的区域。 Method *VerifyVideoMattingInfoMethod `json:"method,omitempty"` } diff --git a/services/mpc/v1/model/model_create_extract_task_req.go b/services/mpc/v1/model/model_create_extract_task_req.go index 810d249653..e4aa5118be 100644 --- a/services/mpc/v1/model/model_create_extract_task_req.go +++ b/services/mpc/v1/model/model_create_extract_task_req.go @@ -16,6 +16,8 @@ type CreateExtractTaskReq struct { // 是否同步处理, - 0:排队处理 - 1:同步处理 默认值:0 Sync *int32 `json:"sync,omitempty"` + + Encryption *Encryption `json:"encryption,omitempty"` } func (o CreateExtractTaskReq) String() string { diff --git a/services/mpc/v1/model/model_video_parameters.go b/services/mpc/v1/model/model_video_parameters.go index 1d7782a4eb..bf9c9cce13 100644 --- a/services/mpc/v1/model/model_video_parameters.go +++ b/services/mpc/v1/model/model_video_parameters.go @@ -17,6 +17,12 @@ type VideoParameters struct { // 视频编码格式。 取值如下: - 1:VIDEO_CODEC_H264 - 2:VIDEO_CODEC_H265 Codec *int32 `json:"codec,omitempty"` + // 视频恒定码率控制因子。 取值范围为[0, 51] + Crf *interface{} `json:"crf,omitempty"` + + // 输出最大码率 单位:kbit/s 带crf时使用,参考原片的平均码率进行设置(一般为1.5倍) + MaxBitrate *int32 `json:"max_bitrate,omitempty"` + // 输出平均码率。 取值范围:0或[40,30000]之间的整数。 单位:kbit/s 若设置为0,则输出平均码率为自适应值。 Bitrate *int32 `json:"bitrate,omitempty"` diff --git a/services/nat/v2/region/region.go b/services/nat/v2/region/region.go index aa6e579cdc..b2d24d2ea0 100644 --- a/services/nat/v2/region/region.go +++ b/services/nat/v2/region/region.go @@ -60,6 +60,8 @@ var ( "https://nat.eu-west-101.myhuaweicloud.eu") MY_KUALALUMPUR_1 = region.NewRegion("my-kualalumpur-1", "https://nat.my-kualalumpur-1.myhuaweicloud.com") + RU_MOSCOW_1 = region.NewRegion("ru-moscow-1", + "https://nat.ru-moscow-1.myhuaweicloud.com") ) var staticFields = map[string]*region.Region{ @@ -89,6 +91,7 @@ var staticFields = map[string]*region.Region{ "cn-south-4": CN_SOUTH_4, "eu-west-101": EU_WEST_101, "my-kualalumpur-1": MY_KUALALUMPUR_1, + "ru-moscow-1": RU_MOSCOW_1, } var provider = region.DefaultProviderChain("NAT") diff --git a/services/vpcep/v1/model/model_list_endpoint_info_details_response.go b/services/vpcep/v1/model/model_list_endpoint_info_details_response.go index 07710307f9..ddb1189df0 100644 --- a/services/vpcep/v1/model/model_list_endpoint_info_details_response.go +++ b/services/vpcep/v1/model/model_list_endpoint_info_details_response.go @@ -64,7 +64,7 @@ type ListEndpointInfoDetailsResponse struct { // 标签列表,没有标签默认为空数组。 Tags *[]TagList `json:"tags,omitempty"` - Error *QueryError `json:"error,omitempty"` + Error *[]QueryError `json:"error,omitempty"` // 控制访问终端节点的白名单。 若未创建,则返回空列表。 创建连接Interface类型终端节点服务的终端节点时,显示此参数。 Whitelist *[]string `json:"whitelist,omitempty"` diff --git a/services/waf/v1/model/model_cloud_waf_host_item.go b/services/waf/v1/model/model_cloud_waf_host_item.go index d8bc36004e..acd693c0a9 100644 --- a/services/waf/v1/model/model_cloud_waf_host_item.go +++ b/services/waf/v1/model/model_cloud_waf_host_item.go @@ -20,6 +20,9 @@ type CloudWafHostItem struct { // 域名描述信息,可选参数。 Description *string `json:"description,omitempty"` + // 防护域名的源站服务器配置信息 + Server *[]CloudWafServer `json:"server,omitempty"` + // WAF部署模式,默认是1,目前仅支持反代模式,冗余参数 Type *int32 `json:"type,omitempty"`