diff --git a/ChangeLog.txt b/ChangeLog.txt index 61e60223a2..cb50277e7f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-08-23 Version: v1.63.7 +- Generated 2021-01-20 for `governance`. +治理检测新增第一版OpenAPI + 2024-08-23 Version: v1.63.6 - Generated 2017-11-10 for `Ens`. undefined diff --git a/services/governance/batch_enroll_accounts.go b/services/governance/batch_enroll_accounts.go new file mode 100644 index 0000000000..586eb5fd60 --- /dev/null +++ b/services/governance/batch_enroll_accounts.go @@ -0,0 +1,114 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// BatchEnrollAccounts invokes the governance.BatchEnrollAccounts API synchronously +func (client *Client) BatchEnrollAccounts(request *BatchEnrollAccountsRequest) (response *BatchEnrollAccountsResponse, err error) { + response = CreateBatchEnrollAccountsResponse() + err = client.DoAction(request, response) + return +} + +// BatchEnrollAccountsWithChan invokes the governance.BatchEnrollAccounts API asynchronously +func (client *Client) BatchEnrollAccountsWithChan(request *BatchEnrollAccountsRequest) (<-chan *BatchEnrollAccountsResponse, <-chan error) { + responseChan := make(chan *BatchEnrollAccountsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchEnrollAccounts(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchEnrollAccountsWithCallback invokes the governance.BatchEnrollAccounts API asynchronously +func (client *Client) BatchEnrollAccountsWithCallback(request *BatchEnrollAccountsRequest, callback func(response *BatchEnrollAccountsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchEnrollAccountsResponse + var err error + defer close(result) + response, err = client.BatchEnrollAccounts(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchEnrollAccountsRequest is the request struct for api BatchEnrollAccounts +type BatchEnrollAccountsRequest struct { + *requests.RpcRequest + BaselineId string `position:"Query" name:"BaselineId"` + BaselineItems *[]BatchEnrollAccountsBaselineItems `position:"Query" name:"BaselineItems" type:"Repeated"` + Accounts *[]BatchEnrollAccountsAccounts `position:"Query" name:"Accounts" type:"Repeated"` +} + +// BatchEnrollAccountsBaselineItems is a repeated param struct in BatchEnrollAccountsRequest +type BatchEnrollAccountsBaselineItems struct { + Name string `name:"Name"` + Skip string `name:"Skip"` + Config string `name:"Config"` + Version string `name:"Version"` +} + +// BatchEnrollAccountsAccounts is a repeated param struct in BatchEnrollAccountsRequest +type BatchEnrollAccountsAccounts struct { + AccountUid string `name:"AccountUid"` +} + +// BatchEnrollAccountsResponse is the response struct for api BatchEnrollAccounts +type BatchEnrollAccountsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateBatchEnrollAccountsRequest creates a request to invoke BatchEnrollAccounts API +func CreateBatchEnrollAccountsRequest() (request *BatchEnrollAccountsRequest) { + request = &BatchEnrollAccountsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "BatchEnrollAccounts", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateBatchEnrollAccountsResponse creates a response to parse from BatchEnrollAccounts response +func CreateBatchEnrollAccountsResponse() (response *BatchEnrollAccountsResponse) { + response = &BatchEnrollAccountsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/client.go b/services/governance/client.go new file mode 100644 index 0000000000..1c0bb8bc0e --- /dev/null +++ b/services/governance/client.go @@ -0,0 +1,129 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "reflect" + + "github.com/aliyun/alibaba-cloud-sdk-go/sdk" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider" +) + +// Client is the sdk client struct, each func corresponds to an OpenAPI +type Client struct { + sdk.Client +} + +// SetClientProperty Set Property by Reflect +func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) { + v := reflect.ValueOf(client).Elem() + if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() { + v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue)) + } +} + +// SetEndpointDataToClient Set EndpointMap and ENdpointType +func SetEndpointDataToClient(client *Client) { + SetClientProperty(client, "EndpointMap", GetEndpointMap()) + SetClientProperty(client, "EndpointType", GetEndpointType()) +} + +// NewClient creates a sdk client with environment variables +func NewClient() (client *Client, err error) { + client = &Client{} + err = client.Init() + SetEndpointDataToClient(client) + return +} + +// NewClientWithProvider creates a sdk client with providers +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) { + client = &Client{} + var pc provider.Provider + if len(providers) == 0 { + pc = provider.DefaultChain + } else { + pc = provider.NewProviderChain(providers) + } + err = client.InitWithProviderChain(regionId, pc) + SetEndpointDataToClient(client) + return +} + +// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential +// this is the common api to create a sdk client +func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) { + client = &Client{} + err = client.InitWithOptions(regionId, config, credential) + SetEndpointDataToClient(client) + return +} + +// NewClientWithAccessKey is a shortcut to create sdk client with accesskey +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) { + client = &Client{} + err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret) + SetEndpointDataToClient(client) + return +} + +// NewClientWithStsToken is a shortcut to create sdk client with sts token +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) { + client = &Client{} + err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken) + SetEndpointDataToClient(client) + return +} + +// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) { + client = &Client{} + err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName) + SetEndpointDataToClient(client) + return +} + +// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) { + client = &Client{} + err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy) + SetEndpointDataToClient(client) + return +} + +// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) { + client = &Client{} + err = client.InitWithEcsRamRole(regionId, roleName) + SetEndpointDataToClient(client) + return +} + +// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) { + client = &Client{} + err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration) + SetEndpointDataToClient(client) + return +} diff --git a/services/governance/create_account_factory_baseline.go b/services/governance/create_account_factory_baseline.go new file mode 100644 index 0000000000..477f23e709 --- /dev/null +++ b/services/governance/create_account_factory_baseline.go @@ -0,0 +1,109 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateAccountFactoryBaseline invokes the governance.CreateAccountFactoryBaseline API synchronously +func (client *Client) CreateAccountFactoryBaseline(request *CreateAccountFactoryBaselineRequest) (response *CreateAccountFactoryBaselineResponse, err error) { + response = CreateCreateAccountFactoryBaselineResponse() + err = client.DoAction(request, response) + return +} + +// CreateAccountFactoryBaselineWithChan invokes the governance.CreateAccountFactoryBaseline API asynchronously +func (client *Client) CreateAccountFactoryBaselineWithChan(request *CreateAccountFactoryBaselineRequest) (<-chan *CreateAccountFactoryBaselineResponse, <-chan error) { + responseChan := make(chan *CreateAccountFactoryBaselineResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateAccountFactoryBaseline(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateAccountFactoryBaselineWithCallback invokes the governance.CreateAccountFactoryBaseline API asynchronously +func (client *Client) CreateAccountFactoryBaselineWithCallback(request *CreateAccountFactoryBaselineRequest, callback func(response *CreateAccountFactoryBaselineResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateAccountFactoryBaselineResponse + var err error + defer close(result) + response, err = client.CreateAccountFactoryBaseline(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateAccountFactoryBaselineRequest is the request struct for api CreateAccountFactoryBaseline +type CreateAccountFactoryBaselineRequest struct { + *requests.RpcRequest + Description string `position:"Query" name:"Description"` + BaselineName string `position:"Query" name:"BaselineName"` + BaselineItems *[]CreateAccountFactoryBaselineBaselineItems `position:"Query" name:"BaselineItems" type:"Repeated"` +} + +// CreateAccountFactoryBaselineBaselineItems is a repeated param struct in CreateAccountFactoryBaselineRequest +type CreateAccountFactoryBaselineBaselineItems struct { + Name string `name:"Name"` + Config string `name:"Config"` + Version string `name:"Version"` +} + +// CreateAccountFactoryBaselineResponse is the response struct for api CreateAccountFactoryBaseline +type CreateAccountFactoryBaselineResponse struct { + *responses.BaseResponse + BaselineId string `json:"BaselineId" xml:"BaselineId"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateCreateAccountFactoryBaselineRequest creates a request to invoke CreateAccountFactoryBaseline API +func CreateCreateAccountFactoryBaselineRequest() (request *CreateAccountFactoryBaselineRequest) { + request = &CreateAccountFactoryBaselineRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "CreateAccountFactoryBaseline", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateAccountFactoryBaselineResponse creates a response to parse from CreateAccountFactoryBaseline response +func CreateCreateAccountFactoryBaselineResponse() (response *CreateAccountFactoryBaselineResponse) { + response = &CreateAccountFactoryBaselineResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/delete_account_factory_baseline.go b/services/governance/delete_account_factory_baseline.go new file mode 100644 index 0000000000..05f11eb8b8 --- /dev/null +++ b/services/governance/delete_account_factory_baseline.go @@ -0,0 +1,99 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteAccountFactoryBaseline invokes the governance.DeleteAccountFactoryBaseline API synchronously +func (client *Client) DeleteAccountFactoryBaseline(request *DeleteAccountFactoryBaselineRequest) (response *DeleteAccountFactoryBaselineResponse, err error) { + response = CreateDeleteAccountFactoryBaselineResponse() + err = client.DoAction(request, response) + return +} + +// DeleteAccountFactoryBaselineWithChan invokes the governance.DeleteAccountFactoryBaseline API asynchronously +func (client *Client) DeleteAccountFactoryBaselineWithChan(request *DeleteAccountFactoryBaselineRequest) (<-chan *DeleteAccountFactoryBaselineResponse, <-chan error) { + responseChan := make(chan *DeleteAccountFactoryBaselineResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteAccountFactoryBaseline(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteAccountFactoryBaselineWithCallback invokes the governance.DeleteAccountFactoryBaseline API asynchronously +func (client *Client) DeleteAccountFactoryBaselineWithCallback(request *DeleteAccountFactoryBaselineRequest, callback func(response *DeleteAccountFactoryBaselineResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteAccountFactoryBaselineResponse + var err error + defer close(result) + response, err = client.DeleteAccountFactoryBaseline(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteAccountFactoryBaselineRequest is the request struct for api DeleteAccountFactoryBaseline +type DeleteAccountFactoryBaselineRequest struct { + *requests.RpcRequest + BaselineId string `position:"Query" name:"BaselineId"` +} + +// DeleteAccountFactoryBaselineResponse is the response struct for api DeleteAccountFactoryBaseline +type DeleteAccountFactoryBaselineResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteAccountFactoryBaselineRequest creates a request to invoke DeleteAccountFactoryBaseline API +func CreateDeleteAccountFactoryBaselineRequest() (request *DeleteAccountFactoryBaselineRequest) { + request = &DeleteAccountFactoryBaselineRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "DeleteAccountFactoryBaseline", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteAccountFactoryBaselineResponse creates a response to parse from DeleteAccountFactoryBaseline response +func CreateDeleteAccountFactoryBaselineResponse() (response *DeleteAccountFactoryBaselineResponse) { + response = &DeleteAccountFactoryBaselineResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/endpoint.go b/services/governance/endpoint.go new file mode 100644 index 0000000000..fb4d48968b --- /dev/null +++ b/services/governance/endpoint.go @@ -0,0 +1,20 @@ +package governance + +// EndpointMap Endpoint Data +var EndpointMap map[string]string + +// EndpointType regional or central +var EndpointType = "regional" + +// GetEndpointMap Get Endpoint Data Map +func GetEndpointMap() map[string]string { + if EndpointMap == nil { + EndpointMap = map[string]string{} + } + return EndpointMap +} + +// GetEndpointType Get Endpoint Type Value +func GetEndpointType() string { + return EndpointType +} diff --git a/services/governance/enroll_account.go b/services/governance/enroll_account.go new file mode 100644 index 0000000000..ea994a32e7 --- /dev/null +++ b/services/governance/enroll_account.go @@ -0,0 +1,115 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// EnrollAccount invokes the governance.EnrollAccount API synchronously +func (client *Client) EnrollAccount(request *EnrollAccountRequest) (response *EnrollAccountResponse, err error) { + response = CreateEnrollAccountResponse() + err = client.DoAction(request, response) + return +} + +// EnrollAccountWithChan invokes the governance.EnrollAccount API asynchronously +func (client *Client) EnrollAccountWithChan(request *EnrollAccountRequest) (<-chan *EnrollAccountResponse, <-chan error) { + responseChan := make(chan *EnrollAccountResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.EnrollAccount(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// EnrollAccountWithCallback invokes the governance.EnrollAccount API asynchronously +func (client *Client) EnrollAccountWithCallback(request *EnrollAccountRequest, callback func(response *EnrollAccountResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *EnrollAccountResponse + var err error + defer close(result) + response, err = client.EnrollAccount(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// EnrollAccountRequest is the request struct for api EnrollAccount +type EnrollAccountRequest struct { + *requests.RpcRequest + FolderId string `position:"Query" name:"FolderId"` + PayerAccountUid requests.Integer `position:"Query" name:"PayerAccountUid"` + AccountUid requests.Integer `position:"Query" name:"AccountUid"` + AccountNamePrefix string `position:"Query" name:"AccountNamePrefix"` + ResellAccountType string `position:"Query" name:"ResellAccountType"` + BaselineId string `position:"Query" name:"BaselineId"` + BaselineItems *[]EnrollAccountBaselineItems `position:"Query" name:"BaselineItems" type:"Repeated"` + DisplayName string `position:"Query" name:"DisplayName"` +} + +// EnrollAccountBaselineItems is a repeated param struct in EnrollAccountRequest +type EnrollAccountBaselineItems struct { + Name string `name:"Name"` + Skip string `name:"Skip"` + Config string `name:"Config"` + Version string `name:"Version"` +} + +// EnrollAccountResponse is the response struct for api EnrollAccount +type EnrollAccountResponse struct { + *responses.BaseResponse + AccountUid int64 `json:"AccountUid" xml:"AccountUid"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateEnrollAccountRequest creates a request to invoke EnrollAccount API +func CreateEnrollAccountRequest() (request *EnrollAccountRequest) { + request = &EnrollAccountRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "EnrollAccount", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateEnrollAccountResponse creates a response to parse from EnrollAccount response +func CreateEnrollAccountResponse() (response *EnrollAccountResponse) { + response = &EnrollAccountResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/get_account_factory_baseline.go b/services/governance/get_account_factory_baseline.go new file mode 100644 index 0000000000..0a48c7383e --- /dev/null +++ b/services/governance/get_account_factory_baseline.go @@ -0,0 +1,106 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// GetAccountFactoryBaseline invokes the governance.GetAccountFactoryBaseline API synchronously +func (client *Client) GetAccountFactoryBaseline(request *GetAccountFactoryBaselineRequest) (response *GetAccountFactoryBaselineResponse, err error) { + response = CreateGetAccountFactoryBaselineResponse() + err = client.DoAction(request, response) + return +} + +// GetAccountFactoryBaselineWithChan invokes the governance.GetAccountFactoryBaseline API asynchronously +func (client *Client) GetAccountFactoryBaselineWithChan(request *GetAccountFactoryBaselineRequest) (<-chan *GetAccountFactoryBaselineResponse, <-chan error) { + responseChan := make(chan *GetAccountFactoryBaselineResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetAccountFactoryBaseline(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetAccountFactoryBaselineWithCallback invokes the governance.GetAccountFactoryBaseline API asynchronously +func (client *Client) GetAccountFactoryBaselineWithCallback(request *GetAccountFactoryBaselineRequest, callback func(response *GetAccountFactoryBaselineResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetAccountFactoryBaselineResponse + var err error + defer close(result) + response, err = client.GetAccountFactoryBaseline(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetAccountFactoryBaselineRequest is the request struct for api GetAccountFactoryBaseline +type GetAccountFactoryBaselineRequest struct { + *requests.RpcRequest + BaselineId string `position:"Query" name:"BaselineId"` +} + +// GetAccountFactoryBaselineResponse is the response struct for api GetAccountFactoryBaseline +type GetAccountFactoryBaselineResponse struct { + *responses.BaseResponse + BaselineId string `json:"BaselineId" xml:"BaselineId"` + BaselineName string `json:"BaselineName" xml:"BaselineName"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + Description string `json:"Description" xml:"Description"` + RequestId string `json:"RequestId" xml:"RequestId"` + Type string `json:"Type" xml:"Type"` + UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` + BaselineItems []BaselineItem `json:"BaselineItems" xml:"BaselineItems"` +} + +// CreateGetAccountFactoryBaselineRequest creates a request to invoke GetAccountFactoryBaseline API +func CreateGetAccountFactoryBaselineRequest() (request *GetAccountFactoryBaselineRequest) { + request = &GetAccountFactoryBaselineRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "GetAccountFactoryBaseline", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetAccountFactoryBaselineResponse creates a response to parse from GetAccountFactoryBaseline response +func CreateGetAccountFactoryBaselineResponse() (response *GetAccountFactoryBaselineResponse) { + response = &GetAccountFactoryBaselineResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/get_enrolled_account.go b/services/governance/get_enrolled_account.go new file mode 100644 index 0000000000..fb82a14dde --- /dev/null +++ b/services/governance/get_enrolled_account.go @@ -0,0 +1,113 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// GetEnrolledAccount invokes the governance.GetEnrolledAccount API synchronously +func (client *Client) GetEnrolledAccount(request *GetEnrolledAccountRequest) (response *GetEnrolledAccountResponse, err error) { + response = CreateGetEnrolledAccountResponse() + err = client.DoAction(request, response) + return +} + +// GetEnrolledAccountWithChan invokes the governance.GetEnrolledAccount API asynchronously +func (client *Client) GetEnrolledAccountWithChan(request *GetEnrolledAccountRequest) (<-chan *GetEnrolledAccountResponse, <-chan error) { + responseChan := make(chan *GetEnrolledAccountResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetEnrolledAccount(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetEnrolledAccountWithCallback invokes the governance.GetEnrolledAccount API asynchronously +func (client *Client) GetEnrolledAccountWithCallback(request *GetEnrolledAccountRequest, callback func(response *GetEnrolledAccountResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetEnrolledAccountResponse + var err error + defer close(result) + response, err = client.GetEnrolledAccount(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetEnrolledAccountRequest is the request struct for api GetEnrolledAccount +type GetEnrolledAccountRequest struct { + *requests.RpcRequest + AccountUid requests.Integer `position:"Query" name:"AccountUid"` +} + +// GetEnrolledAccountResponse is the response struct for api GetEnrolledAccount +type GetEnrolledAccountResponse struct { + *responses.BaseResponse + AccountUid int64 `json:"AccountUid" xml:"AccountUid"` + BaselineId string `json:"BaselineId" xml:"BaselineId"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + FolderId string `json:"FolderId" xml:"FolderId"` + Initialized bool `json:"Initialized" xml:"Initialized"` + MasterAccountUid int64 `json:"MasterAccountUid" xml:"MasterAccountUid"` + PayerAccountUid int64 `json:"PayerAccountUid" xml:"PayerAccountUid"` + RequestId string `json:"RequestId" xml:"RequestId"` + Status string `json:"Status" xml:"Status"` + UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` + ErrorInfo ErrorInfo `json:"ErrorInfo" xml:"ErrorInfo"` + Inputs Inputs `json:"Inputs" xml:"Inputs"` + BaselineItems []BaselineItem `json:"BaselineItems" xml:"BaselineItems"` + Progress []Progres `json:"Progress" xml:"Progress"` +} + +// CreateGetEnrolledAccountRequest creates a request to invoke GetEnrolledAccount API +func CreateGetEnrolledAccountRequest() (request *GetEnrolledAccountRequest) { + request = &GetEnrolledAccountRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "GetEnrolledAccount", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateGetEnrolledAccountResponse creates a response to parse from GetEnrolledAccount response +func CreateGetEnrolledAccountResponse() (response *GetEnrolledAccountResponse) { + response = &GetEnrolledAccountResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/list_account_factory_baseline_items.go b/services/governance/list_account_factory_baseline_items.go new file mode 100644 index 0000000000..6203456b89 --- /dev/null +++ b/services/governance/list_account_factory_baseline_items.go @@ -0,0 +1,105 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListAccountFactoryBaselineItems invokes the governance.ListAccountFactoryBaselineItems API synchronously +func (client *Client) ListAccountFactoryBaselineItems(request *ListAccountFactoryBaselineItemsRequest) (response *ListAccountFactoryBaselineItemsResponse, err error) { + response = CreateListAccountFactoryBaselineItemsResponse() + err = client.DoAction(request, response) + return +} + +// ListAccountFactoryBaselineItemsWithChan invokes the governance.ListAccountFactoryBaselineItems API asynchronously +func (client *Client) ListAccountFactoryBaselineItemsWithChan(request *ListAccountFactoryBaselineItemsRequest) (<-chan *ListAccountFactoryBaselineItemsResponse, <-chan error) { + responseChan := make(chan *ListAccountFactoryBaselineItemsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAccountFactoryBaselineItems(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAccountFactoryBaselineItemsWithCallback invokes the governance.ListAccountFactoryBaselineItems API asynchronously +func (client *Client) ListAccountFactoryBaselineItemsWithCallback(request *ListAccountFactoryBaselineItemsRequest, callback func(response *ListAccountFactoryBaselineItemsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAccountFactoryBaselineItemsResponse + var err error + defer close(result) + response, err = client.ListAccountFactoryBaselineItems(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAccountFactoryBaselineItemsRequest is the request struct for api ListAccountFactoryBaselineItems +type ListAccountFactoryBaselineItemsRequest struct { + *requests.RpcRequest + Type string `position:"Query" name:"Type"` + NextToken string `position:"Query" name:"NextToken"` + Names *[]string `position:"Query" name:"Names" type:"Repeated"` + Versions *[]string `position:"Query" name:"Versions" type:"Repeated"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` +} + +// ListAccountFactoryBaselineItemsResponse is the response struct for api ListAccountFactoryBaselineItems +type ListAccountFactoryBaselineItemsResponse struct { + *responses.BaseResponse + NextToken string `json:"NextToken" xml:"NextToken"` + RequestId string `json:"RequestId" xml:"RequestId"` + BaselineItems []BaselineItem `json:"BaselineItems" xml:"BaselineItems"` +} + +// CreateListAccountFactoryBaselineItemsRequest creates a request to invoke ListAccountFactoryBaselineItems API +func CreateListAccountFactoryBaselineItemsRequest() (request *ListAccountFactoryBaselineItemsRequest) { + request = &ListAccountFactoryBaselineItemsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "ListAccountFactoryBaselineItems", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAccountFactoryBaselineItemsResponse creates a response to parse from ListAccountFactoryBaselineItems response +func CreateListAccountFactoryBaselineItemsResponse() (response *ListAccountFactoryBaselineItemsResponse) { + response = &ListAccountFactoryBaselineItemsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/list_account_factory_baselines.go b/services/governance/list_account_factory_baselines.go new file mode 100644 index 0000000000..995403e830 --- /dev/null +++ b/services/governance/list_account_factory_baselines.go @@ -0,0 +1,102 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListAccountFactoryBaselines invokes the governance.ListAccountFactoryBaselines API synchronously +func (client *Client) ListAccountFactoryBaselines(request *ListAccountFactoryBaselinesRequest) (response *ListAccountFactoryBaselinesResponse, err error) { + response = CreateListAccountFactoryBaselinesResponse() + err = client.DoAction(request, response) + return +} + +// ListAccountFactoryBaselinesWithChan invokes the governance.ListAccountFactoryBaselines API asynchronously +func (client *Client) ListAccountFactoryBaselinesWithChan(request *ListAccountFactoryBaselinesRequest) (<-chan *ListAccountFactoryBaselinesResponse, <-chan error) { + responseChan := make(chan *ListAccountFactoryBaselinesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListAccountFactoryBaselines(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListAccountFactoryBaselinesWithCallback invokes the governance.ListAccountFactoryBaselines API asynchronously +func (client *Client) ListAccountFactoryBaselinesWithCallback(request *ListAccountFactoryBaselinesRequest, callback func(response *ListAccountFactoryBaselinesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListAccountFactoryBaselinesResponse + var err error + defer close(result) + response, err = client.ListAccountFactoryBaselines(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListAccountFactoryBaselinesRequest is the request struct for api ListAccountFactoryBaselines +type ListAccountFactoryBaselinesRequest struct { + *requests.RpcRequest + NextToken string `position:"Query" name:"NextToken"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` +} + +// ListAccountFactoryBaselinesResponse is the response struct for api ListAccountFactoryBaselines +type ListAccountFactoryBaselinesResponse struct { + *responses.BaseResponse + NextToken string `json:"NextToken" xml:"NextToken"` + RequestId string `json:"RequestId" xml:"RequestId"` + Baselines []Baseline `json:"Baselines" xml:"Baselines"` +} + +// CreateListAccountFactoryBaselinesRequest creates a request to invoke ListAccountFactoryBaselines API +func CreateListAccountFactoryBaselinesRequest() (request *ListAccountFactoryBaselinesRequest) { + request = &ListAccountFactoryBaselinesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "ListAccountFactoryBaselines", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateListAccountFactoryBaselinesResponse creates a response to parse from ListAccountFactoryBaselines response +func CreateListAccountFactoryBaselinesResponse() (response *ListAccountFactoryBaselinesResponse) { + response = &ListAccountFactoryBaselinesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/list_enrolled_accounts.go b/services/governance/list_enrolled_accounts.go new file mode 100644 index 0000000000..4c02e6a1fa --- /dev/null +++ b/services/governance/list_enrolled_accounts.go @@ -0,0 +1,102 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListEnrolledAccounts invokes the governance.ListEnrolledAccounts API synchronously +func (client *Client) ListEnrolledAccounts(request *ListEnrolledAccountsRequest) (response *ListEnrolledAccountsResponse, err error) { + response = CreateListEnrolledAccountsResponse() + err = client.DoAction(request, response) + return +} + +// ListEnrolledAccountsWithChan invokes the governance.ListEnrolledAccounts API asynchronously +func (client *Client) ListEnrolledAccountsWithChan(request *ListEnrolledAccountsRequest) (<-chan *ListEnrolledAccountsResponse, <-chan error) { + responseChan := make(chan *ListEnrolledAccountsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListEnrolledAccounts(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListEnrolledAccountsWithCallback invokes the governance.ListEnrolledAccounts API asynchronously +func (client *Client) ListEnrolledAccountsWithCallback(request *ListEnrolledAccountsRequest, callback func(response *ListEnrolledAccountsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListEnrolledAccountsResponse + var err error + defer close(result) + response, err = client.ListEnrolledAccounts(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListEnrolledAccountsRequest is the request struct for api ListEnrolledAccounts +type ListEnrolledAccountsRequest struct { + *requests.RpcRequest + NextToken string `position:"Query" name:"NextToken"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` +} + +// ListEnrolledAccountsResponse is the response struct for api ListEnrolledAccounts +type ListEnrolledAccountsResponse struct { + *responses.BaseResponse + NextToken string `json:"NextToken" xml:"NextToken"` + RequestId string `json:"RequestId" xml:"RequestId"` + EnrolledAccounts []EnrolledAccountsItem `json:"EnrolledAccounts" xml:"EnrolledAccounts"` +} + +// CreateListEnrolledAccountsRequest creates a request to invoke ListEnrolledAccounts API +func CreateListEnrolledAccountsRequest() (request *ListEnrolledAccountsRequest) { + request = &ListEnrolledAccountsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "ListEnrolledAccounts", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateListEnrolledAccountsResponse creates a response to parse from ListEnrolledAccounts response +func CreateListEnrolledAccountsResponse() (response *ListEnrolledAccountsResponse) { + response = &ListEnrolledAccountsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/list_evaluation_metadata.go b/services/governance/list_evaluation_metadata.go new file mode 100644 index 0000000000..9e2733d17e --- /dev/null +++ b/services/governance/list_evaluation_metadata.go @@ -0,0 +1,101 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListEvaluationMetadata invokes the governance.ListEvaluationMetadata API synchronously +func (client *Client) ListEvaluationMetadata(request *ListEvaluationMetadataRequest) (response *ListEvaluationMetadataResponse, err error) { + response = CreateListEvaluationMetadataResponse() + err = client.DoAction(request, response) + return +} + +// ListEvaluationMetadataWithChan invokes the governance.ListEvaluationMetadata API asynchronously +func (client *Client) ListEvaluationMetadataWithChan(request *ListEvaluationMetadataRequest) (<-chan *ListEvaluationMetadataResponse, <-chan error) { + responseChan := make(chan *ListEvaluationMetadataResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListEvaluationMetadata(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListEvaluationMetadataWithCallback invokes the governance.ListEvaluationMetadata API asynchronously +func (client *Client) ListEvaluationMetadataWithCallback(request *ListEvaluationMetadataRequest, callback func(response *ListEvaluationMetadataResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListEvaluationMetadataResponse + var err error + defer close(result) + response, err = client.ListEvaluationMetadata(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListEvaluationMetadataRequest is the request struct for api ListEvaluationMetadata +type ListEvaluationMetadataRequest struct { + *requests.RpcRequest + Language string `position:"Query" name:"Language"` + PartnerCode string `position:"Query" name:"PartnerCode"` +} + +// ListEvaluationMetadataResponse is the response struct for api ListEvaluationMetadata +type ListEvaluationMetadataResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + EvaluationMetadata []EvaluationMetadataItem `json:"EvaluationMetadata" xml:"EvaluationMetadata"` +} + +// CreateListEvaluationMetadataRequest creates a request to invoke ListEvaluationMetadata API +func CreateListEvaluationMetadataRequest() (request *ListEvaluationMetadataRequest) { + request = &ListEvaluationMetadataRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "ListEvaluationMetadata", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateListEvaluationMetadataResponse creates a response to parse from ListEvaluationMetadata response +func CreateListEvaluationMetadataResponse() (response *ListEvaluationMetadataResponse) { + response = &ListEvaluationMetadataResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/list_evaluation_metric_details.go b/services/governance/list_evaluation_metric_details.go new file mode 100644 index 0000000000..999b4a67e7 --- /dev/null +++ b/services/governance/list_evaluation_metric_details.go @@ -0,0 +1,105 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListEvaluationMetricDetails invokes the governance.ListEvaluationMetricDetails API synchronously +func (client *Client) ListEvaluationMetricDetails(request *ListEvaluationMetricDetailsRequest) (response *ListEvaluationMetricDetailsResponse, err error) { + response = CreateListEvaluationMetricDetailsResponse() + err = client.DoAction(request, response) + return +} + +// ListEvaluationMetricDetailsWithChan invokes the governance.ListEvaluationMetricDetails API asynchronously +func (client *Client) ListEvaluationMetricDetailsWithChan(request *ListEvaluationMetricDetailsRequest) (<-chan *ListEvaluationMetricDetailsResponse, <-chan error) { + responseChan := make(chan *ListEvaluationMetricDetailsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListEvaluationMetricDetails(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListEvaluationMetricDetailsWithCallback invokes the governance.ListEvaluationMetricDetails API asynchronously +func (client *Client) ListEvaluationMetricDetailsWithCallback(request *ListEvaluationMetricDetailsRequest, callback func(response *ListEvaluationMetricDetailsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListEvaluationMetricDetailsResponse + var err error + defer close(result) + response, err = client.ListEvaluationMetricDetails(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListEvaluationMetricDetailsRequest is the request struct for api ListEvaluationMetricDetails +type ListEvaluationMetricDetailsRequest struct { + *requests.RpcRequest + AccountId requests.Integer `position:"Query" name:"AccountId"` + NextToken string `position:"Query" name:"NextToken"` + Id string `position:"Query" name:"Id"` + PartnerCode string `position:"Query" name:"PartnerCode"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` +} + +// ListEvaluationMetricDetailsResponse is the response struct for api ListEvaluationMetricDetails +type ListEvaluationMetricDetailsResponse struct { + *responses.BaseResponse + NextToken string `json:"NextToken" xml:"NextToken"` + RequestId string `json:"RequestId" xml:"RequestId"` + Resources []Resource `json:"Resources" xml:"Resources"` +} + +// CreateListEvaluationMetricDetailsRequest creates a request to invoke ListEvaluationMetricDetails API +func CreateListEvaluationMetricDetailsRequest() (request *ListEvaluationMetricDetailsRequest) { + request = &ListEvaluationMetricDetailsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "ListEvaluationMetricDetails", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateListEvaluationMetricDetailsResponse creates a response to parse from ListEvaluationMetricDetails response +func CreateListEvaluationMetricDetailsResponse() (response *ListEvaluationMetricDetailsResponse) { + response = &ListEvaluationMetricDetailsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/list_evaluation_results.go b/services/governance/list_evaluation_results.go new file mode 100644 index 0000000000..5dcd672b90 --- /dev/null +++ b/services/governance/list_evaluation_results.go @@ -0,0 +1,102 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListEvaluationResults invokes the governance.ListEvaluationResults API synchronously +func (client *Client) ListEvaluationResults(request *ListEvaluationResultsRequest) (response *ListEvaluationResultsResponse, err error) { + response = CreateListEvaluationResultsResponse() + err = client.DoAction(request, response) + return +} + +// ListEvaluationResultsWithChan invokes the governance.ListEvaluationResults API asynchronously +func (client *Client) ListEvaluationResultsWithChan(request *ListEvaluationResultsRequest) (<-chan *ListEvaluationResultsResponse, <-chan error) { + responseChan := make(chan *ListEvaluationResultsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListEvaluationResults(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListEvaluationResultsWithCallback invokes the governance.ListEvaluationResults API asynchronously +func (client *Client) ListEvaluationResultsWithCallback(request *ListEvaluationResultsRequest, callback func(response *ListEvaluationResultsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListEvaluationResultsResponse + var err error + defer close(result) + response, err = client.ListEvaluationResults(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListEvaluationResultsRequest is the request struct for api ListEvaluationResults +type ListEvaluationResultsRequest struct { + *requests.RpcRequest + AccountId requests.Integer `position:"Query" name:"AccountId"` + PartnerCode string `position:"Query" name:"PartnerCode"` +} + +// ListEvaluationResultsResponse is the response struct for api ListEvaluationResults +type ListEvaluationResultsResponse struct { + *responses.BaseResponse + AccountId int64 `json:"AccountId" xml:"AccountId"` + RequestId string `json:"RequestId" xml:"RequestId"` + Results Results `json:"Results" xml:"Results"` +} + +// CreateListEvaluationResultsRequest creates a request to invoke ListEvaluationResults API +func CreateListEvaluationResultsRequest() (request *ListEvaluationResultsRequest) { + request = &ListEvaluationResultsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "ListEvaluationResults", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateListEvaluationResultsResponse creates a response to parse from ListEvaluationResults response +func CreateListEvaluationResultsResponse() (response *ListEvaluationResultsResponse) { + response = &ListEvaluationResultsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/list_evaluation_score_history.go b/services/governance/list_evaluation_score_history.go new file mode 100644 index 0000000000..3201ca1143 --- /dev/null +++ b/services/governance/list_evaluation_score_history.go @@ -0,0 +1,104 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ListEvaluationScoreHistory invokes the governance.ListEvaluationScoreHistory API synchronously +func (client *Client) ListEvaluationScoreHistory(request *ListEvaluationScoreHistoryRequest) (response *ListEvaluationScoreHistoryResponse, err error) { + response = CreateListEvaluationScoreHistoryResponse() + err = client.DoAction(request, response) + return +} + +// ListEvaluationScoreHistoryWithChan invokes the governance.ListEvaluationScoreHistory API asynchronously +func (client *Client) ListEvaluationScoreHistoryWithChan(request *ListEvaluationScoreHistoryRequest) (<-chan *ListEvaluationScoreHistoryResponse, <-chan error) { + responseChan := make(chan *ListEvaluationScoreHistoryResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListEvaluationScoreHistory(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListEvaluationScoreHistoryWithCallback invokes the governance.ListEvaluationScoreHistory API asynchronously +func (client *Client) ListEvaluationScoreHistoryWithCallback(request *ListEvaluationScoreHistoryRequest, callback func(response *ListEvaluationScoreHistoryResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListEvaluationScoreHistoryResponse + var err error + defer close(result) + response, err = client.ListEvaluationScoreHistory(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListEvaluationScoreHistoryRequest is the request struct for api ListEvaluationScoreHistory +type ListEvaluationScoreHistoryRequest struct { + *requests.RpcRequest + StartDate string `position:"Query" name:"StartDate"` + PartnerCode string `position:"Query" name:"PartnerCode"` + EndDate string `position:"Query" name:"EndDate"` + ShowScoreDiff requests.Boolean `position:"Query" name:"ShowScoreDiff"` +} + +// ListEvaluationScoreHistoryResponse is the response struct for api ListEvaluationScoreHistory +type ListEvaluationScoreHistoryResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ScoreDiff ScoreDiff `json:"ScoreDiff" xml:"ScoreDiff"` + ScoreHistory ScoreHistory `json:"ScoreHistory" xml:"ScoreHistory"` +} + +// CreateListEvaluationScoreHistoryRequest creates a request to invoke ListEvaluationScoreHistory API +func CreateListEvaluationScoreHistoryRequest() (request *ListEvaluationScoreHistoryRequest) { + request = &ListEvaluationScoreHistoryRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "ListEvaluationScoreHistory", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateListEvaluationScoreHistoryResponse creates a response to parse from ListEvaluationScoreHistory response +func CreateListEvaluationScoreHistoryResponse() (response *ListEvaluationScoreHistoryResponse) { + response = &ListEvaluationScoreHistoryResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/run_evaluation.go b/services/governance/run_evaluation.go new file mode 100644 index 0000000000..356e09b8d6 --- /dev/null +++ b/services/governance/run_evaluation.go @@ -0,0 +1,101 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// RunEvaluation invokes the governance.RunEvaluation API synchronously +func (client *Client) RunEvaluation(request *RunEvaluationRequest) (response *RunEvaluationResponse, err error) { + response = CreateRunEvaluationResponse() + err = client.DoAction(request, response) + return +} + +// RunEvaluationWithChan invokes the governance.RunEvaluation API asynchronously +func (client *Client) RunEvaluationWithChan(request *RunEvaluationRequest) (<-chan *RunEvaluationResponse, <-chan error) { + responseChan := make(chan *RunEvaluationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RunEvaluation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RunEvaluationWithCallback invokes the governance.RunEvaluation API asynchronously +func (client *Client) RunEvaluationWithCallback(request *RunEvaluationRequest, callback func(response *RunEvaluationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RunEvaluationResponse + var err error + defer close(result) + response, err = client.RunEvaluation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RunEvaluationRequest is the request struct for api RunEvaluation +type RunEvaluationRequest struct { + *requests.RpcRequest + AccountId requests.Integer `position:"Query" name:"AccountId"` + Scope string `position:"Query" name:"Scope"` + PartnerCode string `position:"Query" name:"PartnerCode"` +} + +// RunEvaluationResponse is the response struct for api RunEvaluation +type RunEvaluationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateRunEvaluationRequest creates a request to invoke RunEvaluation API +func CreateRunEvaluationRequest() (request *RunEvaluationRequest) { + request = &RunEvaluationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "RunEvaluation", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateRunEvaluationResponse creates a response to parse from RunEvaluation response +func CreateRunEvaluationResponse() (response *RunEvaluationResponse) { + response = &RunEvaluationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/governance/struct_action.go b/services/governance/struct_action.go new file mode 100644 index 0000000000..835c1d26b6 --- /dev/null +++ b/services/governance/struct_action.go @@ -0,0 +1,26 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Action is a nested struct in governance response +type Action struct { + Classification string `json:"Classification" xml:"Classification"` + CostDescription string `json:"CostDescription" xml:"CostDescription"` + Description string `json:"Description" xml:"Description"` + Notice string `json:"Notice" xml:"Notice"` + Suggestion string `json:"Suggestion" xml:"Suggestion"` + Guidance []GuidanceItem `json:"Guidance" xml:"Guidance"` +} diff --git a/services/governance/struct_actions.go b/services/governance/struct_actions.go new file mode 100644 index 0000000000..d1fc8c3ece --- /dev/null +++ b/services/governance/struct_actions.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Actions is a nested struct in governance response +type Actions struct { + Action []Action `json:"Action" xml:"Action"` +} diff --git a/services/governance/struct_baseline.go b/services/governance/struct_baseline.go new file mode 100644 index 0000000000..30b32e5aad --- /dev/null +++ b/services/governance/struct_baseline.go @@ -0,0 +1,26 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Baseline is a nested struct in governance response +type Baseline struct { + BaselineId string `json:"BaselineId" xml:"BaselineId"` + BaselineName string `json:"BaselineName" xml:"BaselineName"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + Description string `json:"Description" xml:"Description"` + Type string `json:"Type" xml:"Type"` + UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` +} diff --git a/services/governance/struct_baseline_item.go b/services/governance/struct_baseline_item.go new file mode 100644 index 0000000000..6b60d9e21a --- /dev/null +++ b/services/governance/struct_baseline_item.go @@ -0,0 +1,27 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// BaselineItem is a nested struct in governance response +type BaselineItem struct { + Name string `json:"Name" xml:"Name"` + Version string `json:"Version" xml:"Version"` + Skip bool `json:"Skip" xml:"Skip"` + Config string `json:"Config" xml:"Config"` + Description string `json:"Description" xml:"Description"` + Type string `json:"Type" xml:"Type"` + DependsOn []DependsOnItem `json:"DependsOn" xml:"DependsOn"` +} diff --git a/services/governance/struct_baseline_items_in_get_account_factory_baseline.go b/services/governance/struct_baseline_items_in_get_account_factory_baseline.go new file mode 100644 index 0000000000..e32b127988 --- /dev/null +++ b/services/governance/struct_baseline_items_in_get_account_factory_baseline.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// BaselineItemsInGetAccountFactoryBaseline is a nested struct in governance response +type BaselineItemsInGetAccountFactoryBaseline struct { + BaselineItem []BaselineItem `json:"BaselineItem" xml:"BaselineItem"` +} diff --git a/services/governance/struct_baseline_items_in_get_enrolled_account.go b/services/governance/struct_baseline_items_in_get_enrolled_account.go new file mode 100644 index 0000000000..ad650c91de --- /dev/null +++ b/services/governance/struct_baseline_items_in_get_enrolled_account.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// BaselineItemsInGetEnrolledAccount is a nested struct in governance response +type BaselineItemsInGetEnrolledAccount struct { + BaselineItem []BaselineItem `json:"BaselineItem" xml:"BaselineItem"` +} diff --git a/services/governance/struct_baseline_items_in_list_account_factory_baseline_items.go b/services/governance/struct_baseline_items_in_list_account_factory_baseline_items.go new file mode 100644 index 0000000000..f0829df348 --- /dev/null +++ b/services/governance/struct_baseline_items_in_list_account_factory_baseline_items.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// BaselineItemsInListAccountFactoryBaselineItems is a nested struct in governance response +type BaselineItemsInListAccountFactoryBaselineItems struct { + BaselineItem []BaselineItem `json:"BaselineItem" xml:"BaselineItem"` +} diff --git a/services/governance/struct_baselines.go b/services/governance/struct_baselines.go new file mode 100644 index 0000000000..cc44fa2028 --- /dev/null +++ b/services/governance/struct_baselines.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Baselines is a nested struct in governance response +type Baselines struct { + Baseline []Baseline `json:"Baseline" xml:"Baseline"` +} diff --git a/services/governance/struct_category_results.go b/services/governance/struct_category_results.go new file mode 100644 index 0000000000..91d8df21ed --- /dev/null +++ b/services/governance/struct_category_results.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CategoryResults is a nested struct in governance response +type CategoryResults struct { + CategoryResultsItem []CategoryResultsItem `json:"CategoryResults" xml:"CategoryResults"` +} diff --git a/services/governance/struct_category_results_item.go b/services/governance/struct_category_results_item.go new file mode 100644 index 0000000000..ec02dede8b --- /dev/null +++ b/services/governance/struct_category_results_item.go @@ -0,0 +1,22 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CategoryResultsItem is a nested struct in governance response +type CategoryResultsItem struct { + Id string `json:"Id" xml:"Id"` + Result string `json:"Result" xml:"Result"` +} diff --git a/services/governance/struct_category_score_diff.go b/services/governance/struct_category_score_diff.go new file mode 100644 index 0000000000..4cdc760bcd --- /dev/null +++ b/services/governance/struct_category_score_diff.go @@ -0,0 +1,24 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CategoryScoreDiff is a nested struct in governance response +type CategoryScoreDiff struct { + CurrentEvaluationTime string `json:"CurrentEvaluationTime" xml:"CurrentEvaluationTime"` + Id string `json:"Id" xml:"Id"` + PreviousEvaluationTime string `json:"PreviousEvaluationTime" xml:"PreviousEvaluationTime"` + ScoreDiff string `json:"ScoreDiff" xml:"ScoreDiff"` +} diff --git a/services/governance/struct_category_score_diffs.go b/services/governance/struct_category_score_diffs.go new file mode 100644 index 0000000000..5761423198 --- /dev/null +++ b/services/governance/struct_category_score_diffs.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CategoryScoreDiffs is a nested struct in governance response +type CategoryScoreDiffs struct { + CategoryScoreDiff []CategoryScoreDiff `json:"CategoryScoreDiff" xml:"CategoryScoreDiff"` +} diff --git a/services/governance/struct_depends_on.go b/services/governance/struct_depends_on.go new file mode 100644 index 0000000000..1b8d3217c3 --- /dev/null +++ b/services/governance/struct_depends_on.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DependsOn is a nested struct in governance response +type DependsOn struct { + DependsOnItem []DependsOnItem `json:"DependsOn" xml:"DependsOn"` +} diff --git a/services/governance/struct_depends_on_item.go b/services/governance/struct_depends_on_item.go new file mode 100644 index 0000000000..018bb4e26a --- /dev/null +++ b/services/governance/struct_depends_on_item.go @@ -0,0 +1,23 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DependsOnItem is a nested struct in governance response +type DependsOnItem struct { + Name string `json:"Name" xml:"Name"` + Type string `json:"Type" xml:"Type"` + Version string `json:"Version" xml:"Version"` +} diff --git a/services/governance/struct_enrolled_accounts.go b/services/governance/struct_enrolled_accounts.go new file mode 100644 index 0000000000..81e0dfcba4 --- /dev/null +++ b/services/governance/struct_enrolled_accounts.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// EnrolledAccounts is a nested struct in governance response +type EnrolledAccounts struct { + EnrolledAccountsItem []EnrolledAccountsItem `json:"EnrolledAccounts" xml:"EnrolledAccounts"` +} diff --git a/services/governance/struct_enrolled_accounts_item.go b/services/governance/struct_enrolled_accounts_item.go new file mode 100644 index 0000000000..7bb12ea2f8 --- /dev/null +++ b/services/governance/struct_enrolled_accounts_item.go @@ -0,0 +1,28 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// EnrolledAccountsItem is a nested struct in governance response +type EnrolledAccountsItem struct { + AccountUid int64 `json:"AccountUid" xml:"AccountUid"` + BaselineId string `json:"BaselineId" xml:"BaselineId"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + FolderId string `json:"FolderId" xml:"FolderId"` + PayerAccountUid int64 `json:"PayerAccountUid" xml:"PayerAccountUid"` + Status string `json:"Status" xml:"Status"` + UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` +} diff --git a/services/governance/struct_error_info.go b/services/governance/struct_error_info.go new file mode 100644 index 0000000000..f5e46c0c9e --- /dev/null +++ b/services/governance/struct_error_info.go @@ -0,0 +1,24 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ErrorInfo is a nested struct in governance response +type ErrorInfo struct { + Message string `json:"Message" xml:"Message"` + Code string `json:"Code" xml:"Code"` + RequestId string `json:"RequestId" xml:"RequestId"` + Recommend string `json:"Recommend" xml:"Recommend"` +} diff --git a/services/governance/struct_evaluation_metadata.go b/services/governance/struct_evaluation_metadata.go new file mode 100644 index 0000000000..b0a26c1393 --- /dev/null +++ b/services/governance/struct_evaluation_metadata.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// EvaluationMetadata is a nested struct in governance response +type EvaluationMetadata struct { + EvaluationMetadataItem []EvaluationMetadataItem `json:"EvaluationMetadata" xml:"EvaluationMetadata"` +} diff --git a/services/governance/struct_evaluation_metadata_item.go b/services/governance/struct_evaluation_metadata_item.go new file mode 100644 index 0000000000..0c077a5356 --- /dev/null +++ b/services/governance/struct_evaluation_metadata_item.go @@ -0,0 +1,22 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// EvaluationMetadataItem is a nested struct in governance response +type EvaluationMetadataItem struct { + Type string `json:"Type" xml:"Type"` + Metadata []MetadataItem `json:"Metadata" xml:"Metadata"` +} diff --git a/services/governance/struct_group_results.go b/services/governance/struct_group_results.go new file mode 100644 index 0000000000..5d53527d0a --- /dev/null +++ b/services/governance/struct_group_results.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GroupResults is a nested struct in governance response +type GroupResults struct { + GroupResultsItem []GroupResultsItem `json:"GroupResults" xml:"GroupResults"` +} diff --git a/services/governance/struct_group_results_item.go b/services/governance/struct_group_results_item.go new file mode 100644 index 0000000000..0aab420811 --- /dev/null +++ b/services/governance/struct_group_results_item.go @@ -0,0 +1,22 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GroupResultsItem is a nested struct in governance response +type GroupResultsItem struct { + Id string `json:"Id" xml:"Id"` + PotentialScoreIncrease string `json:"PotentialScoreIncrease" xml:"PotentialScoreIncrease"` +} diff --git a/services/governance/struct_guidance.go b/services/governance/struct_guidance.go new file mode 100644 index 0000000000..5e70d74294 --- /dev/null +++ b/services/governance/struct_guidance.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Guidance is a nested struct in governance response +type Guidance struct { + GuidanceItem []GuidanceItem `json:"Guidance" xml:"Guidance"` +} diff --git a/services/governance/struct_guidance_item.go b/services/governance/struct_guidance_item.go new file mode 100644 index 0000000000..6ec2443e3d --- /dev/null +++ b/services/governance/struct_guidance_item.go @@ -0,0 +1,24 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GuidanceItem is a nested struct in governance response +type GuidanceItem struct { + ButtonName string `json:"ButtonName" xml:"ButtonName"` + ButtonRef string `json:"ButtonRef" xml:"ButtonRef"` + Content string `json:"Content" xml:"Content"` + Title string `json:"Title" xml:"Title"` +} diff --git a/services/governance/struct_inputs.go b/services/governance/struct_inputs.go new file mode 100644 index 0000000000..a6dab8f499 --- /dev/null +++ b/services/governance/struct_inputs.go @@ -0,0 +1,26 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Inputs is a nested struct in governance response +type Inputs struct { + AccountNamePrefix string `json:"AccountNamePrefix" xml:"AccountNamePrefix"` + AccountUid int64 `json:"AccountUid" xml:"AccountUid"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + FolderId string `json:"FolderId" xml:"FolderId"` + PayerAccountUid int64 `json:"PayerAccountUid" xml:"PayerAccountUid"` + BaselineItems []BaselineItem `json:"BaselineItems" xml:"BaselineItems"` +} diff --git a/services/governance/struct_metadata.go b/services/governance/struct_metadata.go new file mode 100644 index 0000000000..b92ca0a8a3 --- /dev/null +++ b/services/governance/struct_metadata.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Metadata is a nested struct in governance response +type Metadata struct { + MetadataItem []MetadataItem `json:"Metadata" xml:"Metadata"` +} diff --git a/services/governance/struct_metadata_item.go b/services/governance/struct_metadata_item.go new file mode 100644 index 0000000000..17cc1f55ba --- /dev/null +++ b/services/governance/struct_metadata_item.go @@ -0,0 +1,31 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MetadataItem is a nested struct in governance response +type MetadataItem struct { + Category string `json:"Category" xml:"Category"` + Description string `json:"Description" xml:"Description"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + Id string `json:"Id" xml:"Id"` + NoRiskDisplayName string `json:"NoRiskDisplayName" xml:"NoRiskDisplayName"` + ParentId string `json:"ParentId" xml:"ParentId"` + RecommendationLevel string `json:"RecommendationLevel" xml:"RecommendationLevel"` + Scope string `json:"Scope" xml:"Scope"` + Stage string `json:"Stage" xml:"Stage"` + RemediationMetadata RemediationMetadata `json:"RemediationMetadata" xml:"RemediationMetadata"` + ResourceMetadata ResourceMetadata `json:"ResourceMetadata" xml:"ResourceMetadata"` +} diff --git a/services/governance/struct_metric_result.go b/services/governance/struct_metric_result.go new file mode 100644 index 0000000000..c22b1fed95 --- /dev/null +++ b/services/governance/struct_metric_result.go @@ -0,0 +1,27 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MetricResult is a nested struct in governance response +type MetricResult struct { + EvaluationTime string `json:"EvaluationTime" xml:"EvaluationTime"` + Id string `json:"Id" xml:"Id"` + Result string `json:"Result" xml:"Result"` + Risk string `json:"Risk" xml:"Risk"` + Status string `json:"Status" xml:"Status"` + ErrorInfo ErrorInfo `json:"ErrorInfo" xml:"ErrorInfo"` + ResourcesSummary ResourcesSummary `json:"ResourcesSummary" xml:"ResourcesSummary"` +} diff --git a/services/governance/struct_metric_results.go b/services/governance/struct_metric_results.go new file mode 100644 index 0000000000..584aac4da6 --- /dev/null +++ b/services/governance/struct_metric_results.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MetricResults is a nested struct in governance response +type MetricResults struct { + MetricResult []MetricResult `json:"MetricResult" xml:"MetricResult"` +} diff --git a/services/governance/struct_metric_score_diff.go b/services/governance/struct_metric_score_diff.go new file mode 100644 index 0000000000..481cd6ad4e --- /dev/null +++ b/services/governance/struct_metric_score_diff.go @@ -0,0 +1,25 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MetricScoreDiff is a nested struct in governance response +type MetricScoreDiff struct { + Category string `json:"Category" xml:"Category"` + CurrentEvaluationTime string `json:"CurrentEvaluationTime" xml:"CurrentEvaluationTime"` + Id string `json:"Id" xml:"Id"` + PreviousEvaluationTime string `json:"PreviousEvaluationTime" xml:"PreviousEvaluationTime"` + ScoreDiff string `json:"ScoreDiff" xml:"ScoreDiff"` +} diff --git a/services/governance/struct_metric_score_diffs.go b/services/governance/struct_metric_score_diffs.go new file mode 100644 index 0000000000..7e59d69260 --- /dev/null +++ b/services/governance/struct_metric_score_diffs.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MetricScoreDiffs is a nested struct in governance response +type MetricScoreDiffs struct { + MetricScoreDiff []MetricScoreDiff `json:"MetricScoreDiff" xml:"MetricScoreDiff"` +} diff --git a/services/governance/struct_progres.go b/services/governance/struct_progres.go new file mode 100644 index 0000000000..d195ae8390 --- /dev/null +++ b/services/governance/struct_progres.go @@ -0,0 +1,22 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Progres is a nested struct in governance response +type Progres struct { + Name string `json:"Name" xml:"Name"` + Status string `json:"Status" xml:"Status"` +} diff --git a/services/governance/struct_progress.go b/services/governance/struct_progress.go new file mode 100644 index 0000000000..0012fdc92c --- /dev/null +++ b/services/governance/struct_progress.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Progress is a nested struct in governance response +type Progress struct { + Progres []Progres `json:"Progres" xml:"Progres"` +} diff --git a/services/governance/struct_remediation.go b/services/governance/struct_remediation.go new file mode 100644 index 0000000000..c234c7b5fb --- /dev/null +++ b/services/governance/struct_remediation.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Remediation is a nested struct in governance response +type Remediation struct { + RemediationItem []RemediationItem `json:"Remediation" xml:"Remediation"` +} diff --git a/services/governance/struct_remediation_item.go b/services/governance/struct_remediation_item.go new file mode 100644 index 0000000000..9fd76dd009 --- /dev/null +++ b/services/governance/struct_remediation_item.go @@ -0,0 +1,25 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RemediationItem is a nested struct in governance response +type RemediationItem struct { + AnalysisDefinition string `json:"AnalysisDefinition" xml:"AnalysisDefinition"` + RemediationParameters string `json:"RemediationParameters" xml:"RemediationParameters"` + RemediationTarget string `json:"RemediationTarget" xml:"RemediationTarget"` + RemediationType string `json:"RemediationType" xml:"RemediationType"` + Actions []Action `json:"Actions" xml:"Actions"` +} diff --git a/services/governance/struct_remediation_metadata.go b/services/governance/struct_remediation_metadata.go new file mode 100644 index 0000000000..7eb0da69dc --- /dev/null +++ b/services/governance/struct_remediation_metadata.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RemediationMetadata is a nested struct in governance response +type RemediationMetadata struct { + Remediation []RemediationItem `json:"Remediation" xml:"Remediation"` +} diff --git a/services/governance/struct_resource.go b/services/governance/struct_resource.go new file mode 100644 index 0000000000..3b68c62e05 --- /dev/null +++ b/services/governance/struct_resource.go @@ -0,0 +1,28 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Resource is a nested struct in governance response +type Resource struct { + RegionId string `json:"RegionId" xml:"RegionId"` + ResourceClassification string `json:"ResourceClassification" xml:"ResourceClassification"` + ResourceId string `json:"ResourceId" xml:"ResourceId"` + ResourceName string `json:"ResourceName" xml:"ResourceName"` + ResourceOwnerDisplayName string `json:"ResourceOwnerDisplayName" xml:"ResourceOwnerDisplayName"` + ResourceOwnerId int64 `json:"ResourceOwnerId" xml:"ResourceOwnerId"` + ResourceType string `json:"ResourceType" xml:"ResourceType"` + ResourceProperties []ResourcePropertie `json:"ResourceProperties" xml:"ResourceProperties"` +} diff --git a/services/governance/struct_resource_metadata.go b/services/governance/struct_resource_metadata.go new file mode 100644 index 0000000000..602565530a --- /dev/null +++ b/services/governance/struct_resource_metadata.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ResourceMetadata is a nested struct in governance response +type ResourceMetadata struct { + ResourcePropertyMetadata []ResourcePropertyMetadataItem `json:"ResourcePropertyMetadata" xml:"ResourcePropertyMetadata"` +} diff --git a/services/governance/struct_resource_propertie.go b/services/governance/struct_resource_propertie.go new file mode 100644 index 0000000000..ba89d858e5 --- /dev/null +++ b/services/governance/struct_resource_propertie.go @@ -0,0 +1,22 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ResourcePropertie is a nested struct in governance response +type ResourcePropertie struct { + PropertyName string `json:"PropertyName" xml:"PropertyName"` + PropertyValue string `json:"PropertyValue" xml:"PropertyValue"` +} diff --git a/services/governance/struct_resource_properties.go b/services/governance/struct_resource_properties.go new file mode 100644 index 0000000000..17f81b0de1 --- /dev/null +++ b/services/governance/struct_resource_properties.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ResourceProperties is a nested struct in governance response +type ResourceProperties struct { + ResourcePropertie []ResourcePropertie `json:"ResourcePropertie" xml:"ResourcePropertie"` +} diff --git a/services/governance/struct_resource_property_metadata.go b/services/governance/struct_resource_property_metadata.go new file mode 100644 index 0000000000..9c14f2e6d4 --- /dev/null +++ b/services/governance/struct_resource_property_metadata.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ResourcePropertyMetadata is a nested struct in governance response +type ResourcePropertyMetadata struct { + ResourcePropertyMetadataItem []ResourcePropertyMetadataItem `json:"ResourcePropertyMetadata" xml:"ResourcePropertyMetadata"` +} diff --git a/services/governance/struct_resource_property_metadata_item.go b/services/governance/struct_resource_property_metadata_item.go new file mode 100644 index 0000000000..f162f45ee6 --- /dev/null +++ b/services/governance/struct_resource_property_metadata_item.go @@ -0,0 +1,24 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ResourcePropertyMetadataItem is a nested struct in governance response +type ResourcePropertyMetadataItem struct { + DisplayName string `json:"DisplayName" xml:"DisplayName"` + PropertyName string `json:"PropertyName" xml:"PropertyName"` + PropertyReference string `json:"PropertyReference" xml:"PropertyReference"` + PropertyType string `json:"PropertyType" xml:"PropertyType"` +} diff --git a/services/governance/struct_resources.go b/services/governance/struct_resources.go new file mode 100644 index 0000000000..2e1fc4aed0 --- /dev/null +++ b/services/governance/struct_resources.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Resources is a nested struct in governance response +type Resources struct { + Resource []Resource `json:"Resource" xml:"Resource"` +} diff --git a/services/governance/struct_resources_summary.go b/services/governance/struct_resources_summary.go new file mode 100644 index 0000000000..439bfe23f8 --- /dev/null +++ b/services/governance/struct_resources_summary.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ResourcesSummary is a nested struct in governance response +type ResourcesSummary struct { + NonCompliant int `json:"NonCompliant" xml:"NonCompliant"` +} diff --git a/services/governance/struct_results.go b/services/governance/struct_results.go new file mode 100644 index 0000000000..c0f059c163 --- /dev/null +++ b/services/governance/struct_results.go @@ -0,0 +1,26 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Results is a nested struct in governance response +type Results struct { + EvaluationTime string `json:"EvaluationTime" xml:"EvaluationTime"` + Status string `json:"Status" xml:"Status"` + TotalScore string `json:"TotalScore" xml:"TotalScore"` + CategoryResults []CategoryResultsItem `json:"CategoryResults" xml:"CategoryResults"` + GroupResults []GroupResultsItem `json:"GroupResults" xml:"GroupResults"` + MetricResults []MetricResult `json:"MetricResults" xml:"MetricResults"` +} diff --git a/services/governance/struct_score_diff.go b/services/governance/struct_score_diff.go new file mode 100644 index 0000000000..2f0ad2ef95 --- /dev/null +++ b/services/governance/struct_score_diff.go @@ -0,0 +1,22 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ScoreDiff is a nested struct in governance response +type ScoreDiff struct { + CategoryScoreDiffs []CategoryScoreDiff `json:"CategoryScoreDiffs" xml:"CategoryScoreDiffs"` + MetricScoreDiffs []MetricScoreDiff `json:"MetricScoreDiffs" xml:"MetricScoreDiffs"` +} diff --git a/services/governance/struct_score_history.go b/services/governance/struct_score_history.go new file mode 100644 index 0000000000..9779924909 --- /dev/null +++ b/services/governance/struct_score_history.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ScoreHistory is a nested struct in governance response +type ScoreHistory struct { + TotalScoreHistory []TotalScoreHistoryItem `json:"TotalScoreHistory" xml:"TotalScoreHistory"` +} diff --git a/services/governance/struct_total_score_history.go b/services/governance/struct_total_score_history.go new file mode 100644 index 0000000000..ec6c845c11 --- /dev/null +++ b/services/governance/struct_total_score_history.go @@ -0,0 +1,21 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TotalScoreHistory is a nested struct in governance response +type TotalScoreHistory struct { + TotalScoreHistoryItem []TotalScoreHistoryItem `json:"TotalScoreHistory" xml:"TotalScoreHistory"` +} diff --git a/services/governance/struct_total_score_history_item.go b/services/governance/struct_total_score_history_item.go new file mode 100644 index 0000000000..85c668b90d --- /dev/null +++ b/services/governance/struct_total_score_history_item.go @@ -0,0 +1,22 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TotalScoreHistoryItem is a nested struct in governance response +type TotalScoreHistoryItem struct { + EvaluationTime string `json:"EvaluationTime" xml:"EvaluationTime"` + Score string `json:"Score" xml:"Score"` +} diff --git a/services/governance/update_account_factory_baseline.go b/services/governance/update_account_factory_baseline.go new file mode 100644 index 0000000000..a409fc8f7d --- /dev/null +++ b/services/governance/update_account_factory_baseline.go @@ -0,0 +1,109 @@ +package governance + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// UpdateAccountFactoryBaseline invokes the governance.UpdateAccountFactoryBaseline API synchronously +func (client *Client) UpdateAccountFactoryBaseline(request *UpdateAccountFactoryBaselineRequest) (response *UpdateAccountFactoryBaselineResponse, err error) { + response = CreateUpdateAccountFactoryBaselineResponse() + err = client.DoAction(request, response) + return +} + +// UpdateAccountFactoryBaselineWithChan invokes the governance.UpdateAccountFactoryBaseline API asynchronously +func (client *Client) UpdateAccountFactoryBaselineWithChan(request *UpdateAccountFactoryBaselineRequest) (<-chan *UpdateAccountFactoryBaselineResponse, <-chan error) { + responseChan := make(chan *UpdateAccountFactoryBaselineResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateAccountFactoryBaseline(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateAccountFactoryBaselineWithCallback invokes the governance.UpdateAccountFactoryBaseline API asynchronously +func (client *Client) UpdateAccountFactoryBaselineWithCallback(request *UpdateAccountFactoryBaselineRequest, callback func(response *UpdateAccountFactoryBaselineResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateAccountFactoryBaselineResponse + var err error + defer close(result) + response, err = client.UpdateAccountFactoryBaseline(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateAccountFactoryBaselineRequest is the request struct for api UpdateAccountFactoryBaseline +type UpdateAccountFactoryBaselineRequest struct { + *requests.RpcRequest + Description string `position:"Query" name:"Description"` + BaselineName string `position:"Query" name:"BaselineName"` + BaselineId string `position:"Query" name:"BaselineId"` + BaselineItems *[]UpdateAccountFactoryBaselineBaselineItems `position:"Query" name:"BaselineItems" type:"Repeated"` +} + +// UpdateAccountFactoryBaselineBaselineItems is a repeated param struct in UpdateAccountFactoryBaselineRequest +type UpdateAccountFactoryBaselineBaselineItems struct { + Name string `name:"Name"` + Config string `name:"Config"` + Version string `name:"Version"` +} + +// UpdateAccountFactoryBaselineResponse is the response struct for api UpdateAccountFactoryBaseline +type UpdateAccountFactoryBaselineResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateUpdateAccountFactoryBaselineRequest creates a request to invoke UpdateAccountFactoryBaseline API +func CreateUpdateAccountFactoryBaselineRequest() (request *UpdateAccountFactoryBaselineRequest) { + request = &UpdateAccountFactoryBaselineRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("governance", "2021-01-20", "UpdateAccountFactoryBaseline", "governance", "openAPI") + request.Method = requests.POST + return +} + +// CreateUpdateAccountFactoryBaselineResponse creates a response to parse from UpdateAccountFactoryBaseline response +func CreateUpdateAccountFactoryBaselineResponse() (response *UpdateAccountFactoryBaselineResponse) { + response = &UpdateAccountFactoryBaselineResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}