From 4f2bc720d92fbc92d88088676e677a945e436f1a Mon Sep 17 00:00:00 2001 From: devad Date: Tue, 12 Apr 2022 21:11:45 +0800 Subject: [PATCH 1/3] Alibaba Cloud create ECS Signed-off-by: devad --- adaptor/vm_adaptor/server/ecs/list.go | 81 + adaptor/vm_adaptor/service/ecser/ali.go | 214 ++- adaptor/vm_adaptor/service/ecser/ecser.go | 6 +- adaptor/vm_adaptor/service/ecser/huawei.go | 187 ++- adaptor/vm_adaptor/service/ecser/tencent.go | 128 +- common/server/server_ecs.go | 30 + go.mod | 12 +- idl/pbecs/ecs.proto | 186 ++- idl/pbtenant/tenant.proto | 40 +- lan_trans/idl/demo/demo.pb.gw.go | 10 +- lan_trans/idl/pbecs/ecs.pb.go | 1318 +++++++++++++++-- lan_trans/idl/pbecs/ecs.pb.gw.go | 333 ++++- lan_trans/idl/pbecs/ecs_grpc.pb.go | 114 ++ lan_trans/idl/pbpod/pod.pb.gw.go | 70 +- lan_trans/idl/pbtenant/tenant.pb.go | 154 +- .../openapiv2/idl/demo/demo.swagger.json | 9 +- .../openapiv2/idl/pbecs/ecs.swagger.json | 507 ++++++- .../openapiv2/idl/pbpod/pod.swagger.json | 29 +- .../idl/pbtenant/tenant.swagger.json | 9 +- 19 files changed, 2996 insertions(+), 441 deletions(-) diff --git a/adaptor/vm_adaptor/server/ecs/list.go b/adaptor/vm_adaptor/server/ecs/list.go index 4910faf..1d0507d 100644 --- a/adaptor/vm_adaptor/server/ecs/list.go +++ b/adaptor/vm_adaptor/server/ecs/list.go @@ -13,6 +13,87 @@ import ( "github.com/pkg/errors" ) +//CreateMultipleEcs 创建多家云ECS +func CreateMultipleEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { + var ( + ecs ecser.Ecser + ) + tenanters, err := tenanter.GetTenanters(req.Provider) + region, err := tenanter.NewRegion(req.Provider, req.RegionId) + if err != nil { + return nil, errors.Wrap(err, "get tenanters failed") + } + for _, tenanter := range tenanters { + if req.AccountName == "" || tenanter.AccountName() == req.AccountName { + if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { + return nil, errors.WithMessage(err, "NewEcsClient error") + } + break + } + } + return ecs.CreateEcs(ctx, req) +} + +func CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { + var ( + ecs ecser.Ecser + ) + tenanters, err := tenanter.GetTenanters(req.Provider) + region, err := tenanter.NewRegion(req.Provider, req.RegionId) + if err != nil { + return nil, errors.Wrap(err, "get tenanters failed") + } + for _, tenanter := range tenanters { + if req.AccountName == "" || tenanter.AccountName() == req.AccountName { + if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { + return nil, errors.WithMessage(err, "NewEcsClient error") + } + break + } + } + return ecs.CreateEcs(ctx, req) +} + +func DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { + var ( + ecs ecser.Ecser + ) + tenanters, err := tenanter.GetTenanters(req.Provider) + region, err := tenanter.NewRegion(req.Provider, req.RegionId) + if err != nil { + return nil, errors.Wrap(err, "get tenanters failed") + } + for _, tenanter := range tenanters { + if req.AccountName == "" || tenanter.AccountName() == req.AccountName { + if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { + return nil, errors.WithMessage(err, "NewEcsClient error") + } + break + } + } + return ecs.DeleteEcs(ctx, req) +} + +func UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { + var ( + ecs ecser.Ecser + ) + tenanters, err := tenanter.GetTenanters(req.Provider) + region, err := tenanter.NewRegion(req.Provider, req.RegionId) + if err != nil { + return nil, errors.Wrap(err, "get tenanters failed") + } + for _, tenanter := range tenanters { + if req.AccountName == "" || tenanter.AccountName() == req.AccountName { + if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { + return nil, errors.WithMessage(err, "NewEcsClient error") + } + break + } + } + return ecs.UpdateEcs(ctx, req) +} + //ListDetail returns the detail of ecs instances func ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { var ( diff --git a/adaptor/vm_adaptor/service/ecser/ali.go b/adaptor/vm_adaptor/service/ecser/ali.go index aa0197d..ff62b43 100644 --- a/adaptor/vm_adaptor/service/ecser/ali.go +++ b/adaptor/vm_adaptor/service/ecser/ali.go @@ -2,14 +2,22 @@ package ecser import ( "context" - "gitlink.org.cn/JCCE/PCM/common/tenanter" - "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" - "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" "sync" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - aliecs "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" + "github.com/alibabacloud-go/tea/tea" + + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" + + openapi "github.com/alibabacloud-go/darabonba-openapi/client" + + "github.com/golang/glog" + + string_ "github.com/alibabacloud-go/darabonba-string/client" + aliecs "github.com/alibabacloud-go/ecs-20140526/v2/client" + util "github.com/alibabacloud-go/tea-utils/service" "github.com/pkg/errors" + "gitlink.org.cn/JCCE/PCM/common/tenanter" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" ) var aliClientMutex sync.Mutex @@ -25,14 +33,21 @@ func newAliEcsClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecser, e client *aliecs.Client err error ) - switch t := tenant.(type) { case *tenanter.AccessKeyTenant: // 阿里云的sdk有一个 map 的并发问题,go test 加上-race 能检测出来,所以这里加一个锁 aliClientMutex.Lock() - client, err = aliecs.NewClientWithAccessKey(region.GetName(), t.GetId(), t.GetSecret()) + config := &openapi.Config{} + AccessKeyId := t.GetId() + AccessKeySecret := t.GetSecret() + RegionId := region.GetName() + config.AccessKeyId = &AccessKeyId + config.AccessKeySecret = &AccessKeySecret + config.RegionId = &RegionId + client, err = aliecs.NewClient(config) aliClientMutex.Unlock() default: + return nil, errors.New("unsupported tenant type") } if err != nil { @@ -45,40 +60,169 @@ func newAliEcsClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecser, e tenanter: tenant, }, nil } +func (ecs *AliEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { + RegionId := ecs.region.GetName() + ImageId := req.GetImageId() + InstanceType := req.GetInstanceType() + SecurityGroupId := req.GetSecurityGroupId() + InstanceName := req.GetInstanceName() + Description := req.GetDescription() + ZoneId := req.GetZoneId() + VSwitchId := req.GetVSwitchId() + Amount := req.GetAmount() + DryRun := req.GetDryRun() + Category := req.GetCategory() + InstanceChargeType := req.GetInstanceChargeType() + request := &aliecs.RunInstancesRequest{ + RegionId: &RegionId, + InstanceType: &InstanceType, + ImageId: &ImageId, + SecurityGroupId: &SecurityGroupId, + InstanceName: &InstanceName, + Description: &Description, + ZoneId: &ZoneId, + VSwitchId: &VSwitchId, + Amount: &Amount, + DryRun: util.EqualString(&DryRun, tea.String("true")), + SystemDisk: &aliecs.RunInstancesRequestSystemDisk{ + Category: &Category, + }, + InstanceChargeType: &InstanceChargeType, + } + // 创建并运行实例 + glog.Infof("CreateEcs req: %+v", req) + resp, err := ecs.cli.RunInstances(request) + if err != nil { + return nil, errors.Wrap(err, "Ali Create ECS error") + } + isFinished := false + + if len(resp.Body.InstanceIdSets.InstanceIdSet) > 0 { + isFinished = true + } + requestId := *resp.Body.RequestId + //订单ID。该参数只有创建包年包月ECS实例(请求参数InstanceChargeType=PrePaid)时有返回值。 + OrderId := "" + if req.InstanceChargeType == "PrePaid" { + OrderId = *resp.Body.OrderId + } + TradePrice := float32(0) + if resp.Body.TradePrice != nil { + TradePrice = *resp.Body.TradePrice + } + InstanceIds := make([]string, 0) + for _, v := range resp.Body.InstanceIdSets.InstanceIdSet { + InstanceIds = append(InstanceIds, *v) + } + return &pbecs.CreateEcsResp{ + OrderId: OrderId, + TradePrice: TradePrice, + RequestId: requestId, + InstanceIdSets: InstanceIds, + Finished: isFinished, + }, nil +} + +func (ecs *AliEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { + RegionId := ecs.region.GetName() + InstanceIds := req.GetInstanceIds() + DryRun := req.GetDryRun() + Force := req.GetForce() + TerminateSubscription := req.GetTerminateSubscription() + deleteReq := &aliecs.DeleteInstancesRequest{ + RegionId: &RegionId, + InstanceId: string_.Split(&InstanceIds, tea.String(","), tea.Int(-1)), + Force: util.EqualString(&Force, tea.String("true")), + DryRun: util.EqualString(&DryRun, tea.String("true")), + TerminateSubscription: util.EqualString(&TerminateSubscription, tea.String("true")), + } + resp, err := ecs.cli.DeleteInstances(deleteReq) + if err != nil { + return nil, errors.Wrap(err, "Ali Delete ECS error") + } + glog.Infof("--------------------阿里ECS实例释放成功--------------------") + glog.Infof(*util.ToJSONString(util.ToMap(resp))) + return &pbecs.DeleteEcsResp{ + RequestId: *resp.Body.RequestId, + AccountName: req.AccountName, + RegionId: req.RegionId, + }, nil +} + +func (ecs *AliEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { + Password := req.GetPassword() + HostName := req.GetHostName() + InstanceName := req.GetInstanceName() + Description := req.GetDescription() + InstanceId := req.GetInstanceIds() + UpdateReq := &aliecs.ModifyInstanceAttributeRequest{} + if req.GetInstanceIds() == "" { + return nil, errors.New("InstanceId is empty") + } + UpdateReq.InstanceId = &InstanceId + if Password != "" { + UpdateReq.Password = &Password + } + if HostName != "" { + UpdateReq.HostName = &HostName + } + if InstanceName != "" { + UpdateReq.InstanceName = &InstanceName + } + if Description != "" { + UpdateReq.Description = &Description + } + resp, err := ecs.cli.ModifyInstanceAttribute(UpdateReq) + if err != nil { + return nil, errors.Wrap(err, "Ali Update ECS error") + } + glog.Infof("--------------------阿里ECS实例修改成功--------------------") + glog.Infof(*util.ToJSONString(util.ToMap(resp))) + return &pbecs.UpdateEcsResp{ + RequestId: *resp.Body.RequestId, + }, nil +} func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { - request := aliecs.CreateDescribeInstancesRequest() - request.PageNumber = requests.NewInteger(int(req.PageNumber)) - request.PageSize = requests.NewInteger(int(req.PageSize)) - request.NextToken = req.NextToken + request := &aliecs.DescribeInstancesRequest{} + request.PageNumber = &req.PageNumber + request.PageSize = &req.PageSize + request.NextToken = &req.NextToken + request.RegionId = ecs.cli.RegionId resp, err := ecs.cli.DescribeInstances(request) if err != nil { - return nil, errors.Wrap(err, "Aliyun ListDetail error") + return nil, errors.Wrap(err, "Ali ListDetail error") } - - var ecses = make([]*pbecs.EcsInstance, len(resp.Instances.Instance)) - for k, v := range resp.Instances.Instance { + var ecses = make([]*pbecs.EcsInstance, len(resp.Body.Instances.Instance)) + for k, v := range resp.Body.Instances.Instance { + publicIps := make([]string, 0) + for _, vv := range v.PublicIpAddress.IpAddress { + publicIps = append(publicIps, *vv) + } + InnerIps := make([]string, 0) + for _, vv := range v.VpcAttributes.PrivateIpAddress.IpAddress { + InnerIps = append(InnerIps, *vv) + } ecses[k] = &pbecs.EcsInstance{ - Provider: pbtenant.CloudProvider_ali, - AccountName: ecs.tenanter.AccountName(), - InstanceId: v.InstanceId, - InstanceName: v.InstanceName, - RegionName: ecs.region.GetName(), - PublicIps: v.PublicIpAddress.IpAddress, - InstanceType: v.InstanceType, - Cpu: int32(v.Cpu), - Memory: int32(v.Memory), - Description: v.Description, - Status: v.Status, - CreationTime: v.CreationTime, - ExpireTime: v.ExpiredTime, - InnerIps: v.InnerIpAddress.IpAddress, - VpcId: v.VpcAttributes.VpcId, - ResourceGroupId: v.ResourceGroupId, - ChargeType: v.InstanceChargeType, + Provider: pbtenant.CloudProvider_ali, + AccountName: ecs.tenanter.AccountName(), + InstanceId: *v.InstanceId, + InstanceName: *v.InstanceName, + RegionName: ecs.region.GetName(), + PublicIps: publicIps, + InstanceType: *v.InstanceType, + Cpu: *v.Cpu, + Memory: *v.Memory, + Description: *v.Description, + Status: *v.Status, + CreationTime: *v.CreationTime, + ExpireTime: *v.ExpiredTime, + InnerIps: InnerIps, + VpcId: *v.VpcAttributes.VpcId, + ResourceGroupId: *v.ResourceGroupId, + InstanceChargeType: *v.InstanceChargeType, } } - isFinished := false if len(ecses) < int(req.PageSize) { isFinished = true @@ -89,7 +233,7 @@ func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*p Finished: isFinished, PageNumber: req.PageNumber + 1, PageSize: req.PageSize, - NextToken: resp.NextToken, - RequestId: resp.RequestId, + NextToken: *resp.Body.NextToken, + RequestId: *resp.Body.RequestId, }, nil } diff --git a/adaptor/vm_adaptor/service/ecser/ecser.go b/adaptor/vm_adaptor/service/ecser/ecser.go index b96f3ad..8be2f82 100644 --- a/adaptor/vm_adaptor/service/ecser/ecser.go +++ b/adaptor/vm_adaptor/service/ecser/ecser.go @@ -2,6 +2,7 @@ package ecser import ( "context" + "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" @@ -16,7 +17,10 @@ var ( ) type Ecser interface { - ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) + CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (resp *pbecs.CreateEcsResp, err error) //创建ecs + DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error) //批量删除ecs + UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) //修改ecs + ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) //查询ecs详情 } func NewEcsClient(provider pbtenant.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (ecser Ecser, err error) { diff --git a/adaptor/vm_adaptor/service/ecser/huawei.go b/adaptor/vm_adaptor/service/ecser/huawei.go index 756ffd5..8f182a3 100644 --- a/adaptor/vm_adaptor/service/ecser/huawei.go +++ b/adaptor/vm_adaptor/service/ecser/huawei.go @@ -2,6 +2,15 @@ package ecser import ( "context" + "strconv" + + "github.com/golang/glog" + + string_ "github.com/alibabacloud-go/darabonba-string/client" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/alibabacloud-go/tea/tea" + "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" @@ -58,6 +67,139 @@ func newHuaweiEcsClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecser }, nil } +func (ecs *HuaweiEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { + subnetIds := string_.Split(&req.SubnetId, tea.String(","), tea.Int(-1)) + Nics := make([]model.PrePaidServerNic, 0) + for _, nic := range subnetIds { + Nics = append(Nics, model.PrePaidServerNic{ + SubnetId: *nic, + }) + } + Volumetype := &model.PrePaidServerRootVolume{} + switch req.SystemDisk.Category { + case "SATA": + Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().SATA + case "SAS": + Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().SAS + case "SSD": + Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().SSD + case "GPSSD": + Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().GPSSD + case "co-p1": + Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().CO_P1 + case "uh-l1": + Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().UH_L1 + case "ESSD": + Volumetype.Volumetype = model.GetPrePaidServerRootVolumeVolumetypeEnum().ESSD + } + + PrePaidServerExtendParam := &model.PrePaidServerExtendParam{} + prePaid := model.GetPrePaidServerExtendParamChargingModeEnum().PRE_PAID + if req.InstanceChargeType == "PrePaid" { + PrePaidServerExtendParam.ChargingMode = &prePaid + } + request := &model.CreateServersRequest{ + Body: &model.CreateServersRequestBody{ + DryRun: util.EqualString(&req.DryRun, tea.String("true")), + Server: &model.PrePaidServer{ + ImageRef: req.GetImageId(), + FlavorRef: req.InstanceType, + Name: req.InstanceName, + Vpcid: req.VpcId, + Nics: Nics, + RootVolume: Volumetype, + Count: &req.Amount, + Extendparam: PrePaidServerExtendParam, + }, + }} + resp, err := ecs.cli.CreateServers(request) + if err != nil { + return nil, errors.Wrap(err, "Huawei create ecs error") + } + glog.Infof("--------------------华为ECS实例创建成功--------------------") + glog.Infof(resp.String()) + isFinished := false + if len(*resp.ServerIds) > 0 { + isFinished = true + } + //订单ID。该参数只有创建包年包月ECS实例(请求参数InstanceChargeType=PrePaid)时有返回值。 + OrderId := "" + if req.InstanceChargeType == "PrePaid" { + OrderId = *resp.OrderId + } + InstanceIds := make([]string, 0) + for _, v := range *resp.ServerIds { + InstanceIds = append(InstanceIds, v) + } + return &pbecs.CreateEcsResp{ + OrderId: OrderId, + RequestId: *resp.JobId, + InstanceIdSets: InstanceIds, + Finished: isFinished, + }, nil +} + +func (ecs *HuaweiEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { + if req.GetInstanceIds() == "" { + return nil, errors.New("InstanceId is empty") + } + deleteReq := &model.DeleteServersRequest{} + InstanceIds := string_.Split(&req.InstanceIds, tea.String(","), tea.Int(-1)) + Servers := make([]model.ServerId, 0) + for _, v := range InstanceIds { + Servers = append(Servers, model.ServerId{ + Id: *v, + }) + } + deleteReq.Body = &model.DeleteServersRequestBody{ + DeletePublicip: util.EqualString(&req.DeletePublicip, tea.String("true")), + DeleteVolume: util.EqualString(&req.DeleteVolume, tea.String("true")), + Servers: Servers, + } + resp, err := ecs.cli.DeleteServers(deleteReq) + if err != nil { + return nil, errors.Wrap(err, "Huawei Delete ECS error") + } + glog.Infof("--------------------华为ECS实例删除成功--------------------") + glog.Infof(resp.String()) + return &pbecs.DeleteEcsResp{ + RequestId: *resp.JobId, + }, nil +} + +func (ecs *HuaweiEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { + HostName := req.GetHostName() + InstanceName := req.GetInstanceName() + Description := req.GetDescription() + UpdateReq := &model.UpdateServerRequest{} + if req.GetInstanceIds() == "" { + return nil, errors.New("InstanceId is empty") + } + Server := &model.UpdateServerOption{} + UpdateReq.ServerId = req.GetInstanceIds() + if HostName != "" { + Server.Hostname = &HostName + } + if InstanceName != "" { + Server.Name = &InstanceName + } + if Description != "" { + Server.Description = &Description + } + UpdateReq.Body = &model.UpdateServerRequestBody{ + Server: Server, + } + resp, err := ecs.cli.UpdateServer(UpdateReq) + if err != nil { + return nil, errors.Wrap(err, "Huawei Update ECS error") + } + glog.Infof("--------------------华为ECS实例修改成功--------------------") + glog.Infof(resp.String()) + return &pbecs.UpdateEcsResp{ + RequestId: resp.Server.Id, + }, nil +} + func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { request := new(model.ListServersDetailsRequest) offset := (req.PageNumber - 1) * req.PageSize @@ -73,20 +215,39 @@ func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) servers := *resp.Servers var ecses = make([]*pbecs.EcsInstance, len(servers)) for k, v := range servers { + vCpu, err := strconv.ParseInt(v.Flavor.Vcpus, 10, 32) + vMemory, err := strconv.ParseInt(v.Flavor.Vcpus, 10, 32) + if err != nil { + return nil, errors.Wrap(err, "Huawei ListDetail error") + } + PublicIps := make([]string, 0) + InnerIps := make([]string, 0) + for s := range v.Addresses { + for _, a := range v.Addresses[s] { + // 判断是内网ip还是公网ip + if *a.OSEXTIPStype == model.GetServerAddressOSEXTIPStypeEnum().FIXED { + InnerIps = append(InnerIps, a.Addr) + } else { + PublicIps = append(PublicIps, a.Addr) + } + } + } ecses[k] = &pbecs.EcsInstance{ - Provider: pbtenant.CloudProvider_huawei, - AccountName: ecs.tenanter.AccountName(), - InstanceId: v.Id, - InstanceName: v.Name, - RegionName: ecs.region.GetName(), - InstanceType: v.Flavor.Name, - PublicIps: []string{v.AccessIPv4}, - // Cpu: v.Flavor.Vcpus, - // Memory: v.Flavor.Ram, - Description: *v.Description, - Status: v.Status, - CreationTime: v.Created, - ExpireTime: v.OSSRVUSGterminatedAt, + Provider: pbtenant.CloudProvider_huawei, + AccountName: ecs.tenanter.AccountName(), + InstanceId: v.Id, + InstanceName: v.Name, + RegionName: ecs.region.GetName(), + InstanceType: v.Flavor.Name, + PublicIps: PublicIps, + InnerIps: InnerIps, + Cpu: int32(vCpu), + Memory: int32(vMemory), + Description: *v.Description, + Status: v.Status, + CreationTime: v.Created, + ExpireTime: v.OSSRVUSGterminatedAt, + InstanceChargeType: v.Metadata["charging_mode"], } } diff --git a/adaptor/vm_adaptor/service/ecser/tencent.go b/adaptor/vm_adaptor/service/ecser/tencent.go index 5463e86..4907f52 100644 --- a/adaptor/vm_adaptor/service/ecser/tencent.go +++ b/adaptor/vm_adaptor/service/ecser/tencent.go @@ -2,6 +2,14 @@ package ecser import ( "context" + + string_ "github.com/alibabacloud-go/darabonba-string/client" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/alibabacloud-go/tea/tea" + + "github.com/golang/glog" + "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" @@ -41,6 +49,88 @@ func newTencentCvmClient(region tenanter.Region, tenant tenanter.Tenanter) (Ecse }, nil } +func (ecs *TencentCvm) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { + ImageId := req.GetImageId() + InstanceType := req.GetInstanceType() + InstanceName := req.GetInstanceName() + Amount := int64(req.GetAmount()) + DryRun := req.GetDryRun() + InstanceChargeType := req.GetInstanceChargeType() + ZoneId := req.GetZoneId() + request := cvm.NewRunInstancesRequest() + request.ImageId = &ImageId + request.InstanceType = &InstanceType + request.InstanceName = &InstanceName + request.DryRun = util.EqualString(&DryRun, tea.String("true")) + request.InstanceChargeType = &InstanceChargeType + request.InstanceCount = &Amount + request.Placement = &cvm.Placement{ + Zone: &ZoneId, + } + resp, err := ecs.cli.RunInstances(request) + glog.Infof("CreateEcs req: %+v", req) + if err != nil { + return nil, errors.Wrap(err, "Tencent Create ECS error") + } + InstanceIds := make([]string, 0) + for _, v := range resp.Response.InstanceIdSet { + InstanceIds = append(InstanceIds, *v) + } + isFinished := false + if len(resp.Response.InstanceIdSet) > 0 { + isFinished = true + } + return &pbecs.CreateEcsResp{ + RequestId: *resp.Response.RequestId, + InstanceIdSets: InstanceIds, + Finished: isFinished, + }, nil +} + +func (ecs *TencentCvm) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { + idStr := req.GetInstanceIds() + InstanceIds := string_.Split(&idStr, tea.String(","), tea.Int(-1)) + //腾讯云支持批量操作,每次请求批量实例的上限为100 + if len(InstanceIds) > 100 { + return nil, errors.New("Tencent Delete ECS error InstanceIds > 100") + } + deleteReq := cvm.NewTerminateInstancesRequest() + deleteReq.InstanceIds = InstanceIds + resp, err := ecs.cli.TerminateInstances(deleteReq) + if err != nil { + return nil, errors.Wrap(err, "Tencent Delete ECS error") + } + glog.Infof("--------------------实例释放成功--------------------") + glog.Infof(*util.ToJSONString(util.ToMap(resp))) + return &pbecs.DeleteEcsResp{ + RequestId: *resp.Response.RequestId, + AccountName: req.AccountName, + RegionId: req.RegionId, + }, nil +} + +func (ecs *TencentCvm) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { + InstanceName := req.GetInstanceName() + InstanceId := req.GetInstanceIds() + UpdateReq := cvm.NewModifyInstancesAttributeRequest() + if req.GetInstanceIds() == "" { + return nil, errors.New("InstanceId is empty") + } + UpdateReq.InstanceIds = string_.Split(&InstanceId, tea.String(","), tea.Int(-1)) + if InstanceName != "" { + UpdateReq.InstanceName = &InstanceName + } + resp, err := ecs.cli.ModifyInstancesAttribute(UpdateReq) + if err != nil { + return nil, errors.Wrap(err, "Tencent Update ECS error") + } + glog.Infof("--------------------实例修改成功--------------------") + glog.Infof(*util.ToJSONString(util.ToMap(resp))) + return &pbecs.UpdateEcsResp{ + RequestId: *resp.Response.RequestId, + }, nil +} + func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { request := cvm.NewDescribeInstancesRequest() request.Offset = common.Int64Ptr(int64((req.PageNumber - 1) * req.PageSize)) @@ -52,24 +142,28 @@ func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) var ecses = make([]*pbecs.EcsInstance, len(resp.Response.InstanceSet)) for k, v := range resp.Response.InstanceSet { + ExpiredTime := "" + if v.ExpiredTime != nil { + ExpiredTime = *v.ExpiredTime + } ecses[k] = &pbecs.EcsInstance{ - Provider: pbtenant.CloudProvider_tencent, - AccountName: ecs.tenanter.AccountName(), - InstanceId: *v.InstanceId, - InstanceName: *v.InstanceName, - RegionName: ecs.region.GetName(), - PublicIps: make([]string, len(v.PublicIpAddresses)), - InstanceType: *v.InstanceType, - Cpu: int32(*v.CPU), - Memory: int32(*v.Memory), - Description: "", - Status: *v.InstanceState, - CreationTime: *v.CreatedTime, - ExpireTime: *v.ExpiredTime, - InnerIps: make([]string, len(v.PrivateIpAddresses)), - VpcId: *v.VirtualPrivateCloud.VpcId, - ResourceGroupId: "", - ChargeType: *v.InstanceChargeType, + Provider: pbtenant.CloudProvider_tencent, + AccountName: ecs.tenanter.AccountName(), + InstanceId: *v.InstanceId, + InstanceName: *v.InstanceName, + RegionName: ecs.region.GetName(), + PublicIps: make([]string, len(v.PublicIpAddresses)), + InstanceType: *v.InstanceType, + Cpu: int32(*v.CPU), + Memory: int32(*v.Memory), + Description: "", + Status: *v.InstanceState, + CreationTime: *v.CreatedTime, + ExpireTime: ExpiredTime, + InnerIps: make([]string, len(v.PrivateIpAddresses)), + VpcId: *v.VirtualPrivateCloud.VpcId, + ResourceGroupId: "", + InstanceChargeType: *v.InstanceChargeType, } for k1, v1 := range v.PublicIpAddresses { ecses[k].PublicIps[k1] = *v1 diff --git a/common/server/server_ecs.go b/common/server/server_ecs.go index 9ea8b11..b31a809 100644 --- a/common/server/server_ecs.go +++ b/common/server/server_ecs.go @@ -11,6 +11,36 @@ import ( "google.golang.org/grpc/status" ) +// CreateEcs return create ecs +func (s *Server) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { + resp, err := ecs.CreateEcs(ctx, req) + if err != nil { + glog.Errorf("ListEcsDetail error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// DeleteEcs return Delete ecs +func (s *Server) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error) { + resp, err := ecs.DeleteEcs(ctx, req) + if err != nil { + glog.Errorf("ListEcsDetail error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// UpdateEcs return Update ecs +func (s *Server) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error) { + resp, err := ecs.UpdateEcs(ctx, req) + if err != nil { + glog.Errorf("ListEcsDetail error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + // ListEcsDetail return ecs detail func (s *Server) ListEcsDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error) { resp, err := ecs.ListDetail(ctx, req) diff --git a/go.mod b/go.mod index b6b6c26..45d3c4d 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,11 @@ module gitlink.org.cn/JCCE/PCM go 1.17 require ( + github.com/alibabacloud-go/darabonba-openapi v0.1.4 + github.com/alibabacloud-go/darabonba-string v1.0.0 + github.com/alibabacloud-go/ecs-20140526/v2 v2.1.0 + github.com/alibabacloud-go/tea v1.1.15 + github.com/alibabacloud-go/tea-utils v1.3.9 github.com/aliyun/alibaba-cloud-sdk-go v1.61.1530 github.com/go-yaml/yaml v2.1.0+incompatible github.com/golang/glog v1.0.0 @@ -21,6 +26,10 @@ require ( ) require ( + github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect + github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect + github.com/alibabacloud-go/openapi-util v0.0.7 // indirect + github.com/aliyun/credentials-go v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415 // indirect github.com/golang/protobuf v1.5.2 // indirect @@ -31,8 +40,8 @@ require ( github.com/json-iterator/go v1.1.10 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/spf13/pflag v1.0.1 // indirect + github.com/tjfoc/gmsm v1.3.2 // indirect golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 // indirect golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect @@ -41,7 +50,6 @@ require ( golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect google.golang.org/appengine v1.6.6 // indirect - gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/inf.v0 v0.9.0 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/idl/pbecs/ecs.proto b/idl/pbecs/ecs.proto index 5683384..82ec3ea 100644 --- a/idl/pbecs/ecs.proto +++ b/idl/pbecs/ecs.proto @@ -40,7 +40,158 @@ message EcsInstance { // 资源组id string resource_group_id = 16; // 收费类型 - string charge_type = 17; + string instance_charge_type = 17; +} + +//网络计费类型 +enum InternetChargeType { + //按固定带宽计费。 + PayByBandwidth = 0; + //(默认):按使用流量计费 + PayByTraffic = 1; +} + +message CreateEcsReq { + // 云类型 + pbtenant.CloudProvider provider = 1; + // 账号名称 + string account_name = 2; + // 地域,数据中心 + int32 region_id = 3; + //镜像id + string image_id = 4; + // 实例的付费方式 + string instance_charge_type = 5; + //实例的资源规格 + string instance_type = 6; + // 安全组id + string security_group_id = 7; + //交换机id + string v_switch_id = 8; + //实例名称 + string instance_name = 9; + //实例描述 + string description = 10; + //可用区id + string zone_id = 11; + //系统磁盘 + SystemDisk system_disk = 12; + //创建ECS的数量 + int32 amount = 13; + //预检此次请求,为true时请求通过,则返回 Request validation has been passed with DryRun flag set + string dry_run = 14; + //数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。 + string category = 15; + //网络计费类型。取值范围:PayByBandwidth:按固定带宽计费。PayByTraffic(默认):按使用流量计费 + InternetChargeType internet_charge_type = 16; + //公网入带宽最大值,单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0,则自动为实例分配公网IP。 + int32 internet_max_bandwidth_out = 17; + // vpc id 华为云必需 + string vpc_id = 18; + //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 + string subnet_id =19; +} + +message SystemDisk { + //系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小} + string size = 1; + //系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。 + string category = 2; + //系统盘名称 + string disk_name = 3; + //系统盘描述 + string description = 4; + //创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:PL0:单盘最高随机读写IOPS 1万。PL1(默认):单盘最高随机读写IOPS 5万。PL2:单盘最高随机读写IOPS 10万。PL3:单盘最高随机读写IOPS 100万。 + string performance_level = 5; + //系统盘采用的自动快照策略ID。 + string auto_snapshot_policy_id = 6; +} + +message CreateEcsResp { + // 云名称 + pbtenant.CloudProvider provider = 1; + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + string account_name = 2; + // 区域Id,参考 tenant.proto 中的各个云的区域 + int32 region_id = 3; + // 请求ID + string request_id = 4; + // 订单id + string order_id = 5; + // 订单成交价 + float trade_price = 6; + //实例ID(InstanceIdSet)列表 + repeated string instance_id_sets = 7; + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + bool finished = 8; +} + +message DeleteEcsReq { + // 云类型 + pbtenant.CloudProvider provider = 1; + // 账号名称 + string account_name = 2; + // 地域,数据中心 + int32 region_id = 3; + //是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。 + //false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。 + string dry_run = 4; + //Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。 + //false(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态 + string force = 5; + //是否释放已到期的包年包月实例 true,false + string terminate_subscription = 6; + //实例ID数组以”,“分割。列:i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216 + string instance_ids = 7; + //配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。 + //取值为true或false。默认false;华为云 + string delete_publicip = 8; + //配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。 + //取值为true或false。默认false;华为云 + string delete_volume = 9; +} + +message DeleteEcsResp { + // 云名称 + pbtenant.CloudProvider provider = 1; + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + string account_name = 2; + // 区域Id,参考 tenant.proto 中的各个云的区域 + int32 region_id = 3; + // 请求ID + string request_id = 4; +} + +message UpdateEcsReq { + // 云类型 + pbtenant.CloudProvider provider = 1; + // 账号名称 + string account_name = 2; + // 地域,数据中心 + int32 region_id = 3; + //实例id + string instance_ids = 4; + // 实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。 + string password = 5; + //操作系统的主机名 + string host_name = 6; + //实例名称 + string instance_name = 7; + //实例描述 + string description = 8; + //实例重新加入的安全组列表,安全组ID不能重复。以”,“分割 + string security_group_ids = 9; +} + +message UpdateEcsResp { + // 云名称 + pbtenant.CloudProvider provider = 1; + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + string account_name = 2; + // 区域Id,参考 tenant.proto 中的各个云的区域 + int32 region_id = 3; + // 请求ID + string request_id = 4; } message ListDetailReq { @@ -93,27 +244,48 @@ message ListAllReq{} // 亚马逊云 - EC2 service EcsService { + // 创建ECS + rpc CreateEcs(CreateEcsReq) returns (CreateEcsResp) { + option (google.api.http) = { + post : "/apis/ecs/create" + body : "*" + }; + } + + // 删除ECS + rpc DeleteEcs(DeleteEcsReq) returns (DeleteEcsResp) { + option (google.api.http) = { + post : "/apis/ecs/delete" + body : "*" + }; + } + + // 修改ECS + rpc UpdateEcs(UpdateEcsReq) returns (UpdateEcsResp) { + option (google.api.http) = { + put : "/apis/ecs/update" + body : "*" + }; + } + // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 rpc ListEcsDetail(ListDetailReq) returns (ListDetailResp) { option (google.api.http) = { - post : "/apis/ecs/detail" - body : "*" + get : "/apis/ecs/detail" }; } // 查询ECS全量 - 根据云类型 rpc ListEcs(ListReq) returns (ListResp) { option (google.api.http) = { - post : "/apis/ecs" - body : "*" + get : "/apis/ecs" }; } // 查询所有云的ECS rpc ListEcsAll(ListAllReq) returns (ListResp) { option (google.api.http) = { - post : "/apis/ecs/all" - body : "*" + get : "/apis/ecs/all" }; } } \ No newline at end of file diff --git a/idl/pbtenant/tenant.proto b/idl/pbtenant/tenant.proto index 671680e..df0b2d4 100644 --- a/idl/pbtenant/tenant.proto +++ b/idl/pbtenant/tenant.proto @@ -81,25 +81,27 @@ enum AliRegionId { // 腾讯云区域,需要将对应的 _ 转化为 - enum TencentRegionId { tc_all = 0; - tc_ap_bangkok = 1; // 曼谷 - tc_ap_beijing = 2; // 北京 - tc_ap_chengdu = 3; // 成都 - tc_ap_chongqing = 4; // 重庆 - tc_ap_guangzhou = 5; // 广州 - tc_ap_guangzhou_open = 6; // 广州Open - tc_ap_hongkong = 7; // 中国香港 - tc_ap_mumbai = 8; // 孟买 - tc_ap_seoul = 9; // 首尔 - tc_ap_shanghai = 10; // 上海 - tc_ap_shanghai_fsi = 11; // 上海金融 - tc_ap_shenzhen_fsi = 12; // 深圳金融 - tc_ap_singapore = 13; // 新加坡 - tc_ap_tokyo = 14; // 东京 - tc_eu_frankfurt = 15; // 法兰克福 - tc_eu_moscow = 16; // 莫斯科 - tc_na_ashburn = 17; // 阿什本 - tc_na_siliconvalley = 18; // 硅谷 - tc_na_toronto = 19; // 多伦多 + tc_ap_bangkok =1; //亚太东南(曼谷) + tc_ap_beijing =2; //华北地区(北京) + tc_ap_chengdu =3; //西南地区(成都) + tc_ap_chongqing =4; //西南地区(重庆) + tc_ap_guangzhou =5; //华南地区(广州) + tc_ap_hongkong =6; //港澳台地区(中国香港) + tc_ap_jakarta =7; //亚太东南(雅加达) + tc_ap_mumbai=8; // 亚太南部(孟买) + tc_ap_nanjing =9; //华东地区(南京) + tc_ap_seoul =10; //亚太东北(首尔) + tc_ap_shanghai =11; //华东地区(上海) + tc_ap_shanghai_fsi=12; //华东地区(上海金融) + tc_ap_shenzhen_fsi =13; //华南地区(深圳金融) + tc_ap_singapore =14; //亚太东南(新加坡) + tc_ap_tokyo =15; //亚太东北(东京) + tc_eu_frankfurt=16; //欧洲地区(法兰克福) + tc_eu_moscow =17; //欧洲地区(莫斯科) + tc_na_ashburn =18; //美国东部(弗吉尼亚) + tc_na_siliconvalley=19; //美国西部(硅谷) + tc_na_toronto =20; //北美地区(多伦多) + tc_sa_saopaulo =21; //南美地区(圣保罗) } // 华为云区域,需要将对应的 _ 转化为 - diff --git a/lan_trans/idl/demo/demo.pb.gw.go b/lan_trans/idl/demo/demo.pb.gw.go index 5fedd6b..66ed1dc 100644 --- a/lan_trans/idl/demo/demo.pb.gw.go +++ b/lan_trans/idl/demo/demo.pb.gw.go @@ -77,13 +77,12 @@ func RegisterDemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_DemoService_Echo_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_DemoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -140,13 +139,12 @@ func RegisterDemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_DemoService_Echo_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_DemoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/idl/pbecs/ecs.pb.go b/lan_trans/idl/pbecs/ecs.pb.go index 07175d4..3131a72 100644 --- a/lan_trans/idl/pbecs/ecs.pb.go +++ b/lan_trans/idl/pbecs/ecs.pb.go @@ -22,6 +22,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +//网络计费类型 +type InternetChargeType int32 + +const ( + //按固定带宽计费。 + InternetChargeType_PayByBandwidth InternetChargeType = 0 + //(默认):按使用流量计费 + InternetChargeType_PayByTraffic InternetChargeType = 1 +) + +// Enum value maps for InternetChargeType. +var ( + InternetChargeType_name = map[int32]string{ + 0: "PayByBandwidth", + 1: "PayByTraffic", + } + InternetChargeType_value = map[string]int32{ + "PayByBandwidth": 0, + "PayByTraffic": 1, + } +) + +func (x InternetChargeType) Enum() *InternetChargeType { + p := new(InternetChargeType) + *p = x + return p +} + +func (x InternetChargeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InternetChargeType) Descriptor() protoreflect.EnumDescriptor { + return file_idl_pbecs_ecs_proto_enumTypes[0].Descriptor() +} + +func (InternetChargeType) Type() protoreflect.EnumType { + return &file_idl_pbecs_ecs_proto_enumTypes[0] +} + +func (x InternetChargeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InternetChargeType.Descriptor instead. +func (InternetChargeType) EnumDescriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{0} +} + type EcsInstance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -60,7 +109,7 @@ type EcsInstance struct { // 资源组id ResourceGroupId string `protobuf:"bytes,16,opt,name=resource_group_id,json=resourceGroupId,proto3" json:"resource_group_id,omitempty"` // 收费类型 - ChargeType string `protobuf:"bytes,17,opt,name=charge_type,json=chargeType,proto3" json:"charge_type,omitempty"` + InstanceChargeType string `protobuf:"bytes,17,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` } func (x *EcsInstance) Reset() { @@ -207,9 +256,817 @@ func (x *EcsInstance) GetResourceGroupId() string { return "" } -func (x *EcsInstance) GetChargeType() string { +func (x *EcsInstance) GetInstanceChargeType() string { if x != nil { - return x.ChargeType + return x.InstanceChargeType + } + return "" +} + +type CreateEcsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云类型 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账号名称 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 地域,数据中心 + RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + //镜像id + ImageId string `protobuf:"bytes,4,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` + // 实例的付费方式 + InstanceChargeType string `protobuf:"bytes,5,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` + //实例的资源规格 + InstanceType string `protobuf:"bytes,6,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` + // 安全组id + SecurityGroupId string `protobuf:"bytes,7,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` + //交换机id + VSwitchId string `protobuf:"bytes,8,opt,name=v_switch_id,json=vSwitchId,proto3" json:"v_switch_id,omitempty"` + //实例名称 + InstanceName string `protobuf:"bytes,9,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` + //实例描述 + Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` + //可用区id + ZoneId string `protobuf:"bytes,11,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"` + //系统磁盘 + SystemDisk *SystemDisk `protobuf:"bytes,12,opt,name=system_disk,json=systemDisk,proto3" json:"system_disk,omitempty"` + //创建ECS的数量 + Amount int32 `protobuf:"varint,13,opt,name=amount,proto3" json:"amount,omitempty"` + //预检此次请求,为true时请求通过,则返回 Request validation has been passed with DryRun flag set + DryRun string `protobuf:"bytes,14,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` + //数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。 + Category string `protobuf:"bytes,15,opt,name=category,proto3" json:"category,omitempty"` + //网络计费类型。取值范围:PayByBandwidth:按固定带宽计费。PayByTraffic(默认):按使用流量计费 + InternetChargeType InternetChargeType `protobuf:"varint,16,opt,name=internet_charge_type,json=internetChargeType,proto3,enum=pbecs.InternetChargeType" json:"internet_charge_type,omitempty"` + //公网入带宽最大值,单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0,则自动为实例分配公网IP。 + InternetMaxBandwidthOut int32 `protobuf:"varint,17,opt,name=internet_max_bandwidth_out,json=internetMaxBandwidthOut,proto3" json:"internet_max_bandwidth_out,omitempty"` + // vpc id 华为云必需 + VpcId string `protobuf:"bytes,18,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` + //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 + SubnetId string `protobuf:"bytes,19,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` +} + +func (x *CreateEcsReq) Reset() { + *x = CreateEcsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEcsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEcsReq) ProtoMessage() {} + +func (x *CreateEcsReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEcsReq.ProtoReflect.Descriptor instead. +func (*CreateEcsReq) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateEcsReq) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *CreateEcsReq) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *CreateEcsReq) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *CreateEcsReq) GetImageId() string { + if x != nil { + return x.ImageId + } + return "" +} + +func (x *CreateEcsReq) GetInstanceChargeType() string { + if x != nil { + return x.InstanceChargeType + } + return "" +} + +func (x *CreateEcsReq) GetInstanceType() string { + if x != nil { + return x.InstanceType + } + return "" +} + +func (x *CreateEcsReq) GetSecurityGroupId() string { + if x != nil { + return x.SecurityGroupId + } + return "" +} + +func (x *CreateEcsReq) GetVSwitchId() string { + if x != nil { + return x.VSwitchId + } + return "" +} + +func (x *CreateEcsReq) GetInstanceName() string { + if x != nil { + return x.InstanceName + } + return "" +} + +func (x *CreateEcsReq) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateEcsReq) GetZoneId() string { + if x != nil { + return x.ZoneId + } + return "" +} + +func (x *CreateEcsReq) GetSystemDisk() *SystemDisk { + if x != nil { + return x.SystemDisk + } + return nil +} + +func (x *CreateEcsReq) GetAmount() int32 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *CreateEcsReq) GetDryRun() string { + if x != nil { + return x.DryRun + } + return "" +} + +func (x *CreateEcsReq) GetCategory() string { + if x != nil { + return x.Category + } + return "" +} + +func (x *CreateEcsReq) GetInternetChargeType() InternetChargeType { + if x != nil { + return x.InternetChargeType + } + return InternetChargeType_PayByBandwidth +} + +func (x *CreateEcsReq) GetInternetMaxBandwidthOut() int32 { + if x != nil { + return x.InternetMaxBandwidthOut + } + return 0 +} + +func (x *CreateEcsReq) GetVpcId() string { + if x != nil { + return x.VpcId + } + return "" +} + +func (x *CreateEcsReq) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +type SystemDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + //系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小} + Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` + //系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。 + Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` + //系统盘名称 + DiskName string `protobuf:"bytes,3,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` + //系统盘描述 + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + //创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:PL0:单盘最高随机读写IOPS 1万。PL1(默认):单盘最高随机读写IOPS 5万。PL2:单盘最高随机读写IOPS 10万。PL3:单盘最高随机读写IOPS 100万。 + PerformanceLevel string `protobuf:"bytes,5,opt,name=performance_level,json=performanceLevel,proto3" json:"performance_level,omitempty"` + //系统盘采用的自动快照策略ID。 + AutoSnapshotPolicyId string `protobuf:"bytes,6,opt,name=auto_snapshot_policy_id,json=autoSnapshotPolicyId,proto3" json:"auto_snapshot_policy_id,omitempty"` +} + +func (x *SystemDisk) Reset() { + *x = SystemDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SystemDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemDisk) ProtoMessage() {} + +func (x *SystemDisk) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SystemDisk.ProtoReflect.Descriptor instead. +func (*SystemDisk) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{2} +} + +func (x *SystemDisk) GetSize() string { + if x != nil { + return x.Size + } + return "" +} + +func (x *SystemDisk) GetCategory() string { + if x != nil { + return x.Category + } + return "" +} + +func (x *SystemDisk) GetDiskName() string { + if x != nil { + return x.DiskName + } + return "" +} + +func (x *SystemDisk) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SystemDisk) GetPerformanceLevel() string { + if x != nil { + return x.PerformanceLevel + } + return "" +} + +func (x *SystemDisk) GetAutoSnapshotPolicyId() string { + if x != nil { + return x.AutoSnapshotPolicyId + } + return "" +} + +type CreateEcsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云名称 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 区域Id,参考 tenant.proto 中的各个云的区域 + RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + // 请求ID + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // 订单id + OrderId string `protobuf:"bytes,5,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + // 订单成交价 + TradePrice float32 `protobuf:"fixed32,6,opt,name=trade_price,json=tradePrice,proto3" json:"trade_price,omitempty"` + //实例ID(InstanceIdSet)列表 + InstanceIdSets []string `protobuf:"bytes,7,rep,name=instance_id_sets,json=instanceIdSets,proto3" json:"instance_id_sets,omitempty"` + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + Finished bool `protobuf:"varint,8,opt,name=finished,proto3" json:"finished,omitempty"` +} + +func (x *CreateEcsResp) Reset() { + *x = CreateEcsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEcsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEcsResp) ProtoMessage() {} + +func (x *CreateEcsResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEcsResp.ProtoReflect.Descriptor instead. +func (*CreateEcsResp) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateEcsResp) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *CreateEcsResp) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *CreateEcsResp) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *CreateEcsResp) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *CreateEcsResp) GetOrderId() string { + if x != nil { + return x.OrderId + } + return "" +} + +func (x *CreateEcsResp) GetTradePrice() float32 { + if x != nil { + return x.TradePrice + } + return 0 +} + +func (x *CreateEcsResp) GetInstanceIdSets() []string { + if x != nil { + return x.InstanceIdSets + } + return nil +} + +func (x *CreateEcsResp) GetFinished() bool { + if x != nil { + return x.Finished + } + return false +} + +type DeleteEcsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云类型 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账号名称 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 地域,数据中心 + RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + //是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。 + //false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。 + DryRun string `protobuf:"bytes,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` + //Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。 + //false(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态 + Force string `protobuf:"bytes,5,opt,name=force,proto3" json:"force,omitempty"` + //是否释放已到期的包年包月实例 true,false + TerminateSubscription string `protobuf:"bytes,6,opt,name=terminate_subscription,json=terminateSubscription,proto3" json:"terminate_subscription,omitempty"` + //实例ID数组以”,“分割。列:i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216 + InstanceIds string `protobuf:"bytes,7,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` + //配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。 + //取值为true或false。默认false;华为云 + DeletePublicip string `protobuf:"bytes,8,opt,name=delete_publicip,json=deletePublicip,proto3" json:"delete_publicip,omitempty"` + //配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。 + //取值为true或false。默认false;华为云 + DeleteVolume string `protobuf:"bytes,9,opt,name=delete_volume,json=deleteVolume,proto3" json:"delete_volume,omitempty"` +} + +func (x *DeleteEcsReq) Reset() { + *x = DeleteEcsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteEcsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEcsReq) ProtoMessage() {} + +func (x *DeleteEcsReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEcsReq.ProtoReflect.Descriptor instead. +func (*DeleteEcsReq) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteEcsReq) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *DeleteEcsReq) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *DeleteEcsReq) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *DeleteEcsReq) GetDryRun() string { + if x != nil { + return x.DryRun + } + return "" +} + +func (x *DeleteEcsReq) GetForce() string { + if x != nil { + return x.Force + } + return "" +} + +func (x *DeleteEcsReq) GetTerminateSubscription() string { + if x != nil { + return x.TerminateSubscription + } + return "" +} + +func (x *DeleteEcsReq) GetInstanceIds() string { + if x != nil { + return x.InstanceIds + } + return "" +} + +func (x *DeleteEcsReq) GetDeletePublicip() string { + if x != nil { + return x.DeletePublicip + } + return "" +} + +func (x *DeleteEcsReq) GetDeleteVolume() string { + if x != nil { + return x.DeleteVolume + } + return "" +} + +type DeleteEcsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云名称 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 区域Id,参考 tenant.proto 中的各个云的区域 + RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + // 请求ID + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteEcsResp) Reset() { + *x = DeleteEcsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteEcsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEcsResp) ProtoMessage() {} + +func (x *DeleteEcsResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEcsResp.ProtoReflect.Descriptor instead. +func (*DeleteEcsResp) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteEcsResp) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *DeleteEcsResp) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *DeleteEcsResp) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *DeleteEcsResp) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type UpdateEcsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云类型 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账号名称 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 地域,数据中心 + RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + //实例id + InstanceIds string `protobuf:"bytes,4,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` + // 实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。 + Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` + //操作系统的主机名 + HostName string `protobuf:"bytes,6,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` + //实例名称 + InstanceName string `protobuf:"bytes,7,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` + //实例描述 + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + //实例重新加入的安全组列表,安全组ID不能重复。以”,“分割 + SecurityGroupIds string `protobuf:"bytes,9,opt,name=security_group_ids,json=securityGroupIds,proto3" json:"security_group_ids,omitempty"` +} + +func (x *UpdateEcsReq) Reset() { + *x = UpdateEcsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEcsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEcsReq) ProtoMessage() {} + +func (x *UpdateEcsReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEcsReq.ProtoReflect.Descriptor instead. +func (*UpdateEcsReq) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateEcsReq) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *UpdateEcsReq) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *UpdateEcsReq) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *UpdateEcsReq) GetInstanceIds() string { + if x != nil { + return x.InstanceIds + } + return "" +} + +func (x *UpdateEcsReq) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *UpdateEcsReq) GetHostName() string { + if x != nil { + return x.HostName + } + return "" +} + +func (x *UpdateEcsReq) GetInstanceName() string { + if x != nil { + return x.InstanceName + } + return "" +} + +func (x *UpdateEcsReq) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpdateEcsReq) GetSecurityGroupIds() string { + if x != nil { + return x.SecurityGroupIds + } + return "" +} + +type UpdateEcsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 云名称 + Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` + // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` + // 区域Id,参考 tenant.proto 中的各个云的区域 + RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + // 请求ID + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *UpdateEcsResp) Reset() { + *x = UpdateEcsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEcsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEcsResp) ProtoMessage() {} + +func (x *UpdateEcsResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEcsResp.ProtoReflect.Descriptor instead. +func (*UpdateEcsResp) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateEcsResp) GetProvider() pbtenant.CloudProvider { + if x != nil { + return x.Provider + } + return pbtenant.CloudProvider(0) +} + +func (x *UpdateEcsResp) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *UpdateEcsResp) GetRegionId() int32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *UpdateEcsResp) GetRequestId() string { + if x != nil { + return x.RequestId } return "" } @@ -236,7 +1093,7 @@ type ListDetailReq struct { func (x *ListDetailReq) Reset() { *x = ListDetailReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + mi := &file_idl_pbecs_ecs_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -249,7 +1106,7 @@ func (x *ListDetailReq) String() string { func (*ListDetailReq) ProtoMessage() {} func (x *ListDetailReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + mi := &file_idl_pbecs_ecs_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -262,7 +1119,7 @@ func (x *ListDetailReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDetailReq.ProtoReflect.Descriptor instead. func (*ListDetailReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{1} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{8} } func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider { @@ -329,7 +1186,7 @@ type ListDetailResp struct { func (x *ListDetailResp) Reset() { *x = ListDetailResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + mi := &file_idl_pbecs_ecs_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +1199,7 @@ func (x *ListDetailResp) String() string { func (*ListDetailResp) ProtoMessage() {} func (x *ListDetailResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + mi := &file_idl_pbecs_ecs_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +1212,7 @@ func (x *ListDetailResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDetailResp.ProtoReflect.Descriptor instead. func (*ListDetailResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{2} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{9} } func (x *ListDetailResp) GetEcses() []*EcsInstance { @@ -412,7 +1269,7 @@ type ListReq struct { func (x *ListReq) Reset() { *x = ListReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[3] + mi := &file_idl_pbecs_ecs_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -425,7 +1282,7 @@ func (x *ListReq) String() string { func (*ListReq) ProtoMessage() {} func (x *ListReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[3] + mi := &file_idl_pbecs_ecs_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -438,7 +1295,7 @@ func (x *ListReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReq.ProtoReflect.Descriptor instead. func (*ListReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{3} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{10} } func (x *ListReq) GetProvider() pbtenant.CloudProvider { @@ -460,7 +1317,7 @@ type ListResp struct { func (x *ListResp) Reset() { *x = ListResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[4] + mi := &file_idl_pbecs_ecs_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -473,7 +1330,7 @@ func (x *ListResp) String() string { func (*ListResp) ProtoMessage() {} func (x *ListResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[4] + mi := &file_idl_pbecs_ecs_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -486,7 +1343,7 @@ func (x *ListResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResp.ProtoReflect.Descriptor instead. func (*ListResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{4} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{11} } func (x *ListResp) GetEcses() []*EcsInstance { @@ -505,7 +1362,7 @@ type ListAllReq struct { func (x *ListAllReq) Reset() { *x = ListAllReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[5] + mi := &file_idl_pbecs_ecs_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -518,7 +1375,7 @@ func (x *ListAllReq) String() string { func (*ListAllReq) ProtoMessage() {} func (x *ListAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[5] + mi := &file_idl_pbecs_ecs_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -531,7 +1388,7 @@ func (x *ListAllReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAllReq.ProtoReflect.Descriptor instead. func (*ListAllReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{5} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{12} } var File_idl_pbecs_ecs_proto protoreflect.FileDescriptor @@ -542,7 +1399,7 @@ var file_idl_pbecs_ecs_proto_rawDesc = []byte{ 0x6c, 0x2f, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x04, 0x0a, 0x0b, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x04, 0x0a, 0x0b, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, @@ -576,60 +1433,223 @@ var file_idl_pbecs_ecs_proto_rawDesc = []byte{ 0x05, 0x76, 0x70, 0x63, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x22, 0xe0, 0x05, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, - 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd2, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, - 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, - 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, - 0x63, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, - 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x07, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, - 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x08, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, + 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, + 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x5f, 0x73, 0x77, + 0x69, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, + 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x17, 0x0a, 0x07, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x7a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, + 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x4b, 0x0a, 0x14, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x4f, 0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x76, 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, + 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0xdf, 0x01, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x0d, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, + 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x53, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x22, 0xda, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, + 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, + 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xa3, + 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x22, 0xd4, 0x02, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, + 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, + 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x0d, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd2, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, - 0x65, 0x73, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, - 0x32, 0xf5, 0x01, 0x0a, 0x0a, 0x45, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x59, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x12, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, - 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x3a, 0x01, 0x2a, 0x12, 0x40, 0x0a, 0x07, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x09, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x4a, 0x0a, 0x0a, - 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x65, - 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, - 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x18, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, - 0x73, 0x2f, 0x61, 0x6c, 0x6c, 0x3a, 0x01, 0x2a, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, + 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x07, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x08, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, + 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, + 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2a, 0x3a, + 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, + 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, + 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x10, 0x01, 0x32, 0xeb, 0x03, 0x0a, 0x0a, 0x45, + 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, + 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, + 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x15, 0x1a, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x63, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, + 0x15, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x12, 0x3d, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x11, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x12, + 0x47, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x11, 0x2e, + 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, + 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x61, 0x6c, 0x6c, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, 0x50, 0x43, 0x4d, 0x2f, 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x62, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, @@ -647,33 +1667,56 @@ func file_idl_pbecs_ecs_proto_rawDescGZIP() []byte { return file_idl_pbecs_ecs_proto_rawDescData } -var file_idl_pbecs_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_idl_pbecs_ecs_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_idl_pbecs_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_idl_pbecs_ecs_proto_goTypes = []interface{}{ - (*EcsInstance)(nil), // 0: pbecs.EcsInstance - (*ListDetailReq)(nil), // 1: pbecs.ListDetailReq - (*ListDetailResp)(nil), // 2: pbecs.ListDetailResp - (*ListReq)(nil), // 3: pbecs.ListReq - (*ListResp)(nil), // 4: pbecs.ListResp - (*ListAllReq)(nil), // 5: pbecs.ListAllReq - (pbtenant.CloudProvider)(0), // 6: pbtenant.CloudProvider + (InternetChargeType)(0), // 0: pbecs.InternetChargeType + (*EcsInstance)(nil), // 1: pbecs.EcsInstance + (*CreateEcsReq)(nil), // 2: pbecs.CreateEcsReq + (*SystemDisk)(nil), // 3: pbecs.SystemDisk + (*CreateEcsResp)(nil), // 4: pbecs.CreateEcsResp + (*DeleteEcsReq)(nil), // 5: pbecs.DeleteEcsReq + (*DeleteEcsResp)(nil), // 6: pbecs.DeleteEcsResp + (*UpdateEcsReq)(nil), // 7: pbecs.UpdateEcsReq + (*UpdateEcsResp)(nil), // 8: pbecs.UpdateEcsResp + (*ListDetailReq)(nil), // 9: pbecs.ListDetailReq + (*ListDetailResp)(nil), // 10: pbecs.ListDetailResp + (*ListReq)(nil), // 11: pbecs.ListReq + (*ListResp)(nil), // 12: pbecs.ListResp + (*ListAllReq)(nil), // 13: pbecs.ListAllReq + (pbtenant.CloudProvider)(0), // 14: pbtenant.CloudProvider } var file_idl_pbecs_ecs_proto_depIdxs = []int32{ - 6, // 0: pbecs.EcsInstance.provider:type_name -> pbtenant.CloudProvider - 6, // 1: pbecs.ListDetailReq.provider:type_name -> pbtenant.CloudProvider - 0, // 2: pbecs.ListDetailResp.ecses:type_name -> pbecs.EcsInstance - 6, // 3: pbecs.ListReq.provider:type_name -> pbtenant.CloudProvider - 0, // 4: pbecs.ListResp.ecses:type_name -> pbecs.EcsInstance - 1, // 5: pbecs.EcsService.ListEcsDetail:input_type -> pbecs.ListDetailReq - 3, // 6: pbecs.EcsService.ListEcs:input_type -> pbecs.ListReq - 5, // 7: pbecs.EcsService.ListEcsAll:input_type -> pbecs.ListAllReq - 2, // 8: pbecs.EcsService.ListEcsDetail:output_type -> pbecs.ListDetailResp - 4, // 9: pbecs.EcsService.ListEcs:output_type -> pbecs.ListResp - 4, // 10: pbecs.EcsService.ListEcsAll:output_type -> pbecs.ListResp - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 14, // 0: pbecs.EcsInstance.provider:type_name -> pbtenant.CloudProvider + 14, // 1: pbecs.CreateEcsReq.provider:type_name -> pbtenant.CloudProvider + 3, // 2: pbecs.CreateEcsReq.system_disk:type_name -> pbecs.SystemDisk + 0, // 3: pbecs.CreateEcsReq.internet_charge_type:type_name -> pbecs.InternetChargeType + 14, // 4: pbecs.CreateEcsResp.provider:type_name -> pbtenant.CloudProvider + 14, // 5: pbecs.DeleteEcsReq.provider:type_name -> pbtenant.CloudProvider + 14, // 6: pbecs.DeleteEcsResp.provider:type_name -> pbtenant.CloudProvider + 14, // 7: pbecs.UpdateEcsReq.provider:type_name -> pbtenant.CloudProvider + 14, // 8: pbecs.UpdateEcsResp.provider:type_name -> pbtenant.CloudProvider + 14, // 9: pbecs.ListDetailReq.provider:type_name -> pbtenant.CloudProvider + 1, // 10: pbecs.ListDetailResp.ecses:type_name -> pbecs.EcsInstance + 14, // 11: pbecs.ListReq.provider:type_name -> pbtenant.CloudProvider + 1, // 12: pbecs.ListResp.ecses:type_name -> pbecs.EcsInstance + 2, // 13: pbecs.EcsService.CreateEcs:input_type -> pbecs.CreateEcsReq + 5, // 14: pbecs.EcsService.DeleteEcs:input_type -> pbecs.DeleteEcsReq + 7, // 15: pbecs.EcsService.UpdateEcs:input_type -> pbecs.UpdateEcsReq + 9, // 16: pbecs.EcsService.ListEcsDetail:input_type -> pbecs.ListDetailReq + 11, // 17: pbecs.EcsService.ListEcs:input_type -> pbecs.ListReq + 13, // 18: pbecs.EcsService.ListEcsAll:input_type -> pbecs.ListAllReq + 4, // 19: pbecs.EcsService.CreateEcs:output_type -> pbecs.CreateEcsResp + 6, // 20: pbecs.EcsService.DeleteEcs:output_type -> pbecs.DeleteEcsResp + 8, // 21: pbecs.EcsService.UpdateEcs:output_type -> pbecs.UpdateEcsResp + 10, // 22: pbecs.EcsService.ListEcsDetail:output_type -> pbecs.ListDetailResp + 12, // 23: pbecs.EcsService.ListEcs:output_type -> pbecs.ListResp + 12, // 24: pbecs.EcsService.ListEcsAll:output_type -> pbecs.ListResp + 19, // [19:25] is the sub-list for method output_type + 13, // [13:19] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_idl_pbecs_ecs_proto_init() } @@ -695,7 +1738,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDetailReq); i { + switch v := v.(*CreateEcsReq); i { case 0: return &v.state case 1: @@ -707,7 +1750,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDetailResp); i { + switch v := v.(*SystemDisk); i { case 0: return &v.state case 1: @@ -719,7 +1762,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReq); i { + switch v := v.(*CreateEcsResp); i { case 0: return &v.state case 1: @@ -731,7 +1774,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResp); i { + switch v := v.(*DeleteEcsReq); i { case 0: return &v.state case 1: @@ -743,6 +1786,90 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteEcsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEcsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEcsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDetailReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDetailResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListAllReq); i { case 0: return &v.state @@ -760,13 +1887,14 @@ func file_idl_pbecs_ecs_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_pbecs_ecs_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, + NumEnums: 1, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, GoTypes: file_idl_pbecs_ecs_proto_goTypes, DependencyIndexes: file_idl_pbecs_ecs_proto_depIdxs, + EnumInfos: file_idl_pbecs_ecs_proto_enumTypes, MessageInfos: file_idl_pbecs_ecs_proto_msgTypes, }.Build() File_idl_pbecs_ecs_proto = out.File diff --git a/lan_trans/idl/pbecs/ecs.pb.gw.go b/lan_trans/idl/pbecs/ecs.pb.gw.go index 425292e..3078b76 100644 --- a/lan_trans/idl/pbecs/ecs.pb.gw.go +++ b/lan_trans/idl/pbecs/ecs.pb.gw.go @@ -31,8 +31,8 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_EcsService_ListEcsDetail_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListDetailReq +func request_EcsService_CreateEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateEcsReq var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -43,6 +43,111 @@ func request_EcsService_ListEcsDetail_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + msg, err := client.CreateEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EcsService_CreateEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateEcsReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateEcs(ctx, &protoReq) + return msg, metadata, err + +} + +func request_EcsService_DeleteEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteEcsReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EcsService_DeleteEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteEcsReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteEcs(ctx, &protoReq) + return msg, metadata, err + +} + +func request_EcsService_UpdateEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateEcsReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EcsService_UpdateEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateEcsReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateEcs(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_EcsService_ListEcsDetail_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_EcsService_ListEcsDetail_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListDetailReq + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsDetail_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.ListEcsDetail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -52,11 +157,10 @@ func local_request_EcsService_ListEcsDetail_0(ctx context.Context, marshaler run var protoReq ListDetailReq var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsDetail_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -65,15 +169,18 @@ func local_request_EcsService_ListEcsDetail_0(ctx context.Context, marshaler run } +var ( + filter_EcsService_ListEcs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_EcsService_ListEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListReq var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -86,11 +193,10 @@ func local_request_EcsService_ListEcs_0(ctx context.Context, marshaler runtime.M var protoReq ListReq var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -103,14 +209,6 @@ func request_EcsService_ListEcsAll_0(ctx context.Context, marshaler runtime.Mars var protoReq ListAllReq var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ListEcsAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -120,14 +218,6 @@ func local_request_EcsService_ListEcsAll_0(ctx context.Context, marshaler runtim var protoReq ListAllReq var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ListEcsAll(ctx, &protoReq) return msg, metadata, err @@ -139,19 +229,87 @@ func local_request_EcsService_ListEcsAll_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEcsServiceHandlerFromEndpoint instead. func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EcsServiceServer) error { - mux.Handle("POST", pattern_EcsService_ListEcsDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_EcsService_CreateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcsDetail_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_CreateEcs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_CreateEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_EcsService_DeleteEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EcsService_DeleteEcs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_DeleteEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_EcsService_UpdateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EcsService_UpdateEcs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_UpdateEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_EcsService_ListEcsDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -163,19 +321,18 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) - mux.Handle("POST", pattern_EcsService_ListEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_EcsService_ListEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcs_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcs_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -187,19 +344,18 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) - mux.Handle("POST", pattern_EcsService_ListEcsAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_EcsService_ListEcsAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_EcsService_ListEcsAll_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -252,17 +408,76 @@ func RegisterEcsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // "EcsServiceClient" to call the correct interceptors. func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EcsServiceClient) error { - mux.Handle("POST", pattern_EcsService_ListEcsDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_EcsService_CreateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail", runtime.WithHTTPPathPattern("/apis/ecs/detail")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcsDetail_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_CreateEcs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_CreateEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_EcsService_DeleteEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/DeleteEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EcsService_DeleteEcs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_DeleteEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_EcsService_UpdateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/UpdateEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EcsService_UpdateEcs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_UpdateEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_EcsService_ListEcsDetail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsDetail") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EcsService_ListEcsDetail_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -273,17 +488,16 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) - mux.Handle("POST", pattern_EcsService_ListEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_EcsService_ListEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs", runtime.WithHTTPPathPattern("/apis/ecs")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcs") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcs_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcs_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -294,17 +508,16 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) - mux.Handle("POST", pattern_EcsService_ListEcsAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_EcsService_ListEcsAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll", runtime.WithHTTPPathPattern("/apis/ecs/all")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/ListEcsAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_EcsService_ListEcsAll_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_EcsService_ListEcsAll_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -319,6 +532,12 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( + pattern_EcsService_CreateEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "create"}, "")) + + pattern_EcsService_DeleteEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "delete"}, "")) + + pattern_EcsService_UpdateEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "update"}, "")) + pattern_EcsService_ListEcsDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "detail"}, "")) pattern_EcsService_ListEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"apis", "ecs"}, "")) @@ -327,6 +546,12 @@ var ( ) var ( + forward_EcsService_CreateEcs_0 = runtime.ForwardResponseMessage + + forward_EcsService_DeleteEcs_0 = runtime.ForwardResponseMessage + + forward_EcsService_UpdateEcs_0 = runtime.ForwardResponseMessage + forward_EcsService_ListEcsDetail_0 = runtime.ForwardResponseMessage forward_EcsService_ListEcs_0 = runtime.ForwardResponseMessage diff --git a/lan_trans/idl/pbecs/ecs_grpc.pb.go b/lan_trans/idl/pbecs/ecs_grpc.pb.go index 228a13c..ccae9cd 100644 --- a/lan_trans/idl/pbecs/ecs_grpc.pb.go +++ b/lan_trans/idl/pbecs/ecs_grpc.pb.go @@ -22,6 +22,12 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type EcsServiceClient interface { + // 创建ECS + CreateEcs(ctx context.Context, in *CreateEcsReq, opts ...grpc.CallOption) (*CreateEcsResp, error) + // 删除ECS + DeleteEcs(ctx context.Context, in *DeleteEcsReq, opts ...grpc.CallOption) (*DeleteEcsResp, error) + // 修改ECS + UpdateEcs(ctx context.Context, in *UpdateEcsReq, opts ...grpc.CallOption) (*UpdateEcsResp, error) // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 ListEcsDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error) // 查询ECS全量 - 根据云类型 @@ -38,6 +44,33 @@ func NewEcsServiceClient(cc grpc.ClientConnInterface) EcsServiceClient { return &ecsServiceClient{cc} } +func (c *ecsServiceClient) CreateEcs(ctx context.Context, in *CreateEcsReq, opts ...grpc.CallOption) (*CreateEcsResp, error) { + out := new(CreateEcsResp) + err := c.cc.Invoke(ctx, "/pbecs.EcsService/CreateEcs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ecsServiceClient) DeleteEcs(ctx context.Context, in *DeleteEcsReq, opts ...grpc.CallOption) (*DeleteEcsResp, error) { + out := new(DeleteEcsResp) + err := c.cc.Invoke(ctx, "/pbecs.EcsService/DeleteEcs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ecsServiceClient) UpdateEcs(ctx context.Context, in *UpdateEcsReq, opts ...grpc.CallOption) (*UpdateEcsResp, error) { + out := new(UpdateEcsResp) + err := c.cc.Invoke(ctx, "/pbecs.EcsService/UpdateEcs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *ecsServiceClient) ListEcsDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error) { out := new(ListDetailResp) err := c.cc.Invoke(ctx, "/pbecs.EcsService/ListEcsDetail", in, out, opts...) @@ -69,6 +102,12 @@ func (c *ecsServiceClient) ListEcsAll(ctx context.Context, in *ListAllReq, opts // All implementations must embed UnimplementedEcsServiceServer // for forward compatibility type EcsServiceServer interface { + // 创建ECS + CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error) + // 删除ECS + DeleteEcs(context.Context, *DeleteEcsReq) (*DeleteEcsResp, error) + // 修改ECS + UpdateEcs(context.Context, *UpdateEcsReq) (*UpdateEcsResp, error) // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 ListEcsDetail(context.Context, *ListDetailReq) (*ListDetailResp, error) // 查询ECS全量 - 根据云类型 @@ -82,6 +121,15 @@ type EcsServiceServer interface { type UnimplementedEcsServiceServer struct { } +func (UnimplementedEcsServiceServer) CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEcs not implemented") +} +func (UnimplementedEcsServiceServer) DeleteEcs(context.Context, *DeleteEcsReq) (*DeleteEcsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteEcs not implemented") +} +func (UnimplementedEcsServiceServer) UpdateEcs(context.Context, *UpdateEcsReq) (*UpdateEcsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEcs not implemented") +} func (UnimplementedEcsServiceServer) ListEcsDetail(context.Context, *ListDetailReq) (*ListDetailResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListEcsDetail not implemented") } @@ -104,6 +152,60 @@ func RegisterEcsServiceServer(s grpc.ServiceRegistrar, srv EcsServiceServer) { s.RegisterService(&EcsService_ServiceDesc, srv) } +func _EcsService_CreateEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEcsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EcsServiceServer).CreateEcs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbecs.EcsService/CreateEcs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EcsServiceServer).CreateEcs(ctx, req.(*CreateEcsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _EcsService_DeleteEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteEcsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EcsServiceServer).DeleteEcs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbecs.EcsService/DeleteEcs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EcsServiceServer).DeleteEcs(ctx, req.(*DeleteEcsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _EcsService_UpdateEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEcsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EcsServiceServer).UpdateEcs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbecs.EcsService/UpdateEcs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EcsServiceServer).UpdateEcs(ctx, req.(*UpdateEcsReq)) + } + return interceptor(ctx, in, info, handler) +} + func _EcsService_ListEcsDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListDetailReq) if err := dec(in); err != nil { @@ -165,6 +267,18 @@ var EcsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbecs.EcsService", HandlerType: (*EcsServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "CreateEcs", + Handler: _EcsService_CreateEcs_Handler, + }, + { + MethodName: "DeleteEcs", + Handler: _EcsService_DeleteEcs_Handler, + }, + { + MethodName: "UpdateEcs", + Handler: _EcsService_UpdateEcs_Handler, + }, { MethodName: "ListEcsDetail", Handler: _EcsService_ListEcsDetail_Handler, diff --git a/lan_trans/idl/pbpod/pod.pb.gw.go b/lan_trans/idl/pbpod/pod.pb.gw.go index 8aed6f3..8a65b39 100644 --- a/lan_trans/idl/pbpod/pod.pb.gw.go +++ b/lan_trans/idl/pbpod/pod.pb.gw.go @@ -269,13 +269,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_CreatePods_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_CreatePods_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -293,13 +292,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_CreatePod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_CreatePod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -317,13 +315,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_DeletePod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_DeletePod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -341,13 +338,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_UpdatePod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_UpdatePod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -365,13 +361,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodDetail_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodDetail_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -389,13 +384,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPod_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPod_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -413,13 +407,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PodService_ListPodAll_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PodService_ListPodAll_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -476,13 +469,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_CreatePods_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_CreatePods_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -497,13 +489,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_CreatePod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_CreatePod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -518,13 +509,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_DeletePod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_DeletePod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -539,13 +529,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_UpdatePod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_UpdatePod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -560,13 +549,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodDetail_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodDetail_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -581,13 +569,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPod_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPod_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -602,13 +589,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PodService_ListPodAll_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PodService_ListPodAll_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/lan_trans/idl/pbtenant/tenant.pb.go b/lan_trans/idl/pbtenant/tenant.pb.go index 8ad7fe3..818efb5 100644 --- a/lan_trans/idl/pbtenant/tenant.pb.go +++ b/lan_trans/idl/pbtenant/tenant.pb.go @@ -258,26 +258,28 @@ func (AliRegionId) EnumDescriptor() ([]byte, []int) { type TencentRegionId int32 const ( - TencentRegionId_tc_all TencentRegionId = 0 - TencentRegionId_tc_ap_bangkok TencentRegionId = 1 // 曼谷 - TencentRegionId_tc_ap_beijing TencentRegionId = 2 // 北京 - TencentRegionId_tc_ap_chengdu TencentRegionId = 3 // 成都 - TencentRegionId_tc_ap_chongqing TencentRegionId = 4 // 重庆 - TencentRegionId_tc_ap_guangzhou TencentRegionId = 5 // 广州 - TencentRegionId_tc_ap_guangzhou_open TencentRegionId = 6 // 广州Open - TencentRegionId_tc_ap_hongkong TencentRegionId = 7 // 中国香港 - TencentRegionId_tc_ap_mumbai TencentRegionId = 8 // 孟买 - TencentRegionId_tc_ap_seoul TencentRegionId = 9 // 首尔 - TencentRegionId_tc_ap_shanghai TencentRegionId = 10 // 上海 - TencentRegionId_tc_ap_shanghai_fsi TencentRegionId = 11 // 上海金融 - TencentRegionId_tc_ap_shenzhen_fsi TencentRegionId = 12 // 深圳金融 - TencentRegionId_tc_ap_singapore TencentRegionId = 13 // 新加坡 - TencentRegionId_tc_ap_tokyo TencentRegionId = 14 // 东京 - TencentRegionId_tc_eu_frankfurt TencentRegionId = 15 // 法兰克福 - TencentRegionId_tc_eu_moscow TencentRegionId = 16 // 莫斯科 - TencentRegionId_tc_na_ashburn TencentRegionId = 17 // 阿什本 - TencentRegionId_tc_na_siliconvalley TencentRegionId = 18 // 硅谷 - TencentRegionId_tc_na_toronto TencentRegionId = 19 // 多伦多 + TencentRegionId_tc_all TencentRegionId = 0 + TencentRegionId_tc_ap_bangkok TencentRegionId = 1 //亚太东南(曼谷) + TencentRegionId_tc_ap_beijing TencentRegionId = 2 //华北地区(北京) + TencentRegionId_tc_ap_chengdu TencentRegionId = 3 //西南地区(成都) + TencentRegionId_tc_ap_chongqing TencentRegionId = 4 //西南地区(重庆) + TencentRegionId_tc_ap_guangzhou TencentRegionId = 5 //华南地区(广州) + TencentRegionId_tc_ap_hongkong TencentRegionId = 6 //港澳台地区(中国香港) + TencentRegionId_tc_ap_jakarta TencentRegionId = 7 //亚太东南(雅加达) + TencentRegionId_tc_ap_mumbai TencentRegionId = 8 // 亚太南部(孟买) + TencentRegionId_tc_ap_nanjing TencentRegionId = 9 //华东地区(南京) + TencentRegionId_tc_ap_seoul TencentRegionId = 10 //亚太东北(首尔) + TencentRegionId_tc_ap_shanghai TencentRegionId = 11 //华东地区(上海) + TencentRegionId_tc_ap_shanghai_fsi TencentRegionId = 12 //华东地区(上海金融) + TencentRegionId_tc_ap_shenzhen_fsi TencentRegionId = 13 //华南地区(深圳金融) + TencentRegionId_tc_ap_singapore TencentRegionId = 14 //亚太东南(新加坡) + TencentRegionId_tc_ap_tokyo TencentRegionId = 15 //亚太东北(东京) + TencentRegionId_tc_eu_frankfurt TencentRegionId = 16 //欧洲地区(法兰克福) + TencentRegionId_tc_eu_moscow TencentRegionId = 17 //欧洲地区(莫斯科) + TencentRegionId_tc_na_ashburn TencentRegionId = 18 //美国东部(弗吉尼亚) + TencentRegionId_tc_na_siliconvalley TencentRegionId = 19 //美国西部(硅谷) + TencentRegionId_tc_na_toronto TencentRegionId = 20 //北美地区(多伦多) + TencentRegionId_tc_sa_saopaulo TencentRegionId = 21 //南美地区(圣保罗) ) // Enum value maps for TencentRegionId. @@ -289,42 +291,46 @@ var ( 3: "tc_ap_chengdu", 4: "tc_ap_chongqing", 5: "tc_ap_guangzhou", - 6: "tc_ap_guangzhou_open", - 7: "tc_ap_hongkong", + 6: "tc_ap_hongkong", + 7: "tc_ap_jakarta", 8: "tc_ap_mumbai", - 9: "tc_ap_seoul", - 10: "tc_ap_shanghai", - 11: "tc_ap_shanghai_fsi", - 12: "tc_ap_shenzhen_fsi", - 13: "tc_ap_singapore", - 14: "tc_ap_tokyo", - 15: "tc_eu_frankfurt", - 16: "tc_eu_moscow", - 17: "tc_na_ashburn", - 18: "tc_na_siliconvalley", - 19: "tc_na_toronto", + 9: "tc_ap_nanjing", + 10: "tc_ap_seoul", + 11: "tc_ap_shanghai", + 12: "tc_ap_shanghai_fsi", + 13: "tc_ap_shenzhen_fsi", + 14: "tc_ap_singapore", + 15: "tc_ap_tokyo", + 16: "tc_eu_frankfurt", + 17: "tc_eu_moscow", + 18: "tc_na_ashburn", + 19: "tc_na_siliconvalley", + 20: "tc_na_toronto", + 21: "tc_sa_saopaulo", } TencentRegionId_value = map[string]int32{ - "tc_all": 0, - "tc_ap_bangkok": 1, - "tc_ap_beijing": 2, - "tc_ap_chengdu": 3, - "tc_ap_chongqing": 4, - "tc_ap_guangzhou": 5, - "tc_ap_guangzhou_open": 6, - "tc_ap_hongkong": 7, - "tc_ap_mumbai": 8, - "tc_ap_seoul": 9, - "tc_ap_shanghai": 10, - "tc_ap_shanghai_fsi": 11, - "tc_ap_shenzhen_fsi": 12, - "tc_ap_singapore": 13, - "tc_ap_tokyo": 14, - "tc_eu_frankfurt": 15, - "tc_eu_moscow": 16, - "tc_na_ashburn": 17, - "tc_na_siliconvalley": 18, - "tc_na_toronto": 19, + "tc_all": 0, + "tc_ap_bangkok": 1, + "tc_ap_beijing": 2, + "tc_ap_chengdu": 3, + "tc_ap_chongqing": 4, + "tc_ap_guangzhou": 5, + "tc_ap_hongkong": 6, + "tc_ap_jakarta": 7, + "tc_ap_mumbai": 8, + "tc_ap_nanjing": 9, + "tc_ap_seoul": 10, + "tc_ap_shanghai": 11, + "tc_ap_shanghai_fsi": 12, + "tc_ap_shenzhen_fsi": 13, + "tc_ap_singapore": 14, + "tc_ap_tokyo": 15, + "tc_eu_frankfurt": 16, + "tc_eu_moscow": 17, + "tc_na_ashburn": 18, + "tc_na_siliconvalley": 19, + "tc_na_toronto": 20, + "tc_sa_saopaulo": 21, } ) @@ -729,7 +735,7 @@ var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x65, - 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x16, 0x2a, 0xa1, 0x03, 0x0a, 0x0f, 0x54, + 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x16, 0x2a, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, 0x6f, 0x6b, 0x10, 0x01, 0x12, 0x11, 0x0a, @@ -737,25 +743,27 @@ var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, - 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x05, 0x12, 0x18, 0x0a, - 0x14, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, - 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, - 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, - 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x0f, 0x0a, - 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, 0x09, 0x12, 0x12, - 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, - 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, - 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, - 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, 0x66, 0x73, 0x69, - 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x67, - 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0d, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, - 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0e, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x65, - 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x0f, 0x12, 0x10, 0x0a, - 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, 0x10, 0x10, 0x12, - 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, 0x75, 0x72, 0x6e, - 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, 0x69, 0x6c, 0x69, - 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x12, 0x12, 0x11, 0x0a, 0x0d, 0x74, - 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, 0x13, 0x2a, 0xfb, + 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x05, 0x12, 0x12, 0x0a, + 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b, 0x6f, 0x6e, 0x67, 0x10, + 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6a, 0x61, 0x6b, 0x61, 0x72, + 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, + 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, + 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, + 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, + 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x0b, 0x12, 0x16, + 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, + 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, + 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0d, 0x12, 0x13, + 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, + 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, + 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, + 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, + 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, 0x10, 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x74, + 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, 0x75, 0x72, 0x6e, 0x10, 0x12, 0x12, 0x17, + 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, + 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, + 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, 0x14, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, + 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, 0x75, 0x6c, 0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x01, diff --git a/lan_trans/openapiv2/idl/demo/demo.swagger.json b/lan_trans/openapiv2/idl/demo/demo.swagger.json index d7db3be..a969e31 100644 --- a/lan_trans/openapiv2/idl/demo/demo.swagger.json +++ b/lan_trans/openapiv2/idl/demo/demo.swagger.json @@ -68,11 +68,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json index 017208a..1b1965b 100644 --- a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json +++ b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json @@ -17,7 +17,7 @@ ], "paths": { "/apis/ecs": { - "post": { + "get": { "summary": "查询ECS全量 - 根据云类型", "operationId": "EcsService_ListEcs", "responses": { @@ -36,12 +36,18 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/pbecsListReq" - } + "name": "provider", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ali", + "tencent", + "huawei", + "aws" + ], + "default": "ali" } ], "tags": [ @@ -50,7 +56,7 @@ } }, "/apis/ecs/all": { - "post": { + "get": { "summary": "查询所有云的ECS", "operationId": "EcsService_ListEcsAll", "responses": { @@ -67,13 +73,69 @@ } } }, + "tags": [ + "EcsService" + ] + } + }, + "/apis/ecs/create": { + "post": { + "summary": "创建ECS", + "operationId": "EcsService_CreateEcs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbecsCreateEcsResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/pbecsListAllReq" + "$ref": "#/definitions/pbecsCreateEcsReq" + } + } + ], + "tags": [ + "EcsService" + ] + } + }, + "/apis/ecs/delete": { + "post": { + "summary": "删除ECS", + "operationId": "EcsService_DeleteEcs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbecsDeleteEcsResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/pbecsDeleteEcsReq" } } ], @@ -83,7 +145,7 @@ } }, "/apis/ecs/detail": { - "post": { + "get": { "summary": "查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件", "operationId": "EcsService_ListEcsDetail", "responses": { @@ -100,13 +162,90 @@ } } }, + "parameters": [ + { + "name": "provider", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ali", + "tencent", + "huawei", + "aws" + ], + "default": "ali" + }, + { + "name": "accountName", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "regionId", + "description": "区域Id,参考 tenant.proto 中的各个云的区域.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageNumber", + "description": "分页相关参数,页码.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageSize", + "description": "分页相关参数,每页数量.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "nextToken", + "description": "分页相关参数,下一页的token.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "EcsService" + ] + } + }, + "/apis/ecs/update": { + "put": { + "summary": "修改ECS", + "operationId": "EcsService_UpdateEcs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbecsUpdateEcsResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/pbecsListDetailReq" + "$ref": "#/definitions/pbecsUpdateEcsReq" } } ], @@ -117,6 +256,196 @@ } }, "definitions": { + "pbecsCreateEcsReq": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云类型" + }, + "accountName": { + "type": "string", + "title": "账号名称" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "地域,数据中心" + }, + "imageId": { + "type": "string", + "title": "镜像id" + }, + "instanceChargeType": { + "type": "string", + "title": "实例的付费方式" + }, + "instanceType": { + "type": "string", + "title": "实例的资源规格" + }, + "securityGroupId": { + "type": "string", + "title": "安全组id" + }, + "vSwitchId": { + "type": "string", + "title": "交换机id" + }, + "instanceName": { + "type": "string", + "title": "实例名称" + }, + "description": { + "type": "string", + "title": "实例描述" + }, + "zoneId": { + "type": "string", + "title": "可用区id" + }, + "systemDisk": { + "$ref": "#/definitions/pbecsSystemDisk", + "title": "系统磁盘" + }, + "amount": { + "type": "integer", + "format": "int32", + "title": "创建ECS的数量" + }, + "dryRun": { + "type": "string", + "title": "预检此次请求,为true时请求通过,则返回 Request validation has been passed with DryRun flag set" + }, + "category": { + "type": "string", + "title": "数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。" + }, + "internetChargeType": { + "$ref": "#/definitions/pbecsInternetChargeType", + "title": "网络计费类型。取值范围:PayByBandwidth:按固定带宽计费。PayByTraffic(默认):按使用流量计费" + }, + "internetMaxBandwidthOut": { + "type": "integer", + "format": "int32", + "title": "公网入带宽最大值,单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0,则自动为实例分配公网IP。" + }, + "vpcId": { + "type": "string", + "title": "vpc id 华为云必需" + }, + "subnetId": { + "type": "string", + "title": "待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需" + } + } + }, + "pbecsCreateEcsResp": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云名称" + }, + "accountName": { + "type": "string", + "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "区域Id,参考 tenant.proto 中的各个云的区域" + }, + "requestId": { + "type": "string", + "title": "请求ID" + }, + "orderId": { + "type": "string", + "title": "订单id" + }, + "tradePrice": { + "type": "number", + "format": "float", + "title": "订单成交价" + }, + "instanceIdSets": { + "type": "array", + "items": { + "type": "string" + }, + "title": "实例ID(InstanceIdSet)列表" + }, + "finished": { + "type": "boolean", + "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" + } + } + }, + "pbecsDeleteEcsReq": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云类型" + }, + "accountName": { + "type": "string", + "title": "账号名称" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "地域,数据中心" + }, + "dryRun": { + "type": "string", + "title": "是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。\nfalse(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。" + }, + "force": { + "type": "string", + "title": "Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。\nfalse(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态" + }, + "terminateSubscription": { + "type": "string", + "title": "是否释放已到期的包年包月实例 true,false" + }, + "instanceIds": { + "type": "string", + "title": "实例ID数组以”,“分割。列:i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216" + }, + "deletePublicip": { + "type": "string", + "title": "配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。\n取值为true或false。默认false;华为云" + }, + "deleteVolume": { + "type": "string", + "title": "配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。\n取值为true或false。默认false;华为云" + } + } + }, + "pbecsDeleteEcsResp": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云名称" + }, + "accountName": { + "type": "string", + "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "区域Id,参考 tenant.proto 中的各个云的区域" + }, + "requestId": { + "type": "string", + "title": "请求ID" + } + } + }, "pbecsEcsInstance": { "type": "object", "properties": { @@ -192,46 +521,21 @@ "type": "string", "title": "资源组id" }, - "chargeType": { + "instanceChargeType": { "type": "string", "title": "收费类型" } } }, - "pbecsListAllReq": { - "type": "object" - }, - "pbecsListDetailReq": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/pbtenantCloudProvider", - "title": "云名称" - }, - "accountName": { - "type": "string", - "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" - }, - "regionId": { - "type": "integer", - "format": "int32", - "title": "区域Id,参考 tenant.proto 中的各个云的区域" - }, - "pageNumber": { - "type": "integer", - "format": "int32", - "title": "分页相关参数,页码" - }, - "pageSize": { - "type": "integer", - "format": "int32", - "title": "分页相关参数,每页数量" - }, - "nextToken": { - "type": "string", - "title": "分页相关参数,下一页的token" - } - } + "pbecsInternetChargeType": { + "type": "string", + "enum": [ + "PayByBandwidth", + "PayByTraffic" + ], + "default": "PayByBandwidth", + "description": "- PayByBandwidth: 按固定带宽计费。\n - PayByTraffic: (默认):按使用流量计费", + "title": "网络计费类型" }, "pbecsListDetailResp": { "type": "object", @@ -267,15 +571,6 @@ } } }, - "pbecsListReq": { - "type": "object", - "properties": { - "provider": { - "$ref": "#/definitions/pbtenantCloudProvider", - "title": "云名称" - } - } - }, "pbecsListResp": { "type": "object", "properties": { @@ -288,6 +583,99 @@ } } }, + "pbecsSystemDisk": { + "type": "object", + "properties": { + "size": { + "type": "string", + "title": "系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小}" + }, + "category": { + "type": "string", + "title": "系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。" + }, + "diskName": { + "type": "string", + "title": "系统盘名称" + }, + "description": { + "type": "string", + "title": "系统盘描述" + }, + "performanceLevel": { + "type": "string", + "title": "创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:PL0:单盘最高随机读写IOPS 1万。PL1(默认):单盘最高随机读写IOPS 5万。PL2:单盘最高随机读写IOPS 10万。PL3:单盘最高随机读写IOPS 100万。" + }, + "autoSnapshotPolicyId": { + "type": "string", + "title": "系统盘采用的自动快照策略ID。" + } + } + }, + "pbecsUpdateEcsReq": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云类型" + }, + "accountName": { + "type": "string", + "title": "账号名称" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "地域,数据中心" + }, + "instanceIds": { + "type": "string", + "title": "实例id" + }, + "password": { + "type": "string", + "title": "实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。" + }, + "hostName": { + "type": "string", + "title": "操作系统的主机名" + }, + "instanceName": { + "type": "string", + "title": "实例名称" + }, + "description": { + "type": "string", + "title": "实例描述" + }, + "securityGroupIds": { + "type": "string", + "title": "实例重新加入的安全组列表,安全组ID不能重复。以”,“分割" + } + } + }, + "pbecsUpdateEcsResp": { + "type": "object", + "properties": { + "provider": { + "$ref": "#/definitions/pbtenantCloudProvider", + "title": "云名称" + }, + "accountName": { + "type": "string", + "title": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户" + }, + "regionId": { + "type": "integer", + "format": "int32", + "title": "区域Id,参考 tenant.proto 中的各个云的区域" + }, + "requestId": { + "type": "string", + "title": "请求ID" + } + } + }, "pbtenantCloudProvider": { "type": "string", "enum": [ @@ -303,11 +691,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index 97849a0..5e4c9ea 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", "in": "query", "required": false, "type": "string", @@ -198,7 +198,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", "in": "query", "required": false, "type": "string", @@ -212,14 +212,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域", + "description": "区域Id,参考 tenant.proto 中的各个云的区域.", "in": "query", "required": false, "type": "integer", @@ -227,7 +227,7 @@ }, { "name": "regionName", - "description": "区域名称,各云厂商自定义的region name", + "description": "区域名称,各云厂商自定义的region name.", "in": "query", "required": false, "type": "integer", @@ -235,7 +235,7 @@ }, { "name": "podId", - "description": "podID", + "description": "podID.", "in": "query", "required": false, "type": "integer", @@ -243,7 +243,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码", + "description": "分页相关参数,页码.", "in": "query", "required": false, "type": "integer", @@ -251,7 +251,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量", + "description": "分页相关参数,每页数量.", "in": "query", "required": false, "type": "integer", @@ -259,14 +259,14 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token", + "description": "分页相关参数,下一页的token.", "in": "query", "required": false, "type": "string" }, { "name": "namespace", - "description": "namespace", + "description": "namespace.", "in": "query", "required": false, "type": "string" @@ -666,11 +666,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object", diff --git a/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json b/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json index 0a73b35..636ce73 100644 --- a/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json +++ b/lan_trans/openapiv2/idl/pbtenant/tenant.swagger.json @@ -15,11 +15,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object", From aff1665783b95738f16a5b366ec8a5da688c1eb5 Mon Sep 17 00:00:00 2001 From: devad Date: Thu, 14 Apr 2022 20:10:02 +0800 Subject: [PATCH 2/3] ECS impl Signed-off-by: devad --- adaptor/vm_adaptor/server/ecs/list.go | 52 +- adaptor/vm_adaptor/service/ecser/ali.go | 15 +- adaptor/vm_adaptor/service/ecser/huawei.go | 14 +- adaptor/vm_adaptor/service/ecser/tencent.go | 21 +- common/server/server_ecs.go | 10 + idl/pbecs/ecs.proto | 30 + lan_trans/idl/pbecs/ecs.pb.go | 773 +++++++++++------- lan_trans/idl/pbecs/ecs.pb.gw.go | 81 ++ lan_trans/idl/pbecs/ecs_grpc.pb.go | 38 + .../openapiv2/idl/pbecs/ecs.swagger.json | 89 +- 10 files changed, 761 insertions(+), 362 deletions(-) diff --git a/adaptor/vm_adaptor/server/ecs/list.go b/adaptor/vm_adaptor/server/ecs/list.go index 1d0507d..8957ffd 100644 --- a/adaptor/vm_adaptor/server/ecs/list.go +++ b/adaptor/vm_adaptor/server/ecs/list.go @@ -4,34 +4,50 @@ import ( "context" "sync" + "github.com/golang/glog" + "github.com/pkg/errors" "gitlink.org.cn/JCCE/PCM/adaptor/vm_adaptor/service/ecser" "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" - - "github.com/golang/glog" - "github.com/pkg/errors" ) -//CreateMultipleEcs 创建多家云ECS -func CreateMultipleEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { +//CreateMultipleEcs 创建多云ECS +func CreateMultipleEcs(ctx context.Context, reqs *pbecs.CreateEcsMultipleReq) (*pbecs.CreateEcsMultipleResp, error) { var ( - ecs ecser.Ecser + wg sync.WaitGroup + requestIds = make([]string, 0) ) - tenanters, err := tenanter.GetTenanters(req.Provider) - region, err := tenanter.NewRegion(req.Provider, req.RegionId) - if err != nil { - return nil, errors.Wrap(err, "get tenanters failed") - } - for _, tenanter := range tenanters { - if req.AccountName == "" || tenanter.AccountName() == req.AccountName { - if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil { - return nil, errors.WithMessage(err, "NewEcsClient error") + wg.Add(len(reqs.GetCreateEcsReqs())) + c := make(chan string, len(reqs.GetCreateEcsReqs())) + for _, k := range reqs.GetCreateEcsReqs() { + k := k + go func() { + defer wg.Done() + resp, err := CreateEcs(ctx, k) + if err != nil { + glog.Errorf(k.Provider.String()+"CreateEcs error: %v", err) + c <- k.Provider.String() + return } - break - } + c <- resp.GetRequestId() + }() } - return ecs.CreateEcs(ctx, req) + go func() { + defer close(c) + wg.Wait() + }() + for v := range c { + requestIds = append(requestIds, v) + } + isFinished := false + if len(requestIds) > 0 { + isFinished = true + } + return &pbecs.CreateEcsMultipleResp{ + RequestId: requestIds, + Finished: isFinished, + }, nil } func CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { diff --git a/adaptor/vm_adaptor/service/ecser/ali.go b/adaptor/vm_adaptor/service/ecser/ali.go index ff62b43..5f22132 100644 --- a/adaptor/vm_adaptor/service/ecser/ali.go +++ b/adaptor/vm_adaptor/service/ecser/ali.go @@ -4,20 +4,16 @@ import ( "context" "sync" - "github.com/alibabacloud-go/tea/tea" - - "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" - openapi "github.com/alibabacloud-go/darabonba-openapi/client" - - "github.com/golang/glog" - string_ "github.com/alibabacloud-go/darabonba-string/client" aliecs "github.com/alibabacloud-go/ecs-20140526/v2/client" util "github.com/alibabacloud-go/tea-utils/service" + "github.com/alibabacloud-go/tea/tea" + "github.com/golang/glog" "github.com/pkg/errors" "gitlink.org.cn/JCCE/PCM/common/tenanter" "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" ) var aliClientMutex sync.Mutex @@ -90,7 +86,6 @@ func (ecs *AliEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbe InstanceChargeType: &InstanceChargeType, } // 创建并运行实例 - glog.Infof("CreateEcs req: %+v", req) resp, err := ecs.cli.RunInstances(request) if err != nil { return nil, errors.Wrap(err, "Ali Create ECS error") @@ -100,6 +95,8 @@ func (ecs *AliEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbe if len(resp.Body.InstanceIdSets.InstanceIdSet) > 0 { isFinished = true } + glog.Infof("--------------------阿里ECS实例创建成功--------------------") + glog.Infof(*util.ToJSONString(util.ToMap(resp))) requestId := *resp.Body.RequestId //订单ID。该参数只有创建包年包月ECS实例(请求参数InstanceChargeType=PrePaid)时有返回值。 OrderId := "" @@ -117,7 +114,7 @@ func (ecs *AliEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbe return &pbecs.CreateEcsResp{ OrderId: OrderId, TradePrice: TradePrice, - RequestId: requestId, + RequestId: "Ali ECS RequestId: " + requestId, InstanceIdSets: InstanceIds, Finished: isFinished, }, nil diff --git a/adaptor/vm_adaptor/service/ecser/huawei.go b/adaptor/vm_adaptor/service/ecser/huawei.go index 8f182a3..92c925e 100644 --- a/adaptor/vm_adaptor/service/ecser/huawei.go +++ b/adaptor/vm_adaptor/service/ecser/huawei.go @@ -4,17 +4,10 @@ import ( "context" "strconv" - "github.com/golang/glog" - string_ "github.com/alibabacloud-go/darabonba-string/client" - util "github.com/alibabacloud-go/tea-utils/service" "github.com/alibabacloud-go/tea/tea" - - "gitlink.org.cn/JCCE/PCM/common/tenanter" - "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" - "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" - + "github.com/golang/glog" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" hwecs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2/model" @@ -23,6 +16,9 @@ import ( iammodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3/model" iamregion "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3/region" "github.com/pkg/errors" + "gitlink.org.cn/JCCE/PCM/common/tenanter" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" ) type HuaweiEcs struct { @@ -133,7 +129,7 @@ func (ecs *HuaweiEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (* } return &pbecs.CreateEcsResp{ OrderId: OrderId, - RequestId: *resp.JobId, + RequestId: "Huawei ECS RequestId: " + *resp.JobId, InstanceIdSets: InstanceIds, Finished: isFinished, }, nil diff --git a/adaptor/vm_adaptor/service/ecser/tencent.go b/adaptor/vm_adaptor/service/ecser/tencent.go index 4907f52..953d885 100644 --- a/adaptor/vm_adaptor/service/ecser/tencent.go +++ b/adaptor/vm_adaptor/service/ecser/tencent.go @@ -4,21 +4,16 @@ import ( "context" string_ "github.com/alibabacloud-go/darabonba-string/client" - util "github.com/alibabacloud-go/tea-utils/service" "github.com/alibabacloud-go/tea/tea" - "github.com/golang/glog" - - "gitlink.org.cn/JCCE/PCM/common/tenanter" - - "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" - "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" - "github.com/pkg/errors" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" + "gitlink.org.cn/JCCE/PCM/common/tenanter" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs" + "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbtenant" ) type TencentCvm struct { @@ -68,7 +63,6 @@ func (ecs *TencentCvm) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) ( Zone: &ZoneId, } resp, err := ecs.cli.RunInstances(request) - glog.Infof("CreateEcs req: %+v", req) if err != nil { return nil, errors.Wrap(err, "Tencent Create ECS error") } @@ -80,8 +74,10 @@ func (ecs *TencentCvm) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) ( if len(resp.Response.InstanceIdSet) > 0 { isFinished = true } + glog.Infof("--------------------腾讯ECS实例创建成功--------------------") + glog.Infof(*util.ToJSONString(util.ToMap(resp))) return &pbecs.CreateEcsResp{ - RequestId: *resp.Response.RequestId, + RequestId: "Tencent ECS RequestId: " + *resp.Response.RequestId, InstanceIdSets: InstanceIds, Finished: isFinished, }, nil @@ -100,9 +96,10 @@ func (ecs *TencentCvm) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) ( if err != nil { return nil, errors.Wrap(err, "Tencent Delete ECS error") } - glog.Infof("--------------------实例释放成功--------------------") + glog.Infof("--------------------腾讯ECS实例释放成功--------------------") glog.Infof(*util.ToJSONString(util.ToMap(resp))) return &pbecs.DeleteEcsResp{ + Provider: req.Provider, RequestId: *resp.Response.RequestId, AccountName: req.AccountName, RegionId: req.RegionId, @@ -124,7 +121,7 @@ func (ecs *TencentCvm) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) ( if err != nil { return nil, errors.Wrap(err, "Tencent Update ECS error") } - glog.Infof("--------------------实例修改成功--------------------") + glog.Infof("--------------------腾讯ECS实例修改成功--------------------") glog.Infof(*util.ToJSONString(util.ToMap(resp))) return &pbecs.UpdateEcsResp{ RequestId: *resp.Response.RequestId, diff --git a/common/server/server_ecs.go b/common/server/server_ecs.go index b31a809..bb40a2f 100644 --- a/common/server/server_ecs.go +++ b/common/server/server_ecs.go @@ -11,6 +11,16 @@ import ( "google.golang.org/grpc/status" ) +// CreateMultipleEcs return create cloudy ecs +func (s *Server) CreateMultipleEcs(ctx context.Context, reqs *pbecs.CreateEcsMultipleReq) (*pbecs.CreateEcsMultipleResp, error) { + resp, err := ecs.CreateMultipleEcs(ctx, reqs) + if err != nil { + glog.Errorf("ListEcsDetail error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + // CreateEcs return create ecs func (s *Server) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error) { resp, err := ecs.CreateEcs(ctx, req) diff --git a/idl/pbecs/ecs.proto b/idl/pbecs/ecs.proto index 82ec3ea..e282082 100644 --- a/idl/pbecs/ecs.proto +++ b/idl/pbecs/ecs.proto @@ -6,6 +6,7 @@ option go_package = "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbecs"; import "idl/pbtenant/tenant.proto"; import "google/api/annotations.proto"; +//ECS 实例 message EcsInstance { // 云类型 pbtenant.CloudProvider provider = 1; @@ -51,6 +52,19 @@ enum InternetChargeType { PayByTraffic = 1; } +//创建多家云ECS入参 +message CreateEcsMultipleReq { + repeated CreateEcsReq createEcsReqs = 1; +} +//创建多家云ECS返回值 +message CreateEcsMultipleResp { + // 请求ID + repeated string request_id = 1; + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + bool finished = 2; +} + +//创建ECS入参 message CreateEcsReq { // 云类型 pbtenant.CloudProvider provider = 1; @@ -92,6 +106,7 @@ message CreateEcsReq { string subnet_id =19; } +//系统磁盘 message SystemDisk { //系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小} string size = 1; @@ -107,6 +122,7 @@ message SystemDisk { string auto_snapshot_policy_id = 6; } +//创建ECS返回值 message CreateEcsResp { // 云名称 pbtenant.CloudProvider provider = 1; @@ -126,6 +142,7 @@ message CreateEcsResp { bool finished = 8; } +//删除ECS入参 message DeleteEcsReq { // 云类型 pbtenant.CloudProvider provider = 1; @@ -151,6 +168,7 @@ message DeleteEcsReq { string delete_volume = 9; } +//删除ECS返回值 message DeleteEcsResp { // 云名称 pbtenant.CloudProvider provider = 1; @@ -162,6 +180,7 @@ message DeleteEcsResp { string request_id = 4; } +//更新ECS入参 message UpdateEcsReq { // 云类型 pbtenant.CloudProvider provider = 1; @@ -183,6 +202,7 @@ message UpdateEcsReq { string security_group_ids = 9; } +//更新ECS返回值 message UpdateEcsResp { // 云名称 pbtenant.CloudProvider provider = 1; @@ -194,6 +214,7 @@ message UpdateEcsResp { string request_id = 4; } +//查询ECS入参 message ListDetailReq { // 云名称 pbtenant.CloudProvider provider = 1; @@ -209,6 +230,7 @@ message ListDetailReq { string next_token = 6; } +//查询ECS返回值 message ListDetailResp { // Ecs 机器集合 repeated EcsInstance ecses = 1; @@ -244,6 +266,14 @@ message ListAllReq{} // 亚马逊云 - EC2 service EcsService { + // 创建多家云ECS + rpc CreateMultipleEcs(CreateEcsMultipleReq) returns (CreateEcsMultipleResp) { + option (google.api.http) = { + post : "/apis/ecs/createMultiple" + body : "*" + }; + } + // 创建ECS rpc CreateEcs(CreateEcsReq) returns (CreateEcsResp) { option (google.api.http) = { diff --git a/lan_trans/idl/pbecs/ecs.pb.go b/lan_trans/idl/pbecs/ecs.pb.go index 3131a72..1bd2bc1 100644 --- a/lan_trans/idl/pbecs/ecs.pb.go +++ b/lan_trans/idl/pbecs/ecs.pb.go @@ -71,6 +71,7 @@ func (InternetChargeType) EnumDescriptor() ([]byte, []int) { return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{0} } +//ECS 实例 type EcsInstance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -263,6 +264,113 @@ func (x *EcsInstance) GetInstanceChargeType() string { return "" } +//创建多家云ECS入参 +type CreateEcsMultipleReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreateEcsReqs []*CreateEcsReq `protobuf:"bytes,1,rep,name=createEcsReqs,proto3" json:"createEcsReqs,omitempty"` +} + +func (x *CreateEcsMultipleReq) Reset() { + *x = CreateEcsMultipleReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEcsMultipleReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEcsMultipleReq) ProtoMessage() {} + +func (x *CreateEcsMultipleReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEcsMultipleReq.ProtoReflect.Descriptor instead. +func (*CreateEcsMultipleReq) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateEcsMultipleReq) GetCreateEcsReqs() []*CreateEcsReq { + if x != nil { + return x.CreateEcsReqs + } + return nil +} + +//创建多家云ECS返回值 +type CreateEcsMultipleResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 请求ID + RequestId []string `protobuf:"bytes,1,rep,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 + Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` +} + +func (x *CreateEcsMultipleResp) Reset() { + *x = CreateEcsMultipleResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEcsMultipleResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEcsMultipleResp) ProtoMessage() {} + +func (x *CreateEcsMultipleResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEcsMultipleResp.ProtoReflect.Descriptor instead. +func (*CreateEcsMultipleResp) Descriptor() ([]byte, []int) { + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateEcsMultipleResp) GetRequestId() []string { + if x != nil { + return x.RequestId + } + return nil +} + +func (x *CreateEcsMultipleResp) GetFinished() bool { + if x != nil { + return x.Finished + } + return false +} + +//创建ECS入参 type CreateEcsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -311,7 +419,7 @@ type CreateEcsReq struct { func (x *CreateEcsReq) Reset() { *x = CreateEcsReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + mi := &file_idl_pbecs_ecs_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -324,7 +432,7 @@ func (x *CreateEcsReq) String() string { func (*CreateEcsReq) ProtoMessage() {} func (x *CreateEcsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[1] + mi := &file_idl_pbecs_ecs_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -337,7 +445,7 @@ func (x *CreateEcsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateEcsReq.ProtoReflect.Descriptor instead. func (*CreateEcsReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{1} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{3} } func (x *CreateEcsReq) GetProvider() pbtenant.CloudProvider { @@ -473,6 +581,7 @@ func (x *CreateEcsReq) GetSubnetId() string { return "" } +//系统磁盘 type SystemDisk struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -495,7 +604,7 @@ type SystemDisk struct { func (x *SystemDisk) Reset() { *x = SystemDisk{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + mi := &file_idl_pbecs_ecs_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -508,7 +617,7 @@ func (x *SystemDisk) String() string { func (*SystemDisk) ProtoMessage() {} func (x *SystemDisk) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[2] + mi := &file_idl_pbecs_ecs_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -521,7 +630,7 @@ func (x *SystemDisk) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemDisk.ProtoReflect.Descriptor instead. func (*SystemDisk) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{2} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{4} } func (x *SystemDisk) GetSize() string { @@ -566,6 +675,7 @@ func (x *SystemDisk) GetAutoSnapshotPolicyId() string { return "" } +//创建ECS返回值 type CreateEcsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -592,7 +702,7 @@ type CreateEcsResp struct { func (x *CreateEcsResp) Reset() { *x = CreateEcsResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[3] + mi := &file_idl_pbecs_ecs_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -605,7 +715,7 @@ func (x *CreateEcsResp) String() string { func (*CreateEcsResp) ProtoMessage() {} func (x *CreateEcsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[3] + mi := &file_idl_pbecs_ecs_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -618,7 +728,7 @@ func (x *CreateEcsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateEcsResp.ProtoReflect.Descriptor instead. func (*CreateEcsResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{3} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{5} } func (x *CreateEcsResp) GetProvider() pbtenant.CloudProvider { @@ -677,6 +787,7 @@ func (x *CreateEcsResp) GetFinished() bool { return false } +//删除ECS入参 type DeleteEcsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -709,7 +820,7 @@ type DeleteEcsReq struct { func (x *DeleteEcsReq) Reset() { *x = DeleteEcsReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[4] + mi := &file_idl_pbecs_ecs_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -722,7 +833,7 @@ func (x *DeleteEcsReq) String() string { func (*DeleteEcsReq) ProtoMessage() {} func (x *DeleteEcsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[4] + mi := &file_idl_pbecs_ecs_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -735,7 +846,7 @@ func (x *DeleteEcsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteEcsReq.ProtoReflect.Descriptor instead. func (*DeleteEcsReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{4} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{6} } func (x *DeleteEcsReq) GetProvider() pbtenant.CloudProvider { @@ -801,6 +912,7 @@ func (x *DeleteEcsReq) GetDeleteVolume() string { return "" } +//删除ECS返回值 type DeleteEcsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -819,7 +931,7 @@ type DeleteEcsResp struct { func (x *DeleteEcsResp) Reset() { *x = DeleteEcsResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[5] + mi := &file_idl_pbecs_ecs_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -832,7 +944,7 @@ func (x *DeleteEcsResp) String() string { func (*DeleteEcsResp) ProtoMessage() {} func (x *DeleteEcsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[5] + mi := &file_idl_pbecs_ecs_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -845,7 +957,7 @@ func (x *DeleteEcsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteEcsResp.ProtoReflect.Descriptor instead. func (*DeleteEcsResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{5} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{7} } func (x *DeleteEcsResp) GetProvider() pbtenant.CloudProvider { @@ -876,6 +988,7 @@ func (x *DeleteEcsResp) GetRequestId() string { return "" } +//更新ECS入参 type UpdateEcsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -904,7 +1017,7 @@ type UpdateEcsReq struct { func (x *UpdateEcsReq) Reset() { *x = UpdateEcsReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[6] + mi := &file_idl_pbecs_ecs_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -917,7 +1030,7 @@ func (x *UpdateEcsReq) String() string { func (*UpdateEcsReq) ProtoMessage() {} func (x *UpdateEcsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[6] + mi := &file_idl_pbecs_ecs_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -930,7 +1043,7 @@ func (x *UpdateEcsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateEcsReq.ProtoReflect.Descriptor instead. func (*UpdateEcsReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{6} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{8} } func (x *UpdateEcsReq) GetProvider() pbtenant.CloudProvider { @@ -996,6 +1109,7 @@ func (x *UpdateEcsReq) GetSecurityGroupIds() string { return "" } +//更新ECS返回值 type UpdateEcsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1014,7 +1128,7 @@ type UpdateEcsResp struct { func (x *UpdateEcsResp) Reset() { *x = UpdateEcsResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[7] + mi := &file_idl_pbecs_ecs_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1027,7 +1141,7 @@ func (x *UpdateEcsResp) String() string { func (*UpdateEcsResp) ProtoMessage() {} func (x *UpdateEcsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[7] + mi := &file_idl_pbecs_ecs_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1040,7 +1154,7 @@ func (x *UpdateEcsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateEcsResp.ProtoReflect.Descriptor instead. func (*UpdateEcsResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{7} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{9} } func (x *UpdateEcsResp) GetProvider() pbtenant.CloudProvider { @@ -1071,6 +1185,7 @@ func (x *UpdateEcsResp) GetRequestId() string { return "" } +//查询ECS入参 type ListDetailReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1093,7 +1208,7 @@ type ListDetailReq struct { func (x *ListDetailReq) Reset() { *x = ListDetailReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[8] + mi := &file_idl_pbecs_ecs_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1106,7 +1221,7 @@ func (x *ListDetailReq) String() string { func (*ListDetailReq) ProtoMessage() {} func (x *ListDetailReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[8] + mi := &file_idl_pbecs_ecs_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1119,7 +1234,7 @@ func (x *ListDetailReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDetailReq.ProtoReflect.Descriptor instead. func (*ListDetailReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{8} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{10} } func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider { @@ -1164,6 +1279,7 @@ func (x *ListDetailReq) GetNextToken() string { return "" } +//查询ECS返回值 type ListDetailResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1186,7 +1302,7 @@ type ListDetailResp struct { func (x *ListDetailResp) Reset() { *x = ListDetailResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[9] + mi := &file_idl_pbecs_ecs_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1199,7 +1315,7 @@ func (x *ListDetailResp) String() string { func (*ListDetailResp) ProtoMessage() {} func (x *ListDetailResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[9] + mi := &file_idl_pbecs_ecs_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1212,7 +1328,7 @@ func (x *ListDetailResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListDetailResp.ProtoReflect.Descriptor instead. func (*ListDetailResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{9} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{11} } func (x *ListDetailResp) GetEcses() []*EcsInstance { @@ -1269,7 +1385,7 @@ type ListReq struct { func (x *ListReq) Reset() { *x = ListReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[10] + mi := &file_idl_pbecs_ecs_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1282,7 +1398,7 @@ func (x *ListReq) String() string { func (*ListReq) ProtoMessage() {} func (x *ListReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[10] + mi := &file_idl_pbecs_ecs_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1295,7 +1411,7 @@ func (x *ListReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListReq.ProtoReflect.Descriptor instead. func (*ListReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{10} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{12} } func (x *ListReq) GetProvider() pbtenant.CloudProvider { @@ -1317,7 +1433,7 @@ type ListResp struct { func (x *ListResp) Reset() { *x = ListResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[11] + mi := &file_idl_pbecs_ecs_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1330,7 +1446,7 @@ func (x *ListResp) String() string { func (*ListResp) ProtoMessage() {} func (x *ListResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[11] + mi := &file_idl_pbecs_ecs_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1343,7 +1459,7 @@ func (x *ListResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResp.ProtoReflect.Descriptor instead. func (*ListResp) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{11} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{13} } func (x *ListResp) GetEcses() []*EcsInstance { @@ -1362,7 +1478,7 @@ type ListAllReq struct { func (x *ListAllReq) Reset() { *x = ListAllReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_pbecs_ecs_proto_msgTypes[12] + mi := &file_idl_pbecs_ecs_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1375,7 +1491,7 @@ func (x *ListAllReq) String() string { func (*ListAllReq) ProtoMessage() {} func (x *ListAllReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_pbecs_ecs_proto_msgTypes[12] + mi := &file_idl_pbecs_ecs_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1388,7 +1504,7 @@ func (x *ListAllReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAllReq.ProtoReflect.Descriptor instead. func (*ListAllReq) Descriptor() ([]byte, []int) { - return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{12} + return file_idl_pbecs_ecs_proto_rawDescGZIP(), []int{14} } var File_idl_pbecs_ecs_proto protoreflect.FileDescriptor @@ -1436,223 +1552,241 @@ var file_idl_pbecs_ecs_proto_rawDesc = []byte{ 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x22, 0xe0, 0x05, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, - 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x76, 0x5f, 0x73, 0x77, - 0x69, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, - 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x17, 0x0a, 0x07, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x7a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, - 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x4b, 0x0a, 0x14, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, - 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, - 0x4f, 0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x76, 0x70, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, - 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0xdf, 0x01, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, - 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x0d, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, - 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, - 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, - 0x64, 0x53, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x22, 0xda, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, - 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, + 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x39, 0x0a, 0x0d, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x73, 0x22, 0x52, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0xe0, 0x05, 0x0a, 0x0c, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, + 0x1e, 0x0a, 0x0b, 0x76, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, + 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x7a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, + 0x32, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, + 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, + 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, + 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x12, 0x4b, 0x0a, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, + 0x72, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, + 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, + 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, + 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, + 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x42, 0x61, + 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4f, 0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x76, 0x70, + 0x63, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x70, 0x63, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0xdf, + 0x01, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, + 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, + 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x75, 0x74, + 0x6f, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x75, 0x74, 0x6f, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, + 0x22, 0xa5, 0x02, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, - 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, - 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, - 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xa3, - 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, - 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x64, 0x22, 0xd4, 0x02, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, - 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x0d, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd2, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, - 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, - 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x07, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x08, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, - 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, - 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2a, 0x3a, - 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, - 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, - 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x10, 0x01, 0x32, 0xeb, 0x03, 0x0a, 0x0a, 0x45, - 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, - 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, - 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, - 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, - 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, - 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, - 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x15, 0x1a, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, - 0x45, 0x63, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, - 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, - 0x15, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x12, 0x3d, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x70, 0x62, - 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, - 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x11, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x11, 0x2e, - 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, - 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x61, 0x6c, 0x6c, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, - 0x69, 0x6e, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, - 0x50, 0x43, 0x4d, 0x2f, 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, - 0x6c, 0x2f, 0x70, 0x62, 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x53, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0xda, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, + 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, + 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x70, + 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xd4, 0x02, 0x0a, 0x0c, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, + 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, + 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd2, 0x01, 0x0a, + 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x28, 0x0a, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x22, 0x3e, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x22, 0x34, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, + 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, + 0x62, 0x65, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x2a, 0x3a, 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, + 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x00, 0x12, + 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x10, + 0x01, 0x32, 0xe0, 0x04, 0x0a, 0x0a, 0x45, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x73, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x65, 0x45, 0x63, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x65, 0x63, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, + 0x6c, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, + 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, + 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x53, 0x0a, 0x09, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, + 0x62, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, + 0x53, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x13, 0x2e, 0x70, + 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, + 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x1a, + 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x65, 0x63, 0x73, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x3d, 0x0a, 0x07, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x65, 0x63, 0x73, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, + 0x12, 0x09, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x65, 0x63, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, + 0x62, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x65, 0x63, 0x73, + 0x2f, 0x61, 0x6c, 0x6c, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, + 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2f, 0x50, 0x43, 0x4d, 0x2f, + 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x62, + 0x65, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1668,55 +1802,60 @@ func file_idl_pbecs_ecs_proto_rawDescGZIP() []byte { } var file_idl_pbecs_ecs_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_idl_pbecs_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_idl_pbecs_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_idl_pbecs_ecs_proto_goTypes = []interface{}{ - (InternetChargeType)(0), // 0: pbecs.InternetChargeType - (*EcsInstance)(nil), // 1: pbecs.EcsInstance - (*CreateEcsReq)(nil), // 2: pbecs.CreateEcsReq - (*SystemDisk)(nil), // 3: pbecs.SystemDisk - (*CreateEcsResp)(nil), // 4: pbecs.CreateEcsResp - (*DeleteEcsReq)(nil), // 5: pbecs.DeleteEcsReq - (*DeleteEcsResp)(nil), // 6: pbecs.DeleteEcsResp - (*UpdateEcsReq)(nil), // 7: pbecs.UpdateEcsReq - (*UpdateEcsResp)(nil), // 8: pbecs.UpdateEcsResp - (*ListDetailReq)(nil), // 9: pbecs.ListDetailReq - (*ListDetailResp)(nil), // 10: pbecs.ListDetailResp - (*ListReq)(nil), // 11: pbecs.ListReq - (*ListResp)(nil), // 12: pbecs.ListResp - (*ListAllReq)(nil), // 13: pbecs.ListAllReq - (pbtenant.CloudProvider)(0), // 14: pbtenant.CloudProvider + (InternetChargeType)(0), // 0: pbecs.InternetChargeType + (*EcsInstance)(nil), // 1: pbecs.EcsInstance + (*CreateEcsMultipleReq)(nil), // 2: pbecs.CreateEcsMultipleReq + (*CreateEcsMultipleResp)(nil), // 3: pbecs.CreateEcsMultipleResp + (*CreateEcsReq)(nil), // 4: pbecs.CreateEcsReq + (*SystemDisk)(nil), // 5: pbecs.SystemDisk + (*CreateEcsResp)(nil), // 6: pbecs.CreateEcsResp + (*DeleteEcsReq)(nil), // 7: pbecs.DeleteEcsReq + (*DeleteEcsResp)(nil), // 8: pbecs.DeleteEcsResp + (*UpdateEcsReq)(nil), // 9: pbecs.UpdateEcsReq + (*UpdateEcsResp)(nil), // 10: pbecs.UpdateEcsResp + (*ListDetailReq)(nil), // 11: pbecs.ListDetailReq + (*ListDetailResp)(nil), // 12: pbecs.ListDetailResp + (*ListReq)(nil), // 13: pbecs.ListReq + (*ListResp)(nil), // 14: pbecs.ListResp + (*ListAllReq)(nil), // 15: pbecs.ListAllReq + (pbtenant.CloudProvider)(0), // 16: pbtenant.CloudProvider } var file_idl_pbecs_ecs_proto_depIdxs = []int32{ - 14, // 0: pbecs.EcsInstance.provider:type_name -> pbtenant.CloudProvider - 14, // 1: pbecs.CreateEcsReq.provider:type_name -> pbtenant.CloudProvider - 3, // 2: pbecs.CreateEcsReq.system_disk:type_name -> pbecs.SystemDisk - 0, // 3: pbecs.CreateEcsReq.internet_charge_type:type_name -> pbecs.InternetChargeType - 14, // 4: pbecs.CreateEcsResp.provider:type_name -> pbtenant.CloudProvider - 14, // 5: pbecs.DeleteEcsReq.provider:type_name -> pbtenant.CloudProvider - 14, // 6: pbecs.DeleteEcsResp.provider:type_name -> pbtenant.CloudProvider - 14, // 7: pbecs.UpdateEcsReq.provider:type_name -> pbtenant.CloudProvider - 14, // 8: pbecs.UpdateEcsResp.provider:type_name -> pbtenant.CloudProvider - 14, // 9: pbecs.ListDetailReq.provider:type_name -> pbtenant.CloudProvider - 1, // 10: pbecs.ListDetailResp.ecses:type_name -> pbecs.EcsInstance - 14, // 11: pbecs.ListReq.provider:type_name -> pbtenant.CloudProvider - 1, // 12: pbecs.ListResp.ecses:type_name -> pbecs.EcsInstance - 2, // 13: pbecs.EcsService.CreateEcs:input_type -> pbecs.CreateEcsReq - 5, // 14: pbecs.EcsService.DeleteEcs:input_type -> pbecs.DeleteEcsReq - 7, // 15: pbecs.EcsService.UpdateEcs:input_type -> pbecs.UpdateEcsReq - 9, // 16: pbecs.EcsService.ListEcsDetail:input_type -> pbecs.ListDetailReq - 11, // 17: pbecs.EcsService.ListEcs:input_type -> pbecs.ListReq - 13, // 18: pbecs.EcsService.ListEcsAll:input_type -> pbecs.ListAllReq - 4, // 19: pbecs.EcsService.CreateEcs:output_type -> pbecs.CreateEcsResp - 6, // 20: pbecs.EcsService.DeleteEcs:output_type -> pbecs.DeleteEcsResp - 8, // 21: pbecs.EcsService.UpdateEcs:output_type -> pbecs.UpdateEcsResp - 10, // 22: pbecs.EcsService.ListEcsDetail:output_type -> pbecs.ListDetailResp - 12, // 23: pbecs.EcsService.ListEcs:output_type -> pbecs.ListResp - 12, // 24: pbecs.EcsService.ListEcsAll:output_type -> pbecs.ListResp - 19, // [19:25] is the sub-list for method output_type - 13, // [13:19] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 16, // 0: pbecs.EcsInstance.provider:type_name -> pbtenant.CloudProvider + 4, // 1: pbecs.CreateEcsMultipleReq.createEcsReqs:type_name -> pbecs.CreateEcsReq + 16, // 2: pbecs.CreateEcsReq.provider:type_name -> pbtenant.CloudProvider + 5, // 3: pbecs.CreateEcsReq.system_disk:type_name -> pbecs.SystemDisk + 0, // 4: pbecs.CreateEcsReq.internet_charge_type:type_name -> pbecs.InternetChargeType + 16, // 5: pbecs.CreateEcsResp.provider:type_name -> pbtenant.CloudProvider + 16, // 6: pbecs.DeleteEcsReq.provider:type_name -> pbtenant.CloudProvider + 16, // 7: pbecs.DeleteEcsResp.provider:type_name -> pbtenant.CloudProvider + 16, // 8: pbecs.UpdateEcsReq.provider:type_name -> pbtenant.CloudProvider + 16, // 9: pbecs.UpdateEcsResp.provider:type_name -> pbtenant.CloudProvider + 16, // 10: pbecs.ListDetailReq.provider:type_name -> pbtenant.CloudProvider + 1, // 11: pbecs.ListDetailResp.ecses:type_name -> pbecs.EcsInstance + 16, // 12: pbecs.ListReq.provider:type_name -> pbtenant.CloudProvider + 1, // 13: pbecs.ListResp.ecses:type_name -> pbecs.EcsInstance + 2, // 14: pbecs.EcsService.CreateMultipleEcs:input_type -> pbecs.CreateEcsMultipleReq + 4, // 15: pbecs.EcsService.CreateEcs:input_type -> pbecs.CreateEcsReq + 7, // 16: pbecs.EcsService.DeleteEcs:input_type -> pbecs.DeleteEcsReq + 9, // 17: pbecs.EcsService.UpdateEcs:input_type -> pbecs.UpdateEcsReq + 11, // 18: pbecs.EcsService.ListEcsDetail:input_type -> pbecs.ListDetailReq + 13, // 19: pbecs.EcsService.ListEcs:input_type -> pbecs.ListReq + 15, // 20: pbecs.EcsService.ListEcsAll:input_type -> pbecs.ListAllReq + 3, // 21: pbecs.EcsService.CreateMultipleEcs:output_type -> pbecs.CreateEcsMultipleResp + 6, // 22: pbecs.EcsService.CreateEcs:output_type -> pbecs.CreateEcsResp + 8, // 23: pbecs.EcsService.DeleteEcs:output_type -> pbecs.DeleteEcsResp + 10, // 24: pbecs.EcsService.UpdateEcs:output_type -> pbecs.UpdateEcsResp + 12, // 25: pbecs.EcsService.ListEcsDetail:output_type -> pbecs.ListDetailResp + 14, // 26: pbecs.EcsService.ListEcs:output_type -> pbecs.ListResp + 14, // 27: pbecs.EcsService.ListEcsAll:output_type -> pbecs.ListResp + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_idl_pbecs_ecs_proto_init() } @@ -1738,7 +1877,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEcsReq); i { + switch v := v.(*CreateEcsMultipleReq); i { case 0: return &v.state case 1: @@ -1750,7 +1889,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemDisk); i { + switch v := v.(*CreateEcsMultipleResp); i { case 0: return &v.state case 1: @@ -1762,7 +1901,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEcsResp); i { + switch v := v.(*CreateEcsReq); i { case 0: return &v.state case 1: @@ -1774,7 +1913,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEcsReq); i { + switch v := v.(*SystemDisk); i { case 0: return &v.state case 1: @@ -1786,7 +1925,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEcsResp); i { + switch v := v.(*CreateEcsResp); i { case 0: return &v.state case 1: @@ -1798,7 +1937,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEcsReq); i { + switch v := v.(*DeleteEcsReq); i { case 0: return &v.state case 1: @@ -1810,7 +1949,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEcsResp); i { + switch v := v.(*DeleteEcsResp); i { case 0: return &v.state case 1: @@ -1822,7 +1961,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDetailReq); i { + switch v := v.(*UpdateEcsReq); i { case 0: return &v.state case 1: @@ -1834,7 +1973,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDetailResp); i { + switch v := v.(*UpdateEcsResp); i { case 0: return &v.state case 1: @@ -1846,7 +1985,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListReq); i { + switch v := v.(*ListDetailReq); i { case 0: return &v.state case 1: @@ -1858,7 +1997,7 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResp); i { + switch v := v.(*ListDetailResp); i { case 0: return &v.state case 1: @@ -1870,6 +2009,30 @@ func file_idl_pbecs_ecs_proto_init() { } } file_idl_pbecs_ecs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_pbecs_ecs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListAllReq); i { case 0: return &v.state @@ -1888,7 +2051,7 @@ func file_idl_pbecs_ecs_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_pbecs_ecs_proto_rawDesc, NumEnums: 1, - NumMessages: 13, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/lan_trans/idl/pbecs/ecs.pb.gw.go b/lan_trans/idl/pbecs/ecs.pb.gw.go index 3078b76..20ef7d4 100644 --- a/lan_trans/idl/pbecs/ecs.pb.gw.go +++ b/lan_trans/idl/pbecs/ecs.pb.gw.go @@ -31,6 +31,40 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join +func request_EcsService_CreateMultipleEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateEcsMultipleReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateMultipleEcs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EcsService_CreateMultipleEcs_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateEcsMultipleReq + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateMultipleEcs(ctx, &protoReq) + return msg, metadata, err + +} + func request_EcsService_CreateEcs_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateEcsReq var metadata runtime.ServerMetadata @@ -229,6 +263,29 @@ func local_request_EcsService_ListEcsAll_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEcsServiceHandlerFromEndpoint instead. func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EcsServiceServer) error { + mux.Handle("POST", pattern_EcsService_CreateMultipleEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EcsService_CreateMultipleEcs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_CreateMultipleEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_EcsService_CreateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -408,6 +465,26 @@ func RegisterEcsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // "EcsServiceClient" to call the correct interceptors. func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EcsServiceClient) error { + mux.Handle("POST", pattern_EcsService_CreateMultipleEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pbecs.EcsService/CreateMultipleEcs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EcsService_CreateMultipleEcs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_EcsService_CreateMultipleEcs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_EcsService_CreateEcs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -532,6 +609,8 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( + pattern_EcsService_CreateMultipleEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "createMultiple"}, "")) + pattern_EcsService_CreateEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "create"}, "")) pattern_EcsService_DeleteEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "delete"}, "")) @@ -546,6 +625,8 @@ var ( ) var ( + forward_EcsService_CreateMultipleEcs_0 = runtime.ForwardResponseMessage + forward_EcsService_CreateEcs_0 = runtime.ForwardResponseMessage forward_EcsService_DeleteEcs_0 = runtime.ForwardResponseMessage diff --git a/lan_trans/idl/pbecs/ecs_grpc.pb.go b/lan_trans/idl/pbecs/ecs_grpc.pb.go index ccae9cd..847975f 100644 --- a/lan_trans/idl/pbecs/ecs_grpc.pb.go +++ b/lan_trans/idl/pbecs/ecs_grpc.pb.go @@ -22,6 +22,8 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type EcsServiceClient interface { + // 创建多家云ECS + CreateMultipleEcs(ctx context.Context, in *CreateEcsMultipleReq, opts ...grpc.CallOption) (*CreateEcsMultipleResp, error) // 创建ECS CreateEcs(ctx context.Context, in *CreateEcsReq, opts ...grpc.CallOption) (*CreateEcsResp, error) // 删除ECS @@ -44,6 +46,15 @@ func NewEcsServiceClient(cc grpc.ClientConnInterface) EcsServiceClient { return &ecsServiceClient{cc} } +func (c *ecsServiceClient) CreateMultipleEcs(ctx context.Context, in *CreateEcsMultipleReq, opts ...grpc.CallOption) (*CreateEcsMultipleResp, error) { + out := new(CreateEcsMultipleResp) + err := c.cc.Invoke(ctx, "/pbecs.EcsService/CreateMultipleEcs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *ecsServiceClient) CreateEcs(ctx context.Context, in *CreateEcsReq, opts ...grpc.CallOption) (*CreateEcsResp, error) { out := new(CreateEcsResp) err := c.cc.Invoke(ctx, "/pbecs.EcsService/CreateEcs", in, out, opts...) @@ -102,6 +113,8 @@ func (c *ecsServiceClient) ListEcsAll(ctx context.Context, in *ListAllReq, opts // All implementations must embed UnimplementedEcsServiceServer // for forward compatibility type EcsServiceServer interface { + // 创建多家云ECS + CreateMultipleEcs(context.Context, *CreateEcsMultipleReq) (*CreateEcsMultipleResp, error) // 创建ECS CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error) // 删除ECS @@ -121,6 +134,9 @@ type EcsServiceServer interface { type UnimplementedEcsServiceServer struct { } +func (UnimplementedEcsServiceServer) CreateMultipleEcs(context.Context, *CreateEcsMultipleReq) (*CreateEcsMultipleResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateMultipleEcs not implemented") +} func (UnimplementedEcsServiceServer) CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateEcs not implemented") } @@ -152,6 +168,24 @@ func RegisterEcsServiceServer(s grpc.ServiceRegistrar, srv EcsServiceServer) { s.RegisterService(&EcsService_ServiceDesc, srv) } +func _EcsService_CreateMultipleEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEcsMultipleReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EcsServiceServer).CreateMultipleEcs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbecs.EcsService/CreateMultipleEcs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EcsServiceServer).CreateMultipleEcs(ctx, req.(*CreateEcsMultipleReq)) + } + return interceptor(ctx, in, info, handler) +} + func _EcsService_CreateEcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateEcsReq) if err := dec(in); err != nil { @@ -267,6 +301,10 @@ var EcsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbecs.EcsService", HandlerType: (*EcsServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "CreateMultipleEcs", + Handler: _EcsService_CreateMultipleEcs_Handler, + }, { MethodName: "CreateEcs", Handler: _EcsService_CreateEcs_Handler, diff --git a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json index 1b1965b..4d80323 100644 --- a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json +++ b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json @@ -111,6 +111,39 @@ ] } }, + "/apis/ecs/createMultiple": { + "post": { + "summary": "创建多家云ECS", + "operationId": "EcsService_CreateMultipleEcs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pbecsCreateEcsMultipleResp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/pbecsCreateEcsMultipleReq" + } + } + ], + "tags": [ + "EcsService" + ] + } + }, "/apis/ecs/delete": { "post": { "summary": "删除ECS", @@ -256,6 +289,35 @@ } }, "definitions": { + "pbecsCreateEcsMultipleReq": { + "type": "object", + "properties": { + "createEcsReqs": { + "type": "array", + "items": { + "$ref": "#/definitions/pbecsCreateEcsReq" + } + } + }, + "title": "创建多家云ECS入参" + }, + "pbecsCreateEcsMultipleResp": { + "type": "object", + "properties": { + "requestId": { + "type": "array", + "items": { + "type": "string" + }, + "title": "请求ID" + }, + "finished": { + "type": "boolean", + "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" + } + }, + "title": "创建多家云ECS返回值" + }, "pbecsCreateEcsReq": { "type": "object", "properties": { @@ -338,7 +400,8 @@ "type": "string", "title": "待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需" } - } + }, + "title": "创建ECS入参" }, "pbecsCreateEcsResp": { "type": "object", @@ -380,7 +443,8 @@ "type": "boolean", "title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询" } - } + }, + "title": "创建ECS返回值" }, "pbecsDeleteEcsReq": { "type": "object", @@ -422,7 +486,8 @@ "type": "string", "title": "配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。\n取值为true或false。默认false;华为云" } - } + }, + "title": "删除ECS入参" }, "pbecsDeleteEcsResp": { "type": "object", @@ -444,7 +509,8 @@ "type": "string", "title": "请求ID" } - } + }, + "title": "删除ECS返回值" }, "pbecsEcsInstance": { "type": "object", @@ -525,7 +591,8 @@ "type": "string", "title": "收费类型" } - } + }, + "title": "ECS 实例" }, "pbecsInternetChargeType": { "type": "string", @@ -569,7 +636,8 @@ "type": "string", "title": "请求id,出现问题后提供给云厂商,排查问题" } - } + }, + "title": "查询ECS返回值" }, "pbecsListResp": { "type": "object", @@ -610,7 +678,8 @@ "type": "string", "title": "系统盘采用的自动快照策略ID。" } - } + }, + "title": "系统磁盘" }, "pbecsUpdateEcsReq": { "type": "object", @@ -652,7 +721,8 @@ "type": "string", "title": "实例重新加入的安全组列表,安全组ID不能重复。以”,“分割" } - } + }, + "title": "更新ECS入参" }, "pbecsUpdateEcsResp": { "type": "object", @@ -674,7 +744,8 @@ "type": "string", "title": "请求ID" } - } + }, + "title": "更新ECS返回值" }, "pbtenantCloudProvider": { "type": "string", From d926846381976f8291dcf32f1d683a9d0163139f Mon Sep 17 00:00:00 2001 From: devad Date: Fri, 15 Apr 2022 15:42:20 +0800 Subject: [PATCH 3/3] ECS impl Signed-off-by: devad --- lan_trans/idl/pbtenant/tenant.pb.go | 154 +++++++++--------- .../openapiv2/idl/pbecs/ecs.swagger.json | 10 +- .../openapiv2/idl/pbpod/pod.swagger.json | 29 ++-- 3 files changed, 103 insertions(+), 90 deletions(-) diff --git a/lan_trans/idl/pbtenant/tenant.pb.go b/lan_trans/idl/pbtenant/tenant.pb.go index 50f3487..0b05b84 100644 --- a/lan_trans/idl/pbtenant/tenant.pb.go +++ b/lan_trans/idl/pbtenant/tenant.pb.go @@ -262,26 +262,28 @@ func (AliRegionId) EnumDescriptor() ([]byte, []int) { type TencentRegionId int32 const ( - TencentRegionId_tc_all TencentRegionId = 0 - TencentRegionId_tc_ap_bangkok TencentRegionId = 1 // 曼谷 - TencentRegionId_tc_ap_beijing TencentRegionId = 2 // 北京 - TencentRegionId_tc_ap_chengdu TencentRegionId = 3 // 成都 - TencentRegionId_tc_ap_chongqing TencentRegionId = 4 // 重庆 - TencentRegionId_tc_ap_guangzhou TencentRegionId = 5 // 广州 - TencentRegionId_tc_ap_guangzhou_open TencentRegionId = 6 // 广州Open - TencentRegionId_tc_ap_hongkong TencentRegionId = 7 // 中国香港 - TencentRegionId_tc_ap_mumbai TencentRegionId = 8 // 孟买 - TencentRegionId_tc_ap_seoul TencentRegionId = 9 // 首尔 - TencentRegionId_tc_ap_shanghai TencentRegionId = 10 // 上海 - TencentRegionId_tc_ap_shanghai_fsi TencentRegionId = 11 // 上海金融 - TencentRegionId_tc_ap_shenzhen_fsi TencentRegionId = 12 // 深圳金融 - TencentRegionId_tc_ap_singapore TencentRegionId = 13 // 新加坡 - TencentRegionId_tc_ap_tokyo TencentRegionId = 14 // 东京 - TencentRegionId_tc_eu_frankfurt TencentRegionId = 15 // 法兰克福 - TencentRegionId_tc_eu_moscow TencentRegionId = 16 // 莫斯科 - TencentRegionId_tc_na_ashburn TencentRegionId = 17 // 阿什本 - TencentRegionId_tc_na_siliconvalley TencentRegionId = 18 // 硅谷 - TencentRegionId_tc_na_toronto TencentRegionId = 19 // 多伦多 + TencentRegionId_tc_all TencentRegionId = 0 + TencentRegionId_tc_ap_bangkok TencentRegionId = 1 //亚太东南(曼谷) + TencentRegionId_tc_ap_beijing TencentRegionId = 2 //华北地区(北京) + TencentRegionId_tc_ap_chengdu TencentRegionId = 3 //西南地区(成都) + TencentRegionId_tc_ap_chongqing TencentRegionId = 4 //西南地区(重庆) + TencentRegionId_tc_ap_guangzhou TencentRegionId = 5 //华南地区(广州) + TencentRegionId_tc_ap_hongkong TencentRegionId = 6 //港澳台地区(中国香港) + TencentRegionId_tc_ap_jakarta TencentRegionId = 7 //亚太东南(雅加达) + TencentRegionId_tc_ap_mumbai TencentRegionId = 8 // 亚太南部(孟买) + TencentRegionId_tc_ap_nanjing TencentRegionId = 9 //华东地区(南京) + TencentRegionId_tc_ap_seoul TencentRegionId = 10 //亚太东北(首尔) + TencentRegionId_tc_ap_shanghai TencentRegionId = 11 //华东地区(上海) + TencentRegionId_tc_ap_shanghai_fsi TencentRegionId = 12 //华东地区(上海金融) + TencentRegionId_tc_ap_shenzhen_fsi TencentRegionId = 13 //华南地区(深圳金融) + TencentRegionId_tc_ap_singapore TencentRegionId = 14 //亚太东南(新加坡) + TencentRegionId_tc_ap_tokyo TencentRegionId = 15 //亚太东北(东京) + TencentRegionId_tc_eu_frankfurt TencentRegionId = 16 //欧洲地区(法兰克福) + TencentRegionId_tc_eu_moscow TencentRegionId = 17 //欧洲地区(莫斯科) + TencentRegionId_tc_na_ashburn TencentRegionId = 18 //美国东部(弗吉尼亚) + TencentRegionId_tc_na_siliconvalley TencentRegionId = 19 //美国西部(硅谷) + TencentRegionId_tc_na_toronto TencentRegionId = 20 //北美地区(多伦多) + TencentRegionId_tc_sa_saopaulo TencentRegionId = 21 //南美地区(圣保罗) ) // Enum value maps for TencentRegionId. @@ -293,42 +295,46 @@ var ( 3: "tc_ap_chengdu", 4: "tc_ap_chongqing", 5: "tc_ap_guangzhou", - 6: "tc_ap_guangzhou_open", - 7: "tc_ap_hongkong", + 6: "tc_ap_hongkong", + 7: "tc_ap_jakarta", 8: "tc_ap_mumbai", - 9: "tc_ap_seoul", - 10: "tc_ap_shanghai", - 11: "tc_ap_shanghai_fsi", - 12: "tc_ap_shenzhen_fsi", - 13: "tc_ap_singapore", - 14: "tc_ap_tokyo", - 15: "tc_eu_frankfurt", - 16: "tc_eu_moscow", - 17: "tc_na_ashburn", - 18: "tc_na_siliconvalley", - 19: "tc_na_toronto", + 9: "tc_ap_nanjing", + 10: "tc_ap_seoul", + 11: "tc_ap_shanghai", + 12: "tc_ap_shanghai_fsi", + 13: "tc_ap_shenzhen_fsi", + 14: "tc_ap_singapore", + 15: "tc_ap_tokyo", + 16: "tc_eu_frankfurt", + 17: "tc_eu_moscow", + 18: "tc_na_ashburn", + 19: "tc_na_siliconvalley", + 20: "tc_na_toronto", + 21: "tc_sa_saopaulo", } TencentRegionId_value = map[string]int32{ - "tc_all": 0, - "tc_ap_bangkok": 1, - "tc_ap_beijing": 2, - "tc_ap_chengdu": 3, - "tc_ap_chongqing": 4, - "tc_ap_guangzhou": 5, - "tc_ap_guangzhou_open": 6, - "tc_ap_hongkong": 7, - "tc_ap_mumbai": 8, - "tc_ap_seoul": 9, - "tc_ap_shanghai": 10, - "tc_ap_shanghai_fsi": 11, - "tc_ap_shenzhen_fsi": 12, - "tc_ap_singapore": 13, - "tc_ap_tokyo": 14, - "tc_eu_frankfurt": 15, - "tc_eu_moscow": 16, - "tc_na_ashburn": 17, - "tc_na_siliconvalley": 18, - "tc_na_toronto": 19, + "tc_all": 0, + "tc_ap_bangkok": 1, + "tc_ap_beijing": 2, + "tc_ap_chengdu": 3, + "tc_ap_chongqing": 4, + "tc_ap_guangzhou": 5, + "tc_ap_hongkong": 6, + "tc_ap_jakarta": 7, + "tc_ap_mumbai": 8, + "tc_ap_nanjing": 9, + "tc_ap_seoul": 10, + "tc_ap_shanghai": 11, + "tc_ap_shanghai_fsi": 12, + "tc_ap_shenzhen_fsi": 13, + "tc_ap_singapore": 14, + "tc_ap_tokyo": 15, + "tc_eu_frankfurt": 16, + "tc_eu_moscow": 17, + "tc_na_ashburn": 18, + "tc_na_siliconvalley": 19, + "tc_na_toronto": 20, + "tc_sa_saopaulo": 21, } ) @@ -799,7 +805,7 @@ var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, - 0x16, 0x2a, 0xa1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, + 0x16, 0x2a, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, 0x6f, 0x6b, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x65, @@ -807,25 +813,27 @@ var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, - 0x6f, 0x75, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, - 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x10, 0x06, 0x12, 0x12, - 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b, 0x6f, 0x6e, 0x67, - 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, - 0x61, 0x69, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, - 0x6f, 0x75, 0x6c, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, - 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, - 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, - 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, - 0x68, 0x65, 0x6e, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, - 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0d, 0x12, 0x0f, - 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0e, 0x12, - 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, - 0x72, 0x74, 0x10, 0x0f, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, - 0x73, 0x63, 0x6f, 0x77, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, - 0x61, 0x73, 0x68, 0x62, 0x75, 0x72, 0x6e, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, - 0x6e, 0x61, 0x5f, 0x73, 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, - 0x10, 0x12, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, - 0x6e, 0x74, 0x6f, 0x10, 0x13, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, + 0x6f, 0x75, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, + 0x6e, 0x67, 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, + 0x70, 0x5f, 0x6a, 0x61, 0x6b, 0x61, 0x72, 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, + 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, + 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, + 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, + 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, + 0x68, 0x61, 0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, + 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, + 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, + 0x66, 0x73, 0x69, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, + 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, + 0x5f, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, + 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, + 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, + 0x10, 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, + 0x75, 0x72, 0x6e, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, + 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, + 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, + 0x14, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, + 0x75, 0x6c, 0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, diff --git a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json index f6ab810..cb35b46 100644 --- a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json +++ b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -45,7 +45,8 @@ "ali", "tencent", "huawei", - "aws" + "k8s", + "harvester" ], "default": "ali" } @@ -198,7 +199,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -206,7 +207,8 @@ "ali", "tencent", "huawei", - "aws" + "k8s", + "harvester" ], "default": "ali" }, diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index c14bd5a..32ac949 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -205,7 +205,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -220,14 +220,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域", + "description": "区域Id,参考 tenant.proto 中的各个云的区域.", "in": "query", "required": false, "type": "integer", @@ -235,7 +235,7 @@ }, { "name": "regionName", - "description": "区域名称,各云厂商自定义的region name", + "description": "区域名称,各云厂商自定义的region name.", "in": "query", "required": false, "type": "integer", @@ -243,7 +243,7 @@ }, { "name": "podId", - "description": "podID", + "description": "podID.", "in": "query", "required": false, "type": "integer", @@ -251,7 +251,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码", + "description": "分页相关参数,页码.", "in": "query", "required": false, "type": "integer", @@ -259,7 +259,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量", + "description": "分页相关参数,每页数量.", "in": "query", "required": false, "type": "integer", @@ -267,14 +267,14 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token", + "description": "分页相关参数,下一页的token.", "in": "query", "required": false, "type": "string" }, { "name": "namespace", - "description": "namespace", + "description": "namespace.", "in": "query", "required": false, "type": "string" @@ -675,11 +675,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object",