Skip to content

Commit

Permalink
sdk: rolling update for 0.22.10 (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
ucloud-bot authored Nov 27, 2023
1 parent 69b018f commit cb33f41
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 101 deletions.
179 changes: 109 additions & 70 deletions services/ugn/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,25 +205,25 @@ type CreateUGNRequest struct {
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"true"`

// 云联网名称,如果没有传入,默认值为“UGN”
//
Name *string `required:"false"`

// 云联网备注,如果没有传入的话,默认为“”
Remark *string `required:"false"`
// 数组,数组内每个元素的字段如下:NetworkID:string,网络实例 ID,如 uvnet-xxxx;Type:string,网络实例类型,枚举值:VPC/HybridGW/...;Region:string,网络实例所属地域,如 cn-sh2;OrgName:string,网络实例所属项目名,如 org-xxx
Networks []string `required:"false"`

// 业务组Id,如果没有传入,默认值为“Default”
Tag *string `required:"false"`
//
Remark *string `required:"false"`
}

// CreateUGNResponse is response schema for CreateUGN action
type CreateUGNResponse struct {
response.CommonBase

// 返回码描述信息
//
Message string

// 云联网Id
UGNId string
//
UGNID string
}

// NewCreateUGNRequest will create request of CreateUGN action.
Expand Down Expand Up @@ -425,68 +425,6 @@ func (c *UGNClient) DescribeInterRegionBandwidth(req *DescribeInterRegionBandwid
return &res, nil
}

// DescribeUGNRequest is request schema for DescribeUGN action
type DescribeUGNRequest struct {
request.CommonBase

// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"true"`

// 数据分页值。默认为20
Limit *int `required:"false"`

// 数据偏移量。默认为0
Offset *int `required:"false"`

// 云联网Id
UGNIds []string `required:"false"`
}

// DescribeUGNResponse is response schema for DescribeUGN action
type DescribeUGNResponse struct {
response.CommonBase

// 返回码描述信息
Message string

// UGNs字段的数量
TotalCount int

// 云联网信息
UGNs []UGN
}

// NewDescribeUGNRequest will create request of DescribeUGN action.
func (c *UGNClient) NewDescribeUGNRequest() *DescribeUGNRequest {
req := &DescribeUGNRequest{}

// setup request with client config
c.Client.SetupRequest(req)

// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}

/*
API: DescribeUGN
查询云联网
*/
func (c *UGNClient) DescribeUGN(req *DescribeUGNRequest) (*DescribeUGNResponse, error) {
var err error
var res DescribeUGNResponse

reqCopier := *req

err = c.Client.InvokeAction("DescribeUGN", &reqCopier, &res)
if err != nil {
return &res, err
}

return &res, nil
}

// DescribeUGNInstanceRequest is request schema for DescribeUGNInstance action
type DescribeUGNInstanceRequest struct {
request.CommonBase
Expand Down Expand Up @@ -959,3 +897,104 @@ func (c *UGNClient) UnpublishUGNRouteRule(req *UnpublishUGNRouteRuleRequest) (*U

return &res, nil
}

// UpdateUGNBwPackageRequest is request schema for UpdateUGNBwPackage action
type UpdateUGNBwPackageRequest struct {
request.CommonBase

// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`

//
BwBidRate *float64 `required:"true"`

//
BwULRate *float64 `required:"true"`

//
ChargeType *string `required:"false"`

//
Coupon *string `required:"false"`

// 名称
Name *string `required:"false"`

// 带宽包 ID
PackageID *string `required:"true"`

//
Path *string `required:"true"`

//
PayMode *string `required:"true"`

//
Qos *string `required:"true"`

//
Quantity *string `required:"false"`

//
RegionA *string `required:"true"`

//
RegionABwMax *int `required:"true"`

//
RegionABwMin *int `required:"true"`

//
RegionB *string `required:"true"`

//
RegionBBwMax *int `required:"true"`

//
RegionBBwMin *int `required:"true"`

// 备注
Remark *string `required:"false"`

// 所绑定的 UGN ID
UGNID *string `required:"true"`
}

// UpdateUGNBwPackageResponse is response schema for UpdateUGNBwPackage action
type UpdateUGNBwPackageResponse struct {
response.CommonBase

//
Message string
}

// NewUpdateUGNBwPackageRequest will create request of UpdateUGNBwPackage action.
func (c *UGNClient) NewUpdateUGNBwPackageRequest() *UpdateUGNBwPackageRequest {
req := &UpdateUGNBwPackageRequest{}

// setup request with client config
c.Client.SetupRequest(req)

// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}

/*
API: UpdateUGNBwPackage
更新带宽包配置
*/
func (c *UGNClient) UpdateUGNBwPackage(req *UpdateUGNBwPackageRequest) (*UpdateUGNBwPackageResponse, error) {
var err error
var res UpdateUGNBwPackageResponse

reqCopier := *req

err = c.Client.InvokeAction("UpdateUGNBwPackage", &reqCopier, &res)
if err != nil {
return &res, err
}

return &res, nil
}
30 changes: 0 additions & 30 deletions services/ugn/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,6 @@ type InterRegionBandwidth struct {
UGNId string
}

/*
UGN - 云联网信息
*/
type UGN struct {

// 云联网创建时间
CreateTime int

// 实例Id
Instances []string

// 跨域路由Id
InterRegionBandwidths []string

// 云联网名称
Name string

// 云联网备注
Remark string

// 路由规则Id
RouteRules []string

// 业务组Id
Tag string

// 云联网Id
UGNId string
}

/*
Instance - 云联网实例信息
*/
Expand Down
4 changes: 4 additions & 0 deletions tests/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import (
"github.com/ucloud/ucloud-sdk-go/services/udts"
"github.com/ucloud/ucloud-sdk-go/services/uec"
"github.com/ucloud/ucloud-sdk-go/services/ufs"
"github.com/ucloud/ucloud-sdk-go/services/ugn"
"github.com/ucloud/ucloud-sdk-go/services/uk8s"
"github.com/ucloud/ucloud-sdk-go/services/umedia"
"github.com/ucloud/ucloud-sdk-go/services/unvs"
Expand Down Expand Up @@ -195,6 +196,9 @@ func testSetup() {
spec.AddFixture("UFile", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) {
return ufile.NewClient(&cfg, &credential), nil
}))
spec.AddFixture("UGN", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) {
return ugn.NewClient(&cfg, &credential), nil
}))
spec.AddFixture("UHost", driver.SetupClientFixture(func() (ucloud.ServiceClient, error) {
return uhost.NewClient(&cfg, &credential), nil
}))
Expand Down
2 changes: 1 addition & 1 deletion ucloud/version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package version

const Version = "0.22.9"
const Version = "0.22.10"

0 comments on commit cb33f41

Please sign in to comment.