diff --git a/.changelog/2520.txt b/.changelog/2520.txt new file mode 100644 index 0000000000..26c4f8eb36 --- /dev/null +++ b/.changelog/2520.txt @@ -0,0 +1,3 @@ +```release-note:new-data-source +tencentcloud_organization_org_share_area +``` \ No newline at end of file diff --git a/go.mod b/go.mod index 2887eefcbb..b059cc9002 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.847 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.544 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.711 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.856 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.692 @@ -69,7 +69,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.651 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.844 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.777 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.770 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.856 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.814 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.815 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 diff --git a/go.sum b/go.sum index dbc999bf93..302af35c2e 100644 --- a/go.sum +++ b/go.sum @@ -954,6 +954,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.845 h1:fiiV github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.845/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847 h1:ITZmxAWfbr5yikJ4T30yVYMW3jpa/oTmNbPnw/h1Vq0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.856 h1:4PaaKxPjh0dmRzzz0CRZSZlbvzQIPcg4TE1Ibz0Cdlk= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.856/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624 h1:nEZqsoqt1pEoaP9JjkHQy3/H00suCfzlHW1qOm2nYD8= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624/go.mod h1:+TXSVyeKwt1IhZRqKPbTREteBcP+K07Q846/ilNzLWA= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 h1:2egy69SP/wPsmnfozcQVZ6tUY6F6N/TpEe/7xtXrc/8= @@ -1006,6 +1008,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus v1.0.831 h1:oya github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus v1.0.831/go.mod h1:2WuTlTnKCnZoa6l0JxY9GNfo0UG6nU7AEsljF8rMMsM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.770 h1:Ksu947uY/fafnlILemfMuyKqL/RxHh9dfVowWX8paeQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.770/go.mod h1:Ew8jug2Kq03q9Kkjzov7IMYgugGLEw3FGYPofuRqzKw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.856 h1:W1FLC178fBj5HigbNkAUIBGPPTit20RVycuXQ6u2lSg= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.856/go.mod h1:Ln9igPci1mCEe4gzekGpMMn/x9im6XlDh2bqvWnUMDo= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.814 h1:1XlGrQHRBJv419m64yWRNRWVUTvqBi3Go4ahndnZz9w= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.814/go.mod h1:ch9ZDGEWZXIpzOffmFMgCDKX5uL6x2NLJBiSG94WWEE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.815 h1:zuOoiF957eIqonXgMW1qtsMnlYGIrgTSMM+yk+OHuWE= diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 25ea1d8616..e27c8cc0d9 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -10,38 +10,10 @@ import ( "strconv" "strings" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/wedata" - - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tmp" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tpulsar" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/trabbit" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/trocket" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tse" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tsf" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/vod" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/vpc" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/vpn" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/waf" - - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tco" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcr" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tdcpg" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tem" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/teo" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tke" - - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tag" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tat" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcaplusdb" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcm" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcmg" - "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcmq" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/mitchellh/go-homedir" sdkcommon "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" sdksts "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sts/v20180813" - tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" @@ -113,6 +85,29 @@ import ( "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/ssl" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/ssm" "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/sts" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tag" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tat" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcaplusdb" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcm" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcmg" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcmq" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tco" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tcr" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tdcpg" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tem" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/teo" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tke" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tmp" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tpulsar" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/trabbit" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/trocket" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tse" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/tsf" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/vod" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/vpc" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/vpn" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/waf" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/services/wedata" ) const ( @@ -982,6 +977,7 @@ func Provider() *schema.Provider { "tencentcloud_clickhouse_spec": cdwch.DataSourceTencentCloudClickhouseSpec(), "tencentcloud_clickhouse_instance_shards": cdwch.DataSourceTencentCloudClickhouseInstanceShards(), "tencentcloud_clickhouse_instance_nodes": cdwch.DataSourceTencentCloudClickhouseInstanceNodes(), + "tencentcloud_organization_org_share_area": tco.DataSourceTencentCloudOrganizationOrgShareArea(), }, ResourcesMap: map[string]*schema.Resource{ diff --git a/tencentcloud/provider.md b/tencentcloud/provider.md index afb3c4c859..f62b6a14d3 100644 --- a/tencentcloud/provider.md +++ b/tencentcloud/provider.md @@ -1630,6 +1630,7 @@ Tencent Cloud Organization (TCO) tencentcloud_organization_org_financial_by_member tencentcloud_organization_org_financial_by_month tencentcloud_organization_org_financial_by_product + tencentcloud_organization_org_share_area Resource tencentcloud_organization_instance tencentcloud_organization_org_node diff --git a/tencentcloud/services/tco/data_source_tc_organization_org_share_area.go b/tencentcloud/services/tco/data_source_tc_organization_org_share_area.go new file mode 100644 index 0000000000..325848cc64 --- /dev/null +++ b/tencentcloud/services/tco/data_source_tc_organization_org_share_area.go @@ -0,0 +1,120 @@ +package tco + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + organization "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331" + + tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func DataSourceTencentCloudOrganizationOrgShareArea() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudOrganizationOrgShareAreaRead, + Schema: map[string]*schema.Schema{ + "lang": { + Optional: true, + Type: schema.TypeString, + Description: "Language.default zh.\nValid values:\n - `zh`: Chinese.\n - `en`: English.", + }, + + "items": { + Computed: true, + Type: schema.TypeList, + Description: "Area list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "Region name.", + }, + "area": { + Type: schema.TypeString, + Computed: true, + Description: "Region identifier.", + }, + "area_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Region ID.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudOrganizationOrgShareAreaRead(d *schema.ResourceData, meta interface{}) error { + defer tccommon.LogElapsed("data_source.tencentcloud_organization_org_share_area.read")() + defer tccommon.InconsistentCheck(d, meta)() + + logId := tccommon.GetLogId(tccommon.ContextNil) + + ctx := context.WithValue(context.TODO(), tccommon.LogIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("lang"); ok { + paramMap["Lang"] = helper.String(v.(string)) + } + + service := OrganizationService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()} + + var items []*organization.ShareArea + err := resource.Retry(tccommon.ReadRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeOrganizationOrgShareAreaByFilter(ctx, paramMap) + if e != nil { + return tccommon.RetryError(e) + } + items = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(items)) + tmpList := make([]map[string]interface{}, 0, len(items)) + + if items != nil { + for _, shareArea := range items { + shareAreaMap := map[string]interface{}{} + + if shareArea.Name != nil { + shareAreaMap["name"] = shareArea.Name + } + + if shareArea.Area != nil { + shareAreaMap["area"] = shareArea.Area + } + + if shareArea.AreaId != nil { + shareAreaMap["area_id"] = shareArea.AreaId + } + + ids = append(ids, *shareArea.Area) + tmpList = append(tmpList, shareAreaMap) + } + + _ = d.Set("items", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := tccommon.WriteToFile(output.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/services/tco/data_source_tc_organization_org_share_area.md b/tencentcloud/services/tco/data_source_tc_organization_org_share_area.md new file mode 100644 index 0000000000..3f4d3caf94 --- /dev/null +++ b/tencentcloud/services/tco/data_source_tc_organization_org_share_area.md @@ -0,0 +1,9 @@ +Use this data source to query detailed information of organization org_share_area + +Example Usage + +```hcl +data "tencentcloud_organization_org_share_area" "org_share_area" { + lang = "zh" + } +``` diff --git a/tencentcloud/services/tco/data_source_tc_organization_org_share_area_test.go b/tencentcloud/services/tco/data_source_tc_organization_org_share_area_test.go new file mode 100644 index 0000000000..64a12f9855 --- /dev/null +++ b/tencentcloud/services/tco/data_source_tc_organization_org_share_area_test.go @@ -0,0 +1,33 @@ +package tco_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest" +) + +func TestAccTencentCloudOrganizationOrgShareAreaDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + tcacctest.AccPreCheck(t) + }, + Providers: tcacctest.AccProviders, + Steps: []resource.TestStep{ + { + Config: testAccOrganizationOrgShareAreaDataSource, + Check: resource.ComposeTestCheckFunc(tcacctest.AccCheckTencentCloudDataSourceID("data.tencentcloud_organization_org_share_area.org_share_area")), + }, + }, + }) +} + +const testAccOrganizationOrgShareAreaDataSource = ` + +data "tencentcloud_organization_org_share_area" "org_share_area" { + lang = "zh" + } + +` diff --git a/tencentcloud/services/tco/service_tencentcloud_organization.go b/tencentcloud/services/tco/service_tencentcloud_organization.go index 27d6fdbfa5..bc38224f27 100644 --- a/tencentcloud/services/tco/service_tencentcloud_organization.go +++ b/tencentcloud/services/tco/service_tencentcloud_organization.go @@ -769,3 +769,38 @@ func (me *OrganizationService) DescribeOrganizationMembersByFilter(ctx context.C return } + +func (me *OrganizationService) DescribeOrganizationOrgShareAreaByFilter(ctx context.Context, param map[string]interface{}) (orgShareArea []*organization.ShareArea, errRet error) { + var ( + logId = tccommon.GetLogId(ctx) + request = organization.NewDescribeShareAreasRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "Lang" { + request.Lang = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseOrganizationClient().DescribeShareAreas(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if len(response.Response.Items) < 1 { + return + } + + orgShareArea = response.Response.Items + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index 2f5663a71a..1399864ca7 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -265,7 +265,7 @@ func CompleteCommonParams(request Request, region string, requestClient string) params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.847" + params["RequestClient"] = "SDK_GO_1.0.856" if requestClient != "" { params["RequestClient"] += ": " + requestClient } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/client.go index 62b5ba7ae9..958a424b7b 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/client.go @@ -179,6 +179,209 @@ func (c *Client) AddOrganizationNodeWithContext(ctx context.Context, request *Ad return } +func NewAddShareUnitRequest() (request *AddShareUnitRequest) { + request = &AddShareUnitRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "AddShareUnit") + + + return +} + +func NewAddShareUnitResponse() (response *AddShareUnitResponse) { + response = &AddShareUnitResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// AddShareUnit +// 创建共享单元,只有企业组织管理员可创建。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RESOURCEOVERLIMIT = "FailedOperation.ResourceOverLimit" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AddShareUnit(request *AddShareUnitRequest) (response *AddShareUnitResponse, err error) { + return c.AddShareUnitWithContext(context.Background(), request) +} + +// AddShareUnit +// 创建共享单元,只有企业组织管理员可创建。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RESOURCEOVERLIMIT = "FailedOperation.ResourceOverLimit" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AddShareUnitWithContext(ctx context.Context, request *AddShareUnitRequest) (response *AddShareUnitResponse, err error) { + if request == nil { + request = NewAddShareUnitRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AddShareUnit require credential") + } + + request.SetContext(ctx) + + response = NewAddShareUnitResponse() + err = c.Send(request, response) + return +} + +func NewAddShareUnitMembersRequest() (request *AddShareUnitMembersRequest) { + request = &AddShareUnitMembersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "AddShareUnitMembers") + + + return +} + +func NewAddShareUnitMembersResponse() (response *AddShareUnitMembersResponse) { + response = &AddShareUnitMembersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// AddShareUnitMembers +// 添加共享单元成员 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// FAILEDOPERATION_SOMEUINSNOTINORGANIZATION = "FailedOperation.SomeUinsNotInOrganization" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITMEMBEROVERLIMIT = "LimitExceeded.ShareUnitMemberOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AddShareUnitMembers(request *AddShareUnitMembersRequest) (response *AddShareUnitMembersResponse, err error) { + return c.AddShareUnitMembersWithContext(context.Background(), request) +} + +// AddShareUnitMembers +// 添加共享单元成员 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// FAILEDOPERATION_SOMEUINSNOTINORGANIZATION = "FailedOperation.SomeUinsNotInOrganization" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITMEMBEROVERLIMIT = "LimitExceeded.ShareUnitMemberOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) AddShareUnitMembersWithContext(ctx context.Context, request *AddShareUnitMembersRequest) (response *AddShareUnitMembersResponse, err error) { + if request == nil { + request = NewAddShareUnitMembersRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AddShareUnitMembers require credential") + } + + request.SetContext(ctx) + + response = NewAddShareUnitMembersResponse() + err = c.Send(request, response) + return +} + +func NewAddShareUnitResourcesRequest() (request *AddShareUnitResourcesRequest) { + request = &AddShareUnitResourcesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "AddShareUnitResources") + + + return +} + +func NewAddShareUnitResourcesResponse() (response *AddShareUnitResourcesResponse) { + response = &AddShareUnitResourcesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// AddShareUnitResources +// 添加共享单元资源 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_HASDIFFERENTRESOURCETYPE = "FailedOperation.HasDifferentResourceType" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHARERESOURCETYPENOTEXIST = "FailedOperation.ShareResourceTypeNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITRESOURCEOVERLIMIT = "LimitExceeded.ShareUnitResourceOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MEMBERUNSUPPORTEDOPERATION = "UnsupportedOperation.MemberUnsupportedOperation" +func (c *Client) AddShareUnitResources(request *AddShareUnitResourcesRequest) (response *AddShareUnitResourcesResponse, err error) { + return c.AddShareUnitResourcesWithContext(context.Background(), request) +} + +// AddShareUnitResources +// 添加共享单元资源 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_HASDIFFERENTRESOURCETYPE = "FailedOperation.HasDifferentResourceType" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHARERESOURCETYPENOTEXIST = "FailedOperation.ShareResourceTypeNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITRESOURCEOVERLIMIT = "LimitExceeded.ShareUnitResourceOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +// UNSUPPORTEDOPERATION_MEMBERUNSUPPORTEDOPERATION = "UnsupportedOperation.MemberUnsupportedOperation" +func (c *Client) AddShareUnitResourcesWithContext(ctx context.Context, request *AddShareUnitResourcesRequest) (response *AddShareUnitResourcesResponse, err error) { + if request == nil { + request = NewAddShareUnitResourcesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("AddShareUnitResources require credential") + } + + request.SetContext(ctx) + + response = NewAddShareUnitResourcesResponse() + err = c.Send(request, response) + return +} + func NewBindOrganizationMemberAuthAccountRequest() (request *BindOrganizationMemberAuthAccountRequest) { request = &BindOrganizationMemberAuthAccountRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -465,14 +668,18 @@ func NewCreateOrganizationMemberResponse() (response *CreateOrganizationMemberRe // FAILEDOPERATION_ORGANIZATIONNODENOTEXIST = "FailedOperation.OrganizationNodeNotExist" // FAILEDOPERATION_ORGANIZATIONPERMISSIONILLEGAL = "FailedOperation.OrganizationPermissionIllegal" // FAILEDOPERATION_ORGANIZATIONPOLICYILLEGAL = "FailedOperation.OrganizationPolicyIllegal" +// FAILEDOPERATION_PARTNERMANAGEMENTERR = "FailedOperation.PartnerManagementErr" // FAILEDOPERATION_PAYUINILLEGAL = "FailedOperation.PayUinIllegal" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_ORGANIZATIONMEMBERNOTEXIST = "InvalidParameter.OrganizationMemberNotExist" // LIMITEXCEEDED_CREATEMEMBEROVERLIMIT = "LimitExceeded.CreateMemberOverLimit" // LIMITEXCEEDED_ORGANIZATIONMEMBEROVERLIMIT = "LimitExceeded.OrganizationMemberOverLimit" +// RESOURCENOTFOUND_ORGANIZATIONAUTHRELATIONNOTEXIST = "ResourceNotFound.OrganizationAuthRelationNotExist" +// RESOURCENOTFOUND_ORGANIZATIONMEMBERNOTEXIST = "ResourceNotFound.OrganizationMemberNotExist" // RESOURCENOTFOUND_ORGANIZATIONNODENOTEXIST = "ResourceNotFound.OrganizationNodeNotExist" // RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" +// UNSUPPORTEDOPERATION_ABNORMALFINANCIALSTATUSOFADMIN = "UnsupportedOperation.AbnormalFinancialStatusOfAdmin" // UNSUPPORTEDOPERATION_ADDDELEGATEPAYERNOTALLOW = "UnsupportedOperation.AddDelegatePayerNotAllow" // UNSUPPORTEDOPERATION_ADDDISCOUNTINHERITNOTALLOW = "UnsupportedOperation.AddDiscountInheritNotAllow" // UNSUPPORTEDOPERATION_EXISTEDAGENT = "UnsupportedOperation.ExistedAgent" @@ -487,6 +694,7 @@ func NewCreateOrganizationMemberResponse() (response *CreateOrganizationMemberRe // UNSUPPORTEDOPERATION_OWNERDISCOUNTINHERITEXISTED = "UnsupportedOperation.OwnerDiscountInheritExisted" // UNSUPPORTEDOPERATION_PAYERARREARSANDNOCREDITACCOUNT = "UnsupportedOperation.PayerArrearsAndNoCreditAccount" // UNSUPPORTEDOPERATION_PAYEREXISTACCOUNTLEVELDISCOUNTINHERIT = "UnsupportedOperation.PayerExistAccountLevelDiscountInherit" +// UNSUPPORTEDOPERATION_SECONDARYDISTRIBUTORSUBCLIENTEXISTED = "UnsupportedOperation.SecondaryDistributorSubClientExisted" func (c *Client) CreateOrganizationMember(request *CreateOrganizationMemberRequest) (response *CreateOrganizationMemberResponse, err error) { return c.CreateOrganizationMemberWithContext(context.Background(), request) } @@ -510,14 +718,18 @@ func (c *Client) CreateOrganizationMember(request *CreateOrganizationMemberReque // FAILEDOPERATION_ORGANIZATIONNODENOTEXIST = "FailedOperation.OrganizationNodeNotExist" // FAILEDOPERATION_ORGANIZATIONPERMISSIONILLEGAL = "FailedOperation.OrganizationPermissionIllegal" // FAILEDOPERATION_ORGANIZATIONPOLICYILLEGAL = "FailedOperation.OrganizationPolicyIllegal" +// FAILEDOPERATION_PARTNERMANAGEMENTERR = "FailedOperation.PartnerManagementErr" // FAILEDOPERATION_PAYUINILLEGAL = "FailedOperation.PayUinIllegal" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" // INVALIDPARAMETER_ORGANIZATIONMEMBERNOTEXIST = "InvalidParameter.OrganizationMemberNotExist" // LIMITEXCEEDED_CREATEMEMBEROVERLIMIT = "LimitExceeded.CreateMemberOverLimit" // LIMITEXCEEDED_ORGANIZATIONMEMBEROVERLIMIT = "LimitExceeded.OrganizationMemberOverLimit" +// RESOURCENOTFOUND_ORGANIZATIONAUTHRELATIONNOTEXIST = "ResourceNotFound.OrganizationAuthRelationNotExist" +// RESOURCENOTFOUND_ORGANIZATIONMEMBERNOTEXIST = "ResourceNotFound.OrganizationMemberNotExist" // RESOURCENOTFOUND_ORGANIZATIONNODENOTEXIST = "ResourceNotFound.OrganizationNodeNotExist" // RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" +// UNSUPPORTEDOPERATION_ABNORMALFINANCIALSTATUSOFADMIN = "UnsupportedOperation.AbnormalFinancialStatusOfAdmin" // UNSUPPORTEDOPERATION_ADDDELEGATEPAYERNOTALLOW = "UnsupportedOperation.AddDelegatePayerNotAllow" // UNSUPPORTEDOPERATION_ADDDISCOUNTINHERITNOTALLOW = "UnsupportedOperation.AddDiscountInheritNotAllow" // UNSUPPORTEDOPERATION_EXISTEDAGENT = "UnsupportedOperation.ExistedAgent" @@ -532,6 +744,7 @@ func (c *Client) CreateOrganizationMember(request *CreateOrganizationMemberReque // UNSUPPORTEDOPERATION_OWNERDISCOUNTINHERITEXISTED = "UnsupportedOperation.OwnerDiscountInheritExisted" // UNSUPPORTEDOPERATION_PAYERARREARSANDNOCREDITACCOUNT = "UnsupportedOperation.PayerArrearsAndNoCreditAccount" // UNSUPPORTEDOPERATION_PAYEREXISTACCOUNTLEVELDISCOUNTINHERIT = "UnsupportedOperation.PayerExistAccountLevelDiscountInherit" +// UNSUPPORTEDOPERATION_SECONDARYDISTRIBUTORSUBCLIENTEXISTED = "UnsupportedOperation.SecondaryDistributorSubClientExisted" func (c *Client) CreateOrganizationMemberWithContext(ctx context.Context, request *CreateOrganizationMemberRequest) (response *CreateOrganizationMemberResponse, err error) { if request == nil { request = NewCreateOrganizationMemberRequest() @@ -737,6 +950,73 @@ func (c *Client) CreateOrganizationMembersPolicyWithContext(ctx context.Context, return } +func NewDeleteAccountRequest() (request *DeleteAccountRequest) { + request = &DeleteAccountRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DeleteAccount") + + + return +} + +func NewDeleteAccountResponse() (response *DeleteAccountResponse) { + response = &DeleteAccountResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteAccount +// 删除成员账号 +// +// 可能返回的错误码: +// FAILEDOPERATION_MEMBERSHARERESOURCE = "FailedOperation.MemberShareResource" +// FAILEDOPERATION_ORGANIZATIONAUTHMANAGENOTALLOWDELETE = "FailedOperation.OrganizationAuthManageNotAllowDelete" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND_MEMBERNOTEXIST = "ResourceNotFound.MemberNotExist" +// RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" +// UNSUPPORTEDOPERATION_DELETEACCOUNTDISABLED = "UnsupportedOperation.DeleteAccountDisabled" +// UNSUPPORTEDOPERATION_INVITEACCOUNTNOTALLOWDELETE = "UnsupportedOperation.InviteAccountNotAllowDelete" +// UNSUPPORTEDOPERATION_MEMBERACCOUNTEXISTRESOURCE = "UnsupportedOperation.MemberAccountExistResource" +// UNSUPPORTEDOPERATION_MEMBEREXISTSERVICENOTALLOWDELETE = "UnsupportedOperation.MemberExistServiceNotAllowDelete" +func (c *Client) DeleteAccount(request *DeleteAccountRequest) (response *DeleteAccountResponse, err error) { + return c.DeleteAccountWithContext(context.Background(), request) +} + +// DeleteAccount +// 删除成员账号 +// +// 可能返回的错误码: +// FAILEDOPERATION_MEMBERSHARERESOURCE = "FailedOperation.MemberShareResource" +// FAILEDOPERATION_ORGANIZATIONAUTHMANAGENOTALLOWDELETE = "FailedOperation.OrganizationAuthManageNotAllowDelete" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND_MEMBERNOTEXIST = "ResourceNotFound.MemberNotExist" +// RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" +// UNSUPPORTEDOPERATION_DELETEACCOUNTDISABLED = "UnsupportedOperation.DeleteAccountDisabled" +// UNSUPPORTEDOPERATION_INVITEACCOUNTNOTALLOWDELETE = "UnsupportedOperation.InviteAccountNotAllowDelete" +// UNSUPPORTEDOPERATION_MEMBERACCOUNTEXISTRESOURCE = "UnsupportedOperation.MemberAccountExistResource" +// UNSUPPORTEDOPERATION_MEMBEREXISTSERVICENOTALLOWDELETE = "UnsupportedOperation.MemberExistServiceNotAllowDelete" +func (c *Client) DeleteAccountWithContext(ctx context.Context, request *DeleteAccountRequest) (response *DeleteAccountResponse, err error) { + if request == nil { + request = NewDeleteAccountRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteAccount require credential") + } + + request.SetContext(ctx) + + response = NewDeleteAccountResponse() + err = c.Send(request, response) + return +} + func NewDeleteOrganizationRequest() (request *DeleteOrganizationRequest) { request = &DeleteOrganizationRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1115,6 +1395,209 @@ func (c *Client) DeleteOrganizationNodesWithContext(ctx context.Context, request return } +func NewDeleteShareUnitRequest() (request *DeleteShareUnitRequest) { + request = &DeleteShareUnitRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DeleteShareUnit") + + + return +} + +func NewDeleteShareUnitResponse() (response *DeleteShareUnitResponse) { + response = &DeleteShareUnitResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteShareUnit +// 删除共享单元。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteShareUnit(request *DeleteShareUnitRequest) (response *DeleteShareUnitResponse, err error) { + return c.DeleteShareUnitWithContext(context.Background(), request) +} + +// DeleteShareUnit +// 删除共享单元。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteShareUnitWithContext(ctx context.Context, request *DeleteShareUnitRequest) (response *DeleteShareUnitResponse, err error) { + if request == nil { + request = NewDeleteShareUnitRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteShareUnit require credential") + } + + request.SetContext(ctx) + + response = NewDeleteShareUnitResponse() + err = c.Send(request, response) + return +} + +func NewDeleteShareUnitMembersRequest() (request *DeleteShareUnitMembersRequest) { + request = &DeleteShareUnitMembersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DeleteShareUnitMembers") + + + return +} + +func NewDeleteShareUnitMembersResponse() (response *DeleteShareUnitMembersResponse) { + response = &DeleteShareUnitMembersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteShareUnitMembers +// 删除共享单元成员 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHARERESOURCEMEMBERINUSE = "FailedOperation.ShareResourceMemberInUse" +// FAILEDOPERATION_SHARERESOURCENOTEXIST = "FailedOperation.ShareResourceNotExist" +// FAILEDOPERATION_SHARERESOURCETYPENOTEXIST = "FailedOperation.ShareResourceTypeNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITMEMBEROVERLIMIT = "LimitExceeded.ShareUnitMemberOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteShareUnitMembers(request *DeleteShareUnitMembersRequest) (response *DeleteShareUnitMembersResponse, err error) { + return c.DeleteShareUnitMembersWithContext(context.Background(), request) +} + +// DeleteShareUnitMembers +// 删除共享单元成员 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHARERESOURCEMEMBERINUSE = "FailedOperation.ShareResourceMemberInUse" +// FAILEDOPERATION_SHARERESOURCENOTEXIST = "FailedOperation.ShareResourceNotExist" +// FAILEDOPERATION_SHARERESOURCETYPENOTEXIST = "FailedOperation.ShareResourceTypeNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITMEMBEROVERLIMIT = "LimitExceeded.ShareUnitMemberOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteShareUnitMembersWithContext(ctx context.Context, request *DeleteShareUnitMembersRequest) (response *DeleteShareUnitMembersResponse, err error) { + if request == nil { + request = NewDeleteShareUnitMembersRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteShareUnitMembers require credential") + } + + request.SetContext(ctx) + + response = NewDeleteShareUnitMembersResponse() + err = c.Send(request, response) + return +} + +func NewDeleteShareUnitResourcesRequest() (request *DeleteShareUnitResourcesRequest) { + request = &DeleteShareUnitResourcesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DeleteShareUnitResources") + + + return +} + +func NewDeleteShareUnitResourcesResponse() (response *DeleteShareUnitResourcesResponse) { + response = &DeleteShareUnitResourcesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DeleteShareUnitResources +// 删除共享单元资源 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHARERESOURCEMEMBERINUSE = "FailedOperation.ShareResourceMemberInUse" +// FAILEDOPERATION_SHARERESOURCENOTEXIST = "FailedOperation.ShareResourceNotExist" +// FAILEDOPERATION_SHARERESOURCETYPENOTEXIST = "FailedOperation.ShareResourceTypeNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITRESOURCEOVERLIMIT = "LimitExceeded.ShareUnitResourceOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteShareUnitResources(request *DeleteShareUnitResourcesRequest) (response *DeleteShareUnitResourcesResponse, err error) { + return c.DeleteShareUnitResourcesWithContext(context.Background(), request) +} + +// DeleteShareUnitResources +// 删除共享单元资源 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" +// FAILEDOPERATION_SHARERESOURCEMEMBERINUSE = "FailedOperation.ShareResourceMemberInUse" +// FAILEDOPERATION_SHARERESOURCENOTEXIST = "FailedOperation.ShareResourceNotExist" +// FAILEDOPERATION_SHARERESOURCETYPENOTEXIST = "FailedOperation.ShareResourceTypeNotExist" +// FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED_SHAREUNITRESOURCEOVERLIMIT = "LimitExceeded.ShareUnitResourceOverLimit" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteShareUnitResourcesWithContext(ctx context.Context, request *DeleteShareUnitResourcesRequest) (response *DeleteShareUnitResourcesResponse, err error) { + if request == nil { + request = NewDeleteShareUnitResourcesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DeleteShareUnitResources require credential") + } + + request.SetContext(ctx) + + response = NewDeleteShareUnitResourcesResponse() + err = c.Send(request, response) + return +} + func NewDescribeOrganizationRequest() (request *DescribeOrganizationRequest) { request = &DescribeOrganizationRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1518,6 +2001,8 @@ func NewDescribeOrganizationMemberEmailBindResponse() (response *DescribeOrganiz // INVALIDPARAMETER_CODEEXPIRED = "InvalidParameter.CodeExpired" // INVALIDPARAMETER_INVALIDEMAIL = "InvalidParameter.InvalidEmail" // INVALIDPARAMETER_PASSWORDILLEGAL = "InvalidParameter.PasswordIllegal" +// RESOURCENOTFOUND_ORGANIZATIONMEMBERNOTEXIST = "ResourceNotFound.OrganizationMemberNotExist" +// RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" // RESOURCENOTFOUND_USERNOTEXIST = "ResourceNotFound.UserNotExist" func (c *Client) DescribeOrganizationMemberEmailBind(request *DescribeOrganizationMemberEmailBindRequest) (response *DescribeOrganizationMemberEmailBindResponse, err error) { return c.DescribeOrganizationMemberEmailBindWithContext(context.Background(), request) @@ -1540,6 +2025,8 @@ func (c *Client) DescribeOrganizationMemberEmailBind(request *DescribeOrganizati // INVALIDPARAMETER_CODEEXPIRED = "InvalidParameter.CodeExpired" // INVALIDPARAMETER_INVALIDEMAIL = "InvalidParameter.InvalidEmail" // INVALIDPARAMETER_PASSWORDILLEGAL = "InvalidParameter.PasswordIllegal" +// RESOURCENOTFOUND_ORGANIZATIONMEMBERNOTEXIST = "ResourceNotFound.OrganizationMemberNotExist" +// RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" // RESOURCENOTFOUND_USERNOTEXIST = "ResourceNotFound.UserNotExist" func (c *Client) DescribeOrganizationMemberEmailBindWithContext(ctx context.Context, request *DescribeOrganizationMemberEmailBindRequest) (response *DescribeOrganizationMemberEmailBindResponse, err error) { if request == nil { @@ -1638,6 +2125,7 @@ func NewDescribeOrganizationMembersResponse() (response *DescribeOrganizationMem // FAILEDOPERATION_OPERATEBILLINGPERMISSIONERR = "FailedOperation.OperateBillingPermissionErr" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND_ORGANIZATIONNODENOTEXIST = "ResourceNotFound.OrganizationNodeNotExist" // RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" // RESOURCENOTFOUND_ORGANIZATIONSERVICENOTEXIST = "ResourceNotFound.OrganizationServiceNotExist" func (c *Client) DescribeOrganizationMembers(request *DescribeOrganizationMembersRequest) (response *DescribeOrganizationMembersResponse, err error) { @@ -1651,6 +2139,7 @@ func (c *Client) DescribeOrganizationMembers(request *DescribeOrganizationMember // FAILEDOPERATION_OPERATEBILLINGPERMISSIONERR = "FailedOperation.OperateBillingPermissionErr" // INTERNALERROR = "InternalError" // INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND_ORGANIZATIONNODENOTEXIST = "ResourceNotFound.OrganizationNodeNotExist" // RESOURCENOTFOUND_ORGANIZATIONNOTEXIST = "ResourceNotFound.OrganizationNotExist" // RESOURCENOTFOUND_ORGANIZATIONSERVICENOTEXIST = "ResourceNotFound.OrganizationServiceNotExist" func (c *Client) DescribeOrganizationMembersWithContext(ctx context.Context, request *DescribeOrganizationMembersRequest) (response *DescribeOrganizationMembersResponse, err error) { @@ -1722,6 +2211,242 @@ func (c *Client) DescribeOrganizationNodesWithContext(ctx context.Context, reque return } +func NewDescribeShareAreasRequest() (request *DescribeShareAreasRequest) { + request = &DescribeShareAreasRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DescribeShareAreas") + + + return +} + +func NewDescribeShareAreasResponse() (response *DescribeShareAreasResponse) { + response = &DescribeShareAreasResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeShareAreas +// 获取可共享地域列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareAreas(request *DescribeShareAreasRequest) (response *DescribeShareAreasResponse, err error) { + return c.DescribeShareAreasWithContext(context.Background(), request) +} + +// DescribeShareAreas +// 获取可共享地域列表 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareAreasWithContext(ctx context.Context, request *DescribeShareAreasRequest) (response *DescribeShareAreasResponse, err error) { + if request == nil { + request = NewDescribeShareAreasRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeShareAreas require credential") + } + + request.SetContext(ctx) + + response = NewDescribeShareAreasResponse() + err = c.Send(request, response) + return +} + +func NewDescribeShareUnitMembersRequest() (request *DescribeShareUnitMembersRequest) { + request = &DescribeShareUnitMembersRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DescribeShareUnitMembers") + + + return +} + +func NewDescribeShareUnitMembersResponse() (response *DescribeShareUnitMembersResponse) { + response = &DescribeShareUnitMembersResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeShareUnitMembers +// 获取共享单元成员列表。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareUnitMembers(request *DescribeShareUnitMembersRequest) (response *DescribeShareUnitMembersResponse, err error) { + return c.DescribeShareUnitMembersWithContext(context.Background(), request) +} + +// DescribeShareUnitMembers +// 获取共享单元成员列表。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareUnitMembersWithContext(ctx context.Context, request *DescribeShareUnitMembersRequest) (response *DescribeShareUnitMembersResponse, err error) { + if request == nil { + request = NewDescribeShareUnitMembersRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeShareUnitMembers require credential") + } + + request.SetContext(ctx) + + response = NewDescribeShareUnitMembersResponse() + err = c.Send(request, response) + return +} + +func NewDescribeShareUnitResourcesRequest() (request *DescribeShareUnitResourcesRequest) { + request = &DescribeShareUnitResourcesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DescribeShareUnitResources") + + + return +} + +func NewDescribeShareUnitResourcesResponse() (response *DescribeShareUnitResourcesResponse) { + response = &DescribeShareUnitResourcesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeShareUnitResources +// 获取共享单元资源列表。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareUnitResources(request *DescribeShareUnitResourcesRequest) (response *DescribeShareUnitResourcesResponse, err error) { + return c.DescribeShareUnitResourcesWithContext(context.Background(), request) +} + +// DescribeShareUnitResources +// 获取共享单元资源列表。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareUnitResourcesWithContext(ctx context.Context, request *DescribeShareUnitResourcesRequest) (response *DescribeShareUnitResourcesResponse, err error) { + if request == nil { + request = NewDescribeShareUnitResourcesRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeShareUnitResources require credential") + } + + request.SetContext(ctx) + + response = NewDescribeShareUnitResourcesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeShareUnitsRequest() (request *DescribeShareUnitsRequest) { + request = &DescribeShareUnitsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "DescribeShareUnits") + + + return +} + +func NewDescribeShareUnitsResponse() (response *DescribeShareUnitsResponse) { + response = &DescribeShareUnitsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// DescribeShareUnits +// 获取共享单元列表。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareUnits(request *DescribeShareUnitsRequest) (response *DescribeShareUnitsResponse, err error) { + return c.DescribeShareUnitsWithContext(context.Background(), request) +} + +// DescribeShareUnits +// 获取共享单元列表。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeShareUnitsWithContext(ctx context.Context, request *DescribeShareUnitsRequest) (response *DescribeShareUnitsResponse, err error) { + if request == nil { + request = NewDescribeShareUnitsRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("DescribeShareUnits require credential") + } + + request.SetContext(ctx) + + response = NewDescribeShareUnitsResponse() + err = c.Send(request, response) + return +} + func NewListOrganizationIdentityRequest() (request *ListOrganizationIdentityRequest) { request = &ListOrganizationIdentityRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2202,3 +2927,64 @@ func (c *Client) UpdateOrganizationNodeWithContext(ctx context.Context, request err = c.Send(request, response) return } + +func NewUpdateShareUnitRequest() (request *UpdateShareUnitRequest) { + request = &UpdateShareUnitRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("organization", APIVersion, "UpdateShareUnit") + + + return +} + +func NewUpdateShareUnitResponse() (response *UpdateShareUnitResponse) { + response = &UpdateShareUnitResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// UpdateShareUnit +// 更新共享单元。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateShareUnit(request *UpdateShareUnitRequest) (response *UpdateShareUnitResponse, err error) { + return c.UpdateShareUnitWithContext(context.Background(), request) +} + +// UpdateShareUnit +// 更新共享单元。 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateShareUnitWithContext(ctx context.Context, request *UpdateShareUnitRequest) (response *UpdateShareUnitResponse, err error) { + if request == nil { + request = NewUpdateShareUnitRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("UpdateShareUnit require credential") + } + + request.SetContext(ctx) + + response = NewUpdateShareUnitResponse() + err = c.Send(request, response) + return +} diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/errors.go index 9249f3496c..e5c3912214 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/errors.go @@ -17,7 +17,10 @@ package v20210331 const ( // 此产品的特有错误码 - // 该帐号已被注册。 + // 操作失败。 + FAILEDOPERATION = "FailedOperation" + + // 该账号已被注册。 FAILEDOPERATION_ACCOUNTALREADYREGISTER = "FailedOperation.AccountAlreadyRegister" // 用户未实名。 @@ -83,6 +86,9 @@ const ( // 查询策略失败。 FAILEDOPERATION_GETPOLICYDETAIL = "FailedOperation.GetPolicyDetail" + // 共享单元存在不同的共享资源类型 + FAILEDOPERATION_HASDIFFERENTRESOURCETYPE = "FailedOperation.HasDifferentResourceType" + // 邮箱绑定失败。 FAILEDOPERATION_MEMBERBINDEMAILERROR = "FailedOperation.MemberBindEmailError" @@ -107,7 +113,7 @@ const ( // 成员授权策略名已存在。 FAILEDOPERATION_MEMBERPOLICYNAMEEXIST = "FailedOperation.MemberPolicyNameExist" - // 成员正在共享资源。 + // 成员正在共享资源,不允许退出组织。 FAILEDOPERATION_MEMBERSHARERESOURCE = "FailedOperation.MemberShareResource" // 企业组织单元成员不为空。 @@ -119,7 +125,7 @@ const ( // 操作策略失败。 FAILEDOPERATION_OPERATEPOLICY = "FailedOperation.OperatePolicy" - // 成员是主体管理账号不允许删除。 + // 成员是主体管理账号,不允许退出组织。 FAILEDOPERATION_ORGANIZATIONAUTHMANAGENOTALLOWDELETE = "FailedOperation.OrganizationAuthManageNotAllowDelete" // 企业组织已经存在。 @@ -161,6 +167,9 @@ const ( // 集团策略不是禁用状态。 FAILEDOPERATION_ORGANIZATIONPOLICYISNOTDISABLED = "FailedOperation.OrganizationPolicyIsNotDisabled" + // 调用经销系统报错。 + FAILEDOPERATION_PARTNERMANAGEMENTERR = "FailedOperation.PartnerManagementErr" + // 代付者不合法。 FAILEDOPERATION_PAYUINILLEGAL = "FailedOperation.PayUinIllegal" @@ -173,12 +182,27 @@ const ( // 退出共享单元失败。 FAILEDOPERATION_QUITESHAREUNIT = "FailedOperation.QuiteShareUnit" + // 资源超过最大上限。 + FAILEDOPERATION_RESOURCEOVERLIMIT = "FailedOperation.ResourceOverLimit" + + // 共享地域不存在。 + FAILEDOPERATION_SHAREAREANOTEXIST = "FailedOperation.ShareAreaNotExist" + // 成员正在使用共享资源。 FAILEDOPERATION_SHARERESOURCEMEMBERINUSE = "FailedOperation.ShareResourceMemberInUse" + // 共享资源不存在。 + FAILEDOPERATION_SHARERESOURCENOTEXIST = "FailedOperation.ShareResourceNotExist" + + // 共享资源类型不存在。 + FAILEDOPERATION_SHARERESOURCETYPENOTEXIST = "FailedOperation.ShareResourceTypeNotExist" + // 共享单元不为空。 FAILEDOPERATION_SHAREUNITNOTEMPTY = "FailedOperation.ShareUnitNotEmpty" + // 共享单元不存在。 + FAILEDOPERATION_SHAREUNITNOTEXIST = "FailedOperation.ShareUnitNotExist" + // 存在不属于当前组织的uin。 FAILEDOPERATION_SOMEUINSNOTINORGANIZATION = "FailedOperation.SomeUinsNotInOrganization" @@ -236,9 +260,21 @@ const ( // 手机超过绑定上限。 LIMITEXCEEDED_PHONENUMBOUND = "LimitExceeded.PhoneNumBound" + // 当次操作的共享成员超过上限。 + LIMITEXCEEDED_SHAREUNITMEMBEROVERLIMIT = "LimitExceeded.ShareUnitMemberOverLimit" + + // 当次操作的共享资源超过上限。 + LIMITEXCEEDED_SHAREUNITRESOURCEOVERLIMIT = "LimitExceeded.ShareUnitResourceOverLimit" + // 修改成员绑定信息超过限制。 LIMITEXCEEDED_UPDATEEMAILBINDOVERLIMIT = "LimitExceeded.UpdateEmailBindOverLimit" + // 操作被拒绝。 + OPERATIONDENIED = "OperationDenied" + + // 资源不存在。 + RESOURCENOTFOUND = "ResourceNotFound" + // 邮箱绑定记录不存在。 RESOURCENOTFOUND_EMAILBINDRECORDNOTEXIST = "ResourceNotFound.EmailBindRecordNotExist" @@ -251,6 +287,9 @@ const ( // 组织成员策略不存在。 RESOURCENOTFOUND_MEMBERPOLICYNOTEXIST = "ResourceNotFound.MemberPolicyNotExist" + // 认证主体不存在。 + RESOURCENOTFOUND_ORGANIZATIONAUTHRELATIONNOTEXIST = "ResourceNotFound.OrganizationAuthRelationNotExist" + // 组织身份不存在。 RESOURCENOTFOUND_ORGANIZATIONIDENTITYNOTEXIST = "ResourceNotFound.OrganizationIdentityNotExist" @@ -272,9 +311,15 @@ const ( // 用户不存在。 RESOURCENOTFOUND_USERNOTEXIST = "ResourceNotFound.UserNotExist" + // 资源不可用。 + RESOURCEUNAVAILABLE = "ResourceUnavailable" + // 操作不支持。 UNSUPPORTEDOPERATION = "UnsupportedOperation" + // 代付者财务状态异常,不支持代付费。 + UNSUPPORTEDOPERATION_ABNORMALFINANCIALSTATUSOFADMIN = "UnsupportedOperation.AbnormalFinancialStatusOfAdmin" + // 不允许添加代付关系。 UNSUPPORTEDOPERATION_ADDDELEGATEPAYERNOTALLOW = "UnsupportedOperation.AddDelegatePayerNotAllow" @@ -284,12 +329,15 @@ const ( // 创建的成员不允许创建组织。 UNSUPPORTEDOPERATION_CREATEMEMBERNOTALLOWCREATEORGANIZATION = "UnsupportedOperation.CreateMemberNotAllowCreateOrganization" - // 创建的成员不允许删除。 + // 创建的成员不允许移除组织。 UNSUPPORTEDOPERATION_CREATEMEMBERNOTALLOWDELETE = "UnsupportedOperation.CreateMemberNotAllowDelete" // 创建的成员不允许退出。 UNSUPPORTEDOPERATION_CREATEMEMBERNOTALLOWQUIT = "UnsupportedOperation.CreateMemberNotAllowQuit" + // 成员删除许可未开启。 + UNSUPPORTEDOPERATION_DELETEACCOUNTDISABLED = "UnsupportedOperation.DeleteAccountDisabled" + // 不允许删除代付关系。 UNSUPPORTEDOPERATION_DELETEDELEGATEPAYERNOTALLOW = "UnsupportedOperation.DeleteDelegatePayerNotAllow" @@ -302,12 +350,18 @@ const ( // 用户类型不一致。 UNSUPPORTEDOPERATION_INCONSISTENTUSERTYPES = "UnsupportedOperation.InconsistentUserTypes" + // 邀请的成员不允许删除。 + UNSUPPORTEDOPERATION_INVITEACCOUNTNOTALLOWDELETE = "UnsupportedOperation.InviteAccountNotAllowDelete" + // 调用经管系统报错。 UNSUPPORTEDOPERATION_MANAGEMENTSYSTEMERROR = "UnsupportedOperation.ManagementSystemError" // 成员账户欠费。 UNSUPPORTEDOPERATION_MEMBERACCOUNTARREARS = "UnsupportedOperation.MemberAccountArrears" + // 成员账号存在资源,不允许删除。 + UNSUPPORTEDOPERATION_MEMBERACCOUNTEXISTRESOURCE = "UnsupportedOperation.MemberAccountExistResource" + // 成员存在优惠继承。 UNSUPPORTEDOPERATION_MEMBERDISCOUNTINHERITEXISTED = "UnsupportedOperation.MemberDiscountInheritExisted" @@ -317,7 +371,7 @@ const ( // 成员设置了操作审批,不允许删除。 UNSUPPORTEDOPERATION_MEMBEREXISTOPERATEPROCESSNOTALLOWDELETE = "UnsupportedOperation.MemberExistOperateProcessNotAllowDelete" - // 组织成员被委派集团服务,不允许退出。 + // 成员是集团服务委派管理员,不允许退出组织。 UNSUPPORTEDOPERATION_MEMBEREXISTSERVICENOTALLOWDELETE = "UnsupportedOperation.MemberExistServiceNotAllowDelete" // 账号是代理商或代客。 @@ -329,6 +383,9 @@ const ( // 成员不支持主动退出。 UNSUPPORTEDOPERATION_MEMBERNOTALLOWQUIT = "UnsupportedOperation.MemberNotAllowQuit" + // 成员不支持操作。 + UNSUPPORTEDOPERATION_MEMBERUNSUPPORTEDOPERATION = "UnsupportedOperation.MemberUnsupportedOperation" + // 存在在途订单。 UNSUPPORTEDOPERATION_ORDERINPROGRESSEXISTED = "UnsupportedOperation.OrderInProgressExisted" @@ -340,4 +397,7 @@ const ( // 代付者存在账户级优惠。 UNSUPPORTEDOPERATION_PAYEREXISTACCOUNTLEVELDISCOUNTINHERIT = "UnsupportedOperation.PayerExistAccountLevelDiscountInherit" + + // 存在二级经销商子客,不支持代付费。 + UNSUPPORTEDOPERATION_SECONDARYDISTRIBUTORSUBCLIENTEXISTED = "UnsupportedOperation.SecondaryDistributorSubClientExisted" ) diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/models.go index a6c50c129d..3d0626cdb9 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331/models.go @@ -170,6 +170,220 @@ func (r *AddOrganizationNodeResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type AddShareUnitMembersRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 共享成员列表。最大10个。 + Members []*ShareMember `json:"Members,omitnil" name:"Members"` +} + +type AddShareUnitMembersRequest struct { + *tchttp.BaseRequest + + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 共享成员列表。最大10个。 + Members []*ShareMember `json:"Members,omitnil" name:"Members"` +} + +func (r *AddShareUnitMembersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddShareUnitMembersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UnitId") + delete(f, "Area") + delete(f, "Members") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddShareUnitMembersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AddShareUnitMembersResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type AddShareUnitMembersResponse struct { + *tchttp.BaseResponse + Response *AddShareUnitMembersResponseParams `json:"Response"` +} + +func (r *AddShareUnitMembersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddShareUnitMembersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AddShareUnitRequestParams struct { + // 共享单元名称。仅支持大小写字母、数字、-、以及_的组合,3-128个字符。 + Name *string `json:"Name,omitnil" name:"Name"` + + // 共享单元地域。可通过接口DescribeShareAreas获取支持共享的地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 共享单元描述。最大128个字符。 + Description *string `json:"Description,omitnil" name:"Description"` +} + +type AddShareUnitRequest struct { + *tchttp.BaseRequest + + // 共享单元名称。仅支持大小写字母、数字、-、以及_的组合,3-128个字符。 + Name *string `json:"Name,omitnil" name:"Name"` + + // 共享单元地域。可通过接口DescribeShareAreas获取支持共享的地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 共享单元描述。最大128个字符。 + Description *string `json:"Description,omitnil" name:"Description"` +} + +func (r *AddShareUnitRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddShareUnitRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Name") + delete(f, "Area") + delete(f, "Description") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddShareUnitRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AddShareUnitResourcesRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 共享资源类型。支持共享的资源类型,请参见[资源共享概述](https://cloud.tencent.com/document/product/850/59489) + Type *string `json:"Type,omitnil" name:"Type"` + + // 共享资源列表。最大10个。 + Resources []*ProductResource `json:"Resources,omitnil" name:"Resources"` +} + +type AddShareUnitResourcesRequest struct { + *tchttp.BaseRequest + + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 共享资源类型。支持共享的资源类型,请参见[资源共享概述](https://cloud.tencent.com/document/product/850/59489) + Type *string `json:"Type,omitnil" name:"Type"` + + // 共享资源列表。最大10个。 + Resources []*ProductResource `json:"Resources,omitnil" name:"Resources"` +} + +func (r *AddShareUnitResourcesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddShareUnitResourcesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UnitId") + delete(f, "Area") + delete(f, "Type") + delete(f, "Resources") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "AddShareUnitResourcesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AddShareUnitResourcesResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type AddShareUnitResourcesResponse struct { + *tchttp.BaseResponse + Response *AddShareUnitResourcesResponseParams `json:"Response"` +} + +func (r *AddShareUnitResourcesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddShareUnitResourcesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type AddShareUnitResponseParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type AddShareUnitResponse struct { + *tchttp.BaseResponse + Response *AddShareUnitResponseParams `json:"Response"` +} + +func (r *AddShareUnitResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *AddShareUnitResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type AuthNode struct { // 互信主体关系ID // 注意:此字段可能返回 null,表示取不到有效值。 @@ -789,6 +1003,60 @@ func (r *CreateOrganizationResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type DeleteAccountRequestParams struct { + // 成员uin。 + MemberUin *int64 `json:"MemberUin,omitnil" name:"MemberUin"` +} + +type DeleteAccountRequest struct { + *tchttp.BaseRequest + + // 成员uin。 + MemberUin *int64 `json:"MemberUin,omitnil" name:"MemberUin"` +} + +func (r *DeleteAccountRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAccountRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "MemberUin") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAccountRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteAccountResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DeleteAccountResponse struct { + *tchttp.BaseResponse + Response *DeleteAccountResponseParams `json:"Response"` +} + +func (r *DeleteAccountResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteAccountResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type DeleteOrganizationIdentityRequestParams struct { // 身份ID @@ -1118,137 +1386,334 @@ func (r *DeleteOrganizationResponse) FromJsonString(s string) error { } // Predefined struct for user -type DescribeOrganizationAuthNodeRequestParams struct { - // 偏移量。 - Offset *uint64 `json:"Offset,omitnil" name:"Offset"` +type DeleteShareUnitMembersRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` - // 限制数目。最大50 - Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` - // 互信主体名称。 - AuthName *string `json:"AuthName,omitnil" name:"AuthName"` + // 成员列表。 + Members []*ShareMember `json:"Members,omitnil" name:"Members"` } -type DescribeOrganizationAuthNodeRequest struct { +type DeleteShareUnitMembersRequest struct { *tchttp.BaseRequest - // 偏移量。 - Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` - // 限制数目。最大50 - Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` - // 互信主体名称。 - AuthName *string `json:"AuthName,omitnil" name:"AuthName"` + // 成员列表。 + Members []*ShareMember `json:"Members,omitnil" name:"Members"` } -func (r *DescribeOrganizationAuthNodeRequest) ToJsonString() string { +func (r *DeleteShareUnitMembersRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationAuthNodeRequest) FromJsonString(s string) error { +func (r *DeleteShareUnitMembersRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "Offset") - delete(f, "Limit") - delete(f, "AuthName") + delete(f, "UnitId") + delete(f, "Area") + delete(f, "Members") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationAuthNodeRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteShareUnitMembersRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeOrganizationAuthNodeResponseParams struct { - // 总数。 - // 注意:此字段可能返回 null,表示取不到有效值。 - Total *int64 `json:"Total,omitnil" name:"Total"` - - // 条目详情。 - // 注意:此字段可能返回 null,表示取不到有效值。 - Items []*AuthNode `json:"Items,omitnil" name:"Items"` - +type DeleteShareUnitMembersResponseParams struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } -type DescribeOrganizationAuthNodeResponse struct { +type DeleteShareUnitMembersResponse struct { *tchttp.BaseResponse - Response *DescribeOrganizationAuthNodeResponseParams `json:"Response"` + Response *DeleteShareUnitMembersResponseParams `json:"Response"` } -func (r *DescribeOrganizationAuthNodeResponse) ToJsonString() string { +func (r *DeleteShareUnitMembersResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationAuthNodeResponse) FromJsonString(s string) error { +func (r *DeleteShareUnitMembersResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeOrganizationFinancialByMemberRequestParams struct { - // 查询开始月份。格式:yyyy-mm,例如:2021-01。 - Month *string `json:"Month,omitnil" name:"Month"` - - // 限制数目。取值范围:1~50,默认值:10 - Limit *int64 `json:"Limit,omitnil" name:"Limit"` - - // 偏移量。取值是limit的整数倍,默认值 : 0 - Offset *int64 `json:"Offset,omitnil" name:"Offset"` - - // 查询结束月份。格式:yyyy-mm,例如:2021-01,默认值为查询开始月份。 - EndMonth *string `json:"EndMonth,omitnil" name:"EndMonth"` - - // 查询成员列表。 最大100个 - MemberUins []*int64 `json:"MemberUins,omitnil" name:"MemberUins"` - - // 查询产品列表。 最大100个 - ProductCodes []*string `json:"ProductCodes,omitnil" name:"ProductCodes"` +type DeleteShareUnitRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` } -type DescribeOrganizationFinancialByMemberRequest struct { +type DeleteShareUnitRequest struct { *tchttp.BaseRequest - // 查询开始月份。格式:yyyy-mm,例如:2021-01。 - Month *string `json:"Month,omitnil" name:"Month"` - - // 限制数目。取值范围:1~50,默认值:10 - Limit *int64 `json:"Limit,omitnil" name:"Limit"` - - // 偏移量。取值是limit的整数倍,默认值 : 0 - Offset *int64 `json:"Offset,omitnil" name:"Offset"` - - // 查询结束月份。格式:yyyy-mm,例如:2021-01,默认值为查询开始月份。 - EndMonth *string `json:"EndMonth,omitnil" name:"EndMonth"` - - // 查询成员列表。 最大100个 - MemberUins []*int64 `json:"MemberUins,omitnil" name:"MemberUins"` - - // 查询产品列表。 最大100个 - ProductCodes []*string `json:"ProductCodes,omitnil" name:"ProductCodes"` + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` } -func (r *DescribeOrganizationFinancialByMemberRequest) ToJsonString() string { +func (r *DeleteShareUnitRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationFinancialByMemberRequest) FromJsonString(s string) error { +func (r *DeleteShareUnitRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "Month") + delete(f, "UnitId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteShareUnitRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteShareUnitResourcesRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 资源类型。支持共享的资源类型。 + Type *string `json:"Type,omitnil" name:"Type"` + + // 共享资源列表。最大10个。 + Resources []*ShareResource `json:"Resources,omitnil" name:"Resources"` +} + +type DeleteShareUnitResourcesRequest struct { + *tchttp.BaseRequest + + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 资源类型。支持共享的资源类型。 + Type *string `json:"Type,omitnil" name:"Type"` + + // 共享资源列表。最大10个。 + Resources []*ShareResource `json:"Resources,omitnil" name:"Resources"` +} + +func (r *DeleteShareUnitResourcesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteShareUnitResourcesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UnitId") + delete(f, "Area") + delete(f, "Type") + delete(f, "Resources") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteShareUnitResourcesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteShareUnitResourcesResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DeleteShareUnitResourcesResponse struct { + *tchttp.BaseResponse + Response *DeleteShareUnitResourcesResponseParams `json:"Response"` +} + +func (r *DeleteShareUnitResourcesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteShareUnitResourcesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DeleteShareUnitResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DeleteShareUnitResponse struct { + *tchttp.BaseResponse + Response *DeleteShareUnitResponseParams `json:"Response"` +} + +func (r *DeleteShareUnitResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteShareUnitResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationAuthNodeRequestParams struct { + // 偏移量。 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。最大50 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 互信主体名称。 + AuthName *string `json:"AuthName,omitnil" name:"AuthName"` +} + +type DescribeOrganizationAuthNodeRequest struct { + *tchttp.BaseRequest + + // 偏移量。 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。最大50 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 互信主体名称。 + AuthName *string `json:"AuthName,omitnil" name:"AuthName"` +} + +func (r *DescribeOrganizationAuthNodeRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationAuthNodeRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Offset") + delete(f, "Limit") + delete(f, "AuthName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationAuthNodeRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationAuthNodeResponseParams struct { + // 总数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Total *int64 `json:"Total,omitnil" name:"Total"` + + // 条目详情。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Items []*AuthNode `json:"Items,omitnil" name:"Items"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DescribeOrganizationAuthNodeResponse struct { + *tchttp.BaseResponse + Response *DescribeOrganizationAuthNodeResponseParams `json:"Response"` +} + +func (r *DescribeOrganizationAuthNodeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationAuthNodeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationFinancialByMemberRequestParams struct { + // 查询开始月份。格式:yyyy-mm,例如:2021-01。 + Month *string `json:"Month,omitnil" name:"Month"` + + // 限制数目。取值范围:1~50,默认值:10 + Limit *int64 `json:"Limit,omitnil" name:"Limit"` + + // 偏移量。取值是limit的整数倍,默认值 : 0 + Offset *int64 `json:"Offset,omitnil" name:"Offset"` + + // 查询结束月份。格式:yyyy-mm,例如:2021-01,默认值为查询开始月份。 + EndMonth *string `json:"EndMonth,omitnil" name:"EndMonth"` + + // 查询成员列表。 最大100个 + MemberUins []*int64 `json:"MemberUins,omitnil" name:"MemberUins"` + + // 查询产品列表。 最大100个 + ProductCodes []*string `json:"ProductCodes,omitnil" name:"ProductCodes"` +} + +type DescribeOrganizationFinancialByMemberRequest struct { + *tchttp.BaseRequest + + // 查询开始月份。格式:yyyy-mm,例如:2021-01。 + Month *string `json:"Month,omitnil" name:"Month"` + + // 限制数目。取值范围:1~50,默认值:10 + Limit *int64 `json:"Limit,omitnil" name:"Limit"` + + // 偏移量。取值是limit的整数倍,默认值 : 0 + Offset *int64 `json:"Offset,omitnil" name:"Offset"` + + // 查询结束月份。格式:yyyy-mm,例如:2021-01,默认值为查询开始月份。 + EndMonth *string `json:"EndMonth,omitnil" name:"EndMonth"` + + // 查询成员列表。 最大100个 + MemberUins []*int64 `json:"MemberUins,omitnil" name:"MemberUins"` + + // 查询产品列表。 最大100个 + ProductCodes []*string `json:"ProductCodes,omitnil" name:"ProductCodes"` +} + +func (r *DescribeOrganizationFinancialByMemberRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationFinancialByMemberRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Month") delete(f, "Limit") delete(f, "Offset") delete(f, "EndMonth") @@ -1875,230 +2340,558 @@ func (r *DescribeOrganizationMembersRequest) FromJsonString(s string) error { delete(f, "AuthName") delete(f, "Product") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationMembersRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationMembersRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationMembersResponseParams struct { + // 成员列表。 + Items []*OrgMember `json:"Items,omitnil" name:"Items"` + + // 总数目。 + Total *uint64 `json:"Total,omitnil" name:"Total"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DescribeOrganizationMembersResponse struct { + *tchttp.BaseResponse + Response *DescribeOrganizationMembersResponseParams `json:"Response"` +} + +func (r *DescribeOrganizationMembersResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationMembersResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationNodesRequestParams struct { + // 限制数目。最大50 + Limit *int64 `json:"Limit,omitnil" name:"Limit"` + + // 偏移量。 + Offset *int64 `json:"Offset,omitnil" name:"Offset"` +} + +type DescribeOrganizationNodesRequest struct { + *tchttp.BaseRequest + + // 限制数目。最大50 + Limit *int64 `json:"Limit,omitnil" name:"Limit"` + + // 偏移量。 + Offset *int64 `json:"Offset,omitnil" name:"Offset"` +} + +func (r *DescribeOrganizationNodesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationNodesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Limit") + delete(f, "Offset") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationNodesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationNodesResponseParams struct { + // 总数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Total *int64 `json:"Total,omitnil" name:"Total"` + + // 列表详情。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Items []*OrgNode `json:"Items,omitnil" name:"Items"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DescribeOrganizationNodesResponse struct { + *tchttp.BaseResponse + Response *DescribeOrganizationNodesResponseParams `json:"Response"` +} + +func (r *DescribeOrganizationNodesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationNodesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationRequestParams struct { + // 国际站:en,国内站:zh + Lang *string `json:"Lang,omitnil" name:"Lang"` + + // 可信服务产品简称。查询是否该可信服务管理员时必须指定 + Product *string `json:"Product,omitnil" name:"Product"` +} + +type DescribeOrganizationRequest struct { + *tchttp.BaseRequest + + // 国际站:en,国内站:zh + Lang *string `json:"Lang,omitnil" name:"Lang"` + + // 可信服务产品简称。查询是否该可信服务管理员时必须指定 + Product *string `json:"Product,omitnil" name:"Product"` +} + +func (r *DescribeOrganizationRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Lang") + delete(f, "Product") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeOrganizationResponseParams struct { + // 企业组织ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OrgId *int64 `json:"OrgId,omitnil" name:"OrgId"` + + // 创建者UIN。 + // 注意:此字段可能返回 null,表示取不到有效值。 + HostUin *int64 `json:"HostUin,omitnil" name:"HostUin"` + + // 创建者昵称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + NickName *string `json:"NickName,omitnil" name:"NickName"` + + // 企业组织类型。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OrgType *int64 `json:"OrgType,omitnil" name:"OrgType"` + + // 是否组织管理员。是:true ,否:false + // 注意:此字段可能返回 null,表示取不到有效值。 + IsManager *bool `json:"IsManager,omitnil" name:"IsManager"` + + // 策略类型。财务管理:Financial + // 注意:此字段可能返回 null,表示取不到有效值。 + OrgPolicyType *string `json:"OrgPolicyType,omitnil" name:"OrgPolicyType"` + + // 策略名。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OrgPolicyName *string `json:"OrgPolicyName,omitnil" name:"OrgPolicyName"` + + // 成员财务权限列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + OrgPermission []*OrgPermission `json:"OrgPermission,omitnil" name:"OrgPermission"` + + // 组织根节点ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + RootNodeId *int64 `json:"RootNodeId,omitnil" name:"RootNodeId"` + + // 组织创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreateTime *string `json:"CreateTime,omitnil" name:"CreateTime"` + + // 成员加入时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + JoinTime *string `json:"JoinTime,omitnil" name:"JoinTime"` + + // 成员是否允许退出。允许:Allow,不允许:Denied + // 注意:此字段可能返回 null,表示取不到有效值。 + IsAllowQuit *string `json:"IsAllowQuit,omitnil" name:"IsAllowQuit"` + + // 代付者Uin。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PayUin *string `json:"PayUin,omitnil" name:"PayUin"` + + // 代付者名称。 + // 注意:此字段可能返回 null,表示取不到有效值。 + PayName *string `json:"PayName,omitnil" name:"PayName"` + + // 是否可信服务管理员。是:true,否:false + // 注意:此字段可能返回 null,表示取不到有效值。 + IsAssignManager *bool `json:"IsAssignManager,omitnil" name:"IsAssignManager"` + + // 是否实名主体管理员。是:true,否:false + // 注意:此字段可能返回 null,表示取不到有效值。 + IsAuthManager *bool `json:"IsAuthManager,omitnil" name:"IsAuthManager"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DescribeOrganizationResponse struct { + *tchttp.BaseResponse + Response *DescribeOrganizationResponseParams `json:"Response"` +} + +func (r *DescribeOrganizationResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeOrganizationResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeShareAreasRequestParams struct { + // 国际站:en,国内站:zh + Lang *string `json:"Lang,omitnil" name:"Lang"` +} + +type DescribeShareAreasRequest struct { + *tchttp.BaseRequest + + // 国际站:en,国内站:zh + Lang *string `json:"Lang,omitnil" name:"Lang"` +} + +func (r *DescribeShareAreasRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeShareAreasRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Lang") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeShareAreasRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeShareAreasResponseParams struct { + // 详情 + // 注意:此字段可能返回 null,表示取不到有效值。 + Items []*ShareArea `json:"Items,omitnil" name:"Items"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type DescribeShareAreasResponse struct { + *tchttp.BaseResponse + Response *DescribeShareAreasResponseParams `json:"Response"` +} + +func (r *DescribeShareAreasResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeShareAreasResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type DescribeShareUnitMembersRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 偏移量。取值是limit的整数倍,默认值 : 0 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。取值范围:1~50。 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 搜索关键字。支持成员uin搜索。 + SearchKey *string `json:"SearchKey,omitnil" name:"SearchKey"` +} + +type DescribeShareUnitMembersRequest struct { + *tchttp.BaseRequest + + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 偏移量。取值是limit的整数倍,默认值 : 0 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。取值范围:1~50。 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 搜索关键字。支持成员uin搜索。 + SearchKey *string `json:"SearchKey,omitnil" name:"SearchKey"` +} + +func (r *DescribeShareUnitMembersRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeShareUnitMembersRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UnitId") + delete(f, "Area") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "SearchKey") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeShareUnitMembersRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeOrganizationMembersResponseParams struct { - // 成员列表。 - Items []*OrgMember `json:"Items,omitnil" name:"Items"` - +type DescribeShareUnitMembersResponseParams struct { // 总数目。 - Total *uint64 `json:"Total,omitnil" name:"Total"` + // 注意:此字段可能返回 null,表示取不到有效值。 + Total *int64 `json:"Total,omitnil" name:"Total"` + + // 共享单元成员列表。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Items []*ShareUnitMember `json:"Items,omitnil" name:"Items"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } -type DescribeOrganizationMembersResponse struct { +type DescribeShareUnitMembersResponse struct { *tchttp.BaseResponse - Response *DescribeOrganizationMembersResponseParams `json:"Response"` + Response *DescribeShareUnitMembersResponseParams `json:"Response"` } -func (r *DescribeOrganizationMembersResponse) ToJsonString() string { +func (r *DescribeShareUnitMembersResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationMembersResponse) FromJsonString(s string) error { +func (r *DescribeShareUnitMembersResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeOrganizationNodesRequestParams struct { - // 限制数目。最大50 - Limit *int64 `json:"Limit,omitnil" name:"Limit"` +type DescribeShareUnitResourcesRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` - // 偏移量。 - Offset *int64 `json:"Offset,omitnil" name:"Offset"` + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 偏移量。取值是limit的整数倍,默认值 : 0 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。取值范围:1~50。 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 搜索关键字。支持产品资源ID搜索。 + SearchKey *string `json:"SearchKey,omitnil" name:"SearchKey"` + + // 共享资源类型。 + Type *string `json:"Type,omitnil" name:"Type"` } -type DescribeOrganizationNodesRequest struct { +type DescribeShareUnitResourcesRequest struct { *tchttp.BaseRequest - // 限制数目。最大50 - Limit *int64 `json:"Limit,omitnil" name:"Limit"` + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` - // 偏移量。 - Offset *int64 `json:"Offset,omitnil" name:"Offset"` + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 偏移量。取值是limit的整数倍,默认值 : 0 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。取值范围:1~50。 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 搜索关键字。支持产品资源ID搜索。 + SearchKey *string `json:"SearchKey,omitnil" name:"SearchKey"` + + // 共享资源类型。 + Type *string `json:"Type,omitnil" name:"Type"` } -func (r *DescribeOrganizationNodesRequest) ToJsonString() string { +func (r *DescribeShareUnitResourcesRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationNodesRequest) FromJsonString(s string) error { +func (r *DescribeShareUnitResourcesRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "Limit") + delete(f, "UnitId") + delete(f, "Area") delete(f, "Offset") + delete(f, "Limit") + delete(f, "SearchKey") + delete(f, "Type") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationNodesRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeShareUnitResourcesRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeOrganizationNodesResponseParams struct { - // 总数。 +type DescribeShareUnitResourcesResponseParams struct { + // 总数目。 // 注意:此字段可能返回 null,表示取不到有效值。 Total *int64 `json:"Total,omitnil" name:"Total"` - // 列表详情。 + // 共享单元资源列表。 // 注意:此字段可能返回 null,表示取不到有效值。 - Items []*OrgNode `json:"Items,omitnil" name:"Items"` + Items []*ShareUnitResource `json:"Items,omitnil" name:"Items"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } -type DescribeOrganizationNodesResponse struct { +type DescribeShareUnitResourcesResponse struct { *tchttp.BaseResponse - Response *DescribeOrganizationNodesResponseParams `json:"Response"` + Response *DescribeShareUnitResourcesResponseParams `json:"Response"` } -func (r *DescribeOrganizationNodesResponse) ToJsonString() string { +func (r *DescribeShareUnitResourcesResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationNodesResponse) FromJsonString(s string) error { +func (r *DescribeShareUnitResourcesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeOrganizationRequestParams struct { - // 国际站:en,国内站:zh - Lang *string `json:"Lang,omitnil" name:"Lang"` +type DescribeShareUnitsRequestParams struct { + // 共享单元地域。可通过接口DescribeShareAreas获取支持共享的地域。 + Area *string `json:"Area,omitnil" name:"Area"` - // 可信服务产品简称。查询是否该可信服务管理员时必须指定 - Product *string `json:"Product,omitnil" name:"Product"` + // 偏移量。取值是limit的整数倍。默认值 : 0。 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。取值范围:1~50。 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 搜索关键字。支持UnitId和Name搜索。 + SearchKey *string `json:"SearchKey,omitnil" name:"SearchKey"` } -type DescribeOrganizationRequest struct { +type DescribeShareUnitsRequest struct { *tchttp.BaseRequest - // 国际站:en,国内站:zh - Lang *string `json:"Lang,omitnil" name:"Lang"` + // 共享单元地域。可通过接口DescribeShareAreas获取支持共享的地域。 + Area *string `json:"Area,omitnil" name:"Area"` - // 可信服务产品简称。查询是否该可信服务管理员时必须指定 - Product *string `json:"Product,omitnil" name:"Product"` + // 偏移量。取值是limit的整数倍。默认值 : 0。 + Offset *uint64 `json:"Offset,omitnil" name:"Offset"` + + // 限制数目。取值范围:1~50。 + Limit *uint64 `json:"Limit,omitnil" name:"Limit"` + + // 搜索关键字。支持UnitId和Name搜索。 + SearchKey *string `json:"SearchKey,omitnil" name:"SearchKey"` } -func (r *DescribeOrganizationRequest) ToJsonString() string { +func (r *DescribeShareUnitsRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationRequest) FromJsonString(s string) error { +func (r *DescribeShareUnitsRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "Lang") - delete(f, "Product") + delete(f, "Area") + delete(f, "Offset") + delete(f, "Limit") + delete(f, "SearchKey") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeOrganizationRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeShareUnitsRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } // Predefined struct for user -type DescribeOrganizationResponseParams struct { - // 企业组织ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 - OrgId *int64 `json:"OrgId,omitnil" name:"OrgId"` - - // 创建者UIN。 - // 注意:此字段可能返回 null,表示取不到有效值。 - HostUin *int64 `json:"HostUin,omitnil" name:"HostUin"` - - // 创建者昵称。 - // 注意:此字段可能返回 null,表示取不到有效值。 - NickName *string `json:"NickName,omitnil" name:"NickName"` - - // 企业组织类型。 - // 注意:此字段可能返回 null,表示取不到有效值。 - OrgType *int64 `json:"OrgType,omitnil" name:"OrgType"` - - // 是否组织管理员。是:true ,否:false - // 注意:此字段可能返回 null,表示取不到有效值。 - IsManager *bool `json:"IsManager,omitnil" name:"IsManager"` - - // 策略类型。财务管理:Financial - // 注意:此字段可能返回 null,表示取不到有效值。 - OrgPolicyType *string `json:"OrgPolicyType,omitnil" name:"OrgPolicyType"` - - // 策略名。 - // 注意:此字段可能返回 null,表示取不到有效值。 - OrgPolicyName *string `json:"OrgPolicyName,omitnil" name:"OrgPolicyName"` - - // 成员财务权限列表。 - // 注意:此字段可能返回 null,表示取不到有效值。 - OrgPermission []*OrgPermission `json:"OrgPermission,omitnil" name:"OrgPermission"` - - // 组织根节点ID。 - // 注意:此字段可能返回 null,表示取不到有效值。 - RootNodeId *int64 `json:"RootNodeId,omitnil" name:"RootNodeId"` - - // 组织创建时间。 - // 注意:此字段可能返回 null,表示取不到有效值。 - CreateTime *string `json:"CreateTime,omitnil" name:"CreateTime"` - - // 成员加入时间。 - // 注意:此字段可能返回 null,表示取不到有效值。 - JoinTime *string `json:"JoinTime,omitnil" name:"JoinTime"` - - // 成员是否允许退出。允许:Allow,不允许:Denied - // 注意:此字段可能返回 null,表示取不到有效值。 - IsAllowQuit *string `json:"IsAllowQuit,omitnil" name:"IsAllowQuit"` - - // 代付者Uin。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PayUin *string `json:"PayUin,omitnil" name:"PayUin"` - - // 代付者名称。 - // 注意:此字段可能返回 null,表示取不到有效值。 - PayName *string `json:"PayName,omitnil" name:"PayName"` - - // 是否可信服务管理员。是:true,否:false +type DescribeShareUnitsResponseParams struct { + // 总数目。 // 注意:此字段可能返回 null,表示取不到有效值。 - IsAssignManager *bool `json:"IsAssignManager,omitnil" name:"IsAssignManager"` + Total *int64 `json:"Total,omitnil" name:"Total"` - // 是否实名主体管理员。是:true,否:false + // 共享单元列表。 // 注意:此字段可能返回 null,表示取不到有效值。 - IsAuthManager *bool `json:"IsAuthManager,omitnil" name:"IsAuthManager"` + Items []*ManagerShareUnit `json:"Items,omitnil" name:"Items"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitnil" name:"RequestId"` } -type DescribeOrganizationResponse struct { +type DescribeShareUnitsResponse struct { *tchttp.BaseResponse - Response *DescribeOrganizationResponseParams `json:"Response"` + Response *DescribeShareUnitsResponseParams `json:"Response"` } -func (r *DescribeOrganizationResponse) ToJsonString() string { +func (r *DescribeShareUnitsResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeOrganizationResponse) FromJsonString(s string) error { +func (r *DescribeShareUnitsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } @@ -2208,6 +3001,39 @@ func (r *ListOrganizationIdentityResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type ManagerShareUnit struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元名称。 + Name *string `json:"Name,omitnil" name:"Name"` + + // 共享单元管理员Uin。 + Uin *int64 `json:"Uin,omitnil" name:"Uin"` + + // 共享单元管理员OwnerUin。 + OwnerUin *int64 `json:"OwnerUin,omitnil" name:"OwnerUin"` + + // 共享单元地域。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 描述。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Description *string `json:"Description,omitnil" name:"Description"` + + // 创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreateTime *string `json:"CreateTime,omitnil" name:"CreateTime"` + + // 共享单元资源数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ShareResourceNum *int64 `json:"ShareResourceNum,omitnil" name:"ShareResourceNum"` + + // 共享单元成员数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ShareMemberNum *int64 `json:"ShareMemberNum,omitnil" name:"ShareMemberNum"` +} + type MemberIdentity struct { // 身份ID。 // 注意:此字段可能返回 null,表示取不到有效值。 @@ -2587,6 +3413,16 @@ type OrgProductFinancial struct { Ratio *string `json:"Ratio,omitnil" name:"Ratio"` } +type ProductResource struct { + // 产品资源ID。 + ProductResourceId *string `json:"ProductResourceId,omitnil" name:"ProductResourceId"` + + // 资源六段式最后一节 + // + // Deprecated: ResourceGrantLast is deprecated. + ResourceGrantLast *string `json:"ResourceGrantLast,omitnil" name:"ResourceGrantLast"` +} + // Predefined struct for user type QuitOrganizationRequestParams struct { // 企业组织ID @@ -2641,6 +3477,69 @@ func (r *QuitOrganizationResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type ShareArea struct { + // 地域名称。 + Name *string `json:"Name,omitnil" name:"Name"` + + // 地域标识。 + Area *string `json:"Area,omitnil" name:"Area"` + + // 地域ID。 + AreaId *int64 `json:"AreaId,omitnil" name:"AreaId"` +} + +type ShareMember struct { + // 共享成员Uin。 + ShareMemberUin *int64 `json:"ShareMemberUin,omitnil" name:"ShareMemberUin"` +} + +type ShareResource struct { + // 共享资源ID。 + // + // Deprecated: ResourceId is deprecated. + ResourceId *string `json:"ResourceId,omitnil" name:"ResourceId"` + + // 产品资源ID。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ProductResourceId *string `json:"ProductResourceId,omitnil" name:"ProductResourceId"` +} + +type ShareUnitMember struct { + // 共享成员Uin。 + ShareMemberUin *int64 `json:"ShareMemberUin,omitnil" name:"ShareMemberUin"` + + // 创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreateTime *string `json:"CreateTime,omitnil" name:"CreateTime"` +} + +type ShareUnitResource struct { + // 共享资源ID。 + ResourceId *string `json:"ResourceId,omitnil" name:"ResourceId"` + + // 共享资源类型。 + Type *string `json:"Type,omitnil" name:"Type"` + + // 创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreateTime *string `json:"CreateTime,omitnil" name:"CreateTime"` + + // 产品资源ID。 + ProductResourceId *string `json:"ProductResourceId,omitnil" name:"ProductResourceId"` + + // 共享单元成员数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SharedMemberNum *uint64 `json:"SharedMemberNum,omitnil" name:"SharedMemberNum"` + + // 使用中共享单元成员数。 + // 注意:此字段可能返回 null,表示取不到有效值。 + SharedMemberUseNum *uint64 `json:"SharedMemberUseNum,omitnil" name:"SharedMemberUseNum"` + + // 共享管理员OwnerUin。 + // 注意:此字段可能返回 null,表示取不到有效值。 + ShareManagerUin *int64 `json:"ShareManagerUin,omitnil" name:"ShareManagerUin"` +} + // Predefined struct for user type UpdateOrganizationIdentityRequestParams struct { // 身份ID @@ -2955,4 +3854,72 @@ func (r *UpdateOrganizationNodeResponse) ToJsonString() string { // because it has no param check, nor strict type check func (r *UpdateOrganizationNodeResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type UpdateShareUnitRequestParams struct { + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元名称。仅支持大小写字母、数字、-、以及_的组合,3-128个字符。 + Name *string `json:"Name,omitnil" name:"Name"` + + // 共享单元描述。最大128个字符。 + Description *string `json:"Description,omitnil" name:"Description"` +} + +type UpdateShareUnitRequest struct { + *tchttp.BaseRequest + + // 共享单元ID。 + UnitId *string `json:"UnitId,omitnil" name:"UnitId"` + + // 共享单元名称。仅支持大小写字母、数字、-、以及_的组合,3-128个字符。 + Name *string `json:"Name,omitnil" name:"Name"` + + // 共享单元描述。最大128个字符。 + Description *string `json:"Description,omitnil" name:"Description"` +} + +func (r *UpdateShareUnitRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateShareUnitRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "UnitId") + delete(f, "Name") + delete(f, "Description") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateShareUnitRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type UpdateShareUnitResponseParams struct { + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil" name:"RequestId"` +} + +type UpdateShareUnitResponse struct { + *tchttp.BaseResponse + Response *UpdateShareUnitResponseParams `json:"Response"` +} + +func (r *UpdateShareUnitResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateShareUnitResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) } \ No newline at end of file diff --git a/vendor/modules.txt b/vendor/modules.txt index 3ba21df30e..2040efa318 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1157,7 +1157,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.711 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.856 ## explicit; go 1.11 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors @@ -1237,7 +1237,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps/v20190612 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus v1.0.831 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus/v20190422 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.770 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.856 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization/v20210331 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.814