From 0ce63ca6c30d90a7a7aa27c3f8480f6cf480eb79 Mon Sep 17 00:00:00 2001 From: Alibaba Cloud SDK Date: Thu, 16 May 2019 19:24:03 +0800 Subject: [PATCH] Generated 2017-12-14 for BssOpenApi --- ChangeLog.txt | 3 + services/bssopenapi/apply_invoice.go | 136 ++++++++-------- services/bssopenapi/cancel_order.go | 118 +++++++------- services/bssopenapi/change_consume_amount.go | 132 ++++++++-------- .../change_reseller_consume_amount.go | 118 ++++++++++++++ services/bssopenapi/client.go | 75 ++++----- services/bssopenapi/convert_charge_type.go | 126 +++++++-------- services/bssopenapi/create_instance.go | 136 ++++++++-------- .../bssopenapi/create_reseller_user_quota.go | 114 ++++++++++++++ .../bssopenapi/create_resource_package.go | 130 ++++++++-------- services/bssopenapi/create_user_quota.go | 124 +++++++-------- .../bssopenapi/describe_pricing_module.go | 122 ++++++++------- .../describe_resource_package_product.go | 118 +++++++------- services/bssopenapi/enable_bill_generation.go | 118 +++++++------- .../bssopenapi/get_customer_account_info.go | 111 ++++++++++++++ services/bssopenapi/get_customer_list.go | 110 +++++++++++++ services/bssopenapi/get_order_detail.go | 118 +++++++------- .../bssopenapi/get_pay_as_you_go_price.go | 133 ++++++++-------- .../bssopenapi/get_resource_package_price.go | 128 ++++++++-------- services/bssopenapi/get_subscription_price.go | 145 +++++++++--------- services/bssopenapi/modify_instance.go | 134 ++++++++-------- services/bssopenapi/query_account_balance.go | 114 +++++++------- .../bssopenapi/query_account_book_list.go | 122 ++++++++------- .../bssopenapi/query_account_transactions.go | 117 ++++++++++++++ .../bssopenapi/query_available_instances.go | 140 +++++++++-------- services/bssopenapi/query_avaliable_quota.go | 120 ++++++++------- services/bssopenapi/query_bill.go | 134 ++++++++-------- services/bssopenapi/query_bill_overview.go | 122 ++++++++------- services/bssopenapi/query_cash_coupons.go | 120 ++++++++------- .../bssopenapi/query_customer_address_list.go | 120 ++++++++------- services/bssopenapi/query_enduser_status.go | 124 +++++++-------- services/bssopenapi/query_evaluate_list.go | 142 ++++++++--------- services/bssopenapi/query_instance_bill.go | 132 ++++++++-------- .../bssopenapi/query_instance_gaap_cost.go | 126 +++++++-------- .../query_invoicing_customer_list.go | 116 +++++++------- services/bssopenapi/query_monthly_bill.go | 116 +++++++------- .../query_monthly_instance_consumption.go | 128 ++++++++-------- services/bssopenapi/query_orders.go | 134 ++++++++-------- services/bssopenapi/query_prepaid_cards.go | 120 ++++++++------- services/bssopenapi/query_price.go | 118 +++++++------- services/bssopenapi/query_price_list.go | 124 +++++++-------- services/bssopenapi/query_product_list.go | 120 ++++++++------- services/bssopenapi/query_redeem.go | 124 +++++++-------- .../query_reseller_available_quota.go | 112 ++++++++++++++ .../query_resource_package_instances.go | 132 ++++++++-------- services/bssopenapi/query_settlement_bill.go | 136 ++++++++-------- .../bssopenapi/query_user_alarm_threshold.go | 124 +++++++-------- services/bssopenapi/query_user_oms_data.go | 128 ++++++++-------- services/bssopenapi/renew_instance.go | 126 +++++++-------- services/bssopenapi/set_enduser_status.go | 122 ++++++++------- services/bssopenapi/set_renewal.go | 128 ++++++++-------- .../set_reseller_user_alarm_threshold.go | 113 ++++++++++++++ .../bssopenapi/set_reseller_user_quota.go | 114 ++++++++++++++ .../bssopenapi/set_reseller_user_status.go | 113 ++++++++++++++ .../bssopenapi/set_user_alarm_threshold.go | 122 ++++++++------- services/bssopenapi/set_user_quota.go | 124 +++++++-------- .../struct_account_transactions_list.go | 22 +++ .../struct_account_transactions_list_item.go | 34 ++++ .../bssopenapi/struct_applicable_products.go | 3 +- services/bssopenapi/struct_attribute.go | 9 +- services/bssopenapi/struct_attribute_list.go | 3 +- services/bssopenapi/struct_attribute_value.go | 9 +- .../bssopenapi/struct_available_duration.go | 7 +- .../bssopenapi/struct_available_durations.go | 3 +- services/bssopenapi/struct_cash_coupon.go | 21 +-- services/bssopenapi/struct_config_list.go | 3 +- .../bssopenapi/struct_customer_invoice.go | 43 +++--- .../struct_customer_invoice_address.go | 25 +-- .../struct_customer_invoice_address_list.go | 3 +- .../struct_customer_invoice_list.go | 3 +- services/bssopenapi/struct_data.go | 121 ++++++++------- .../struct_data_in_create_resource_package.go | 5 +- .../struct_data_in_get_customer_list.go | 22 +++ .../struct_data_in_query_cash_coupons.go | 3 +- .../struct_data_in_query_prepaid_cards.go | 3 +- .../bssopenapi/struct_data_in_query_redeem.go | 9 +- ...ata_in_query_resource_package_instances.go | 11 +- .../struct_data_in_query_user_oms_data.go | 7 +- ...struct_datas_in_query_account_book_list.go | 3 +- .../struct_datas_in_query_enduser_status.go | 3 +- ...uct_datas_in_query_user_alarm_threshold.go | 3 +- services/bssopenapi/struct_evaluate.go | 43 +++--- services/bssopenapi/struct_evaluate_list.go | 3 +- services/bssopenapi/struct_instance.go | 59 +++---- ...nce_in_query_resource_package_instances.go | 27 ++-- services/bssopenapi/struct_instance_list.go | 3 +- services/bssopenapi/struct_instances.go | 3 +- services/bssopenapi/struct_item.go | 105 ++++++------- .../struct_item_in_query_instance_bill.go | 59 ++++--- .../bssopenapi/struct_items_in_query_bill.go | 3 +- .../struct_items_in_query_bill_overview.go | 3 +- .../struct_items_in_query_instance_bill.go | 3 +- .../struct_items_in_query_monthly_bill.go | 3 +- ...s_in_query_monthly_instance_consumption.go | 3 +- .../struct_items_in_query_settlement_bill.go | 3 +- services/bssopenapi/struct_module.go | 121 +++++++-------- services/bssopenapi/struct_module_detail.go | 11 +- ...dule_details_in_get_pay_as_you_go_price.go | 3 +- ...odule_details_in_get_subscription_price.go | 3 +- services/bssopenapi/struct_module_list.go | 3 +- ...uct_modules_in_query_instance_gaap_cost.go | 3 +- .../struct_modules_in_query_price_list.go | 3 +- services/bssopenapi/struct_oms_data.go | 3 +- services/bssopenapi/struct_order.go | 47 +++--- .../struct_order_list_in_get_order_detail.go | 3 +- .../struct_order_list_in_query_orders.go | 3 +- services/bssopenapi/struct_package_type.go | 9 +- services/bssopenapi/struct_package_types.go | 3 +- services/bssopenapi/struct_prepaid_card.go | 21 +-- services/bssopenapi/struct_product.go | 9 +- services/bssopenapi/struct_product_list.go | 3 +- services/bssopenapi/struct_promotion.go | 5 +- .../bssopenapi/struct_promotion_detail.go | 7 +- ...tion_details_in_get_pay_as_you_go_price.go | 3 +- ...otion_details_in_get_subscription_price.go | 3 +- services/bssopenapi/struct_promotions.go | 3 +- services/bssopenapi/struct_properties.go | 3 +- services/bssopenapi/struct_property.go | 5 +- services/bssopenapi/struct_redeem.go | 3 +- services/bssopenapi/struct_redeem_item.go | 21 +-- .../bssopenapi/struct_resource_package.go | 9 +- .../bssopenapi/struct_resource_packages.go | 3 +- services/bssopenapi/struct_specification.go | 7 +- services/bssopenapi/struct_specifications.go | 3 +- services/bssopenapi/struct_tier_price.go | 15 +- services/bssopenapi/struct_tier_prices.go | 3 +- services/bssopenapi/struct_uid_list.go | 22 +++ services/bssopenapi/struct_values.go | 3 +- services/bssopenapi/subscribe_bill_to_oss.go | 116 +++++++------- services/bssopenapi/subscribe_detail.go | 118 +++++++------- .../bssopenapi/subscribe_export_to_oss.go | 118 +++++++------- .../bssopenapi/unsubscribe_bill_to_oss.go | 114 +++++++------- .../bssopenapi/unsubscribe_export_to_oss.go | 112 +++++++------- 133 files changed, 4913 insertions(+), 3505 deletions(-) create mode 100644 services/bssopenapi/change_reseller_consume_amount.go create mode 100644 services/bssopenapi/create_reseller_user_quota.go create mode 100644 services/bssopenapi/get_customer_account_info.go create mode 100644 services/bssopenapi/get_customer_list.go create mode 100644 services/bssopenapi/query_account_transactions.go create mode 100644 services/bssopenapi/query_reseller_available_quota.go create mode 100644 services/bssopenapi/set_reseller_user_alarm_threshold.go create mode 100644 services/bssopenapi/set_reseller_user_quota.go create mode 100644 services/bssopenapi/set_reseller_user_status.go create mode 100644 services/bssopenapi/struct_account_transactions_list.go create mode 100644 services/bssopenapi/struct_account_transactions_list_item.go create mode 100644 services/bssopenapi/struct_data_in_get_customer_list.go create mode 100644 services/bssopenapi/struct_uid_list.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 4437715e91..ea2caea86e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +2019-05-16 Version: 1.58.15 +- Generated 2017-12-14 for `BssOpenApi` + 2019-05-16 Version: 1.58.14 - Generated 2014-05-26 for `Ecs` diff --git a/services/bssopenapi/apply_invoice.go b/services/bssopenapi/apply_invoice.go index c5e8645176..2b5f2cf37a 100644 --- a/services/bssopenapi/apply_invoice.go +++ b/services/bssopenapi/apply_invoice.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,102 +17,105 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // ApplyInvoice invokes the bssopenapi.ApplyInvoice API synchronously // api document: https://help.aliyun.com/api/bssopenapi/applyinvoice.html func (client *Client) ApplyInvoice(request *ApplyInvoiceRequest) (response *ApplyInvoiceResponse, err error) { - response = CreateApplyInvoiceResponse() - err = client.DoAction(request, response) - return +response = CreateApplyInvoiceResponse() +err = client.DoAction(request, response) +return } // ApplyInvoiceWithChan invokes the bssopenapi.ApplyInvoice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/applyinvoice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ApplyInvoiceWithChan(request *ApplyInvoiceRequest) (<-chan *ApplyInvoiceResponse, <-chan error) { - responseChan := make(chan *ApplyInvoiceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.ApplyInvoice(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *ApplyInvoiceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.ApplyInvoice(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // ApplyInvoiceWithCallback invokes the bssopenapi.ApplyInvoice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/applyinvoice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) ApplyInvoiceWithCallback(request *ApplyInvoiceRequest, callback func(response *ApplyInvoiceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *ApplyInvoiceResponse - var err error - defer close(result) - response, err = client.ApplyInvoice(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) ApplyInvoiceWithCallback(request *ApplyInvoiceRequest, callback func(response *ApplyInvoiceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *ApplyInvoiceResponse +var err error +defer close(result) +response, err = client.ApplyInvoice(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // ApplyInvoiceRequest is the request struct for api ApplyInvoice type ApplyInvoiceRequest struct { - *requests.RpcRequest - InvoicingType requests.Integer `position:"Query" name:"InvoicingType"` - ApplyUserNick string `position:"Query" name:"ApplyUserNick"` - InvoiceByAmount requests.Boolean `position:"Query" name:"InvoiceByAmount"` - CustomerId requests.Integer `position:"Query" name:"CustomerId"` - SelectedIds *[]string `position:"Query" name:"SelectedIds" type:"Repeated"` - ProcessWay requests.Integer `position:"Query" name:"ProcessWay"` - CallerBid requests.Integer `position:"Query" name:"callerBid"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InvoiceAmount requests.Integer `position:"Query" name:"InvoiceAmount"` - AddressId requests.Integer `position:"Query" name:"AddressId"` - CallerUid requests.Integer `position:"Query" name:"callerUid"` +*requests.RpcRequest + InvoicingType requests.Integer `position:"Query" name:"InvoicingType"` + ProcessWay requests.Integer `position:"Query" name:"ProcessWay"` + CallerBid requests.Integer `position:"Query" name:"callerBid"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InvoiceAmount requests.Integer `position:"Query" name:"InvoiceAmount"` + AddressId requests.Integer `position:"Query" name:"AddressId"` + ApplyUserNick string `position:"Query" name:"ApplyUserNick"` + InvoiceByAmount requests.Boolean `position:"Query" name:"InvoiceByAmount"` + CustomerId requests.Integer `position:"Query" name:"CustomerId"` + SelectedIds *[]string `position:"Query" name:"SelectedIds" type:"Repeated"` + CallerUid requests.Integer `position:"Query" name:"callerUid"` } + // ApplyInvoiceResponse is the response struct for api ApplyInvoice type ApplyInvoiceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateApplyInvoiceRequest creates a request to invoke ApplyInvoice API func CreateApplyInvoiceRequest() (request *ApplyInvoiceRequest) { - request = &ApplyInvoiceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ApplyInvoice", "", "") - return +request = &ApplyInvoiceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ApplyInvoice", "", "") +return } // CreateApplyInvoiceResponse creates a response to parse from ApplyInvoice response func CreateApplyInvoiceResponse() (response *ApplyInvoiceResponse) { - response = &ApplyInvoiceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &ApplyInvoiceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/cancel_order.go b/services/bssopenapi/cancel_order.go index 63c346c91d..2ed0da630e 100644 --- a/services/bssopenapi/cancel_order.go +++ b/services/bssopenapi/cancel_order.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,93 +17,96 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // CancelOrder invokes the bssopenapi.CancelOrder API synchronously // api document: https://help.aliyun.com/api/bssopenapi/cancelorder.html func (client *Client) CancelOrder(request *CancelOrderRequest) (response *CancelOrderResponse, err error) { - response = CreateCancelOrderResponse() - err = client.DoAction(request, response) - return +response = CreateCancelOrderResponse() +err = client.DoAction(request, response) +return } // CancelOrderWithChan invokes the bssopenapi.CancelOrder API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/cancelorder.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelOrderWithChan(request *CancelOrderRequest) (<-chan *CancelOrderResponse, <-chan error) { - responseChan := make(chan *CancelOrderResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.CancelOrder(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *CancelOrderResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.CancelOrder(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // CancelOrderWithCallback invokes the bssopenapi.CancelOrder API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/cancelorder.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) CancelOrderWithCallback(request *CancelOrderRequest, callback func(response *CancelOrderResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *CancelOrderResponse - var err error - defer close(result) - response, err = client.CancelOrder(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) CancelOrderWithCallback(request *CancelOrderRequest, callback func(response *CancelOrderResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *CancelOrderResponse +var err error +defer close(result) +response, err = client.CancelOrder(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // CancelOrderRequest is the request struct for api CancelOrder type CancelOrderRequest struct { - *requests.RpcRequest - OrderId string `position:"Query" name:"OrderId"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` +*requests.RpcRequest + OrderId string `position:"Query" name:"OrderId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` } + // CancelOrderResponse is the response struct for api CancelOrder type CancelOrderResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateCancelOrderRequest creates a request to invoke CancelOrder API func CreateCancelOrderRequest() (request *CancelOrderRequest) { - request = &CancelOrderRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CancelOrder", "", "") - return +request = &CancelOrderRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CancelOrder", "", "") +return } // CreateCancelOrderResponse creates a response to parse from CancelOrder response func CreateCancelOrderResponse() (response *CancelOrderResponse) { - response = &CancelOrderResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &CancelOrderResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/change_consume_amount.go b/services/bssopenapi/change_consume_amount.go index 169694a421..55524a062c 100644 --- a/services/bssopenapi/change_consume_amount.go +++ b/services/bssopenapi/change_consume_amount.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,100 +17,103 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // ChangeConsumeAmount invokes the bssopenapi.ChangeConsumeAmount API synchronously // api document: https://help.aliyun.com/api/bssopenapi/changeconsumeamount.html func (client *Client) ChangeConsumeAmount(request *ChangeConsumeAmountRequest) (response *ChangeConsumeAmountResponse, err error) { - response = CreateChangeConsumeAmountResponse() - err = client.DoAction(request, response) - return +response = CreateChangeConsumeAmountResponse() +err = client.DoAction(request, response) +return } // ChangeConsumeAmountWithChan invokes the bssopenapi.ChangeConsumeAmount API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/changeconsumeamount.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ChangeConsumeAmountWithChan(request *ChangeConsumeAmountRequest) (<-chan *ChangeConsumeAmountResponse, <-chan error) { - responseChan := make(chan *ChangeConsumeAmountResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.ChangeConsumeAmount(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *ChangeConsumeAmountResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.ChangeConsumeAmount(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // ChangeConsumeAmountWithCallback invokes the bssopenapi.ChangeConsumeAmount API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/changeconsumeamount.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) ChangeConsumeAmountWithCallback(request *ChangeConsumeAmountRequest, callback func(response *ChangeConsumeAmountResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *ChangeConsumeAmountResponse - var err error - defer close(result) - response, err = client.ChangeConsumeAmount(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) ChangeConsumeAmountWithCallback(request *ChangeConsumeAmountRequest, callback func(response *ChangeConsumeAmountResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *ChangeConsumeAmountResponse +var err error +defer close(result) +response, err = client.ChangeConsumeAmount(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // ChangeConsumeAmountRequest is the request struct for api ChangeConsumeAmount type ChangeConsumeAmountRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - AdjustType string `position:"Query" name:"AdjustType"` - Amount string `position:"Query" name:"Amount"` - OutBizId string `position:"Query" name:"OutBizId"` - ExtendMap string `position:"Query" name:"ExtendMap"` - Currency string `position:"Query" name:"Currency"` - Source string `position:"Query" name:"Source"` - Bid string `position:"Query" name:"Bid"` - BusinessType string `position:"Query" name:"BusinessType"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + AdjustType string `position:"Query" name:"AdjustType"` + Amount string `position:"Query" name:"Amount"` + OutBizId string `position:"Query" name:"OutBizId"` + ExtendMap string `position:"Query" name:"ExtendMap"` + Currency string `position:"Query" name:"Currency"` + Source string `position:"Query" name:"Source"` + Bid string `position:"Query" name:"Bid"` + BusinessType string `position:"Query" name:"BusinessType"` } + // ChangeConsumeAmountResponse is the response struct for api ChangeConsumeAmount type ChangeConsumeAmountResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Data string `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data string `json:"Data" xml:"Data"` } // CreateChangeConsumeAmountRequest creates a request to invoke ChangeConsumeAmount API func CreateChangeConsumeAmountRequest() (request *ChangeConsumeAmountRequest) { - request = &ChangeConsumeAmountRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ChangeConsumeAmount", "", "") - return +request = &ChangeConsumeAmountRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ChangeConsumeAmount", "", "") +return } // CreateChangeConsumeAmountResponse creates a response to parse from ChangeConsumeAmount response func CreateChangeConsumeAmountResponse() (response *ChangeConsumeAmountResponse) { - response = &ChangeConsumeAmountResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &ChangeConsumeAmountResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/change_reseller_consume_amount.go b/services/bssopenapi/change_reseller_consume_amount.go new file mode 100644 index 0000000000..5566e85bea --- /dev/null +++ b/services/bssopenapi/change_reseller_consume_amount.go @@ -0,0 +1,118 @@ + +package bssopenapi + +//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" +) + +// ChangeResellerConsumeAmount invokes the bssopenapi.ChangeResellerConsumeAmount API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/changeresellerconsumeamount.html +func (client *Client) ChangeResellerConsumeAmount(request *ChangeResellerConsumeAmountRequest) (response *ChangeResellerConsumeAmountResponse, err error) { +response = CreateChangeResellerConsumeAmountResponse() +err = client.DoAction(request, response) +return +} + +// ChangeResellerConsumeAmountWithChan invokes the bssopenapi.ChangeResellerConsumeAmount API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/changeresellerconsumeamount.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ChangeResellerConsumeAmountWithChan(request *ChangeResellerConsumeAmountRequest) (<-chan *ChangeResellerConsumeAmountResponse, <-chan error) { +responseChan := make(chan *ChangeResellerConsumeAmountResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.ChangeResellerConsumeAmount(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// ChangeResellerConsumeAmountWithCallback invokes the bssopenapi.ChangeResellerConsumeAmount API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/changeresellerconsumeamount.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ChangeResellerConsumeAmountWithCallback(request *ChangeResellerConsumeAmountRequest, callback func(response *ChangeResellerConsumeAmountResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *ChangeResellerConsumeAmountResponse +var err error +defer close(result) +response, err = client.ChangeResellerConsumeAmount(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// ChangeResellerConsumeAmountRequest is the request struct for api ChangeResellerConsumeAmount +type ChangeResellerConsumeAmountRequest struct { +*requests.RpcRequest + Amount string `position:"Query" name:"Amount"` + OutBizId string `position:"Query" name:"OutBizId"` + Source string `position:"Query" name:"Source"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + BusinessType string `position:"Query" name:"BusinessType"` + AdjustType string `position:"Query" name:"AdjustType"` + ExtendMap string `position:"Query" name:"ExtendMap"` + Currency string `position:"Query" name:"Currency"` +} + + +// ChangeResellerConsumeAmountResponse is the response struct for api ChangeResellerConsumeAmount +type ChangeResellerConsumeAmountResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data string `json:"Data" xml:"Data"` +} + +// CreateChangeResellerConsumeAmountRequest creates a request to invoke ChangeResellerConsumeAmount API +func CreateChangeResellerConsumeAmountRequest() (request *ChangeResellerConsumeAmountRequest) { +request = &ChangeResellerConsumeAmountRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ChangeResellerConsumeAmount", "", "") +return +} + +// CreateChangeResellerConsumeAmountResponse creates a response to parse from ChangeResellerConsumeAmount response +func CreateChangeResellerConsumeAmountResponse() (response *ChangeResellerConsumeAmountResponse) { +response = &ChangeResellerConsumeAmountResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/client.go b/services/bssopenapi/client.go index ae705e8acf..0be647484a 100644 --- a/services/bssopenapi/client.go +++ b/services/bssopenapi/client.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,89 +17,89 @@ package bssopenapi // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( - "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" + "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 + sdk.Client } // NewClient creates a sdk client with environment variables func NewClient() (client *Client, err error) { - client = &Client{} - err = client.Init() - return + client = &Client{} + err = client.Init() + 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) - return + client = &Client{} + var pc provider.Provider + if len(providers) == 0 { + pc = provider.DefaultChain + } else { + pc = provider.NewProviderChain(providers) + } + err = client.InitWithProviderChain(regionId, pc) + 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) - return + client = &Client{} + err = client.InitWithOptions(regionId, config, credential) + 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) - return + client = &Client{} + err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret) + 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) - return + client = &Client{} + err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken) + 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) - return + client = &Client{} + err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName) + 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) - return + client = &Client{} + err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy) + 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) - return + client = &Client{} + err = client.InitWithEcsRamRole(regionId, roleName) + 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) - return + client = &Client{} + err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration) + return } diff --git a/services/bssopenapi/convert_charge_type.go b/services/bssopenapi/convert_charge_type.go index cb299d32d8..9d31d8e45b 100644 --- a/services/bssopenapi/convert_charge_type.go +++ b/services/bssopenapi/convert_charge_type.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,97 +17,100 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // ConvertChargeType invokes the bssopenapi.ConvertChargeType API synchronously // api document: https://help.aliyun.com/api/bssopenapi/convertchargetype.html func (client *Client) ConvertChargeType(request *ConvertChargeTypeRequest) (response *ConvertChargeTypeResponse, err error) { - response = CreateConvertChargeTypeResponse() - err = client.DoAction(request, response) - return +response = CreateConvertChargeTypeResponse() +err = client.DoAction(request, response) +return } // ConvertChargeTypeWithChan invokes the bssopenapi.ConvertChargeType API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/convertchargetype.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ConvertChargeTypeWithChan(request *ConvertChargeTypeRequest) (<-chan *ConvertChargeTypeResponse, <-chan error) { - responseChan := make(chan *ConvertChargeTypeResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.ConvertChargeType(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *ConvertChargeTypeResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.ConvertChargeType(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // ConvertChargeTypeWithCallback invokes the bssopenapi.ConvertChargeType API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/convertchargetype.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) ConvertChargeTypeWithCallback(request *ConvertChargeTypeRequest, callback func(response *ConvertChargeTypeResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *ConvertChargeTypeResponse - var err error - defer close(result) - response, err = client.ConvertChargeType(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) ConvertChargeTypeWithCallback(request *ConvertChargeTypeRequest, callback func(response *ConvertChargeTypeResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *ConvertChargeTypeResponse +var err error +defer close(result) +response, err = client.ConvertChargeType(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // ConvertChargeTypeRequest is the request struct for api ConvertChargeType type ConvertChargeTypeRequest struct { - *requests.RpcRequest - Period requests.Integer `position:"Query" name:"Period"` - ProductCode string `position:"Query" name:"ProductCode"` - InstanceId string `position:"Query" name:"InstanceId"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + Period requests.Integer `position:"Query" name:"Period"` + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + InstanceId string `position:"Query" name:"InstanceId"` } + // ConvertChargeTypeResponse is the response struct for api ConvertChargeType type ConvertChargeTypeResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateConvertChargeTypeRequest creates a request to invoke ConvertChargeType API func CreateConvertChargeTypeRequest() (request *ConvertChargeTypeRequest) { - request = &ConvertChargeTypeRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ConvertChargeType", "", "") - return +request = &ConvertChargeTypeRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ConvertChargeType", "", "") +return } // CreateConvertChargeTypeResponse creates a response to parse from ConvertChargeType response func CreateConvertChargeTypeResponse() (response *ConvertChargeTypeResponse) { - response = &ConvertChargeTypeResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &ConvertChargeTypeResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/create_instance.go b/services/bssopenapi/create_instance.go index 80a73ae213..3116860646 100644 --- a/services/bssopenapi/create_instance.go +++ b/services/bssopenapi/create_instance.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,105 +17,108 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // CreateInstance invokes the bssopenapi.CreateInstance API synchronously // api document: https://help.aliyun.com/api/bssopenapi/createinstance.html func (client *Client) CreateInstance(request *CreateInstanceRequest) (response *CreateInstanceResponse, err error) { - response = CreateCreateInstanceResponse() - err = client.DoAction(request, response) - return +response = CreateCreateInstanceResponse() +err = client.DoAction(request, response) +return } // CreateInstanceWithChan invokes the bssopenapi.CreateInstance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/createinstance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateInstanceWithChan(request *CreateInstanceRequest) (<-chan *CreateInstanceResponse, <-chan error) { - responseChan := make(chan *CreateInstanceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.CreateInstance(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *CreateInstanceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.CreateInstance(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // CreateInstanceWithCallback invokes the bssopenapi.CreateInstance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/createinstance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) CreateInstanceWithCallback(request *CreateInstanceRequest, callback func(response *CreateInstanceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *CreateInstanceResponse - var err error - defer close(result) - response, err = client.CreateInstance(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) CreateInstanceWithCallback(request *CreateInstanceRequest, callback func(response *CreateInstanceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *CreateInstanceResponse +var err error +defer close(result) +response, err = client.CreateInstance(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // CreateInstanceRequest is the request struct for api CreateInstance type CreateInstanceRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - Period requests.Integer `position:"Query" name:"Period"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - RenewPeriod requests.Integer `position:"Query" name:"RenewPeriod"` - Parameter *[]CreateInstanceParameter `position:"Query" name:"Parameter" type:"Repeated"` - RenewalStatus string `position:"Query" name:"RenewalStatus"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + Period requests.Integer `position:"Query" name:"Period"` + ClientToken string `position:"Query" name:"ClientToken"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + RenewPeriod requests.Integer `position:"Query" name:"RenewPeriod"` + Parameter *[]CreateInstanceParameter `position:"Query" name:"Parameter" type:"Repeated"` + RenewalStatus string `position:"Query" name:"RenewalStatus"` } // CreateInstanceParameter is a repeated param struct in CreateInstanceRequest -type CreateInstanceParameter struct { - Code string `name:"Code"` - Value string `name:"Value"` +type CreateInstanceParameter struct{ + Code string `name:"Code"` + Value string `name:"Value"` } // CreateInstanceResponse is the response struct for api CreateInstance type CreateInstanceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateCreateInstanceRequest creates a request to invoke CreateInstance API func CreateCreateInstanceRequest() (request *CreateInstanceRequest) { - request = &CreateInstanceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateInstance", "", "") - return +request = &CreateInstanceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateInstance", "", "") +return } // CreateCreateInstanceResponse creates a response to parse from CreateInstance response func CreateCreateInstanceResponse() (response *CreateInstanceResponse) { - response = &CreateInstanceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &CreateInstanceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/create_reseller_user_quota.go b/services/bssopenapi/create_reseller_user_quota.go new file mode 100644 index 0000000000..bee9ac2202 --- /dev/null +++ b/services/bssopenapi/create_reseller_user_quota.go @@ -0,0 +1,114 @@ + +package bssopenapi + +//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" +) + +// CreateResellerUserQuota invokes the bssopenapi.CreateResellerUserQuota API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/createreselleruserquota.html +func (client *Client) CreateResellerUserQuota(request *CreateResellerUserQuotaRequest) (response *CreateResellerUserQuotaResponse, err error) { +response = CreateCreateResellerUserQuotaResponse() +err = client.DoAction(request, response) +return +} + +// CreateResellerUserQuotaWithChan invokes the bssopenapi.CreateResellerUserQuota API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/createreselleruserquota.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateResellerUserQuotaWithChan(request *CreateResellerUserQuotaRequest) (<-chan *CreateResellerUserQuotaResponse, <-chan error) { +responseChan := make(chan *CreateResellerUserQuotaResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.CreateResellerUserQuota(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// CreateResellerUserQuotaWithCallback invokes the bssopenapi.CreateResellerUserQuota API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/createreselleruserquota.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateResellerUserQuotaWithCallback(request *CreateResellerUserQuotaRequest, callback func(response *CreateResellerUserQuotaResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *CreateResellerUserQuotaResponse +var err error +defer close(result) +response, err = client.CreateResellerUserQuota(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// CreateResellerUserQuotaRequest is the request struct for api CreateResellerUserQuota +type CreateResellerUserQuotaRequest struct { +*requests.RpcRequest + Amount string `position:"Query" name:"Amount"` + OutBizId string `position:"Query" name:"OutBizId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Currency string `position:"Query" name:"Currency"` +} + + +// CreateResellerUserQuotaResponse is the response struct for api CreateResellerUserQuota +type CreateResellerUserQuotaResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` +} + +// CreateCreateResellerUserQuotaRequest creates a request to invoke CreateResellerUserQuota API +func CreateCreateResellerUserQuotaRequest() (request *CreateResellerUserQuotaRequest) { +request = &CreateResellerUserQuotaRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateResellerUserQuota", "", "") +return +} + +// CreateCreateResellerUserQuotaResponse creates a response to parse from CreateResellerUserQuota response +func CreateCreateResellerUserQuotaResponse() (response *CreateResellerUserQuotaResponse) { +response = &CreateResellerUserQuotaResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/create_resource_package.go b/services/bssopenapi/create_resource_package.go index 871eaa6494..6bab415cf4 100644 --- a/services/bssopenapi/create_resource_package.go +++ b/services/bssopenapi/create_resource_package.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,99 +17,102 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // CreateResourcePackage invokes the bssopenapi.CreateResourcePackage API synchronously // api document: https://help.aliyun.com/api/bssopenapi/createresourcepackage.html func (client *Client) CreateResourcePackage(request *CreateResourcePackageRequest) (response *CreateResourcePackageResponse, err error) { - response = CreateCreateResourcePackageResponse() - err = client.DoAction(request, response) - return +response = CreateCreateResourcePackageResponse() +err = client.DoAction(request, response) +return } // CreateResourcePackageWithChan invokes the bssopenapi.CreateResourcePackage API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/createresourcepackage.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateResourcePackageWithChan(request *CreateResourcePackageRequest) (<-chan *CreateResourcePackageResponse, <-chan error) { - responseChan := make(chan *CreateResourcePackageResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.CreateResourcePackage(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *CreateResourcePackageResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.CreateResourcePackage(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // CreateResourcePackageWithCallback invokes the bssopenapi.CreateResourcePackage API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/createresourcepackage.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) CreateResourcePackageWithCallback(request *CreateResourcePackageRequest, callback func(response *CreateResourcePackageResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *CreateResourcePackageResponse - var err error - defer close(result) - response, err = client.CreateResourcePackage(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) CreateResourcePackageWithCallback(request *CreateResourcePackageRequest, callback func(response *CreateResourcePackageResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *CreateResourcePackageResponse +var err error +defer close(result) +response, err = client.CreateResourcePackage(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // CreateResourcePackageRequest is the request struct for api CreateResourcePackage type CreateResourcePackageRequest struct { - *requests.RpcRequest - Duration requests.Integer `position:"Query" name:"Duration"` - ProductCode string `position:"Query" name:"ProductCode"` - Specification string `position:"Query" name:"Specification"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PackageType string `position:"Query" name:"PackageType"` - EffectiveDate string `position:"Query" name:"EffectiveDate"` - PricingCycle string `position:"Query" name:"PricingCycle"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + Specification string `position:"Query" name:"Specification"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + EffectiveDate string `position:"Query" name:"EffectiveDate"` + Duration requests.Integer `position:"Query" name:"Duration"` + PackageType string `position:"Query" name:"PackageType"` + PricingCycle string `position:"Query" name:"PricingCycle"` } + // CreateResourcePackageResponse is the response struct for api CreateResourcePackage type CreateResourcePackageResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - OrderId int `json:"OrderId" xml:"OrderId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data DataInCreateResourcePackage `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OrderId int `json:"OrderId" xml:"OrderId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data DataInCreateResourcePackage `json:"Data" xml:"Data"` } // CreateCreateResourcePackageRequest creates a request to invoke CreateResourcePackage API func CreateCreateResourcePackageRequest() (request *CreateResourcePackageRequest) { - request = &CreateResourcePackageRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateResourcePackage", "", "") - return +request = &CreateResourcePackageRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateResourcePackage", "", "") +return } // CreateCreateResourcePackageResponse creates a response to parse from CreateResourcePackage response func CreateCreateResourcePackageResponse() (response *CreateResourcePackageResponse) { - response = &CreateResourcePackageResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &CreateResourcePackageResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/create_user_quota.go b/services/bssopenapi/create_user_quota.go index db91dccfd4..bb4597b87f 100644 --- a/services/bssopenapi/create_user_quota.go +++ b/services/bssopenapi/create_user_quota.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,96 +17,99 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // CreateUserQuota invokes the bssopenapi.CreateUserQuota API synchronously // api document: https://help.aliyun.com/api/bssopenapi/createuserquota.html func (client *Client) CreateUserQuota(request *CreateUserQuotaRequest) (response *CreateUserQuotaResponse, err error) { - response = CreateCreateUserQuotaResponse() - err = client.DoAction(request, response) - return +response = CreateCreateUserQuotaResponse() +err = client.DoAction(request, response) +return } // CreateUserQuotaWithChan invokes the bssopenapi.CreateUserQuota API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/createuserquota.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateUserQuotaWithChan(request *CreateUserQuotaRequest) (<-chan *CreateUserQuotaResponse, <-chan error) { - responseChan := make(chan *CreateUserQuotaResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.CreateUserQuota(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *CreateUserQuotaResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.CreateUserQuota(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // CreateUserQuotaWithCallback invokes the bssopenapi.CreateUserQuota API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/createuserquota.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) CreateUserQuotaWithCallback(request *CreateUserQuotaRequest, callback func(response *CreateUserQuotaResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *CreateUserQuotaResponse - var err error - defer close(result) - response, err = client.CreateUserQuota(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) CreateUserQuotaWithCallback(request *CreateUserQuotaRequest, callback func(response *CreateUserQuotaResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *CreateUserQuotaResponse +var err error +defer close(result) +response, err = client.CreateUserQuota(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // CreateUserQuotaRequest is the request struct for api CreateUserQuota type CreateUserQuotaRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - Amount string `position:"Query" name:"Amount"` - OutBizId string `position:"Query" name:"OutBizId"` - Currency string `position:"Query" name:"Currency"` - Bid string `position:"Query" name:"Bid"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + Amount string `position:"Query" name:"Amount"` + OutBizId string `position:"Query" name:"OutBizId"` + Currency string `position:"Query" name:"Currency"` + Bid string `position:"Query" name:"Bid"` } + // CreateUserQuotaResponse is the response struct for api CreateUserQuota type CreateUserQuotaResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Data bool `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` } // CreateCreateUserQuotaRequest creates a request to invoke CreateUserQuota API func CreateCreateUserQuotaRequest() (request *CreateUserQuotaRequest) { - request = &CreateUserQuotaRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateUserQuota", "", "") - return +request = &CreateUserQuotaRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "CreateUserQuota", "", "") +return } // CreateCreateUserQuotaResponse creates a response to parse from CreateUserQuota response func CreateCreateUserQuotaResponse() (response *CreateUserQuotaResponse) { - response = &CreateUserQuotaResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &CreateUserQuotaResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/describe_pricing_module.go b/services/bssopenapi/describe_pricing_module.go index f49d905105..826b19fedc 100644 --- a/services/bssopenapi/describe_pricing_module.go +++ b/services/bssopenapi/describe_pricing_module.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,95 +17,98 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // DescribePricingModule invokes the bssopenapi.DescribePricingModule API synchronously // api document: https://help.aliyun.com/api/bssopenapi/describepricingmodule.html func (client *Client) DescribePricingModule(request *DescribePricingModuleRequest) (response *DescribePricingModuleResponse, err error) { - response = CreateDescribePricingModuleResponse() - err = client.DoAction(request, response) - return +response = CreateDescribePricingModuleResponse() +err = client.DoAction(request, response) +return } // DescribePricingModuleWithChan invokes the bssopenapi.DescribePricingModule API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/describepricingmodule.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribePricingModuleWithChan(request *DescribePricingModuleRequest) (<-chan *DescribePricingModuleResponse, <-chan error) { - responseChan := make(chan *DescribePricingModuleResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DescribePricingModule(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *DescribePricingModuleResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.DescribePricingModule(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // DescribePricingModuleWithCallback invokes the bssopenapi.DescribePricingModule API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/describepricingmodule.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DescribePricingModuleWithCallback(request *DescribePricingModuleRequest, callback func(response *DescribePricingModuleResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DescribePricingModuleResponse - var err error - defer close(result) - response, err = client.DescribePricingModule(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) DescribePricingModuleWithCallback(request *DescribePricingModuleRequest, callback func(response *DescribePricingModuleResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *DescribePricingModuleResponse +var err error +defer close(result) +response, err = client.DescribePricingModule(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // DescribePricingModuleRequest is the request struct for api DescribePricingModule type DescribePricingModuleRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` } + // DescribePricingModuleResponse is the response struct for api DescribePricingModule type DescribePricingModuleResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateDescribePricingModuleRequest creates a request to invoke DescribePricingModule API func CreateDescribePricingModuleRequest() (request *DescribePricingModuleRequest) { - request = &DescribePricingModuleRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "DescribePricingModule", "", "") - return +request = &DescribePricingModuleRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "DescribePricingModule", "", "") +return } // CreateDescribePricingModuleResponse creates a response to parse from DescribePricingModule response func CreateDescribePricingModuleResponse() (response *DescribePricingModuleResponse) { - response = &DescribePricingModuleResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &DescribePricingModuleResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/describe_resource_package_product.go b/services/bssopenapi/describe_resource_package_product.go index 10ecb21095..40790eb4fe 100644 --- a/services/bssopenapi/describe_resource_package_product.go +++ b/services/bssopenapi/describe_resource_package_product.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,93 +17,96 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // DescribeResourcePackageProduct invokes the bssopenapi.DescribeResourcePackageProduct API synchronously // api document: https://help.aliyun.com/api/bssopenapi/describeresourcepackageproduct.html func (client *Client) DescribeResourcePackageProduct(request *DescribeResourcePackageProductRequest) (response *DescribeResourcePackageProductResponse, err error) { - response = CreateDescribeResourcePackageProductResponse() - err = client.DoAction(request, response) - return +response = CreateDescribeResourcePackageProductResponse() +err = client.DoAction(request, response) +return } // DescribeResourcePackageProductWithChan invokes the bssopenapi.DescribeResourcePackageProduct API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/describeresourcepackageproduct.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeResourcePackageProductWithChan(request *DescribeResourcePackageProductRequest) (<-chan *DescribeResourcePackageProductResponse, <-chan error) { - responseChan := make(chan *DescribeResourcePackageProductResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DescribeResourcePackageProduct(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *DescribeResourcePackageProductResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.DescribeResourcePackageProduct(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // DescribeResourcePackageProductWithCallback invokes the bssopenapi.DescribeResourcePackageProduct API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/describeresourcepackageproduct.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DescribeResourcePackageProductWithCallback(request *DescribeResourcePackageProductRequest, callback func(response *DescribeResourcePackageProductResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DescribeResourcePackageProductResponse - var err error - defer close(result) - response, err = client.DescribeResourcePackageProduct(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) DescribeResourcePackageProductWithCallback(request *DescribeResourcePackageProductRequest, callback func(response *DescribeResourcePackageProductResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *DescribeResourcePackageProductResponse +var err error +defer close(result) +response, err = client.DescribeResourcePackageProduct(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // DescribeResourcePackageProductRequest is the request struct for api DescribeResourcePackageProduct type DescribeResourcePackageProductRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` } + // DescribeResourcePackageProductResponse is the response struct for api DescribeResourcePackageProduct type DescribeResourcePackageProductResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - OrderId int `json:"OrderId" xml:"OrderId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OrderId int `json:"OrderId" xml:"OrderId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateDescribeResourcePackageProductRequest creates a request to invoke DescribeResourcePackageProduct API func CreateDescribeResourcePackageProductRequest() (request *DescribeResourcePackageProductRequest) { - request = &DescribeResourcePackageProductRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "DescribeResourcePackageProduct", "", "") - return +request = &DescribeResourcePackageProductRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "DescribeResourcePackageProduct", "", "") +return } // CreateDescribeResourcePackageProductResponse creates a response to parse from DescribeResourcePackageProduct response func CreateDescribeResourcePackageProductResponse() (response *DescribeResourcePackageProductResponse) { - response = &DescribeResourcePackageProductResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &DescribeResourcePackageProductResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/enable_bill_generation.go b/services/bssopenapi/enable_bill_generation.go index dc357dd2a1..60c025550e 100644 --- a/services/bssopenapi/enable_bill_generation.go +++ b/services/bssopenapi/enable_bill_generation.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,93 +17,96 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // EnableBillGeneration invokes the bssopenapi.EnableBillGeneration API synchronously // api document: https://help.aliyun.com/api/bssopenapi/enablebillgeneration.html func (client *Client) EnableBillGeneration(request *EnableBillGenerationRequest) (response *EnableBillGenerationResponse, err error) { - response = CreateEnableBillGenerationResponse() - err = client.DoAction(request, response) - return +response = CreateEnableBillGenerationResponse() +err = client.DoAction(request, response) +return } // EnableBillGenerationWithChan invokes the bssopenapi.EnableBillGeneration API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/enablebillgeneration.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EnableBillGenerationWithChan(request *EnableBillGenerationRequest) (<-chan *EnableBillGenerationResponse, <-chan error) { - responseChan := make(chan *EnableBillGenerationResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.EnableBillGeneration(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *EnableBillGenerationResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.EnableBillGeneration(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // EnableBillGenerationWithCallback invokes the bssopenapi.EnableBillGeneration API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/enablebillgeneration.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) EnableBillGenerationWithCallback(request *EnableBillGenerationRequest, callback func(response *EnableBillGenerationResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *EnableBillGenerationResponse - var err error - defer close(result) - response, err = client.EnableBillGeneration(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) EnableBillGenerationWithCallback(request *EnableBillGenerationRequest, callback func(response *EnableBillGenerationResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *EnableBillGenerationResponse +var err error +defer close(result) +response, err = client.EnableBillGeneration(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // EnableBillGenerationRequest is the request struct for api EnableBillGeneration type EnableBillGenerationRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` } + // EnableBillGenerationResponse is the response struct for api EnableBillGeneration type EnableBillGenerationResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateEnableBillGenerationRequest creates a request to invoke EnableBillGeneration API func CreateEnableBillGenerationRequest() (request *EnableBillGenerationRequest) { - request = &EnableBillGenerationRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "EnableBillGeneration", "", "") - return +request = &EnableBillGenerationRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "EnableBillGeneration", "", "") +return } // CreateEnableBillGenerationResponse creates a response to parse from EnableBillGeneration response func CreateEnableBillGenerationResponse() (response *EnableBillGenerationResponse) { - response = &EnableBillGenerationResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &EnableBillGenerationResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/get_customer_account_info.go b/services/bssopenapi/get_customer_account_info.go new file mode 100644 index 0000000000..7c5195e5dd --- /dev/null +++ b/services/bssopenapi/get_customer_account_info.go @@ -0,0 +1,111 @@ + +package bssopenapi + +//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" +) + +// GetCustomerAccountInfo invokes the bssopenapi.GetCustomerAccountInfo API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/getcustomeraccountinfo.html +func (client *Client) GetCustomerAccountInfo(request *GetCustomerAccountInfoRequest) (response *GetCustomerAccountInfoResponse, err error) { +response = CreateGetCustomerAccountInfoResponse() +err = client.DoAction(request, response) +return +} + +// GetCustomerAccountInfoWithChan invokes the bssopenapi.GetCustomerAccountInfo API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/getcustomeraccountinfo.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetCustomerAccountInfoWithChan(request *GetCustomerAccountInfoRequest) (<-chan *GetCustomerAccountInfoResponse, <-chan error) { +responseChan := make(chan *GetCustomerAccountInfoResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.GetCustomerAccountInfo(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// GetCustomerAccountInfoWithCallback invokes the bssopenapi.GetCustomerAccountInfo API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/getcustomeraccountinfo.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetCustomerAccountInfoWithCallback(request *GetCustomerAccountInfoRequest, callback func(response *GetCustomerAccountInfoResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *GetCustomerAccountInfoResponse +var err error +defer close(result) +response, err = client.GetCustomerAccountInfo(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// GetCustomerAccountInfoRequest is the request struct for api GetCustomerAccountInfo +type GetCustomerAccountInfoRequest struct { +*requests.RpcRequest + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + + +// GetCustomerAccountInfoResponse is the response struct for api GetCustomerAccountInfo +type GetCustomerAccountInfoResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateGetCustomerAccountInfoRequest creates a request to invoke GetCustomerAccountInfo API +func CreateGetCustomerAccountInfoRequest() (request *GetCustomerAccountInfoRequest) { +request = &GetCustomerAccountInfoRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetCustomerAccountInfo", "", "") +return +} + +// CreateGetCustomerAccountInfoResponse creates a response to parse from GetCustomerAccountInfo response +func CreateGetCustomerAccountInfoResponse() (response *GetCustomerAccountInfoResponse) { +response = &GetCustomerAccountInfoResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/get_customer_list.go b/services/bssopenapi/get_customer_list.go new file mode 100644 index 0000000000..82cb2024fc --- /dev/null +++ b/services/bssopenapi/get_customer_list.go @@ -0,0 +1,110 @@ + +package bssopenapi + +//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" +) + +// GetCustomerList invokes the bssopenapi.GetCustomerList API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/getcustomerlist.html +func (client *Client) GetCustomerList(request *GetCustomerListRequest) (response *GetCustomerListResponse, err error) { +response = CreateGetCustomerListResponse() +err = client.DoAction(request, response) +return +} + +// GetCustomerListWithChan invokes the bssopenapi.GetCustomerList API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/getcustomerlist.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetCustomerListWithChan(request *GetCustomerListRequest) (<-chan *GetCustomerListResponse, <-chan error) { +responseChan := make(chan *GetCustomerListResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.GetCustomerList(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// GetCustomerListWithCallback invokes the bssopenapi.GetCustomerList API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/getcustomerlist.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetCustomerListWithCallback(request *GetCustomerListRequest, callback func(response *GetCustomerListResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *GetCustomerListResponse +var err error +defer close(result) +response, err = client.GetCustomerList(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// GetCustomerListRequest is the request struct for api GetCustomerList +type GetCustomerListRequest struct { +*requests.RpcRequest +} + + +// GetCustomerListResponse is the response struct for api GetCustomerList +type GetCustomerListResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data DataInGetCustomerList `json:"Data" xml:"Data"` +} + +// CreateGetCustomerListRequest creates a request to invoke GetCustomerList API +func CreateGetCustomerListRequest() (request *GetCustomerListRequest) { +request = &GetCustomerListRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetCustomerList", "", "") +return +} + +// CreateGetCustomerListResponse creates a response to parse from GetCustomerList response +func CreateGetCustomerListResponse() (response *GetCustomerListResponse) { +response = &GetCustomerListResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/get_order_detail.go b/services/bssopenapi/get_order_detail.go index ed22e345b7..9f922a727e 100644 --- a/services/bssopenapi/get_order_detail.go +++ b/services/bssopenapi/get_order_detail.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,93 +17,96 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // GetOrderDetail invokes the bssopenapi.GetOrderDetail API synchronously // api document: https://help.aliyun.com/api/bssopenapi/getorderdetail.html func (client *Client) GetOrderDetail(request *GetOrderDetailRequest) (response *GetOrderDetailResponse, err error) { - response = CreateGetOrderDetailResponse() - err = client.DoAction(request, response) - return +response = CreateGetOrderDetailResponse() +err = client.DoAction(request, response) +return } // GetOrderDetailWithChan invokes the bssopenapi.GetOrderDetail API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getorderdetail.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetOrderDetailWithChan(request *GetOrderDetailRequest) (<-chan *GetOrderDetailResponse, <-chan error) { - responseChan := make(chan *GetOrderDetailResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.GetOrderDetail(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *GetOrderDetailResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.GetOrderDetail(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // GetOrderDetailWithCallback invokes the bssopenapi.GetOrderDetail API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getorderdetail.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GetOrderDetailWithCallback(request *GetOrderDetailRequest, callback func(response *GetOrderDetailResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *GetOrderDetailResponse - var err error - defer close(result) - response, err = client.GetOrderDetail(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) GetOrderDetailWithCallback(request *GetOrderDetailRequest, callback func(response *GetOrderDetailResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *GetOrderDetailResponse +var err error +defer close(result) +response, err = client.GetOrderDetail(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // GetOrderDetailRequest is the request struct for api GetOrderDetail type GetOrderDetailRequest struct { - *requests.RpcRequest - OrderId string `position:"Query" name:"OrderId"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` +*requests.RpcRequest + OrderId string `position:"Query" name:"OrderId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` } + // GetOrderDetailResponse is the response struct for api GetOrderDetail type GetOrderDetailResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateGetOrderDetailRequest creates a request to invoke GetOrderDetail API func CreateGetOrderDetailRequest() (request *GetOrderDetailRequest) { - request = &GetOrderDetailRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetOrderDetail", "", "") - return +request = &GetOrderDetailRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetOrderDetail", "", "") +return } // CreateGetOrderDetailResponse creates a response to parse from GetOrderDetail response func CreateGetOrderDetailResponse() (response *GetOrderDetailResponse) { - response = &GetOrderDetailResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &GetOrderDetailResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/get_pay_as_you_go_price.go b/services/bssopenapi/get_pay_as_you_go_price.go index fc26f85eb1..457b80932e 100644 --- a/services/bssopenapi/get_pay_as_you_go_price.go +++ b/services/bssopenapi/get_pay_as_you_go_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,104 +17,106 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // GetPayAsYouGoPrice invokes the bssopenapi.GetPayAsYouGoPrice API synchronously // api document: https://help.aliyun.com/api/bssopenapi/getpayasyougoprice.html func (client *Client) GetPayAsYouGoPrice(request *GetPayAsYouGoPriceRequest) (response *GetPayAsYouGoPriceResponse, err error) { - response = CreateGetPayAsYouGoPriceResponse() - err = client.DoAction(request, response) - return +response = CreateGetPayAsYouGoPriceResponse() +err = client.DoAction(request, response) +return } // GetPayAsYouGoPriceWithChan invokes the bssopenapi.GetPayAsYouGoPrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getpayasyougoprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetPayAsYouGoPriceWithChan(request *GetPayAsYouGoPriceRequest) (<-chan *GetPayAsYouGoPriceResponse, <-chan error) { - responseChan := make(chan *GetPayAsYouGoPriceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.GetPayAsYouGoPrice(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *GetPayAsYouGoPriceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.GetPayAsYouGoPrice(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // GetPayAsYouGoPriceWithCallback invokes the bssopenapi.GetPayAsYouGoPrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getpayasyougoprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GetPayAsYouGoPriceWithCallback(request *GetPayAsYouGoPriceRequest, callback func(response *GetPayAsYouGoPriceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *GetPayAsYouGoPriceResponse - var err error - defer close(result) - response, err = client.GetPayAsYouGoPrice(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) GetPayAsYouGoPriceWithCallback(request *GetPayAsYouGoPriceRequest, callback func(response *GetPayAsYouGoPriceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *GetPayAsYouGoPriceResponse +var err error +defer close(result) +response, err = client.GetPayAsYouGoPrice(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // GetPayAsYouGoPriceRequest is the request struct for api GetPayAsYouGoPrice type GetPayAsYouGoPriceRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - ModuleList *[]GetPayAsYouGoPriceModuleList `position:"Query" name:"ModuleList" type:"Repeated"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Region string `position:"Query" name:"Region"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + ModuleList *[]GetPayAsYouGoPriceModuleList `position:"Query" name:"ModuleList" type:"Repeated"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + Region string `position:"Query" name:"Region"` } // GetPayAsYouGoPriceModuleList is a repeated param struct in GetPayAsYouGoPriceRequest -type GetPayAsYouGoPriceModuleList struct { - ModuleCode string `name:"ModuleCode"` - PriceType string `name:"PriceType"` - Config string `name:"Config"` +type GetPayAsYouGoPriceModuleList struct{ + ModuleCode string `name:"ModuleCode"` + PriceType string `name:"PriceType"` + Config string `name:"Config"` } // GetPayAsYouGoPriceResponse is the response struct for api GetPayAsYouGoPrice type GetPayAsYouGoPriceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateGetPayAsYouGoPriceRequest creates a request to invoke GetPayAsYouGoPrice API func CreateGetPayAsYouGoPriceRequest() (request *GetPayAsYouGoPriceRequest) { - request = &GetPayAsYouGoPriceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetPayAsYouGoPrice", "", "") - return +request = &GetPayAsYouGoPriceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetPayAsYouGoPrice", "", "") +return } // CreateGetPayAsYouGoPriceResponse creates a response to parse from GetPayAsYouGoPrice response func CreateGetPayAsYouGoPriceResponse() (response *GetPayAsYouGoPriceResponse) { - response = &GetPayAsYouGoPriceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &GetPayAsYouGoPriceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/get_resource_package_price.go b/services/bssopenapi/get_resource_package_price.go index 7580182371..e4fd3bd431 100644 --- a/services/bssopenapi/get_resource_package_price.go +++ b/services/bssopenapi/get_resource_package_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,98 +17,101 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // GetResourcePackagePrice invokes the bssopenapi.GetResourcePackagePrice API synchronously // api document: https://help.aliyun.com/api/bssopenapi/getresourcepackageprice.html func (client *Client) GetResourcePackagePrice(request *GetResourcePackagePriceRequest) (response *GetResourcePackagePriceResponse, err error) { - response = CreateGetResourcePackagePriceResponse() - err = client.DoAction(request, response) - return +response = CreateGetResourcePackagePriceResponse() +err = client.DoAction(request, response) +return } // GetResourcePackagePriceWithChan invokes the bssopenapi.GetResourcePackagePrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getresourcepackageprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetResourcePackagePriceWithChan(request *GetResourcePackagePriceRequest) (<-chan *GetResourcePackagePriceResponse, <-chan error) { - responseChan := make(chan *GetResourcePackagePriceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.GetResourcePackagePrice(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *GetResourcePackagePriceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.GetResourcePackagePrice(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // GetResourcePackagePriceWithCallback invokes the bssopenapi.GetResourcePackagePrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getresourcepackageprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GetResourcePackagePriceWithCallback(request *GetResourcePackagePriceRequest, callback func(response *GetResourcePackagePriceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *GetResourcePackagePriceResponse - var err error - defer close(result) - response, err = client.GetResourcePackagePrice(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) GetResourcePackagePriceWithCallback(request *GetResourcePackagePriceRequest, callback func(response *GetResourcePackagePriceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *GetResourcePackagePriceResponse +var err error +defer close(result) +response, err = client.GetResourcePackagePrice(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // GetResourcePackagePriceRequest is the request struct for api GetResourcePackagePrice type GetResourcePackagePriceRequest struct { - *requests.RpcRequest - Duration requests.Integer `position:"Query" name:"Duration"` - ProductCode string `position:"Query" name:"ProductCode"` - Specification string `position:"Query" name:"Specification"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PackageType string `position:"Query" name:"PackageType"` - EffectiveDate string `position:"Query" name:"EffectiveDate"` - PricingCycle string `position:"Query" name:"PricingCycle"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + Specification string `position:"Query" name:"Specification"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + EffectiveDate string `position:"Query" name:"EffectiveDate"` + Duration requests.Integer `position:"Query" name:"Duration"` + PackageType string `position:"Query" name:"PackageType"` + PricingCycle string `position:"Query" name:"PricingCycle"` } + // GetResourcePackagePriceResponse is the response struct for api GetResourcePackagePrice type GetResourcePackagePriceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateGetResourcePackagePriceRequest creates a request to invoke GetResourcePackagePrice API func CreateGetResourcePackagePriceRequest() (request *GetResourcePackagePriceRequest) { - request = &GetResourcePackagePriceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetResourcePackagePrice", "", "") - return +request = &GetResourcePackagePriceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetResourcePackagePrice", "", "") +return } // CreateGetResourcePackagePriceResponse creates a response to parse from GetResourcePackagePrice response func CreateGetResourcePackagePriceResponse() (response *GetResourcePackagePriceResponse) { - response = &GetResourcePackagePriceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &GetResourcePackagePriceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/get_subscription_price.go b/services/bssopenapi/get_subscription_price.go index 8133f07f50..9ac4ac2224 100644 --- a/services/bssopenapi/get_subscription_price.go +++ b/services/bssopenapi/get_subscription_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,110 +17,112 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // GetSubscriptionPrice invokes the bssopenapi.GetSubscriptionPrice API synchronously // api document: https://help.aliyun.com/api/bssopenapi/getsubscriptionprice.html func (client *Client) GetSubscriptionPrice(request *GetSubscriptionPriceRequest) (response *GetSubscriptionPriceResponse, err error) { - response = CreateGetSubscriptionPriceResponse() - err = client.DoAction(request, response) - return +response = CreateGetSubscriptionPriceResponse() +err = client.DoAction(request, response) +return } // GetSubscriptionPriceWithChan invokes the bssopenapi.GetSubscriptionPrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getsubscriptionprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetSubscriptionPriceWithChan(request *GetSubscriptionPriceRequest) (<-chan *GetSubscriptionPriceResponse, <-chan error) { - responseChan := make(chan *GetSubscriptionPriceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.GetSubscriptionPrice(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *GetSubscriptionPriceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.GetSubscriptionPrice(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // GetSubscriptionPriceWithCallback invokes the bssopenapi.GetSubscriptionPrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/getsubscriptionprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GetSubscriptionPriceWithCallback(request *GetSubscriptionPriceRequest, callback func(response *GetSubscriptionPriceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *GetSubscriptionPriceResponse - var err error - defer close(result) - response, err = client.GetSubscriptionPrice(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) GetSubscriptionPriceWithCallback(request *GetSubscriptionPriceRequest, callback func(response *GetSubscriptionPriceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *GetSubscriptionPriceResponse +var err error +defer close(result) +response, err = client.GetSubscriptionPrice(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // GetSubscriptionPriceRequest is the request struct for api GetSubscriptionPrice type GetSubscriptionPriceRequest struct { - *requests.RpcRequest - ServicePeriodQuantity requests.Integer `position:"Query" name:"ServicePeriodQuantity"` - ProductCode string `position:"Query" name:"ProductCode"` - InstanceId string `position:"Query" name:"InstanceId"` - Quantity requests.Integer `position:"Query" name:"Quantity"` - ServicePeriodUnit string `position:"Query" name:"ServicePeriodUnit"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - ModuleList *[]GetSubscriptionPriceModuleList `position:"Query" name:"ModuleList" type:"Repeated"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Region string `position:"Query" name:"Region"` - OrderType string `position:"Query" name:"OrderType"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + Quantity requests.Integer `position:"Query" name:"Quantity"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + ModuleList *[]GetSubscriptionPriceModuleList `position:"Query" name:"ModuleList" type:"Repeated"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + ServicePeriodQuantity requests.Integer `position:"Query" name:"ServicePeriodQuantity"` + InstanceId string `position:"Query" name:"InstanceId"` + ServicePeriodUnit string `position:"Query" name:"ServicePeriodUnit"` + Region string `position:"Query" name:"Region"` + OrderType string `position:"Query" name:"OrderType"` } // GetSubscriptionPriceModuleList is a repeated param struct in GetSubscriptionPriceRequest -type GetSubscriptionPriceModuleList struct { - ModuleCode string `name:"ModuleCode"` - ModuleStatus string `name:"ModuleStatus"` - Tag string `name:"Tag"` - Config string `name:"Config"` +type GetSubscriptionPriceModuleList struct{ + ModuleCode string `name:"ModuleCode"` + ModuleStatus string `name:"ModuleStatus"` + Tag string `name:"Tag"` + Config string `name:"Config"` } // GetSubscriptionPriceResponse is the response struct for api GetSubscriptionPrice type GetSubscriptionPriceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateGetSubscriptionPriceRequest creates a request to invoke GetSubscriptionPrice API func CreateGetSubscriptionPriceRequest() (request *GetSubscriptionPriceRequest) { - request = &GetSubscriptionPriceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetSubscriptionPrice", "", "") - return +request = &GetSubscriptionPriceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "GetSubscriptionPrice", "", "") +return } // CreateGetSubscriptionPriceResponse creates a response to parse from GetSubscriptionPrice response func CreateGetSubscriptionPriceResponse() (response *GetSubscriptionPriceResponse) { - response = &GetSubscriptionPriceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &GetSubscriptionPriceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/modify_instance.go b/services/bssopenapi/modify_instance.go index 4328e00fb9..bd972e287b 100644 --- a/services/bssopenapi/modify_instance.go +++ b/services/bssopenapi/modify_instance.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,104 +17,107 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // ModifyInstance invokes the bssopenapi.ModifyInstance API synchronously // api document: https://help.aliyun.com/api/bssopenapi/modifyinstance.html func (client *Client) ModifyInstance(request *ModifyInstanceRequest) (response *ModifyInstanceResponse, err error) { - response = CreateModifyInstanceResponse() - err = client.DoAction(request, response) - return +response = CreateModifyInstanceResponse() +err = client.DoAction(request, response) +return } // ModifyInstanceWithChan invokes the bssopenapi.ModifyInstance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/modifyinstance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceWithChan(request *ModifyInstanceRequest) (<-chan *ModifyInstanceResponse, <-chan error) { - responseChan := make(chan *ModifyInstanceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.ModifyInstance(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *ModifyInstanceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.ModifyInstance(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // ModifyInstanceWithCallback invokes the bssopenapi.ModifyInstance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/modifyinstance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) ModifyInstanceWithCallback(request *ModifyInstanceRequest, callback func(response *ModifyInstanceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *ModifyInstanceResponse - var err error - defer close(result) - response, err = client.ModifyInstance(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) ModifyInstanceWithCallback(request *ModifyInstanceRequest, callback func(response *ModifyInstanceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *ModifyInstanceResponse +var err error +defer close(result) +response, err = client.ModifyInstance(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // ModifyInstanceRequest is the request struct for api ModifyInstance type ModifyInstanceRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - InstanceId string `position:"Query" name:"InstanceId"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - ModifyType string `position:"Query" name:"ModifyType"` - Parameter *[]ModifyInstanceParameter `position:"Query" name:"Parameter" type:"Repeated"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + ClientToken string `position:"Query" name:"ClientToken"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + InstanceId string `position:"Query" name:"InstanceId"` + ModifyType string `position:"Query" name:"ModifyType"` + Parameter *[]ModifyInstanceParameter `position:"Query" name:"Parameter" type:"Repeated"` } // ModifyInstanceParameter is a repeated param struct in ModifyInstanceRequest -type ModifyInstanceParameter struct { - Code string `name:"Code"` - Value string `name:"Value"` +type ModifyInstanceParameter struct{ + Code string `name:"Code"` + Value string `name:"Value"` } // ModifyInstanceResponse is the response struct for api ModifyInstance type ModifyInstanceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateModifyInstanceRequest creates a request to invoke ModifyInstance API func CreateModifyInstanceRequest() (request *ModifyInstanceRequest) { - request = &ModifyInstanceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ModifyInstance", "", "") - return +request = &ModifyInstanceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "ModifyInstance", "", "") +return } // CreateModifyInstanceResponse creates a response to parse from ModifyInstance response func CreateModifyInstanceResponse() (response *ModifyInstanceResponse) { - response = &ModifyInstanceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &ModifyInstanceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_account_balance.go b/services/bssopenapi/query_account_balance.go index 8e52ae71c7..f550a9b433 100644 --- a/services/bssopenapi/query_account_balance.go +++ b/services/bssopenapi/query_account_balance.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,91 +17,94 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryAccountBalance invokes the bssopenapi.QueryAccountBalance API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryaccountbalance.html func (client *Client) QueryAccountBalance(request *QueryAccountBalanceRequest) (response *QueryAccountBalanceResponse, err error) { - response = CreateQueryAccountBalanceResponse() - err = client.DoAction(request, response) - return +response = CreateQueryAccountBalanceResponse() +err = client.DoAction(request, response) +return } // QueryAccountBalanceWithChan invokes the bssopenapi.QueryAccountBalance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryaccountbalance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryAccountBalanceWithChan(request *QueryAccountBalanceRequest) (<-chan *QueryAccountBalanceResponse, <-chan error) { - responseChan := make(chan *QueryAccountBalanceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryAccountBalance(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryAccountBalanceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryAccountBalance(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryAccountBalanceWithCallback invokes the bssopenapi.QueryAccountBalance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryaccountbalance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryAccountBalanceWithCallback(request *QueryAccountBalanceRequest, callback func(response *QueryAccountBalanceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryAccountBalanceResponse - var err error - defer close(result) - response, err = client.QueryAccountBalance(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryAccountBalanceWithCallback(request *QueryAccountBalanceRequest, callback func(response *QueryAccountBalanceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryAccountBalanceResponse +var err error +defer close(result) +response, err = client.QueryAccountBalance(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryAccountBalanceRequest is the request struct for api QueryAccountBalance type QueryAccountBalanceRequest struct { - *requests.RpcRequest +*requests.RpcRequest } + // QueryAccountBalanceResponse is the response struct for api QueryAccountBalance type QueryAccountBalanceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryAccountBalanceRequest creates a request to invoke QueryAccountBalance API func CreateQueryAccountBalanceRequest() (request *QueryAccountBalanceRequest) { - request = &QueryAccountBalanceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAccountBalance", "", "") - return +request = &QueryAccountBalanceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAccountBalance", "", "") +return } // CreateQueryAccountBalanceResponse creates a response to parse from QueryAccountBalance response func CreateQueryAccountBalanceResponse() (response *QueryAccountBalanceResponse) { - response = &QueryAccountBalanceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryAccountBalanceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_account_book_list.go b/services/bssopenapi/query_account_book_list.go index b9a7d683f1..005801cdbf 100644 --- a/services/bssopenapi/query_account_book_list.go +++ b/services/bssopenapi/query_account_book_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,95 +17,98 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryAccountBookList invokes the bssopenapi.QueryAccountBookList API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryaccountbooklist.html func (client *Client) QueryAccountBookList(request *QueryAccountBookListRequest) (response *QueryAccountBookListResponse, err error) { - response = CreateQueryAccountBookListResponse() - err = client.DoAction(request, response) - return +response = CreateQueryAccountBookListResponse() +err = client.DoAction(request, response) +return } // QueryAccountBookListWithChan invokes the bssopenapi.QueryAccountBookList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryaccountbooklist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryAccountBookListWithChan(request *QueryAccountBookListRequest) (<-chan *QueryAccountBookListResponse, <-chan error) { - responseChan := make(chan *QueryAccountBookListResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryAccountBookList(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryAccountBookListResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryAccountBookList(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryAccountBookListWithCallback invokes the bssopenapi.QueryAccountBookList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryaccountbooklist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryAccountBookListWithCallback(request *QueryAccountBookListRequest, callback func(response *QueryAccountBookListResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryAccountBookListResponse - var err error - defer close(result) - response, err = client.QueryAccountBookList(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryAccountBookListWithCallback(request *QueryAccountBookListRequest, callback func(response *QueryAccountBookListResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryAccountBookListResponse +var err error +defer close(result) +response, err = client.QueryAccountBookList(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryAccountBookListRequest is the request struct for api QueryAccountBookList type QueryAccountBookListRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - ItemCodes string `position:"Query" name:"ItemCodes"` - Bid string `position:"Query" name:"Bid"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + ItemCodes string `position:"Query" name:"ItemCodes"` + Bid string `position:"Query" name:"Bid"` } + // QueryAccountBookListResponse is the response struct for api QueryAccountBookList type QueryAccountBookListResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Count int `json:"Count" xml:"Count"` - Datas DatasInQueryAccountBookList `json:"Datas" xml:"Datas"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Count int `json:"Count" xml:"Count"` + Datas DatasInQueryAccountBookList `json:"Datas" xml:"Datas"` } // CreateQueryAccountBookListRequest creates a request to invoke QueryAccountBookList API func CreateQueryAccountBookListRequest() (request *QueryAccountBookListRequest) { - request = &QueryAccountBookListRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAccountBookList", "", "") - return +request = &QueryAccountBookListRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAccountBookList", "", "") +return } // CreateQueryAccountBookListResponse creates a response to parse from QueryAccountBookList response func CreateQueryAccountBookListResponse() (response *QueryAccountBookListResponse) { - response = &QueryAccountBookListResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryAccountBookListResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_account_transactions.go b/services/bssopenapi/query_account_transactions.go new file mode 100644 index 0000000000..6cf2700bc6 --- /dev/null +++ b/services/bssopenapi/query_account_transactions.go @@ -0,0 +1,117 @@ + +package bssopenapi + +//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" +) + +// QueryAccountTransactions invokes the bssopenapi.QueryAccountTransactions API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/queryaccounttransactions.html +func (client *Client) QueryAccountTransactions(request *QueryAccountTransactionsRequest) (response *QueryAccountTransactionsResponse, err error) { +response = CreateQueryAccountTransactionsResponse() +err = client.DoAction(request, response) +return +} + +// QueryAccountTransactionsWithChan invokes the bssopenapi.QueryAccountTransactions API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/queryaccounttransactions.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryAccountTransactionsWithChan(request *QueryAccountTransactionsRequest) (<-chan *QueryAccountTransactionsResponse, <-chan error) { +responseChan := make(chan *QueryAccountTransactionsResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryAccountTransactions(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// QueryAccountTransactionsWithCallback invokes the bssopenapi.QueryAccountTransactions API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/queryaccounttransactions.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryAccountTransactionsWithCallback(request *QueryAccountTransactionsRequest, callback func(response *QueryAccountTransactionsResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryAccountTransactionsResponse +var err error +defer close(result) +response, err = client.QueryAccountTransactions(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// QueryAccountTransactionsRequest is the request struct for api QueryAccountTransactions +type QueryAccountTransactionsRequest struct { +*requests.RpcRequest + PageNum requests.Integer `position:"Query" name:"PageNum"` + CreateTimeEnd string `position:"Query" name:"CreateTimeEnd"` + RecordID string `position:"Query" name:"RecordID"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + TransactionChannelSN string `position:"Query" name:"TransactionChannelSN"` + CreateTimeStart string `position:"Query" name:"CreateTimeStart"` + TransactionNumber string `position:"Query" name:"TransactionNumber"` +} + + +// QueryAccountTransactionsResponse is the response struct for api QueryAccountTransactions +type QueryAccountTransactionsResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateQueryAccountTransactionsRequest creates a request to invoke QueryAccountTransactions API +func CreateQueryAccountTransactionsRequest() (request *QueryAccountTransactionsRequest) { +request = &QueryAccountTransactionsRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAccountTransactions", "", "") +return +} + +// CreateQueryAccountTransactionsResponse creates a response to parse from QueryAccountTransactions response +func CreateQueryAccountTransactionsResponse() (response *QueryAccountTransactionsResponse) { +response = &QueryAccountTransactionsResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/query_available_instances.go b/services/bssopenapi/query_available_instances.go index 60f4711f2f..68ec890f04 100644 --- a/services/bssopenapi/query_available_instances.go +++ b/services/bssopenapi/query_available_instances.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,104 +17,107 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryAvailableInstances invokes the bssopenapi.QueryAvailableInstances API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryavailableinstances.html func (client *Client) QueryAvailableInstances(request *QueryAvailableInstancesRequest) (response *QueryAvailableInstancesResponse, err error) { - response = CreateQueryAvailableInstancesResponse() - err = client.DoAction(request, response) - return +response = CreateQueryAvailableInstancesResponse() +err = client.DoAction(request, response) +return } // QueryAvailableInstancesWithChan invokes the bssopenapi.QueryAvailableInstances API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryavailableinstances.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryAvailableInstancesWithChan(request *QueryAvailableInstancesRequest) (<-chan *QueryAvailableInstancesResponse, <-chan error) { - responseChan := make(chan *QueryAvailableInstancesResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryAvailableInstances(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryAvailableInstancesResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryAvailableInstances(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryAvailableInstancesWithCallback invokes the bssopenapi.QueryAvailableInstances API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryavailableinstances.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryAvailableInstancesWithCallback(request *QueryAvailableInstancesRequest, callback func(response *QueryAvailableInstancesResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryAvailableInstancesResponse - var err error - defer close(result) - response, err = client.QueryAvailableInstances(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryAvailableInstancesWithCallback(request *QueryAvailableInstancesRequest, callback func(response *QueryAvailableInstancesResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryAvailableInstancesResponse +var err error +defer close(result) +response, err = client.QueryAvailableInstances(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryAvailableInstancesRequest is the request struct for api QueryAvailableInstances type QueryAvailableInstancesRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - EndTimeStart string `position:"Query" name:"EndTimeStart"` - ProductType string `position:"Query" name:"ProductType"` - CreateTimeEnd string `position:"Query" name:"CreateTimeEnd"` - InstanceIDs string `position:"Query" name:"InstanceIDs"` - EndTimeEnd string `position:"Query" name:"EndTimeEnd"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - CreateTimeStart string `position:"Query" name:"CreateTimeStart"` - Region string `position:"Query" name:"Region"` - RenewStatus string `position:"Query" name:"RenewStatus"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + ProductType string `position:"Query" name:"ProductType"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + RenewStatus string `position:"Query" name:"RenewStatus"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + EndTimeStart string `position:"Query" name:"EndTimeStart"` + CreateTimeEnd string `position:"Query" name:"CreateTimeEnd"` + InstanceIDs string `position:"Query" name:"InstanceIDs"` + EndTimeEnd string `position:"Query" name:"EndTimeEnd"` + CreateTimeStart string `position:"Query" name:"CreateTimeStart"` + Region string `position:"Query" name:"Region"` } + // QueryAvailableInstancesResponse is the response struct for api QueryAvailableInstances type QueryAvailableInstancesResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryAvailableInstancesRequest creates a request to invoke QueryAvailableInstances API func CreateQueryAvailableInstancesRequest() (request *QueryAvailableInstancesRequest) { - request = &QueryAvailableInstancesRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAvailableInstances", "", "") - return +request = &QueryAvailableInstancesRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAvailableInstances", "", "") +return } // CreateQueryAvailableInstancesResponse creates a response to parse from QueryAvailableInstances response func CreateQueryAvailableInstancesResponse() (response *QueryAvailableInstancesResponse) { - response = &QueryAvailableInstancesResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryAvailableInstancesResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_avaliable_quota.go b/services/bssopenapi/query_avaliable_quota.go index 27db59a295..ed06342abb 100644 --- a/services/bssopenapi/query_avaliable_quota.go +++ b/services/bssopenapi/query_avaliable_quota.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,94 +17,97 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryAvaliableQuota invokes the bssopenapi.QueryAvaliableQuota API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryavaliablequota.html func (client *Client) QueryAvaliableQuota(request *QueryAvaliableQuotaRequest) (response *QueryAvaliableQuotaResponse, err error) { - response = CreateQueryAvaliableQuotaResponse() - err = client.DoAction(request, response) - return +response = CreateQueryAvaliableQuotaResponse() +err = client.DoAction(request, response) +return } // QueryAvaliableQuotaWithChan invokes the bssopenapi.QueryAvaliableQuota API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryavaliablequota.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryAvaliableQuotaWithChan(request *QueryAvaliableQuotaRequest) (<-chan *QueryAvaliableQuotaResponse, <-chan error) { - responseChan := make(chan *QueryAvaliableQuotaResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryAvaliableQuota(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryAvaliableQuotaResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryAvaliableQuota(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryAvaliableQuotaWithCallback invokes the bssopenapi.QueryAvaliableQuota API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryavaliablequota.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryAvaliableQuotaWithCallback(request *QueryAvaliableQuotaRequest, callback func(response *QueryAvaliableQuotaResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryAvaliableQuotaResponse - var err error - defer close(result) - response, err = client.QueryAvaliableQuota(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryAvaliableQuotaWithCallback(request *QueryAvaliableQuotaRequest, callback func(response *QueryAvaliableQuotaResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryAvaliableQuotaResponse +var err error +defer close(result) +response, err = client.QueryAvaliableQuota(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryAvaliableQuotaRequest is the request struct for api QueryAvaliableQuota type QueryAvaliableQuotaRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - ItemCodes string `position:"Query" name:"ItemCodes"` - Bid string `position:"Query" name:"Bid"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + ItemCodes string `position:"Query" name:"ItemCodes"` + Bid string `position:"Query" name:"Bid"` } + // QueryAvaliableQuotaResponse is the response struct for api QueryAvaliableQuota type QueryAvaliableQuotaResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Data string `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data string `json:"Data" xml:"Data"` } // CreateQueryAvaliableQuotaRequest creates a request to invoke QueryAvaliableQuota API func CreateQueryAvaliableQuotaRequest() (request *QueryAvaliableQuotaRequest) { - request = &QueryAvaliableQuotaRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAvaliableQuota", "", "") - return +request = &QueryAvaliableQuotaRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryAvaliableQuota", "", "") +return } // CreateQueryAvaliableQuotaResponse creates a response to parse from QueryAvaliableQuota response func CreateQueryAvaliableQuotaResponse() (response *QueryAvaliableQuotaResponse) { - response = &QueryAvaliableQuotaResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryAvaliableQuotaResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_bill.go b/services/bssopenapi/query_bill.go index ba63e3c924..c700f6ad7d 100644 --- a/services/bssopenapi/query_bill.go +++ b/services/bssopenapi/query_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,101 +17,104 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryBill invokes the bssopenapi.QueryBill API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querybill.html func (client *Client) QueryBill(request *QueryBillRequest) (response *QueryBillResponse, err error) { - response = CreateQueryBillResponse() - err = client.DoAction(request, response) - return +response = CreateQueryBillResponse() +err = client.DoAction(request, response) +return } // QueryBillWithChan invokes the bssopenapi.QueryBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querybill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryBillWithChan(request *QueryBillRequest) (<-chan *QueryBillResponse, <-chan error) { - responseChan := make(chan *QueryBillResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryBill(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryBillResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryBill(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryBillWithCallback invokes the bssopenapi.QueryBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querybill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryBillWithCallback(request *QueryBillRequest, callback func(response *QueryBillResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryBillResponse - var err error - defer close(result) - response, err = client.QueryBill(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryBillWithCallback(request *QueryBillRequest, callback func(response *QueryBillResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryBillResponse +var err error +defer close(result) +response, err = client.QueryBill(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryBillRequest is the request struct for api QueryBill type QueryBillRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - IsHideZeroCharge requests.Boolean `position:"Query" name:"IsHideZeroCharge"` - IsDisplayLocalCurrency requests.Boolean `position:"Query" name:"IsDisplayLocalCurrency"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - BillingCycle string `position:"Query" name:"BillingCycle"` - Type string `position:"Query" name:"Type"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + IsHideZeroCharge requests.Boolean `position:"Query" name:"IsHideZeroCharge"` + IsDisplayLocalCurrency requests.Boolean `position:"Query" name:"IsDisplayLocalCurrency"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + BillingCycle string `position:"Query" name:"BillingCycle"` + Type string `position:"Query" name:"Type"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + ProductType string `position:"Query" name:"ProductType"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QueryBillResponse is the response struct for api QueryBill type QueryBillResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryBillRequest creates a request to invoke QueryBill API func CreateQueryBillRequest() (request *QueryBillRequest) { - request = &QueryBillRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryBill", "", "") - return +request = &QueryBillRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryBill", "", "") +return } // CreateQueryBillResponse creates a response to parse from QueryBill response func CreateQueryBillResponse() (response *QueryBillResponse) { - response = &QueryBillResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryBillResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_bill_overview.go b/services/bssopenapi/query_bill_overview.go index 01765c8562..63887a19dc 100644 --- a/services/bssopenapi/query_bill_overview.go +++ b/services/bssopenapi/query_bill_overview.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,95 +17,98 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryBillOverview invokes the bssopenapi.QueryBillOverview API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querybilloverview.html func (client *Client) QueryBillOverview(request *QueryBillOverviewRequest) (response *QueryBillOverviewResponse, err error) { - response = CreateQueryBillOverviewResponse() - err = client.DoAction(request, response) - return +response = CreateQueryBillOverviewResponse() +err = client.DoAction(request, response) +return } // QueryBillOverviewWithChan invokes the bssopenapi.QueryBillOverview API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querybilloverview.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryBillOverviewWithChan(request *QueryBillOverviewRequest) (<-chan *QueryBillOverviewResponse, <-chan error) { - responseChan := make(chan *QueryBillOverviewResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryBillOverview(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryBillOverviewResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryBillOverview(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryBillOverviewWithCallback invokes the bssopenapi.QueryBillOverview API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querybilloverview.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryBillOverviewWithCallback(request *QueryBillOverviewRequest, callback func(response *QueryBillOverviewResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryBillOverviewResponse - var err error - defer close(result) - response, err = client.QueryBillOverview(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryBillOverviewWithCallback(request *QueryBillOverviewRequest, callback func(response *QueryBillOverviewResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryBillOverviewResponse +var err error +defer close(result) +response, err = client.QueryBillOverview(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryBillOverviewRequest is the request struct for api QueryBillOverview type QueryBillOverviewRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - BillingCycle string `position:"Query" name:"BillingCycle"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + BillingCycle string `position:"Query" name:"BillingCycle"` + ProductType string `position:"Query" name:"ProductType"` } + // QueryBillOverviewResponse is the response struct for api QueryBillOverview type QueryBillOverviewResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryBillOverviewRequest creates a request to invoke QueryBillOverview API func CreateQueryBillOverviewRequest() (request *QueryBillOverviewRequest) { - request = &QueryBillOverviewRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryBillOverview", "", "") - return +request = &QueryBillOverviewRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryBillOverview", "", "") +return } // CreateQueryBillOverviewResponse creates a response to parse from QueryBillOverview response func CreateQueryBillOverviewResponse() (response *QueryBillOverviewResponse) { - response = &QueryBillOverviewResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryBillOverviewResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_cash_coupons.go b/services/bssopenapi/query_cash_coupons.go index 2408db3611..7087893bde 100644 --- a/services/bssopenapi/query_cash_coupons.go +++ b/services/bssopenapi/query_cash_coupons.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,94 +17,97 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryCashCoupons invokes the bssopenapi.QueryCashCoupons API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querycashcoupons.html func (client *Client) QueryCashCoupons(request *QueryCashCouponsRequest) (response *QueryCashCouponsResponse, err error) { - response = CreateQueryCashCouponsResponse() - err = client.DoAction(request, response) - return +response = CreateQueryCashCouponsResponse() +err = client.DoAction(request, response) +return } // QueryCashCouponsWithChan invokes the bssopenapi.QueryCashCoupons API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querycashcoupons.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryCashCouponsWithChan(request *QueryCashCouponsRequest) (<-chan *QueryCashCouponsResponse, <-chan error) { - responseChan := make(chan *QueryCashCouponsResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryCashCoupons(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryCashCouponsResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryCashCoupons(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryCashCouponsWithCallback invokes the bssopenapi.QueryCashCoupons API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querycashcoupons.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryCashCouponsWithCallback(request *QueryCashCouponsRequest, callback func(response *QueryCashCouponsResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryCashCouponsResponse - var err error - defer close(result) - response, err = client.QueryCashCoupons(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryCashCouponsWithCallback(request *QueryCashCouponsRequest, callback func(response *QueryCashCouponsResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryCashCouponsResponse +var err error +defer close(result) +response, err = client.QueryCashCoupons(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryCashCouponsRequest is the request struct for api QueryCashCoupons type QueryCashCouponsRequest struct { - *requests.RpcRequest - ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` - ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` - EffectiveOrNot requests.Boolean `position:"Query" name:"EffectiveOrNot"` +*requests.RpcRequest + ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` + ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` + EffectiveOrNot requests.Boolean `position:"Query" name:"EffectiveOrNot"` } + // QueryCashCouponsResponse is the response struct for api QueryCashCoupons type QueryCashCouponsResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data DataInQueryCashCoupons `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data DataInQueryCashCoupons `json:"Data" xml:"Data"` } // CreateQueryCashCouponsRequest creates a request to invoke QueryCashCoupons API func CreateQueryCashCouponsRequest() (request *QueryCashCouponsRequest) { - request = &QueryCashCouponsRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryCashCoupons", "", "") - return +request = &QueryCashCouponsRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryCashCoupons", "", "") +return } // CreateQueryCashCouponsResponse creates a response to parse from QueryCashCoupons response func CreateQueryCashCouponsResponse() (response *QueryCashCouponsResponse) { - response = &QueryCashCouponsResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryCashCouponsResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_customer_address_list.go b/services/bssopenapi/query_customer_address_list.go index fd31caddb5..5ed77111f7 100644 --- a/services/bssopenapi/query_customer_address_list.go +++ b/services/bssopenapi/query_customer_address_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,94 +17,97 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryCustomerAddressList invokes the bssopenapi.QueryCustomerAddressList API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querycustomeraddresslist.html func (client *Client) QueryCustomerAddressList(request *QueryCustomerAddressListRequest) (response *QueryCustomerAddressListResponse, err error) { - response = CreateQueryCustomerAddressListResponse() - err = client.DoAction(request, response) - return +response = CreateQueryCustomerAddressListResponse() +err = client.DoAction(request, response) +return } // QueryCustomerAddressListWithChan invokes the bssopenapi.QueryCustomerAddressList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querycustomeraddresslist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryCustomerAddressListWithChan(request *QueryCustomerAddressListRequest) (<-chan *QueryCustomerAddressListResponse, <-chan error) { - responseChan := make(chan *QueryCustomerAddressListResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryCustomerAddressList(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryCustomerAddressListResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryCustomerAddressList(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryCustomerAddressListWithCallback invokes the bssopenapi.QueryCustomerAddressList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querycustomeraddresslist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryCustomerAddressListWithCallback(request *QueryCustomerAddressListRequest, callback func(response *QueryCustomerAddressListResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryCustomerAddressListResponse - var err error - defer close(result) - response, err = client.QueryCustomerAddressList(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryCustomerAddressListWithCallback(request *QueryCustomerAddressListRequest, callback func(response *QueryCustomerAddressListResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryCustomerAddressListResponse +var err error +defer close(result) +response, err = client.QueryCustomerAddressList(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryCustomerAddressListRequest is the request struct for api QueryCustomerAddressList type QueryCustomerAddressListRequest struct { - *requests.RpcRequest - CallerBid requests.Integer `position:"Query" name:"callerBid"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - CallerUid requests.Integer `position:"Query" name:"callerUid"` +*requests.RpcRequest + CallerBid requests.Integer `position:"Query" name:"callerBid"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + CallerUid requests.Integer `position:"Query" name:"callerUid"` } + // QueryCustomerAddressListResponse is the response struct for api QueryCustomerAddressList type QueryCustomerAddressListResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryCustomerAddressListRequest creates a request to invoke QueryCustomerAddressList API func CreateQueryCustomerAddressListRequest() (request *QueryCustomerAddressListRequest) { - request = &QueryCustomerAddressListRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryCustomerAddressList", "", "") - return +request = &QueryCustomerAddressListRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryCustomerAddressList", "", "") +return } // CreateQueryCustomerAddressListResponse creates a response to parse from QueryCustomerAddressList response func CreateQueryCustomerAddressListResponse() (response *QueryCustomerAddressListResponse) { - response = &QueryCustomerAddressListResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryCustomerAddressListResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_enduser_status.go b/services/bssopenapi/query_enduser_status.go index 0f9c117d66..4fb5b9c3ab 100644 --- a/services/bssopenapi/query_enduser_status.go +++ b/services/bssopenapi/query_enduser_status.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,96 +17,99 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryEnduserStatus invokes the bssopenapi.QueryEnduserStatus API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryenduserstatus.html func (client *Client) QueryEnduserStatus(request *QueryEnduserStatusRequest) (response *QueryEnduserStatusResponse, err error) { - response = CreateQueryEnduserStatusResponse() - err = client.DoAction(request, response) - return +response = CreateQueryEnduserStatusResponse() +err = client.DoAction(request, response) +return } // QueryEnduserStatusWithChan invokes the bssopenapi.QueryEnduserStatus API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryenduserstatus.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryEnduserStatusWithChan(request *QueryEnduserStatusRequest) (<-chan *QueryEnduserStatusResponse, <-chan error) { - responseChan := make(chan *QueryEnduserStatusResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryEnduserStatus(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryEnduserStatusResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryEnduserStatus(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryEnduserStatusWithCallback invokes the bssopenapi.QueryEnduserStatus API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryenduserstatus.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryEnduserStatusWithCallback(request *QueryEnduserStatusRequest, callback func(response *QueryEnduserStatusResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryEnduserStatusResponse - var err error - defer close(result) - response, err = client.QueryEnduserStatus(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryEnduserStatusWithCallback(request *QueryEnduserStatusRequest, callback func(response *QueryEnduserStatusResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryEnduserStatusResponse +var err error +defer close(result) +response, err = client.QueryEnduserStatus(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryEnduserStatusRequest is the request struct for api QueryEnduserStatus type QueryEnduserStatusRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - PrimaryAccount string `position:"Query" name:"PrimaryAccount"` - Status string `position:"Query" name:"Status"` - BusinessType string `position:"Query" name:"BusinessType"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + PrimaryAccount string `position:"Query" name:"PrimaryAccount"` + Status string `position:"Query" name:"Status"` + BusinessType string `position:"Query" name:"BusinessType"` } + // QueryEnduserStatusResponse is the response struct for api QueryEnduserStatus type QueryEnduserStatusResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Count int `json:"Count" xml:"Count"` - Datas DatasInQueryEnduserStatus `json:"Datas" xml:"Datas"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Count int `json:"Count" xml:"Count"` + Datas DatasInQueryEnduserStatus `json:"Datas" xml:"Datas"` } // CreateQueryEnduserStatusRequest creates a request to invoke QueryEnduserStatus API func CreateQueryEnduserStatusRequest() (request *QueryEnduserStatusRequest) { - request = &QueryEnduserStatusRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryEnduserStatus", "", "") - return +request = &QueryEnduserStatusRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryEnduserStatus", "", "") +return } // CreateQueryEnduserStatusResponse creates a response to parse from QueryEnduserStatus response func CreateQueryEnduserStatusResponse() (response *QueryEnduserStatusResponse) { - response = &QueryEnduserStatusResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryEnduserStatusResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_evaluate_list.go b/services/bssopenapi/query_evaluate_list.go index 2d92c56430..eb7d6319da 100644 --- a/services/bssopenapi/query_evaluate_list.go +++ b/services/bssopenapi/query_evaluate_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,105 +17,108 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryEvaluateList invokes the bssopenapi.QueryEvaluateList API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryevaluatelist.html func (client *Client) QueryEvaluateList(request *QueryEvaluateListRequest) (response *QueryEvaluateListResponse, err error) { - response = CreateQueryEvaluateListResponse() - err = client.DoAction(request, response) - return +response = CreateQueryEvaluateListResponse() +err = client.DoAction(request, response) +return } // QueryEvaluateListWithChan invokes the bssopenapi.QueryEvaluateList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryevaluatelist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryEvaluateListWithChan(request *QueryEvaluateListRequest) (<-chan *QueryEvaluateListResponse, <-chan error) { - responseChan := make(chan *QueryEvaluateListResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryEvaluateList(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryEvaluateListResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryEvaluateList(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryEvaluateListWithCallback invokes the bssopenapi.QueryEvaluateList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryevaluatelist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryEvaluateListWithCallback(request *QueryEvaluateListRequest, callback func(response *QueryEvaluateListResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryEvaluateListResponse - var err error - defer close(result) - response, err = client.QueryEvaluateList(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryEvaluateListWithCallback(request *QueryEvaluateListRequest, callback func(response *QueryEvaluateListResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryEvaluateListResponse +var err error +defer close(result) +response, err = client.QueryEvaluateList(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryEvaluateListRequest is the request struct for api QueryEvaluateList type QueryEvaluateListRequest struct { - *requests.RpcRequest - EndSearchTime string `position:"Query" name:"EndSearchTime"` - OutBizId string `position:"Query" name:"OutBizId"` - SortType requests.Integer `position:"Query" name:"SortType"` - BizTypeList *[]string `position:"Query" name:"BizTypeList" type:"Repeated"` - Type requests.Integer `position:"Query" name:"Type"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - StartSearchTime string `position:"Query" name:"StartSearchTime"` - EndBizTime string `position:"Query" name:"EndBizTime"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - EndAmount requests.Integer `position:"Query" name:"EndAmount"` - BillCycle string `position:"Query" name:"BillCycle"` - StartAmount requests.Integer `position:"Query" name:"StartAmount"` - StartBizTime string `position:"Query" name:"StartBizTime"` +*requests.RpcRequest + EndSearchTime string `position:"Query" name:"EndSearchTime"` + OutBizId string `position:"Query" name:"OutBizId"` + SortType requests.Integer `position:"Query" name:"SortType"` + Type requests.Integer `position:"Query" name:"Type"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + EndAmount requests.Integer `position:"Query" name:"EndAmount"` + BillCycle string `position:"Query" name:"BillCycle"` + BizTypeList *[]string `position:"Query" name:"BizTypeList" type:"Repeated"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + StartSearchTime string `position:"Query" name:"StartSearchTime"` + EndBizTime string `position:"Query" name:"EndBizTime"` + StartAmount requests.Integer `position:"Query" name:"StartAmount"` + StartBizTime string `position:"Query" name:"StartBizTime"` } + // QueryEvaluateListResponse is the response struct for api QueryEvaluateList type QueryEvaluateListResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryEvaluateListRequest creates a request to invoke QueryEvaluateList API func CreateQueryEvaluateListRequest() (request *QueryEvaluateListRequest) { - request = &QueryEvaluateListRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryEvaluateList", "", "") - return +request = &QueryEvaluateListRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryEvaluateList", "", "") +return } // CreateQueryEvaluateListResponse creates a response to parse from QueryEvaluateList response func CreateQueryEvaluateListResponse() (response *QueryEvaluateListResponse) { - response = &QueryEvaluateListResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryEvaluateListResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_instance_bill.go b/services/bssopenapi/query_instance_bill.go index a5714e0bcd..a1d83b032a 100644 --- a/services/bssopenapi/query_instance_bill.go +++ b/services/bssopenapi/query_instance_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,100 +17,103 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryInstanceBill invokes the bssopenapi.QueryInstanceBill API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinstancebill.html func (client *Client) QueryInstanceBill(request *QueryInstanceBillRequest) (response *QueryInstanceBillResponse, err error) { - response = CreateQueryInstanceBillResponse() - err = client.DoAction(request, response) - return +response = CreateQueryInstanceBillResponse() +err = client.DoAction(request, response) +return } // QueryInstanceBillWithChan invokes the bssopenapi.QueryInstanceBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinstancebill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryInstanceBillWithChan(request *QueryInstanceBillRequest) (<-chan *QueryInstanceBillResponse, <-chan error) { - responseChan := make(chan *QueryInstanceBillResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryInstanceBill(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryInstanceBillResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryInstanceBill(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryInstanceBillWithCallback invokes the bssopenapi.QueryInstanceBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinstancebill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryInstanceBillWithCallback(request *QueryInstanceBillRequest, callback func(response *QueryInstanceBillResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryInstanceBillResponse - var err error - defer close(result) - response, err = client.QueryInstanceBill(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryInstanceBillWithCallback(request *QueryInstanceBillRequest, callback func(response *QueryInstanceBillResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryInstanceBillResponse +var err error +defer close(result) +response, err = client.QueryInstanceBill(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryInstanceBillRequest is the request struct for api QueryInstanceBill type QueryInstanceBillRequest struct { - *requests.RpcRequest - IsBillingItem requests.Boolean `position:"Query" name:"IsBillingItem"` - ProductCode string `position:"Query" name:"ProductCode"` - IsHideZeroCharge requests.Boolean `position:"Query" name:"IsHideZeroCharge"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - BillingCycle string `position:"Query" name:"BillingCycle"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + IsHideZeroCharge requests.Boolean `position:"Query" name:"IsHideZeroCharge"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + BillingCycle string `position:"Query" name:"BillingCycle"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + ProductType string `position:"Query" name:"ProductType"` + IsBillingItem requests.Boolean `position:"Query" name:"IsBillingItem"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QueryInstanceBillResponse is the response struct for api QueryInstanceBill type QueryInstanceBillResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryInstanceBillRequest creates a request to invoke QueryInstanceBill API func CreateQueryInstanceBillRequest() (request *QueryInstanceBillRequest) { - request = &QueryInstanceBillRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInstanceBill", "", "") - return +request = &QueryInstanceBillRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInstanceBill", "", "") +return } // CreateQueryInstanceBillResponse creates a response to parse from QueryInstanceBill response func CreateQueryInstanceBillResponse() (response *QueryInstanceBillResponse) { - response = &QueryInstanceBillResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryInstanceBillResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_instance_gaap_cost.go b/services/bssopenapi/query_instance_gaap_cost.go index 4242603b74..87351ae050 100644 --- a/services/bssopenapi/query_instance_gaap_cost.go +++ b/services/bssopenapi/query_instance_gaap_cost.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,97 +17,100 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryInstanceGaapCost invokes the bssopenapi.QueryInstanceGaapCost API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinstancegaapcost.html func (client *Client) QueryInstanceGaapCost(request *QueryInstanceGaapCostRequest) (response *QueryInstanceGaapCostResponse, err error) { - response = CreateQueryInstanceGaapCostResponse() - err = client.DoAction(request, response) - return +response = CreateQueryInstanceGaapCostResponse() +err = client.DoAction(request, response) +return } // QueryInstanceGaapCostWithChan invokes the bssopenapi.QueryInstanceGaapCost API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinstancegaapcost.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryInstanceGaapCostWithChan(request *QueryInstanceGaapCostRequest) (<-chan *QueryInstanceGaapCostResponse, <-chan error) { - responseChan := make(chan *QueryInstanceGaapCostResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryInstanceGaapCost(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryInstanceGaapCostResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryInstanceGaapCost(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryInstanceGaapCostWithCallback invokes the bssopenapi.QueryInstanceGaapCost API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinstancegaapcost.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryInstanceGaapCostWithCallback(request *QueryInstanceGaapCostRequest, callback func(response *QueryInstanceGaapCostResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryInstanceGaapCostResponse - var err error - defer close(result) - response, err = client.QueryInstanceGaapCost(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryInstanceGaapCostWithCallback(request *QueryInstanceGaapCostRequest, callback func(response *QueryInstanceGaapCostResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryInstanceGaapCostResponse +var err error +defer close(result) +response, err = client.QueryInstanceGaapCost(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryInstanceGaapCostRequest is the request struct for api QueryInstanceGaapCost type QueryInstanceGaapCostRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - BillingCycle string `position:"Query" name:"BillingCycle"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + BillingCycle string `position:"Query" name:"BillingCycle"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + ProductType string `position:"Query" name:"ProductType"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QueryInstanceGaapCostResponse is the response struct for api QueryInstanceGaapCost type QueryInstanceGaapCostResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryInstanceGaapCostRequest creates a request to invoke QueryInstanceGaapCost API func CreateQueryInstanceGaapCostRequest() (request *QueryInstanceGaapCostRequest) { - request = &QueryInstanceGaapCostRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInstanceGaapCost", "", "") - return +request = &QueryInstanceGaapCostRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInstanceGaapCost", "", "") +return } // CreateQueryInstanceGaapCostResponse creates a response to parse from QueryInstanceGaapCost response func CreateQueryInstanceGaapCostResponse() (response *QueryInstanceGaapCostResponse) { - response = &QueryInstanceGaapCostResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryInstanceGaapCostResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_invoicing_customer_list.go b/services/bssopenapi/query_invoicing_customer_list.go index e0a2db34f1..b590a5cf0b 100644 --- a/services/bssopenapi/query_invoicing_customer_list.go +++ b/services/bssopenapi/query_invoicing_customer_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,92 +17,95 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryInvoicingCustomerList invokes the bssopenapi.QueryInvoicingCustomerList API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinvoicingcustomerlist.html func (client *Client) QueryInvoicingCustomerList(request *QueryInvoicingCustomerListRequest) (response *QueryInvoicingCustomerListResponse, err error) { - response = CreateQueryInvoicingCustomerListResponse() - err = client.DoAction(request, response) - return +response = CreateQueryInvoicingCustomerListResponse() +err = client.DoAction(request, response) +return } // QueryInvoicingCustomerListWithChan invokes the bssopenapi.QueryInvoicingCustomerList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinvoicingcustomerlist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryInvoicingCustomerListWithChan(request *QueryInvoicingCustomerListRequest) (<-chan *QueryInvoicingCustomerListResponse, <-chan error) { - responseChan := make(chan *QueryInvoicingCustomerListResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryInvoicingCustomerList(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryInvoicingCustomerListResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryInvoicingCustomerList(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryInvoicingCustomerListWithCallback invokes the bssopenapi.QueryInvoicingCustomerList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryinvoicingcustomerlist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryInvoicingCustomerListWithCallback(request *QueryInvoicingCustomerListRequest, callback func(response *QueryInvoicingCustomerListResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryInvoicingCustomerListResponse - var err error - defer close(result) - response, err = client.QueryInvoicingCustomerList(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryInvoicingCustomerListWithCallback(request *QueryInvoicingCustomerListRequest, callback func(response *QueryInvoicingCustomerListResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryInvoicingCustomerListResponse +var err error +defer close(result) +response, err = client.QueryInvoicingCustomerList(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryInvoicingCustomerListRequest is the request struct for api QueryInvoicingCustomerList type QueryInvoicingCustomerListRequest struct { - *requests.RpcRequest - OwnerId requests.Integer `position:"Query" name:"OwnerId"` +*requests.RpcRequest + OwnerId requests.Integer `position:"Query" name:"OwnerId"` } + // QueryInvoicingCustomerListResponse is the response struct for api QueryInvoicingCustomerList type QueryInvoicingCustomerListResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryInvoicingCustomerListRequest creates a request to invoke QueryInvoicingCustomerList API func CreateQueryInvoicingCustomerListRequest() (request *QueryInvoicingCustomerListRequest) { - request = &QueryInvoicingCustomerListRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInvoicingCustomerList", "", "") - return +request = &QueryInvoicingCustomerListRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryInvoicingCustomerList", "", "") +return } // CreateQueryInvoicingCustomerListResponse creates a response to parse from QueryInvoicingCustomerList response func CreateQueryInvoicingCustomerListResponse() (response *QueryInvoicingCustomerListResponse) { - response = &QueryInvoicingCustomerListResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryInvoicingCustomerListResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_monthly_bill.go b/services/bssopenapi/query_monthly_bill.go index 5e98f860d4..a2f378a1fe 100644 --- a/services/bssopenapi/query_monthly_bill.go +++ b/services/bssopenapi/query_monthly_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,92 +17,95 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryMonthlyBill invokes the bssopenapi.QueryMonthlyBill API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querymonthlybill.html func (client *Client) QueryMonthlyBill(request *QueryMonthlyBillRequest) (response *QueryMonthlyBillResponse, err error) { - response = CreateQueryMonthlyBillResponse() - err = client.DoAction(request, response) - return +response = CreateQueryMonthlyBillResponse() +err = client.DoAction(request, response) +return } // QueryMonthlyBillWithChan invokes the bssopenapi.QueryMonthlyBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querymonthlybill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryMonthlyBillWithChan(request *QueryMonthlyBillRequest) (<-chan *QueryMonthlyBillResponse, <-chan error) { - responseChan := make(chan *QueryMonthlyBillResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryMonthlyBill(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryMonthlyBillResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryMonthlyBill(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryMonthlyBillWithCallback invokes the bssopenapi.QueryMonthlyBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querymonthlybill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryMonthlyBillWithCallback(request *QueryMonthlyBillRequest, callback func(response *QueryMonthlyBillResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryMonthlyBillResponse - var err error - defer close(result) - response, err = client.QueryMonthlyBill(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryMonthlyBillWithCallback(request *QueryMonthlyBillRequest, callback func(response *QueryMonthlyBillResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryMonthlyBillResponse +var err error +defer close(result) +response, err = client.QueryMonthlyBill(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryMonthlyBillRequest is the request struct for api QueryMonthlyBill type QueryMonthlyBillRequest struct { - *requests.RpcRequest - BillingCycle string `position:"Query" name:"BillingCycle"` +*requests.RpcRequest + BillingCycle string `position:"Query" name:"BillingCycle"` } + // QueryMonthlyBillResponse is the response struct for api QueryMonthlyBill type QueryMonthlyBillResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryMonthlyBillRequest creates a request to invoke QueryMonthlyBill API func CreateQueryMonthlyBillRequest() (request *QueryMonthlyBillRequest) { - request = &QueryMonthlyBillRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryMonthlyBill", "", "") - return +request = &QueryMonthlyBillRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryMonthlyBill", "", "") +return } // CreateQueryMonthlyBillResponse creates a response to parse from QueryMonthlyBill response func CreateQueryMonthlyBillResponse() (response *QueryMonthlyBillResponse) { - response = &QueryMonthlyBillResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryMonthlyBillResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_monthly_instance_consumption.go b/services/bssopenapi/query_monthly_instance_consumption.go index 5a0cd7058d..895d510867 100644 --- a/services/bssopenapi/query_monthly_instance_consumption.go +++ b/services/bssopenapi/query_monthly_instance_consumption.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,98 +17,101 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryMonthlyInstanceConsumption invokes the bssopenapi.QueryMonthlyInstanceConsumption API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querymonthlyinstanceconsumption.html func (client *Client) QueryMonthlyInstanceConsumption(request *QueryMonthlyInstanceConsumptionRequest) (response *QueryMonthlyInstanceConsumptionResponse, err error) { - response = CreateQueryMonthlyInstanceConsumptionResponse() - err = client.DoAction(request, response) - return +response = CreateQueryMonthlyInstanceConsumptionResponse() +err = client.DoAction(request, response) +return } // QueryMonthlyInstanceConsumptionWithChan invokes the bssopenapi.QueryMonthlyInstanceConsumption API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querymonthlyinstanceconsumption.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryMonthlyInstanceConsumptionWithChan(request *QueryMonthlyInstanceConsumptionRequest) (<-chan *QueryMonthlyInstanceConsumptionResponse, <-chan error) { - responseChan := make(chan *QueryMonthlyInstanceConsumptionResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryMonthlyInstanceConsumption(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryMonthlyInstanceConsumptionResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryMonthlyInstanceConsumption(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryMonthlyInstanceConsumptionWithCallback invokes the bssopenapi.QueryMonthlyInstanceConsumption API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querymonthlyinstanceconsumption.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryMonthlyInstanceConsumptionWithCallback(request *QueryMonthlyInstanceConsumptionRequest, callback func(response *QueryMonthlyInstanceConsumptionResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryMonthlyInstanceConsumptionResponse - var err error - defer close(result) - response, err = client.QueryMonthlyInstanceConsumption(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryMonthlyInstanceConsumptionWithCallback(request *QueryMonthlyInstanceConsumptionRequest, callback func(response *QueryMonthlyInstanceConsumptionResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryMonthlyInstanceConsumptionResponse +var err error +defer close(result) +response, err = client.QueryMonthlyInstanceConsumption(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryMonthlyInstanceConsumptionRequest is the request struct for api QueryMonthlyInstanceConsumption type QueryMonthlyInstanceConsumptionRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - BillingCycle string `position:"Query" name:"BillingCycle"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + BillingCycle string `position:"Query" name:"BillingCycle"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + ProductType string `position:"Query" name:"ProductType"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QueryMonthlyInstanceConsumptionResponse is the response struct for api QueryMonthlyInstanceConsumption type QueryMonthlyInstanceConsumptionResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryMonthlyInstanceConsumptionRequest creates a request to invoke QueryMonthlyInstanceConsumption API func CreateQueryMonthlyInstanceConsumptionRequest() (request *QueryMonthlyInstanceConsumptionRequest) { - request = &QueryMonthlyInstanceConsumptionRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryMonthlyInstanceConsumption", "", "") - return +request = &QueryMonthlyInstanceConsumptionRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryMonthlyInstanceConsumption", "", "") +return } // CreateQueryMonthlyInstanceConsumptionResponse creates a response to parse from QueryMonthlyInstanceConsumption response func CreateQueryMonthlyInstanceConsumptionResponse() (response *QueryMonthlyInstanceConsumptionResponse) { - response = &QueryMonthlyInstanceConsumptionResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryMonthlyInstanceConsumptionResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_orders.go b/services/bssopenapi/query_orders.go index 024cf17274..df7bf15e43 100644 --- a/services/bssopenapi/query_orders.go +++ b/services/bssopenapi/query_orders.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,101 +17,104 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryOrders invokes the bssopenapi.QueryOrders API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryorders.html func (client *Client) QueryOrders(request *QueryOrdersRequest) (response *QueryOrdersResponse, err error) { - response = CreateQueryOrdersResponse() - err = client.DoAction(request, response) - return +response = CreateQueryOrdersResponse() +err = client.DoAction(request, response) +return } // QueryOrdersWithChan invokes the bssopenapi.QueryOrders API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryorders.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryOrdersWithChan(request *QueryOrdersRequest) (<-chan *QueryOrdersResponse, <-chan error) { - responseChan := make(chan *QueryOrdersResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryOrders(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryOrdersResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryOrders(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryOrdersWithCallback invokes the bssopenapi.QueryOrders API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryorders.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryOrdersWithCallback(request *QueryOrdersRequest, callback func(response *QueryOrdersResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryOrdersResponse - var err error - defer close(result) - response, err = client.QueryOrders(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryOrdersWithCallback(request *QueryOrdersRequest, callback func(response *QueryOrdersResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryOrdersResponse +var err error +defer close(result) +response, err = client.QueryOrders(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryOrdersRequest is the request struct for api QueryOrders type QueryOrdersRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - PaymentStatus string `position:"Query" name:"PaymentStatus"` - CreateTimeStart string `position:"Query" name:"CreateTimeStart"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - CreateTimeEnd string `position:"Query" name:"CreateTimeEnd"` - ProductType string `position:"Query" name:"ProductType"` - OrderType string `position:"Query" name:"OrderType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + CreateTimeEnd string `position:"Query" name:"CreateTimeEnd"` + ProductType string `position:"Query" name:"ProductType"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + PaymentStatus string `position:"Query" name:"PaymentStatus"` + CreateTimeStart string `position:"Query" name:"CreateTimeStart"` + OrderType string `position:"Query" name:"OrderType"` } + // QueryOrdersResponse is the response struct for api QueryOrders type QueryOrdersResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryOrdersRequest creates a request to invoke QueryOrders API func CreateQueryOrdersRequest() (request *QueryOrdersRequest) { - request = &QueryOrdersRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryOrders", "", "") - return +request = &QueryOrdersRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryOrders", "", "") +return } // CreateQueryOrdersResponse creates a response to parse from QueryOrders response func CreateQueryOrdersResponse() (response *QueryOrdersResponse) { - response = &QueryOrdersResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryOrdersResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_prepaid_cards.go b/services/bssopenapi/query_prepaid_cards.go index c164e2c165..5a6d93de56 100644 --- a/services/bssopenapi/query_prepaid_cards.go +++ b/services/bssopenapi/query_prepaid_cards.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,94 +17,97 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryPrepaidCards invokes the bssopenapi.QueryPrepaidCards API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryprepaidcards.html func (client *Client) QueryPrepaidCards(request *QueryPrepaidCardsRequest) (response *QueryPrepaidCardsResponse, err error) { - response = CreateQueryPrepaidCardsResponse() - err = client.DoAction(request, response) - return +response = CreateQueryPrepaidCardsResponse() +err = client.DoAction(request, response) +return } // QueryPrepaidCardsWithChan invokes the bssopenapi.QueryPrepaidCards API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryprepaidcards.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryPrepaidCardsWithChan(request *QueryPrepaidCardsRequest) (<-chan *QueryPrepaidCardsResponse, <-chan error) { - responseChan := make(chan *QueryPrepaidCardsResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryPrepaidCards(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryPrepaidCardsResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryPrepaidCards(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryPrepaidCardsWithCallback invokes the bssopenapi.QueryPrepaidCards API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryprepaidcards.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryPrepaidCardsWithCallback(request *QueryPrepaidCardsRequest, callback func(response *QueryPrepaidCardsResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryPrepaidCardsResponse - var err error - defer close(result) - response, err = client.QueryPrepaidCards(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryPrepaidCardsWithCallback(request *QueryPrepaidCardsRequest, callback func(response *QueryPrepaidCardsResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryPrepaidCardsResponse +var err error +defer close(result) +response, err = client.QueryPrepaidCards(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryPrepaidCardsRequest is the request struct for api QueryPrepaidCards type QueryPrepaidCardsRequest struct { - *requests.RpcRequest - ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` - ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` - EffectiveOrNot requests.Boolean `position:"Query" name:"EffectiveOrNot"` +*requests.RpcRequest + ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` + ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` + EffectiveOrNot requests.Boolean `position:"Query" name:"EffectiveOrNot"` } + // QueryPrepaidCardsResponse is the response struct for api QueryPrepaidCards type QueryPrepaidCardsResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data DataInQueryPrepaidCards `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data DataInQueryPrepaidCards `json:"Data" xml:"Data"` } // CreateQueryPrepaidCardsRequest creates a request to invoke QueryPrepaidCards API func CreateQueryPrepaidCardsRequest() (request *QueryPrepaidCardsRequest) { - request = &QueryPrepaidCardsRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPrepaidCards", "", "") - return +request = &QueryPrepaidCardsRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPrepaidCards", "", "") +return } // CreateQueryPrepaidCardsResponse creates a response to parse from QueryPrepaidCards response func CreateQueryPrepaidCardsResponse() (response *QueryPrepaidCardsResponse) { - response = &QueryPrepaidCardsResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryPrepaidCardsResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_price.go b/services/bssopenapi/query_price.go index 746ff2e29e..668bcb3c05 100644 --- a/services/bssopenapi/query_price.go +++ b/services/bssopenapi/query_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,93 +17,96 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryPrice invokes the bssopenapi.QueryPrice API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryprice.html func (client *Client) QueryPrice(request *QueryPriceRequest) (response *QueryPriceResponse, err error) { - response = CreateQueryPriceResponse() - err = client.DoAction(request, response) - return +response = CreateQueryPriceResponse() +err = client.DoAction(request, response) +return } // QueryPriceWithChan invokes the bssopenapi.QueryPrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryPriceWithChan(request *QueryPriceRequest) (<-chan *QueryPriceResponse, <-chan error) { - responseChan := make(chan *QueryPriceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryPrice(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryPriceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryPrice(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryPriceWithCallback invokes the bssopenapi.QueryPrice API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryprice.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryPriceWithCallback(request *QueryPriceRequest, callback func(response *QueryPriceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryPriceResponse - var err error - defer close(result) - response, err = client.QueryPrice(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryPriceWithCallback(request *QueryPriceRequest, callback func(response *QueryPriceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryPriceResponse +var err error +defer close(result) +response, err = client.QueryPrice(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryPriceRequest is the request struct for api QueryPrice type QueryPriceRequest struct { - *requests.RpcRequest - ParamStr string `position:"Query" name:"ParamStr"` +*requests.RpcRequest + ParamStr string `position:"Query" name:"ParamStr"` } + // QueryPriceResponse is the response struct for api QueryPrice type QueryPriceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data string `json:"Data" xml:"Data"` - ErrCode string `json:"ErrCode" xml:"ErrCode"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data string `json:"Data" xml:"Data"` + ErrCode string `json:"ErrCode" xml:"ErrCode"` } // CreateQueryPriceRequest creates a request to invoke QueryPrice API func CreateQueryPriceRequest() (request *QueryPriceRequest) { - request = &QueryPriceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPrice", "", "") - return +request = &QueryPriceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPrice", "", "") +return } // CreateQueryPriceResponse creates a response to parse from QueryPrice response func CreateQueryPriceResponse() (response *QueryPriceResponse) { - response = &QueryPriceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryPriceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_price_list.go b/services/bssopenapi/query_price_list.go index 0d1d2b44d4..b8c2371a78 100644 --- a/services/bssopenapi/query_price_list.go +++ b/services/bssopenapi/query_price_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,96 +17,99 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryPriceList invokes the bssopenapi.QueryPriceList API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querypricelist.html func (client *Client) QueryPriceList(request *QueryPriceListRequest) (response *QueryPriceListResponse, err error) { - response = CreateQueryPriceListResponse() - err = client.DoAction(request, response) - return +response = CreateQueryPriceListResponse() +err = client.DoAction(request, response) +return } // QueryPriceListWithChan invokes the bssopenapi.QueryPriceList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querypricelist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryPriceListWithChan(request *QueryPriceListRequest) (<-chan *QueryPriceListResponse, <-chan error) { - responseChan := make(chan *QueryPriceListResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryPriceList(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryPriceListResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryPriceList(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryPriceListWithCallback invokes the bssopenapi.QueryPriceList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querypricelist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryPriceListWithCallback(request *QueryPriceListRequest, callback func(response *QueryPriceListResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryPriceListResponse - var err error - defer close(result) - response, err = client.QueryPriceList(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryPriceListWithCallback(request *QueryPriceListRequest, callback func(response *QueryPriceListResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryPriceListResponse +var err error +defer close(result) +response, err = client.QueryPriceList(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryPriceListRequest is the request struct for api QueryPriceList type QueryPriceListRequest struct { - *requests.RpcRequest - ModuleCode string `position:"Query" name:"ModuleCode"` - ProductCode string `position:"Query" name:"ProductCode"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + ModuleCode string `position:"Query" name:"ModuleCode"` } + // QueryPriceListResponse is the response struct for api QueryPriceList type QueryPriceListResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryPriceListRequest creates a request to invoke QueryPriceList API func CreateQueryPriceListRequest() (request *QueryPriceListRequest) { - request = &QueryPriceListRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPriceList", "", "") - return +request = &QueryPriceListRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryPriceList", "", "") +return } // CreateQueryPriceListResponse creates a response to parse from QueryPriceList response func CreateQueryPriceListResponse() (response *QueryPriceListResponse) { - response = &QueryPriceListResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryPriceListResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_product_list.go b/services/bssopenapi/query_product_list.go index ec078f4f1b..99021390bc 100644 --- a/services/bssopenapi/query_product_list.go +++ b/services/bssopenapi/query_product_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,94 +17,97 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryProductList invokes the bssopenapi.QueryProductList API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryproductlist.html func (client *Client) QueryProductList(request *QueryProductListRequest) (response *QueryProductListResponse, err error) { - response = CreateQueryProductListResponse() - err = client.DoAction(request, response) - return +response = CreateQueryProductListResponse() +err = client.DoAction(request, response) +return } // QueryProductListWithChan invokes the bssopenapi.QueryProductList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryproductlist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryProductListWithChan(request *QueryProductListRequest) (<-chan *QueryProductListResponse, <-chan error) { - responseChan := make(chan *QueryProductListResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryProductList(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryProductListResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryProductList(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryProductListWithCallback invokes the bssopenapi.QueryProductList API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryproductlist.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryProductListWithCallback(request *QueryProductListRequest, callback func(response *QueryProductListResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryProductListResponse - var err error - defer close(result) - response, err = client.QueryProductList(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryProductListWithCallback(request *QueryProductListRequest, callback func(response *QueryProductListResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryProductListResponse +var err error +defer close(result) +response, err = client.QueryProductList(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryProductListRequest is the request struct for api QueryProductList type QueryProductListRequest struct { - *requests.RpcRequest - QueryTotalCount requests.Boolean `position:"Query" name:"QueryTotalCount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - PageNum requests.Integer `position:"Query" name:"PageNum"` +*requests.RpcRequest + PageNum requests.Integer `position:"Query" name:"PageNum"` + QueryTotalCount requests.Boolean `position:"Query" name:"QueryTotalCount"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QueryProductListResponse is the response struct for api QueryProductList type QueryProductListResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQueryProductListRequest creates a request to invoke QueryProductList API func CreateQueryProductListRequest() (request *QueryProductListRequest) { - request = &QueryProductListRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryProductList", "", "") - return +request = &QueryProductListRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryProductList", "", "") +return } // CreateQueryProductListResponse creates a response to parse from QueryProductList response func CreateQueryProductListResponse() (response *QueryProductListResponse) { - response = &QueryProductListResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryProductListResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_redeem.go b/services/bssopenapi/query_redeem.go index 3670784fb6..c6edaabefd 100644 --- a/services/bssopenapi/query_redeem.go +++ b/services/bssopenapi/query_redeem.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,96 +17,99 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryRedeem invokes the bssopenapi.QueryRedeem API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryredeem.html func (client *Client) QueryRedeem(request *QueryRedeemRequest) (response *QueryRedeemResponse, err error) { - response = CreateQueryRedeemResponse() - err = client.DoAction(request, response) - return +response = CreateQueryRedeemResponse() +err = client.DoAction(request, response) +return } // QueryRedeemWithChan invokes the bssopenapi.QueryRedeem API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryredeem.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryRedeemWithChan(request *QueryRedeemRequest) (<-chan *QueryRedeemResponse, <-chan error) { - responseChan := make(chan *QueryRedeemResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryRedeem(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryRedeemResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryRedeem(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryRedeemWithCallback invokes the bssopenapi.QueryRedeem API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryredeem.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryRedeemWithCallback(request *QueryRedeemRequest, callback func(response *QueryRedeemResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryRedeemResponse - var err error - defer close(result) - response, err = client.QueryRedeem(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryRedeemWithCallback(request *QueryRedeemRequest, callback func(response *QueryRedeemResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryRedeemResponse +var err error +defer close(result) +response, err = client.QueryRedeem(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryRedeemRequest is the request struct for api QueryRedeem type QueryRedeemRequest struct { - *requests.RpcRequest - ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - EffectiveOrNot requests.Boolean `position:"Query" name:"EffectiveOrNot"` +*requests.RpcRequest + ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` + ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + EffectiveOrNot requests.Boolean `position:"Query" name:"EffectiveOrNot"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QueryRedeemResponse is the response struct for api QueryRedeem type QueryRedeemResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data DataInQueryRedeem `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data DataInQueryRedeem `json:"Data" xml:"Data"` } // CreateQueryRedeemRequest creates a request to invoke QueryRedeem API func CreateQueryRedeemRequest() (request *QueryRedeemRequest) { - request = &QueryRedeemRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryRedeem", "", "") - return +request = &QueryRedeemRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryRedeem", "", "") +return } // CreateQueryRedeemResponse creates a response to parse from QueryRedeem response func CreateQueryRedeemResponse() (response *QueryRedeemResponse) { - response = &QueryRedeemResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryRedeemResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_reseller_available_quota.go b/services/bssopenapi/query_reseller_available_quota.go new file mode 100644 index 0000000000..dcada298ea --- /dev/null +++ b/services/bssopenapi/query_reseller_available_quota.go @@ -0,0 +1,112 @@ + +package bssopenapi + +//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" +) + +// QueryResellerAvailableQuota invokes the bssopenapi.QueryResellerAvailableQuota API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/queryreselleravailablequota.html +func (client *Client) QueryResellerAvailableQuota(request *QueryResellerAvailableQuotaRequest) (response *QueryResellerAvailableQuotaResponse, err error) { +response = CreateQueryResellerAvailableQuotaResponse() +err = client.DoAction(request, response) +return +} + +// QueryResellerAvailableQuotaWithChan invokes the bssopenapi.QueryResellerAvailableQuota API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/queryreselleravailablequota.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryResellerAvailableQuotaWithChan(request *QueryResellerAvailableQuotaRequest) (<-chan *QueryResellerAvailableQuotaResponse, <-chan error) { +responseChan := make(chan *QueryResellerAvailableQuotaResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryResellerAvailableQuota(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// QueryResellerAvailableQuotaWithCallback invokes the bssopenapi.QueryResellerAvailableQuota API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/queryreselleravailablequota.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryResellerAvailableQuotaWithCallback(request *QueryResellerAvailableQuotaRequest, callback func(response *QueryResellerAvailableQuotaResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryResellerAvailableQuotaResponse +var err error +defer close(result) +response, err = client.QueryResellerAvailableQuota(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// QueryResellerAvailableQuotaRequest is the request struct for api QueryResellerAvailableQuota +type QueryResellerAvailableQuotaRequest struct { +*requests.RpcRequest + ItemCodes string `position:"Query" name:"ItemCodes"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + + +// QueryResellerAvailableQuotaResponse is the response struct for api QueryResellerAvailableQuota +type QueryResellerAvailableQuotaResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data string `json:"Data" xml:"Data"` +} + +// CreateQueryResellerAvailableQuotaRequest creates a request to invoke QueryResellerAvailableQuota API +func CreateQueryResellerAvailableQuotaRequest() (request *QueryResellerAvailableQuotaRequest) { +request = &QueryResellerAvailableQuotaRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryResellerAvailableQuota", "", "") +return +} + +// CreateQueryResellerAvailableQuotaResponse creates a response to parse from QueryResellerAvailableQuota response +func CreateQueryResellerAvailableQuotaResponse() (response *QueryResellerAvailableQuotaResponse) { +response = &QueryResellerAvailableQuotaResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/query_resource_package_instances.go b/services/bssopenapi/query_resource_package_instances.go index c0cd496285..83d214e33a 100644 --- a/services/bssopenapi/query_resource_package_instances.go +++ b/services/bssopenapi/query_resource_package_instances.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,100 +17,103 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryResourcePackageInstances invokes the bssopenapi.QueryResourcePackageInstances API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryresourcepackageinstances.html func (client *Client) QueryResourcePackageInstances(request *QueryResourcePackageInstancesRequest) (response *QueryResourcePackageInstancesResponse, err error) { - response = CreateQueryResourcePackageInstancesResponse() - err = client.DoAction(request, response) - return +response = CreateQueryResourcePackageInstancesResponse() +err = client.DoAction(request, response) +return } // QueryResourcePackageInstancesWithChan invokes the bssopenapi.QueryResourcePackageInstances API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryresourcepackageinstances.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryResourcePackageInstancesWithChan(request *QueryResourcePackageInstancesRequest) (<-chan *QueryResourcePackageInstancesResponse, <-chan error) { - responseChan := make(chan *QueryResourcePackageInstancesResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryResourcePackageInstances(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryResourcePackageInstancesResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryResourcePackageInstances(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryResourcePackageInstancesWithCallback invokes the bssopenapi.QueryResourcePackageInstances API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryresourcepackageinstances.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryResourcePackageInstancesWithCallback(request *QueryResourcePackageInstancesRequest, callback func(response *QueryResourcePackageInstancesResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryResourcePackageInstancesResponse - var err error - defer close(result) - response, err = client.QueryResourcePackageInstances(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryResourcePackageInstancesWithCallback(request *QueryResourcePackageInstancesRequest, callback func(response *QueryResourcePackageInstancesResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryResourcePackageInstancesResponse +var err error +defer close(result) +response, err = client.QueryResourcePackageInstances(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryResourcePackageInstancesRequest is the request struct for api QueryResourcePackageInstances type QueryResourcePackageInstancesRequest struct { - *requests.RpcRequest - ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` - ProductCode string `position:"Query" name:"ProductCode"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` - PageNum requests.Integer `position:"Query" name:"PageNum"` +*requests.RpcRequest + ExpiryTimeEnd string `position:"Query" name:"ExpiryTimeEnd"` + ProductCode string `position:"Query" name:"ProductCode"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ExpiryTimeStart string `position:"Query" name:"ExpiryTimeStart"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QueryResourcePackageInstancesResponse is the response struct for api QueryResourcePackageInstances type QueryResourcePackageInstancesResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Page int `json:"Page" xml:"Page"` - PageSize int `json:"PageSize" xml:"PageSize"` - Total int `json:"Total" xml:"Total"` - Data DataInQueryResourcePackageInstances `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Page int `json:"Page" xml:"Page"` + PageSize int `json:"PageSize" xml:"PageSize"` + Total int `json:"Total" xml:"Total"` + Data DataInQueryResourcePackageInstances `json:"Data" xml:"Data"` } // CreateQueryResourcePackageInstancesRequest creates a request to invoke QueryResourcePackageInstances API func CreateQueryResourcePackageInstancesRequest() (request *QueryResourcePackageInstancesRequest) { - request = &QueryResourcePackageInstancesRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryResourcePackageInstances", "", "") - return +request = &QueryResourcePackageInstancesRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryResourcePackageInstances", "", "") +return } // CreateQueryResourcePackageInstancesResponse creates a response to parse from QueryResourcePackageInstances response func CreateQueryResourcePackageInstancesResponse() (response *QueryResourcePackageInstancesResponse) { - response = &QueryResourcePackageInstancesResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryResourcePackageInstancesResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_settlement_bill.go b/services/bssopenapi/query_settlement_bill.go index 87b9479014..e9721a5ee3 100644 --- a/services/bssopenapi/query_settlement_bill.go +++ b/services/bssopenapi/query_settlement_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,102 +17,105 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QuerySettlementBill invokes the bssopenapi.QuerySettlementBill API synchronously // api document: https://help.aliyun.com/api/bssopenapi/querysettlementbill.html func (client *Client) QuerySettlementBill(request *QuerySettlementBillRequest) (response *QuerySettlementBillResponse, err error) { - response = CreateQuerySettlementBillResponse() - err = client.DoAction(request, response) - return +response = CreateQuerySettlementBillResponse() +err = client.DoAction(request, response) +return } // QuerySettlementBillWithChan invokes the bssopenapi.QuerySettlementBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querysettlementbill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QuerySettlementBillWithChan(request *QuerySettlementBillRequest) (<-chan *QuerySettlementBillResponse, <-chan error) { - responseChan := make(chan *QuerySettlementBillResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QuerySettlementBill(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QuerySettlementBillResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QuerySettlementBill(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QuerySettlementBillWithCallback invokes the bssopenapi.QuerySettlementBill API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/querysettlementbill.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QuerySettlementBillWithCallback(request *QuerySettlementBillRequest, callback func(response *QuerySettlementBillResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QuerySettlementBillResponse - var err error - defer close(result) - response, err = client.QuerySettlementBill(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QuerySettlementBillWithCallback(request *QuerySettlementBillRequest, callback func(response *QuerySettlementBillResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QuerySettlementBillResponse +var err error +defer close(result) +response, err = client.QuerySettlementBill(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QuerySettlementBillRequest is the request struct for api QuerySettlementBill type QuerySettlementBillRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - IsHideZeroCharge requests.Boolean `position:"Query" name:"IsHideZeroCharge"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - EndTime string `position:"Query" name:"EndTime"` - BillingCycle string `position:"Query" name:"BillingCycle"` - StartTime string `position:"Query" name:"StartTime"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNum requests.Integer `position:"Query" name:"PageNum"` - Type string `position:"Query" name:"Type"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + IsHideZeroCharge requests.Boolean `position:"Query" name:"IsHideZeroCharge"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + EndTime string `position:"Query" name:"EndTime"` + BillingCycle string `position:"Query" name:"BillingCycle"` + StartTime string `position:"Query" name:"StartTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PageNum requests.Integer `position:"Query" name:"PageNum"` + Type string `position:"Query" name:"Type"` + ProductType string `position:"Query" name:"ProductType"` + PageSize requests.Integer `position:"Query" name:"PageSize"` } + // QuerySettlementBillResponse is the response struct for api QuerySettlementBill type QuerySettlementBillResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateQuerySettlementBillRequest creates a request to invoke QuerySettlementBill API func CreateQuerySettlementBillRequest() (request *QuerySettlementBillRequest) { - request = &QuerySettlementBillRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QuerySettlementBill", "", "") - return +request = &QuerySettlementBillRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QuerySettlementBill", "", "") +return } // CreateQuerySettlementBillResponse creates a response to parse from QuerySettlementBill response func CreateQuerySettlementBillResponse() (response *QuerySettlementBillResponse) { - response = &QuerySettlementBillResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QuerySettlementBillResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_user_alarm_threshold.go b/services/bssopenapi/query_user_alarm_threshold.go index 299d662d50..a909bfc690 100644 --- a/services/bssopenapi/query_user_alarm_threshold.go +++ b/services/bssopenapi/query_user_alarm_threshold.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,96 +17,99 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryUserAlarmThreshold invokes the bssopenapi.QueryUserAlarmThreshold API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryuseralarmthreshold.html func (client *Client) QueryUserAlarmThreshold(request *QueryUserAlarmThresholdRequest) (response *QueryUserAlarmThresholdResponse, err error) { - response = CreateQueryUserAlarmThresholdResponse() - err = client.DoAction(request, response) - return +response = CreateQueryUserAlarmThresholdResponse() +err = client.DoAction(request, response) +return } // QueryUserAlarmThresholdWithChan invokes the bssopenapi.QueryUserAlarmThreshold API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryuseralarmthreshold.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryUserAlarmThresholdWithChan(request *QueryUserAlarmThresholdRequest) (<-chan *QueryUserAlarmThresholdResponse, <-chan error) { - responseChan := make(chan *QueryUserAlarmThresholdResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryUserAlarmThreshold(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryUserAlarmThresholdResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryUserAlarmThreshold(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryUserAlarmThresholdWithCallback invokes the bssopenapi.QueryUserAlarmThreshold API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryuseralarmthreshold.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryUserAlarmThresholdWithCallback(request *QueryUserAlarmThresholdRequest, callback func(response *QueryUserAlarmThresholdResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryUserAlarmThresholdResponse - var err error - defer close(result) - response, err = client.QueryUserAlarmThreshold(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryUserAlarmThresholdWithCallback(request *QueryUserAlarmThresholdRequest, callback func(response *QueryUserAlarmThresholdResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryUserAlarmThresholdResponse +var err error +defer close(result) +response, err = client.QueryUserAlarmThreshold(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryUserAlarmThresholdRequest is the request struct for api QueryUserAlarmThreshold type QueryUserAlarmThresholdRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - AlarmType string `position:"Query" name:"AlarmType"` - AlarmThresholds string `position:"Query" name:"AlarmThresholds"` - Bid string `position:"Query" name:"Bid"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + AlarmType string `position:"Query" name:"AlarmType"` + AlarmThresholds string `position:"Query" name:"AlarmThresholds"` + Bid string `position:"Query" name:"Bid"` } + // QueryUserAlarmThresholdResponse is the response struct for api QueryUserAlarmThreshold type QueryUserAlarmThresholdResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Count int `json:"Count" xml:"Count"` - Datas DatasInQueryUserAlarmThreshold `json:"Datas" xml:"Datas"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Count int `json:"Count" xml:"Count"` + Datas DatasInQueryUserAlarmThreshold `json:"Datas" xml:"Datas"` } // CreateQueryUserAlarmThresholdRequest creates a request to invoke QueryUserAlarmThreshold API func CreateQueryUserAlarmThresholdRequest() (request *QueryUserAlarmThresholdRequest) { - request = &QueryUserAlarmThresholdRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryUserAlarmThreshold", "", "") - return +request = &QueryUserAlarmThresholdRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryUserAlarmThreshold", "", "") +return } // CreateQueryUserAlarmThresholdResponse creates a response to parse from QueryUserAlarmThreshold response func CreateQueryUserAlarmThresholdResponse() (response *QueryUserAlarmThresholdResponse) { - response = &QueryUserAlarmThresholdResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryUserAlarmThresholdResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/query_user_oms_data.go b/services/bssopenapi/query_user_oms_data.go index a0862111d4..b1b005457f 100644 --- a/services/bssopenapi/query_user_oms_data.go +++ b/services/bssopenapi/query_user_oms_data.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,98 +17,101 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // QueryUserOmsData invokes the bssopenapi.QueryUserOmsData API synchronously // api document: https://help.aliyun.com/api/bssopenapi/queryuseromsdata.html func (client *Client) QueryUserOmsData(request *QueryUserOmsDataRequest) (response *QueryUserOmsDataResponse, err error) { - response = CreateQueryUserOmsDataResponse() - err = client.DoAction(request, response) - return +response = CreateQueryUserOmsDataResponse() +err = client.DoAction(request, response) +return } // QueryUserOmsDataWithChan invokes the bssopenapi.QueryUserOmsData API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryuseromsdata.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QueryUserOmsDataWithChan(request *QueryUserOmsDataRequest) (<-chan *QueryUserOmsDataResponse, <-chan error) { - responseChan := make(chan *QueryUserOmsDataResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryUserOmsData(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *QueryUserOmsDataResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.QueryUserOmsData(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // QueryUserOmsDataWithCallback invokes the bssopenapi.QueryUserOmsData API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/queryuseromsdata.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryUserOmsDataWithCallback(request *QueryUserOmsDataRequest, callback func(response *QueryUserOmsDataResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryUserOmsDataResponse - var err error - defer close(result) - response, err = client.QueryUserOmsData(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) QueryUserOmsDataWithCallback(request *QueryUserOmsDataRequest, callback func(response *QueryUserOmsDataResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *QueryUserOmsDataResponse +var err error +defer close(result) +response, err = client.QueryUserOmsData(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // QueryUserOmsDataRequest is the request struct for api QueryUserOmsData type QueryUserOmsDataRequest struct { - *requests.RpcRequest - DataType string `position:"Query" name:"DataType"` - Marker string `position:"Query" name:"Marker"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - EndTime string `position:"Query" name:"EndTime"` - StartTime string `position:"Query" name:"StartTime"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Table string `position:"Query" name:"Table"` +*requests.RpcRequest + EndTime string `position:"Query" name:"EndTime"` + StartTime string `position:"Query" name:"StartTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + DataType string `position:"Query" name:"DataType"` + Marker string `position:"Query" name:"Marker"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + Table string `position:"Query" name:"Table"` } + // QueryUserOmsDataResponse is the response struct for api QueryUserOmsData type QueryUserOmsDataResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data DataInQueryUserOmsData `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data DataInQueryUserOmsData `json:"Data" xml:"Data"` } // CreateQueryUserOmsDataRequest creates a request to invoke QueryUserOmsData API func CreateQueryUserOmsDataRequest() (request *QueryUserOmsDataRequest) { - request = &QueryUserOmsDataRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryUserOmsData", "", "") - return +request = &QueryUserOmsDataRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "QueryUserOmsData", "", "") +return } // CreateQueryUserOmsDataResponse creates a response to parse from QueryUserOmsData response func CreateQueryUserOmsDataResponse() (response *QueryUserOmsDataResponse) { - response = &QueryUserOmsDataResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &QueryUserOmsDataResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/renew_instance.go b/services/bssopenapi/renew_instance.go index 88f31d8cd1..410a85b595 100644 --- a/services/bssopenapi/renew_instance.go +++ b/services/bssopenapi/renew_instance.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,97 +17,100 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // RenewInstance invokes the bssopenapi.RenewInstance API synchronously // api document: https://help.aliyun.com/api/bssopenapi/renewinstance.html func (client *Client) RenewInstance(request *RenewInstanceRequest) (response *RenewInstanceResponse, err error) { - response = CreateRenewInstanceResponse() - err = client.DoAction(request, response) - return +response = CreateRenewInstanceResponse() +err = client.DoAction(request, response) +return } // RenewInstanceWithChan invokes the bssopenapi.RenewInstance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/renewinstance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RenewInstanceWithChan(request *RenewInstanceRequest) (<-chan *RenewInstanceResponse, <-chan error) { - responseChan := make(chan *RenewInstanceResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.RenewInstance(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *RenewInstanceResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.RenewInstance(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // RenewInstanceWithCallback invokes the bssopenapi.RenewInstance API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/renewinstance.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) RenewInstanceWithCallback(request *RenewInstanceRequest, callback func(response *RenewInstanceResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *RenewInstanceResponse - var err error - defer close(result) - response, err = client.RenewInstance(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) RenewInstanceWithCallback(request *RenewInstanceRequest, callback func(response *RenewInstanceResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *RenewInstanceResponse +var err error +defer close(result) +response, err = client.RenewInstance(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // RenewInstanceRequest is the request struct for api RenewInstance type RenewInstanceRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - InstanceId string `position:"Query" name:"InstanceId"` - ClientToken string `position:"Query" name:"ClientToken"` - RenewPeriod requests.Integer `position:"Query" name:"RenewPeriod"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + ClientToken string `position:"Query" name:"ClientToken"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + InstanceId string `position:"Query" name:"InstanceId"` + RenewPeriod requests.Integer `position:"Query" name:"RenewPeriod"` } + // RenewInstanceResponse is the response struct for api RenewInstance type RenewInstanceResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` } // CreateRenewInstanceRequest creates a request to invoke RenewInstance API func CreateRenewInstanceRequest() (request *RenewInstanceRequest) { - request = &RenewInstanceRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "RenewInstance", "", "") - return +request = &RenewInstanceRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "RenewInstance", "", "") +return } // CreateRenewInstanceResponse creates a response to parse from RenewInstance response func CreateRenewInstanceResponse() (response *RenewInstanceResponse) { - response = &RenewInstanceResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &RenewInstanceResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/set_enduser_status.go b/services/bssopenapi/set_enduser_status.go index 37e74257be..f5dd72e0b7 100644 --- a/services/bssopenapi/set_enduser_status.go +++ b/services/bssopenapi/set_enduser_status.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,95 +17,98 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // SetEnduserStatus invokes the bssopenapi.SetEnduserStatus API synchronously // api document: https://help.aliyun.com/api/bssopenapi/setenduserstatus.html func (client *Client) SetEnduserStatus(request *SetEnduserStatusRequest) (response *SetEnduserStatusResponse, err error) { - response = CreateSetEnduserStatusResponse() - err = client.DoAction(request, response) - return +response = CreateSetEnduserStatusResponse() +err = client.DoAction(request, response) +return } // SetEnduserStatusWithChan invokes the bssopenapi.SetEnduserStatus API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setenduserstatus.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SetEnduserStatusWithChan(request *SetEnduserStatusRequest) (<-chan *SetEnduserStatusResponse, <-chan error) { - responseChan := make(chan *SetEnduserStatusResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SetEnduserStatus(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *SetEnduserStatusResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SetEnduserStatus(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // SetEnduserStatusWithCallback invokes the bssopenapi.SetEnduserStatus API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setenduserstatus.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) SetEnduserStatusWithCallback(request *SetEnduserStatusRequest, callback func(response *SetEnduserStatusResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SetEnduserStatusResponse - var err error - defer close(result) - response, err = client.SetEnduserStatus(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) SetEnduserStatusWithCallback(request *SetEnduserStatusRequest, callback func(response *SetEnduserStatusResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SetEnduserStatusResponse +var err error +defer close(result) +response, err = client.SetEnduserStatus(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // SetEnduserStatusRequest is the request struct for api SetEnduserStatus type SetEnduserStatusRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - PrimaryAccount string `position:"Query" name:"PrimaryAccount"` - Status string `position:"Query" name:"Status"` - BusinessType string `position:"Query" name:"BusinessType"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + PrimaryAccount string `position:"Query" name:"PrimaryAccount"` + Status string `position:"Query" name:"Status"` + BusinessType string `position:"Query" name:"BusinessType"` } + // SetEnduserStatusResponse is the response struct for api SetEnduserStatus type SetEnduserStatusResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Data bool `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` } // CreateSetEnduserStatusRequest creates a request to invoke SetEnduserStatus API func CreateSetEnduserStatusRequest() (request *SetEnduserStatusRequest) { - request = &SetEnduserStatusRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetEnduserStatus", "", "") - return +request = &SetEnduserStatusRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetEnduserStatus", "", "") +return } // CreateSetEnduserStatusResponse creates a response to parse from SetEnduserStatus response func CreateSetEnduserStatusResponse() (response *SetEnduserStatusResponse) { - response = &SetEnduserStatusResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &SetEnduserStatusResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/set_renewal.go b/services/bssopenapi/set_renewal.go index 58dfde7f68..5123d73efe 100644 --- a/services/bssopenapi/set_renewal.go +++ b/services/bssopenapi/set_renewal.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,98 +17,101 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // SetRenewal invokes the bssopenapi.SetRenewal API synchronously // api document: https://help.aliyun.com/api/bssopenapi/setrenewal.html func (client *Client) SetRenewal(request *SetRenewalRequest) (response *SetRenewalResponse, err error) { - response = CreateSetRenewalResponse() - err = client.DoAction(request, response) - return +response = CreateSetRenewalResponse() +err = client.DoAction(request, response) +return } // SetRenewalWithChan invokes the bssopenapi.SetRenewal API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setrenewal.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SetRenewalWithChan(request *SetRenewalRequest) (<-chan *SetRenewalResponse, <-chan error) { - responseChan := make(chan *SetRenewalResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SetRenewal(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *SetRenewalResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SetRenewal(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // SetRenewalWithCallback invokes the bssopenapi.SetRenewal API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setrenewal.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) SetRenewalWithCallback(request *SetRenewalRequest, callback func(response *SetRenewalResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SetRenewalResponse - var err error - defer close(result) - response, err = client.SetRenewal(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) SetRenewalWithCallback(request *SetRenewalRequest, callback func(response *SetRenewalResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SetRenewalResponse +var err error +defer close(result) +response, err = client.SetRenewal(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // SetRenewalRequest is the request struct for api SetRenewal type SetRenewalRequest struct { - *requests.RpcRequest - ProductCode string `position:"Query" name:"ProductCode"` - InstanceIDs string `position:"Query" name:"InstanceIDs"` - SubscriptionType string `position:"Query" name:"SubscriptionType"` - RenewalStatus string `position:"Query" name:"RenewalStatus"` - RenewalPeriodUnit string `position:"Query" name:"RenewalPeriodUnit"` - RenewalPeriod requests.Integer `position:"Query" name:"RenewalPeriod"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ProductType string `position:"Query" name:"ProductType"` +*requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + SubscriptionType string `position:"Query" name:"SubscriptionType"` + RenewalPeriod requests.Integer `position:"Query" name:"RenewalPeriod"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ProductType string `position:"Query" name:"ProductType"` + InstanceIDs string `position:"Query" name:"InstanceIDs"` + RenewalStatus string `position:"Query" name:"RenewalStatus"` + RenewalPeriodUnit string `position:"Query" name:"RenewalPeriodUnit"` } + // SetRenewalResponse is the response struct for api SetRenewal type SetRenewalResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` } // CreateSetRenewalRequest creates a request to invoke SetRenewal API func CreateSetRenewalRequest() (request *SetRenewalRequest) { - request = &SetRenewalRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetRenewal", "", "") - return +request = &SetRenewalRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetRenewal", "", "") +return } // CreateSetRenewalResponse creates a response to parse from SetRenewal response func CreateSetRenewalResponse() (response *SetRenewalResponse) { - response = &SetRenewalResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &SetRenewalResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/set_reseller_user_alarm_threshold.go b/services/bssopenapi/set_reseller_user_alarm_threshold.go new file mode 100644 index 0000000000..1d97b70fe9 --- /dev/null +++ b/services/bssopenapi/set_reseller_user_alarm_threshold.go @@ -0,0 +1,113 @@ + +package bssopenapi + +//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" +) + +// SetResellerUserAlarmThreshold invokes the bssopenapi.SetResellerUserAlarmThreshold API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruseralarmthreshold.html +func (client *Client) SetResellerUserAlarmThreshold(request *SetResellerUserAlarmThresholdRequest) (response *SetResellerUserAlarmThresholdResponse, err error) { +response = CreateSetResellerUserAlarmThresholdResponse() +err = client.DoAction(request, response) +return +} + +// SetResellerUserAlarmThresholdWithChan invokes the bssopenapi.SetResellerUserAlarmThreshold API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruseralarmthreshold.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SetResellerUserAlarmThresholdWithChan(request *SetResellerUserAlarmThresholdRequest) (<-chan *SetResellerUserAlarmThresholdResponse, <-chan error) { +responseChan := make(chan *SetResellerUserAlarmThresholdResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SetResellerUserAlarmThreshold(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// SetResellerUserAlarmThresholdWithCallback invokes the bssopenapi.SetResellerUserAlarmThreshold API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruseralarmthreshold.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SetResellerUserAlarmThresholdWithCallback(request *SetResellerUserAlarmThresholdRequest, callback func(response *SetResellerUserAlarmThresholdResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SetResellerUserAlarmThresholdResponse +var err error +defer close(result) +response, err = client.SetResellerUserAlarmThreshold(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// SetResellerUserAlarmThresholdRequest is the request struct for api SetResellerUserAlarmThreshold +type SetResellerUserAlarmThresholdRequest struct { +*requests.RpcRequest + AlarmType string `position:"Query" name:"AlarmType"` + AlarmThresholds string `position:"Query" name:"AlarmThresholds"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + + +// SetResellerUserAlarmThresholdResponse is the response struct for api SetResellerUserAlarmThreshold +type SetResellerUserAlarmThresholdResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` +} + +// CreateSetResellerUserAlarmThresholdRequest creates a request to invoke SetResellerUserAlarmThreshold API +func CreateSetResellerUserAlarmThresholdRequest() (request *SetResellerUserAlarmThresholdRequest) { +request = &SetResellerUserAlarmThresholdRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetResellerUserAlarmThreshold", "", "") +return +} + +// CreateSetResellerUserAlarmThresholdResponse creates a response to parse from SetResellerUserAlarmThreshold response +func CreateSetResellerUserAlarmThresholdResponse() (response *SetResellerUserAlarmThresholdResponse) { +response = &SetResellerUserAlarmThresholdResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/set_reseller_user_quota.go b/services/bssopenapi/set_reseller_user_quota.go new file mode 100644 index 0000000000..06c2763fe1 --- /dev/null +++ b/services/bssopenapi/set_reseller_user_quota.go @@ -0,0 +1,114 @@ + +package bssopenapi + +//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" +) + +// SetResellerUserQuota invokes the bssopenapi.SetResellerUserQuota API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruserquota.html +func (client *Client) SetResellerUserQuota(request *SetResellerUserQuotaRequest) (response *SetResellerUserQuotaResponse, err error) { +response = CreateSetResellerUserQuotaResponse() +err = client.DoAction(request, response) +return +} + +// SetResellerUserQuotaWithChan invokes the bssopenapi.SetResellerUserQuota API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruserquota.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SetResellerUserQuotaWithChan(request *SetResellerUserQuotaRequest) (<-chan *SetResellerUserQuotaResponse, <-chan error) { +responseChan := make(chan *SetResellerUserQuotaResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SetResellerUserQuota(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// SetResellerUserQuotaWithCallback invokes the bssopenapi.SetResellerUserQuota API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruserquota.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SetResellerUserQuotaWithCallback(request *SetResellerUserQuotaRequest, callback func(response *SetResellerUserQuotaResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SetResellerUserQuotaResponse +var err error +defer close(result) +response, err = client.SetResellerUserQuota(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// SetResellerUserQuotaRequest is the request struct for api SetResellerUserQuota +type SetResellerUserQuotaRequest struct { +*requests.RpcRequest + Amount string `position:"Query" name:"Amount"` + OutBizId string `position:"Query" name:"OutBizId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Currency string `position:"Query" name:"Currency"` +} + + +// SetResellerUserQuotaResponse is the response struct for api SetResellerUserQuota +type SetResellerUserQuotaResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` +} + +// CreateSetResellerUserQuotaRequest creates a request to invoke SetResellerUserQuota API +func CreateSetResellerUserQuotaRequest() (request *SetResellerUserQuotaRequest) { +request = &SetResellerUserQuotaRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetResellerUserQuota", "", "") +return +} + +// CreateSetResellerUserQuotaResponse creates a response to parse from SetResellerUserQuota response +func CreateSetResellerUserQuotaResponse() (response *SetResellerUserQuotaResponse) { +response = &SetResellerUserQuotaResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/set_reseller_user_status.go b/services/bssopenapi/set_reseller_user_status.go new file mode 100644 index 0000000000..6b8c3ce713 --- /dev/null +++ b/services/bssopenapi/set_reseller_user_status.go @@ -0,0 +1,113 @@ + +package bssopenapi + +//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" +) + +// SetResellerUserStatus invokes the bssopenapi.SetResellerUserStatus API synchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruserstatus.html +func (client *Client) SetResellerUserStatus(request *SetResellerUserStatusRequest) (response *SetResellerUserStatusResponse, err error) { +response = CreateSetResellerUserStatusResponse() +err = client.DoAction(request, response) +return +} + +// SetResellerUserStatusWithChan invokes the bssopenapi.SetResellerUserStatus API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruserstatus.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SetResellerUserStatusWithChan(request *SetResellerUserStatusRequest) (<-chan *SetResellerUserStatusResponse, <-chan error) { +responseChan := make(chan *SetResellerUserStatusResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SetResellerUserStatus(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan +} + +// SetResellerUserStatusWithCallback invokes the bssopenapi.SetResellerUserStatus API asynchronously +// api document: https://help.aliyun.com/api/bssopenapi/setreselleruserstatus.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SetResellerUserStatusWithCallback(request *SetResellerUserStatusRequest, callback func(response *SetResellerUserStatusResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SetResellerUserStatusResponse +var err error +defer close(result) +response, err = client.SetResellerUserStatus(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result +} + +// SetResellerUserStatusRequest is the request struct for api SetResellerUserStatus +type SetResellerUserStatusRequest struct { +*requests.RpcRequest + OwnerId string `position:"Query" name:"OwnerId"` + BusinessType string `position:"Query" name:"BusinessType"` + Status string `position:"Query" name:"Status"` +} + + +// SetResellerUserStatusResponse is the response struct for api SetResellerUserStatus +type SetResellerUserStatusResponse struct { +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` +} + +// CreateSetResellerUserStatusRequest creates a request to invoke SetResellerUserStatus API +func CreateSetResellerUserStatusRequest() (request *SetResellerUserStatusRequest) { +request = &SetResellerUserStatusRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetResellerUserStatus", "", "") +return +} + +// CreateSetResellerUserStatusResponse creates a response to parse from SetResellerUserStatus response +func CreateSetResellerUserStatusResponse() (response *SetResellerUserStatusResponse) { +response = &SetResellerUserStatusResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return +} + + diff --git a/services/bssopenapi/set_user_alarm_threshold.go b/services/bssopenapi/set_user_alarm_threshold.go index 76f5513e7e..7689af45dc 100644 --- a/services/bssopenapi/set_user_alarm_threshold.go +++ b/services/bssopenapi/set_user_alarm_threshold.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,95 +17,98 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // SetUserAlarmThreshold invokes the bssopenapi.SetUserAlarmThreshold API synchronously // api document: https://help.aliyun.com/api/bssopenapi/setuseralarmthreshold.html func (client *Client) SetUserAlarmThreshold(request *SetUserAlarmThresholdRequest) (response *SetUserAlarmThresholdResponse, err error) { - response = CreateSetUserAlarmThresholdResponse() - err = client.DoAction(request, response) - return +response = CreateSetUserAlarmThresholdResponse() +err = client.DoAction(request, response) +return } // SetUserAlarmThresholdWithChan invokes the bssopenapi.SetUserAlarmThreshold API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setuseralarmthreshold.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SetUserAlarmThresholdWithChan(request *SetUserAlarmThresholdRequest) (<-chan *SetUserAlarmThresholdResponse, <-chan error) { - responseChan := make(chan *SetUserAlarmThresholdResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SetUserAlarmThreshold(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *SetUserAlarmThresholdResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SetUserAlarmThreshold(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // SetUserAlarmThresholdWithCallback invokes the bssopenapi.SetUserAlarmThreshold API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setuseralarmthreshold.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) SetUserAlarmThresholdWithCallback(request *SetUserAlarmThresholdRequest, callback func(response *SetUserAlarmThresholdResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SetUserAlarmThresholdResponse - var err error - defer close(result) - response, err = client.SetUserAlarmThreshold(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) SetUserAlarmThresholdWithCallback(request *SetUserAlarmThresholdRequest, callback func(response *SetUserAlarmThresholdResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SetUserAlarmThresholdResponse +var err error +defer close(result) +response, err = client.SetUserAlarmThreshold(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // SetUserAlarmThresholdRequest is the request struct for api SetUserAlarmThreshold type SetUserAlarmThresholdRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - AlarmType string `position:"Query" name:"AlarmType"` - AlarmThresholds string `position:"Query" name:"AlarmThresholds"` - Bid string `position:"Query" name:"Bid"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + AlarmType string `position:"Query" name:"AlarmType"` + AlarmThresholds string `position:"Query" name:"AlarmThresholds"` + Bid string `position:"Query" name:"Bid"` } + // SetUserAlarmThresholdResponse is the response struct for api SetUserAlarmThreshold type SetUserAlarmThresholdResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Data bool `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` } // CreateSetUserAlarmThresholdRequest creates a request to invoke SetUserAlarmThreshold API func CreateSetUserAlarmThresholdRequest() (request *SetUserAlarmThresholdRequest) { - request = &SetUserAlarmThresholdRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetUserAlarmThreshold", "", "") - return +request = &SetUserAlarmThresholdRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetUserAlarmThreshold", "", "") +return } // CreateSetUserAlarmThresholdResponse creates a response to parse from SetUserAlarmThreshold response func CreateSetUserAlarmThresholdResponse() (response *SetUserAlarmThresholdResponse) { - response = &SetUserAlarmThresholdResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &SetUserAlarmThresholdResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/set_user_quota.go b/services/bssopenapi/set_user_quota.go index fe95512383..93d81855e2 100644 --- a/services/bssopenapi/set_user_quota.go +++ b/services/bssopenapi/set_user_quota.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,96 +17,99 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // SetUserQuota invokes the bssopenapi.SetUserQuota API synchronously // api document: https://help.aliyun.com/api/bssopenapi/setuserquota.html func (client *Client) SetUserQuota(request *SetUserQuotaRequest) (response *SetUserQuotaResponse, err error) { - response = CreateSetUserQuotaResponse() - err = client.DoAction(request, response) - return +response = CreateSetUserQuotaResponse() +err = client.DoAction(request, response) +return } // SetUserQuotaWithChan invokes the bssopenapi.SetUserQuota API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setuserquota.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SetUserQuotaWithChan(request *SetUserQuotaRequest) (<-chan *SetUserQuotaResponse, <-chan error) { - responseChan := make(chan *SetUserQuotaResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SetUserQuota(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *SetUserQuotaResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SetUserQuota(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // SetUserQuotaWithCallback invokes the bssopenapi.SetUserQuota API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/setuserquota.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) SetUserQuotaWithCallback(request *SetUserQuotaRequest, callback func(response *SetUserQuotaResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SetUserQuotaResponse - var err error - defer close(result) - response, err = client.SetUserQuota(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) SetUserQuotaWithCallback(request *SetUserQuotaRequest, callback func(response *SetUserQuotaResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SetUserQuotaResponse +var err error +defer close(result) +response, err = client.SetUserQuota(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // SetUserQuotaRequest is the request struct for api SetUserQuota type SetUserQuotaRequest struct { - *requests.RpcRequest - Uid requests.Integer `position:"Query" name:"Uid"` - Amount string `position:"Query" name:"Amount"` - OutBizId string `position:"Query" name:"OutBizId"` - Currency string `position:"Query" name:"Currency"` - Bid string `position:"Query" name:"Bid"` +*requests.RpcRequest + Uid requests.Integer `position:"Query" name:"Uid"` + Amount string `position:"Query" name:"Amount"` + OutBizId string `position:"Query" name:"OutBizId"` + Currency string `position:"Query" name:"Currency"` + Bid string `position:"Query" name:"Bid"` } + // SetUserQuotaResponse is the response struct for api SetUserQuota type SetUserQuotaResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - Data bool `json:"Data" xml:"Data"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Data bool `json:"Data" xml:"Data"` } // CreateSetUserQuotaRequest creates a request to invoke SetUserQuota API func CreateSetUserQuotaRequest() (request *SetUserQuotaRequest) { - request = &SetUserQuotaRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetUserQuota", "", "") - return +request = &SetUserQuotaRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SetUserQuota", "", "") +return } // CreateSetUserQuotaResponse creates a response to parse from SetUserQuota response func CreateSetUserQuotaResponse() (response *SetUserQuotaResponse) { - response = &SetUserQuotaResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &SetUserQuotaResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/struct_account_transactions_list.go b/services/bssopenapi/struct_account_transactions_list.go new file mode 100644 index 0000000000..0cd645402c --- /dev/null +++ b/services/bssopenapi/struct_account_transactions_list.go @@ -0,0 +1,22 @@ + +package bssopenapi + +//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. + +// AccountTransactionsList is a nested struct in bssopenapi response +type AccountTransactionsList struct { +AccountTransactionsListItem []AccountTransactionsListItem `json:"AccountTransactionsListItem" xml:"AccountTransactionsListItem"` +} diff --git a/services/bssopenapi/struct_account_transactions_list_item.go b/services/bssopenapi/struct_account_transactions_list_item.go new file mode 100644 index 0000000000..59eee1cfd1 --- /dev/null +++ b/services/bssopenapi/struct_account_transactions_list_item.go @@ -0,0 +1,34 @@ + +package bssopenapi + +//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. + +// AccountTransactionsListItem is a nested struct in bssopenapi response +type AccountTransactionsListItem struct { + TransactionNumber string `json:"TransactionNumber" xml:"TransactionNumber"` + TransactionTime string `json:"TransactionTime" xml:"TransactionTime"` + TransactionFlow string `json:"TransactionFlow" xml:"TransactionFlow"` + TransactionType string `json:"TransactionType" xml:"TransactionType"` + TransactionChannel string `json:"TransactionChannel" xml:"TransactionChannel"` + TransactionChannelSN string `json:"TransactionChannelSN" xml:"TransactionChannelSN"` + FundType string `json:"FundType" xml:"FundType"` + RecordID string `json:"RecordID" xml:"RecordID"` + Remarks string `json:"Remarks" xml:"Remarks"` + BillingCycle string `json:"BillingCycle" xml:"BillingCycle"` + Amount string `json:"Amount" xml:"Amount"` + Balance string `json:"Balance" xml:"Balance"` + TransactionAccount string `json:"TransactionAccount" xml:"TransactionAccount"` +} diff --git a/services/bssopenapi/struct_applicable_products.go b/services/bssopenapi/struct_applicable_products.go index d18fd3a65b..f9a6c3f2a0 100644 --- a/services/bssopenapi/struct_applicable_products.go +++ b/services/bssopenapi/struct_applicable_products.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ApplicableProducts is a nested struct in bssopenapi response type ApplicableProducts struct { - Product []string `json:"Product" xml:"Product"` +Product [] string `json:"Product" xml:"Product"` } diff --git a/services/bssopenapi/struct_attribute.go b/services/bssopenapi/struct_attribute.go index 9ee884541d..d6a320d0f0 100644 --- a/services/bssopenapi/struct_attribute.go +++ b/services/bssopenapi/struct_attribute.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,8 +18,8 @@ package bssopenapi // Attribute is a nested struct in bssopenapi response type Attribute struct { - Code string `json:"Code" xml:"Code"` - Name string `json:"Name" xml:"Name"` - Unit string `json:"Unit" xml:"Unit"` - Values Values `json:"Values" xml:"Values"` + Code string `json:"Code" xml:"Code"` + Name string `json:"Name" xml:"Name"` + Unit string `json:"Unit" xml:"Unit"` + Values Values `json:"Values" xml:"Values"` } diff --git a/services/bssopenapi/struct_attribute_list.go b/services/bssopenapi/struct_attribute_list.go index 37f87c4afa..2b6e793fe6 100644 --- a/services/bssopenapi/struct_attribute_list.go +++ b/services/bssopenapi/struct_attribute_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // AttributeList is a nested struct in bssopenapi response type AttributeList struct { - Attribute []Attribute `json:"Attribute" xml:"Attribute"` +Attribute []Attribute `json:"Attribute" xml:"Attribute"` } diff --git a/services/bssopenapi/struct_attribute_value.go b/services/bssopenapi/struct_attribute_value.go index cc3a7c35bd..ff6d3afa53 100644 --- a/services/bssopenapi/struct_attribute_value.go +++ b/services/bssopenapi/struct_attribute_value.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,8 +18,8 @@ package bssopenapi // AttributeValue is a nested struct in bssopenapi response type AttributeValue struct { - Type string `json:"Type" xml:"Type"` - Name string `json:"Name" xml:"Name"` - Value string `json:"Value" xml:"Value"` - Remark string `json:"Remark" xml:"Remark"` + Type string `json:"Type" xml:"Type"` + Name string `json:"Name" xml:"Name"` + Value string `json:"Value" xml:"Value"` + Remark string `json:"Remark" xml:"Remark"` } diff --git a/services/bssopenapi/struct_available_duration.go b/services/bssopenapi/struct_available_duration.go index f00372aaca..9dcdbeeb23 100644 --- a/services/bssopenapi/struct_available_duration.go +++ b/services/bssopenapi/struct_available_duration.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,7 +18,7 @@ package bssopenapi // AvailableDuration is a nested struct in bssopenapi response type AvailableDuration struct { - Name string `json:"Name" xml:"Name"` - Value int `json:"Value" xml:"Value"` - Unit string `json:"Unit" xml:"Unit"` + Name string `json:"Name" xml:"Name"` + Value int `json:"Value" xml:"Value"` + Unit string `json:"Unit" xml:"Unit"` } diff --git a/services/bssopenapi/struct_available_durations.go b/services/bssopenapi/struct_available_durations.go index 394e05b3ff..806eaca101 100644 --- a/services/bssopenapi/struct_available_durations.go +++ b/services/bssopenapi/struct_available_durations.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // AvailableDurations is a nested struct in bssopenapi response type AvailableDurations struct { - AvailableDuration []AvailableDuration `json:"AvailableDuration" xml:"AvailableDuration"` +AvailableDuration []AvailableDuration `json:"AvailableDuration" xml:"AvailableDuration"` } diff --git a/services/bssopenapi/struct_cash_coupon.go b/services/bssopenapi/struct_cash_coupon.go index 4cc90e1d9b..c79c95d89d 100644 --- a/services/bssopenapi/struct_cash_coupon.go +++ b/services/bssopenapi/struct_cash_coupon.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,14 +18,14 @@ package bssopenapi // CashCoupon is a nested struct in bssopenapi response type CashCoupon struct { - CashCouponId int `json:"CashCouponId" xml:"CashCouponId"` - CashCouponNo string `json:"CashCouponNo" xml:"CashCouponNo"` - GrantedTime string `json:"GrantedTime" xml:"GrantedTime"` - EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` - ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` - ApplicableProducts string `json:"ApplicableProducts" xml:"ApplicableProducts"` - ApplicableScenarios string `json:"ApplicableScenarios" xml:"ApplicableScenarios"` - NominalValue string `json:"NominalValue" xml:"NominalValue"` - Balance string `json:"Balance" xml:"Balance"` - Status string `json:"Status" xml:"Status"` + CashCouponId int `json:"CashCouponId" xml:"CashCouponId"` + CashCouponNo string `json:"CashCouponNo" xml:"CashCouponNo"` + GrantedTime string `json:"GrantedTime" xml:"GrantedTime"` + EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` + ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` + ApplicableProducts string `json:"ApplicableProducts" xml:"ApplicableProducts"` + ApplicableScenarios string `json:"ApplicableScenarios" xml:"ApplicableScenarios"` + NominalValue string `json:"NominalValue" xml:"NominalValue"` + Balance string `json:"Balance" xml:"Balance"` + Status string `json:"Status" xml:"Status"` } diff --git a/services/bssopenapi/struct_config_list.go b/services/bssopenapi/struct_config_list.go index 17f69bf7fe..06133523a0 100644 --- a/services/bssopenapi/struct_config_list.go +++ b/services/bssopenapi/struct_config_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ConfigList is a nested struct in bssopenapi response type ConfigList struct { - ConfigList []string `json:"ConfigList" xml:"ConfigList"` +ConfigList [] string `json:"ConfigList" xml:"ConfigList"` } diff --git a/services/bssopenapi/struct_customer_invoice.go b/services/bssopenapi/struct_customer_invoice.go index f121436edd..9f5817fb88 100644 --- a/services/bssopenapi/struct_customer_invoice.go +++ b/services/bssopenapi/struct_customer_invoice.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,25 +18,25 @@ package bssopenapi // CustomerInvoice is a nested struct in bssopenapi response type CustomerInvoice struct { - Id int `json:"Id" xml:"Id"` - UserId int `json:"UserId" xml:"UserId"` - UserNick string `json:"UserNick" xml:"UserNick"` - InvoiceTitle string `json:"InvoiceTitle" xml:"InvoiceTitle"` - CustomerType int `json:"CustomerType" xml:"CustomerType"` - TaxpayerType int `json:"TaxpayerType" xml:"TaxpayerType"` - Bank string `json:"Bank" xml:"Bank"` - BankNo string `json:"BankNo" xml:"BankNo"` - OperatingLicenseAddress string `json:"OperatingLicenseAddress" xml:"OperatingLicenseAddress"` - OperatingLicensePhone string `json:"OperatingLicensePhone" xml:"OperatingLicensePhone"` - RegisterNo string `json:"RegisterNo" xml:"RegisterNo"` - StartCycle int `json:"StartCycle" xml:"StartCycle"` - Status int `json:"Status" xml:"Status"` - GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` - TaxationLicense string `json:"TaxationLicense" xml:"TaxationLicense"` - AdjustType int `json:"AdjustType" xml:"AdjustType"` - EndCycle int `json:"EndCycle" xml:"EndCycle"` - TitleChangeInstructions string `json:"TitleChangeInstructions" xml:"TitleChangeInstructions"` - IssueType int `json:"IssueType" xml:"IssueType"` - Type int `json:"Type" xml:"Type"` - DefaultRemark string `json:"DefaultRemark" xml:"DefaultRemark"` + Id int `json:"Id" xml:"Id"` + UserId int `json:"UserId" xml:"UserId"` + UserNick string `json:"UserNick" xml:"UserNick"` + InvoiceTitle string `json:"InvoiceTitle" xml:"InvoiceTitle"` + CustomerType int `json:"CustomerType" xml:"CustomerType"` + TaxpayerType int `json:"TaxpayerType" xml:"TaxpayerType"` + Bank string `json:"Bank" xml:"Bank"` + BankNo string `json:"BankNo" xml:"BankNo"` + OperatingLicenseAddress string `json:"OperatingLicenseAddress" xml:"OperatingLicenseAddress"` + OperatingLicensePhone string `json:"OperatingLicensePhone" xml:"OperatingLicensePhone"` + RegisterNo string `json:"RegisterNo" xml:"RegisterNo"` + StartCycle int `json:"StartCycle" xml:"StartCycle"` + Status int `json:"Status" xml:"Status"` + GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` + TaxationLicense string `json:"TaxationLicense" xml:"TaxationLicense"` + AdjustType int `json:"AdjustType" xml:"AdjustType"` + EndCycle int `json:"EndCycle" xml:"EndCycle"` + TitleChangeInstructions string `json:"TitleChangeInstructions" xml:"TitleChangeInstructions"` + IssueType int `json:"IssueType" xml:"IssueType"` + Type int `json:"Type" xml:"Type"` + DefaultRemark string `json:"DefaultRemark" xml:"DefaultRemark"` } diff --git a/services/bssopenapi/struct_customer_invoice_address.go b/services/bssopenapi/struct_customer_invoice_address.go index 4950441796..4a74eace45 100644 --- a/services/bssopenapi/struct_customer_invoice_address.go +++ b/services/bssopenapi/struct_customer_invoice_address.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,16 +18,16 @@ package bssopenapi // CustomerInvoiceAddress is a nested struct in bssopenapi response type CustomerInvoiceAddress struct { - Id int `json:"Id" xml:"Id"` - UserId int `json:"UserId" xml:"UserId"` - UserNick string `json:"UserNick" xml:"UserNick"` - Addressee string `json:"Addressee" xml:"Addressee"` - Province string `json:"Province" xml:"Province"` - City string `json:"City" xml:"City"` - County string `json:"County" xml:"County"` - Street string `json:"Street" xml:"Street"` - PostalCode string `json:"PostalCode" xml:"PostalCode"` - Phone string `json:"Phone" xml:"Phone"` - BizType string `json:"BizType" xml:"BizType"` - DeliveryAddress string `json:"DeliveryAddress" xml:"DeliveryAddress"` + Id int `json:"Id" xml:"Id"` + UserId int `json:"UserId" xml:"UserId"` + UserNick string `json:"UserNick" xml:"UserNick"` + Addressee string `json:"Addressee" xml:"Addressee"` + Province string `json:"Province" xml:"Province"` + City string `json:"City" xml:"City"` + County string `json:"County" xml:"County"` + Street string `json:"Street" xml:"Street"` + PostalCode string `json:"PostalCode" xml:"PostalCode"` + Phone string `json:"Phone" xml:"Phone"` + BizType string `json:"BizType" xml:"BizType"` + DeliveryAddress string `json:"DeliveryAddress" xml:"DeliveryAddress"` } diff --git a/services/bssopenapi/struct_customer_invoice_address_list.go b/services/bssopenapi/struct_customer_invoice_address_list.go index 2a9f9ff6f6..c79dd962f7 100644 --- a/services/bssopenapi/struct_customer_invoice_address_list.go +++ b/services/bssopenapi/struct_customer_invoice_address_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // CustomerInvoiceAddressList is a nested struct in bssopenapi response type CustomerInvoiceAddressList struct { - CustomerInvoiceAddress []CustomerInvoiceAddress `json:"CustomerInvoiceAddress" xml:"CustomerInvoiceAddress"` +CustomerInvoiceAddress []CustomerInvoiceAddress `json:"CustomerInvoiceAddress" xml:"CustomerInvoiceAddress"` } diff --git a/services/bssopenapi/struct_customer_invoice_list.go b/services/bssopenapi/struct_customer_invoice_list.go index acbadc42f5..cc43cef6d8 100644 --- a/services/bssopenapi/struct_customer_invoice_list.go +++ b/services/bssopenapi/struct_customer_invoice_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // CustomerInvoiceList is a nested struct in bssopenapi response type CustomerInvoiceList struct { - CustomerInvoice []CustomerInvoice `json:"CustomerInvoice" xml:"CustomerInvoice"` +CustomerInvoice []CustomerInvoice `json:"CustomerInvoice" xml:"CustomerInvoice"` } diff --git a/services/bssopenapi/struct_data.go b/services/bssopenapi/struct_data.go index 51bd4fd715..38f88efb9c 100644 --- a/services/bssopenapi/struct_data.go +++ b/services/bssopenapi/struct_data.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,60 +18,68 @@ package bssopenapi // Data is a nested struct in bssopenapi response type Data struct { - BusinessType string `json:"BusinessType" xml:"BusinessType"` - TradePrice float64 `json:"TradePrice" xml:"TradePrice"` - HostId string `json:"HostId" xml:"HostId"` - TotalUnAppliedInvoiceAmount int `json:"TotalUnAppliedInvoiceAmount" xml:"TotalUnAppliedInvoiceAmount"` - OriginalPrice float64 `json:"OriginalPrice" xml:"OriginalPrice"` - OrderId string `json:"OrderId" xml:"OrderId"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - BillingCycle string `json:"BillingCycle" xml:"BillingCycle"` - Uid int `json:"Uid" xml:"Uid"` - OutstandingAmount float64 `json:"OutstandingAmount" xml:"OutstandingAmount"` - InvalidTimeStamp int `json:"InvalidTimeStamp" xml:"InvalidTimeStamp"` - Quantity int `json:"Quantity" xml:"Quantity"` - AvailableCashAmount string `json:"AvailableCashAmount" xml:"AvailableCashAmount"` - EffectTimeStamp int `json:"EffectTimeStamp" xml:"EffectTimeStamp"` - PrimaryAccount string `json:"PrimaryAccount" xml:"PrimaryAccount"` - HostName string `json:"HostName" xml:"HostName"` - TotalOutstandingAmount float64 `json:"TotalOutstandingAmount" xml:"TotalOutstandingAmount"` - Status string `json:"Status" xml:"Status"` - UserId int `json:"UserId" xml:"UserId"` - NewInvoiceAmount float64 `json:"NewInvoiceAmount" xml:"NewInvoiceAmount"` - Marker string `json:"Marker" xml:"Marker"` - Numerator int `json:"Numerator" xml:"Numerator"` - AvailableAmount string `json:"AvailableAmount" xml:"AvailableAmount"` - PageSize int `json:"PageSize" xml:"PageSize"` - Amount string `json:"Amount" xml:"Amount"` - MybankCreditAmount string `json:"MybankCreditAmount" xml:"MybankCreditAmount"` - CreditAmount string `json:"CreditAmount" xml:"CreditAmount"` - ThresholdType int `json:"ThresholdType" xml:"ThresholdType"` - AccountID string `json:"AccountID" xml:"AccountID"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - ItemCode string `json:"ItemCode" xml:"ItemCode"` - ThresholdAmount string `json:"ThresholdAmount" xml:"ThresholdAmount"` - InvoiceApplyId int `json:"InvoiceApplyId" xml:"InvoiceApplyId"` - Boolean bool `json:"Boolean" xml:"Boolean"` - TotalInvoiceAmount int `json:"TotalInvoiceAmount" xml:"TotalInvoiceAmount"` - PageNum int `json:"PageNum" xml:"PageNum"` - Bid string `json:"Bid" xml:"Bid"` - Currency string `json:"Currency" xml:"Currency"` - DiscountPrice float64 `json:"DiscountPrice" xml:"DiscountPrice"` - AccountName string `json:"AccountName" xml:"AccountName"` - Denominator int `json:"Denominator" xml:"Denominator"` - OmsData OmsData `json:"OmsData" xml:"OmsData"` - ModuleList ModuleList `json:"ModuleList" xml:"ModuleList"` - InstanceList []Instance `json:"InstanceList" xml:"InstanceList"` - OrderList OrderListInQueryOrders `json:"OrderList" xml:"OrderList"` - Modules ModulesInQueryInstanceGaapCost `json:"Modules" xml:"Modules"` - Items ItemsInQueryInstanceBill `json:"Items" xml:"Items"` - ResourcePackages ResourcePackages `json:"ResourcePackages" xml:"ResourcePackages"` - ProductList ProductList `json:"ProductList" xml:"ProductList"` - ModuleDetails ModuleDetailsInGetSubscriptionPrice `json:"ModuleDetails" xml:"ModuleDetails"` - PromotionDetails PromotionDetailsInGetSubscriptionPrice `json:"PromotionDetails" xml:"PromotionDetails"` - EvaluateList EvaluateList `json:"EvaluateList" xml:"EvaluateList"` - Promotions Promotions `json:"Promotions" xml:"Promotions"` - CustomerInvoiceAddressList CustomerInvoiceAddressList `json:"CustomerInvoiceAddressList" xml:"CustomerInvoiceAddressList"` - CustomerInvoiceList CustomerInvoiceList `json:"CustomerInvoiceList" xml:"CustomerInvoiceList"` - AttributeList AttributeList `json:"AttributeList" xml:"AttributeList"` + BusinessType string `json:"BusinessType" xml:"BusinessType"` + TradePrice float64 `json:"TradePrice" xml:"TradePrice"` + HostId string `json:"HostId" xml:"HostId"` + TotalUnAppliedInvoiceAmount int `json:"TotalUnAppliedInvoiceAmount" xml:"TotalUnAppliedInvoiceAmount"` + OriginalPrice float64 `json:"OriginalPrice" xml:"OriginalPrice"` + OrderId string `json:"OrderId" xml:"OrderId"` + HostingStatus string `json:"HostingStatus" xml:"HostingStatus"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + CreditLimitStatus string `json:"CreditLimitStatus" xml:"CreditLimitStatus"` + BillingCycle string `json:"BillingCycle" xml:"BillingCycle"` + Uid int `json:"Uid" xml:"Uid"` + OutstandingAmount float64 `json:"OutstandingAmount" xml:"OutstandingAmount"` + InvalidTimeStamp int `json:"InvalidTimeStamp" xml:"InvalidTimeStamp"` + Quantity int `json:"Quantity" xml:"Quantity"` + AvailableCashAmount string `json:"AvailableCashAmount" xml:"AvailableCashAmount"` + EffectTimeStamp int `json:"EffectTimeStamp" xml:"EffectTimeStamp"` + PrimaryAccount string `json:"PrimaryAccount" xml:"PrimaryAccount"` + HostName string `json:"HostName" xml:"HostName"` + TotalOutstandingAmount float64 `json:"TotalOutstandingAmount" xml:"TotalOutstandingAmount"` + UserId int `json:"UserId" xml:"UserId"` + Status string `json:"Status" xml:"Status"` + NewInvoiceAmount float64 `json:"NewInvoiceAmount" xml:"NewInvoiceAmount"` + Marker string `json:"Marker" xml:"Marker"` + AccountType string `json:"AccountType" xml:"AccountType"` + Numerator int `json:"Numerator" xml:"Numerator"` + AvailableAmount string `json:"AvailableAmount" xml:"AvailableAmount"` + PageSize int `json:"PageSize" xml:"PageSize"` + Amount string `json:"Amount" xml:"Amount"` + MybankCreditAmount string `json:"MybankCreditAmount" xml:"MybankCreditAmount"` + CreditAmount string `json:"CreditAmount" xml:"CreditAmount"` + ThresholdType int `json:"ThresholdType" xml:"ThresholdType"` + AccountID string `json:"AccountID" xml:"AccountID"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + ItemCode string `json:"ItemCode" xml:"ItemCode"` + ThresholdAmount string `json:"ThresholdAmount" xml:"ThresholdAmount"` + InvoiceApplyId int `json:"InvoiceApplyId" xml:"InvoiceApplyId"` + Boolean bool `json:"Boolean" xml:"Boolean"` + IsCertified bool `json:"IsCertified" xml:"IsCertified"` + TotalInvoiceAmount int `json:"TotalInvoiceAmount" xml:"TotalInvoiceAmount"` + PageNum int `json:"PageNum" xml:"PageNum"` + Currency string `json:"Currency" xml:"Currency"` + Bid string `json:"Bid" xml:"Bid"` + LoginEmail string `json:"LoginEmail" xml:"LoginEmail"` + DiscountPrice float64 `json:"DiscountPrice" xml:"DiscountPrice"` + AccountName string `json:"AccountName" xml:"AccountName"` + Denominator int `json:"Denominator" xml:"Denominator"` + Mpk int `json:"Mpk" xml:"Mpk"` + UidList UidList `json:"UidList" xml:"UidList"` + OmsData OmsData `json:"OmsData" xml:"OmsData"` + ModuleList ModuleList `json:"ModuleList" xml:"ModuleList"` + InstanceList []Instance `json:"InstanceList" xml:"InstanceList"` + OrderList OrderListInQueryOrders `json:"OrderList" xml:"OrderList"` + Modules ModulesInQueryInstanceGaapCost `json:"Modules" xml:"Modules"` + ResourcePackages ResourcePackages `json:"ResourcePackages" xml:"ResourcePackages"` + ProductList ProductList `json:"ProductList" xml:"ProductList"` + Items ItemsInQueryBill `json:"Items" xml:"Items"` + ModuleDetails ModuleDetailsInGetPayAsYouGoPrice `json:"ModuleDetails" xml:"ModuleDetails"` + PromotionDetails PromotionDetailsInGetPayAsYouGoPrice `json:"PromotionDetails" xml:"PromotionDetails"` + AccountTransactionsList AccountTransactionsList `json:"AccountTransactionsList" xml:"AccountTransactionsList"` + EvaluateList EvaluateList `json:"EvaluateList" xml:"EvaluateList"` + Promotions Promotions `json:"Promotions" xml:"Promotions"` + CustomerInvoiceAddressList CustomerInvoiceAddressList `json:"CustomerInvoiceAddressList" xml:"CustomerInvoiceAddressList"` + CustomerInvoiceList CustomerInvoiceList `json:"CustomerInvoiceList" xml:"CustomerInvoiceList"` + AttributeList AttributeList `json:"AttributeList" xml:"AttributeList"` } diff --git a/services/bssopenapi/struct_data_in_create_resource_package.go b/services/bssopenapi/struct_data_in_create_resource_package.go index 2f2e283515..35d9881628 100644 --- a/services/bssopenapi/struct_data_in_create_resource_package.go +++ b/services/bssopenapi/struct_data_in_create_resource_package.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +18,6 @@ package bssopenapi // DataInCreateResourcePackage is a nested struct in bssopenapi response type DataInCreateResourcePackage struct { - OrderId int `json:"OrderId" xml:"OrderId"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` + OrderId int `json:"OrderId" xml:"OrderId"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` } diff --git a/services/bssopenapi/struct_data_in_get_customer_list.go b/services/bssopenapi/struct_data_in_get_customer_list.go new file mode 100644 index 0000000000..b93a3a4cc2 --- /dev/null +++ b/services/bssopenapi/struct_data_in_get_customer_list.go @@ -0,0 +1,22 @@ + +package bssopenapi + +//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. + +// DataInGetCustomerList is a nested struct in bssopenapi response +type DataInGetCustomerList struct { + UidList [] string `json:"UidList" xml:"UidList"` +} diff --git a/services/bssopenapi/struct_data_in_query_cash_coupons.go b/services/bssopenapi/struct_data_in_query_cash_coupons.go index 7f7b5b0dd3..677c0ddb93 100644 --- a/services/bssopenapi/struct_data_in_query_cash_coupons.go +++ b/services/bssopenapi/struct_data_in_query_cash_coupons.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // DataInQueryCashCoupons is a nested struct in bssopenapi response type DataInQueryCashCoupons struct { - CashCoupon []CashCoupon `json:"CashCoupon" xml:"CashCoupon"` +CashCoupon []CashCoupon `json:"CashCoupon" xml:"CashCoupon"` } diff --git a/services/bssopenapi/struct_data_in_query_prepaid_cards.go b/services/bssopenapi/struct_data_in_query_prepaid_cards.go index d45a315db9..3f314599a1 100644 --- a/services/bssopenapi/struct_data_in_query_prepaid_cards.go +++ b/services/bssopenapi/struct_data_in_query_prepaid_cards.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // DataInQueryPrepaidCards is a nested struct in bssopenapi response type DataInQueryPrepaidCards struct { - PrepaidCard []PrepaidCard `json:"PrepaidCard" xml:"PrepaidCard"` +PrepaidCard []PrepaidCard `json:"PrepaidCard" xml:"PrepaidCard"` } diff --git a/services/bssopenapi/struct_data_in_query_redeem.go b/services/bssopenapi/struct_data_in_query_redeem.go index c0e21cdf7b..1c49c78501 100644 --- a/services/bssopenapi/struct_data_in_query_redeem.go +++ b/services/bssopenapi/struct_data_in_query_redeem.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,8 +18,8 @@ package bssopenapi // DataInQueryRedeem is a nested struct in bssopenapi response type DataInQueryRedeem struct { - PageNum int `json:"PageNum" xml:"PageNum"` - PageSize int `json:"PageSize" xml:"PageSize"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - Redeem Redeem `json:"Redeem" xml:"Redeem"` + PageNum int `json:"PageNum" xml:"PageNum"` + PageSize int `json:"PageSize" xml:"PageSize"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + Redeem Redeem `json:"Redeem" xml:"Redeem"` } diff --git a/services/bssopenapi/struct_data_in_query_resource_package_instances.go b/services/bssopenapi/struct_data_in_query_resource_package_instances.go index 3028ec8e30..cb04e8d3d7 100644 --- a/services/bssopenapi/struct_data_in_query_resource_package_instances.go +++ b/services/bssopenapi/struct_data_in_query_resource_package_instances.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,9 +18,9 @@ package bssopenapi // DataInQueryResourcePackageInstances is a nested struct in bssopenapi response type DataInQueryResourcePackageInstances struct { - HostId string `json:"HostId" xml:"HostId"` - PageNum string `json:"PageNum" xml:"PageNum"` - PageSize string `json:"PageSize" xml:"PageSize"` - TotalCount string `json:"TotalCount" xml:"TotalCount"` - Instances Instances `json:"Instances" xml:"Instances"` + HostId string `json:"HostId" xml:"HostId"` + PageNum string `json:"PageNum" xml:"PageNum"` + PageSize string `json:"PageSize" xml:"PageSize"` + TotalCount string `json:"TotalCount" xml:"TotalCount"` + Instances Instances `json:"Instances" xml:"Instances"` } diff --git a/services/bssopenapi/struct_data_in_query_user_oms_data.go b/services/bssopenapi/struct_data_in_query_user_oms_data.go index ebc81ab3b1..e7826c53eb 100644 --- a/services/bssopenapi/struct_data_in_query_user_oms_data.go +++ b/services/bssopenapi/struct_data_in_query_user_oms_data.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,7 +18,7 @@ package bssopenapi // DataInQueryUserOmsData is a nested struct in bssopenapi response type DataInQueryUserOmsData struct { - Marker string `json:"Marker" xml:"Marker"` - HostId string `json:"HostId" xml:"HostId"` - OmsData []string `json:"OmsData" xml:"OmsData"` + Marker string `json:"Marker" xml:"Marker"` + HostId string `json:"HostId" xml:"HostId"` + OmsData [] string `json:"OmsData" xml:"OmsData"` } diff --git a/services/bssopenapi/struct_datas_in_query_account_book_list.go b/services/bssopenapi/struct_datas_in_query_account_book_list.go index d31fb834d6..a7479d8329 100644 --- a/services/bssopenapi/struct_datas_in_query_account_book_list.go +++ b/services/bssopenapi/struct_datas_in_query_account_book_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // DatasInQueryAccountBookList is a nested struct in bssopenapi response type DatasInQueryAccountBookList struct { - Data []Data `json:"Data" xml:"Data"` +Data []Data `json:"Data" xml:"Data"` } diff --git a/services/bssopenapi/struct_datas_in_query_enduser_status.go b/services/bssopenapi/struct_datas_in_query_enduser_status.go index c02252373b..cbd4984f74 100644 --- a/services/bssopenapi/struct_datas_in_query_enduser_status.go +++ b/services/bssopenapi/struct_datas_in_query_enduser_status.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // DatasInQueryEnduserStatus is a nested struct in bssopenapi response type DatasInQueryEnduserStatus struct { - Data []Data `json:"Data" xml:"Data"` +Data []Data `json:"Data" xml:"Data"` } diff --git a/services/bssopenapi/struct_datas_in_query_user_alarm_threshold.go b/services/bssopenapi/struct_datas_in_query_user_alarm_threshold.go index 3610c9bef4..31cff7e1dd 100644 --- a/services/bssopenapi/struct_datas_in_query_user_alarm_threshold.go +++ b/services/bssopenapi/struct_datas_in_query_user_alarm_threshold.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // DatasInQueryUserAlarmThreshold is a nested struct in bssopenapi response type DatasInQueryUserAlarmThreshold struct { - Data []Data `json:"Data" xml:"Data"` +Data []Data `json:"Data" xml:"Data"` } diff --git a/services/bssopenapi/struct_evaluate.go b/services/bssopenapi/struct_evaluate.go index 968d8c97bd..a8ed795698 100644 --- a/services/bssopenapi/struct_evaluate.go +++ b/services/bssopenapi/struct_evaluate.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,25 +18,25 @@ package bssopenapi // Evaluate is a nested struct in bssopenapi response type Evaluate struct { - Id int `json:"Id" xml:"Id"` - GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` - GmtModified string `json:"GmtModified" xml:"GmtModified"` - UserId int `json:"UserId" xml:"UserId"` - UserNick string `json:"UserNick" xml:"UserNick"` - OutBizId string `json:"OutBizId" xml:"OutBizId"` - BillId int `json:"BillId" xml:"BillId"` - ItemId int `json:"ItemId" xml:"ItemId"` - BillCycle string `json:"BillCycle" xml:"BillCycle"` - BizType string `json:"BizType" xml:"BizType"` - OriginalAmount int `json:"OriginalAmount" xml:"OriginalAmount"` - PresentAmount int `json:"PresentAmount" xml:"PresentAmount"` - CanInvoiceAmount int `json:"CanInvoiceAmount" xml:"CanInvoiceAmount"` - InvoicedAmount int `json:"InvoicedAmount" xml:"InvoicedAmount"` - OffsetCostAmount int `json:"OffsetCostAmount" xml:"OffsetCostAmount"` - OffsetAcceptAmount int `json:"OffsetAcceptAmount" xml:"OffsetAcceptAmount"` - Status int `json:"Status" xml:"Status"` - OpId string `json:"OpId" xml:"OpId"` - Name string `json:"Name" xml:"Name"` - BizTime string `json:"BizTime" xml:"BizTime"` - Type int `json:"Type" xml:"Type"` + Id int `json:"Id" xml:"Id"` + GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` + GmtModified string `json:"GmtModified" xml:"GmtModified"` + UserId int `json:"UserId" xml:"UserId"` + UserNick string `json:"UserNick" xml:"UserNick"` + OutBizId string `json:"OutBizId" xml:"OutBizId"` + BillId int `json:"BillId" xml:"BillId"` + ItemId int `json:"ItemId" xml:"ItemId"` + BillCycle string `json:"BillCycle" xml:"BillCycle"` + BizType string `json:"BizType" xml:"BizType"` + OriginalAmount int `json:"OriginalAmount" xml:"OriginalAmount"` + PresentAmount int `json:"PresentAmount" xml:"PresentAmount"` + CanInvoiceAmount int `json:"CanInvoiceAmount" xml:"CanInvoiceAmount"` + InvoicedAmount int `json:"InvoicedAmount" xml:"InvoicedAmount"` + OffsetCostAmount int `json:"OffsetCostAmount" xml:"OffsetCostAmount"` + OffsetAcceptAmount int `json:"OffsetAcceptAmount" xml:"OffsetAcceptAmount"` + Status int `json:"Status" xml:"Status"` + OpId string `json:"OpId" xml:"OpId"` + Name string `json:"Name" xml:"Name"` + BizTime string `json:"BizTime" xml:"BizTime"` + Type int `json:"Type" xml:"Type"` } diff --git a/services/bssopenapi/struct_evaluate_list.go b/services/bssopenapi/struct_evaluate_list.go index 00998cba67..0d9a10007d 100644 --- a/services/bssopenapi/struct_evaluate_list.go +++ b/services/bssopenapi/struct_evaluate_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // EvaluateList is a nested struct in bssopenapi response type EvaluateList struct { - Evaluate []Evaluate `json:"Evaluate" xml:"Evaluate"` +Evaluate []Evaluate `json:"Evaluate" xml:"Evaluate"` } diff --git a/services/bssopenapi/struct_instance.go b/services/bssopenapi/struct_instance.go index 95f9276c5c..9dff7e5efc 100644 --- a/services/bssopenapi/struct_instance.go +++ b/services/bssopenapi/struct_instance.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,33 +18,33 @@ package bssopenapi // Instance is a nested struct in bssopenapi response type Instance struct { - Region string `json:"Region" xml:"Region"` - ExpectedReleaseTime string `json:"ExpectedReleaseTime" xml:"ExpectedReleaseTime"` - PackageType string `json:"PackageType" xml:"PackageType"` - DeductType string `json:"DeductType" xml:"DeductType"` - CreateTime string `json:"CreateTime" xml:"CreateTime"` - OwnerId int `json:"OwnerId" xml:"OwnerId"` - TotalAmount string `json:"TotalAmount" xml:"TotalAmount"` - RenewStatus string `json:"RenewStatus" xml:"RenewStatus"` - SubStatus string `json:"SubStatus" xml:"SubStatus"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - TotalAmountUnit string `json:"TotalAmountUnit" xml:"TotalAmountUnit"` - SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` - RemainingAmountUnit string `json:"RemainingAmountUnit" xml:"RemainingAmountUnit"` - StopTime string `json:"StopTime" xml:"StopTime"` - Seller string `json:"Seller" xml:"Seller"` - Remark string `json:"Remark" xml:"Remark"` - ProductType string `json:"ProductType" xml:"ProductType"` - ProductCode string `json:"ProductCode" xml:"ProductCode"` - RenewalDuration int `json:"RenewalDuration" xml:"RenewalDuration"` - RenewalDurationUnit string `json:"RenewalDurationUnit" xml:"RenewalDurationUnit"` - RemainingAmount string `json:"RemainingAmount" xml:"RemainingAmount"` - EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` - ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` - EndTime string `json:"EndTime" xml:"EndTime"` - SellerId int `json:"SellerId" xml:"SellerId"` - InstanceID string `json:"InstanceID" xml:"InstanceID"` - ReleaseTime string `json:"ReleaseTime" xml:"ReleaseTime"` - Status string `json:"Status" xml:"Status"` - ApplicableProducts []string `json:"ApplicableProducts" xml:"ApplicableProducts"` + Region string `json:"Region" xml:"Region"` + ExpectedReleaseTime string `json:"ExpectedReleaseTime" xml:"ExpectedReleaseTime"` + PackageType string `json:"PackageType" xml:"PackageType"` + DeductType string `json:"DeductType" xml:"DeductType"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + OwnerId int `json:"OwnerId" xml:"OwnerId"` + TotalAmount string `json:"TotalAmount" xml:"TotalAmount"` + RenewStatus string `json:"RenewStatus" xml:"RenewStatus"` + SubStatus string `json:"SubStatus" xml:"SubStatus"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + TotalAmountUnit string `json:"TotalAmountUnit" xml:"TotalAmountUnit"` + SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` + RemainingAmountUnit string `json:"RemainingAmountUnit" xml:"RemainingAmountUnit"` + StopTime string `json:"StopTime" xml:"StopTime"` + Seller string `json:"Seller" xml:"Seller"` + Remark string `json:"Remark" xml:"Remark"` + ProductType string `json:"ProductType" xml:"ProductType"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + RenewalDuration int `json:"RenewalDuration" xml:"RenewalDuration"` + RenewalDurationUnit string `json:"RenewalDurationUnit" xml:"RenewalDurationUnit"` + RemainingAmount string `json:"RemainingAmount" xml:"RemainingAmount"` + EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` + ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` + EndTime string `json:"EndTime" xml:"EndTime"` + SellerId int `json:"SellerId" xml:"SellerId"` + InstanceID string `json:"InstanceID" xml:"InstanceID"` + ReleaseTime string `json:"ReleaseTime" xml:"ReleaseTime"` + Status string `json:"Status" xml:"Status"` + ApplicableProducts [] string `json:"ApplicableProducts" xml:"ApplicableProducts"` } diff --git a/services/bssopenapi/struct_instance_in_query_resource_package_instances.go b/services/bssopenapi/struct_instance_in_query_resource_package_instances.go index 53ddf3dd9f..5b19ae46a9 100644 --- a/services/bssopenapi/struct_instance_in_query_resource_package_instances.go +++ b/services/bssopenapi/struct_instance_in_query_resource_package_instances.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,17 +18,17 @@ package bssopenapi // InstanceInQueryResourcePackageInstances is a nested struct in bssopenapi response type InstanceInQueryResourcePackageInstances struct { - InstanceId string `json:"InstanceId" xml:"InstanceId"` - Region string `json:"Region" xml:"Region"` - TotalAmount string `json:"TotalAmount" xml:"TotalAmount"` - TotalAmountUnit string `json:"TotalAmountUnit" xml:"TotalAmountUnit"` - RemainingAmount string `json:"RemainingAmount" xml:"RemainingAmount"` - RemainingAmountUnit string `json:"RemainingAmountUnit" xml:"RemainingAmountUnit"` - EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` - ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` - Remark string `json:"Remark" xml:"Remark"` - PackageType string `json:"PackageType" xml:"PackageType"` - Status string `json:"Status" xml:"Status"` - DeductType string `json:"DeductType" xml:"DeductType"` - ApplicableProducts ApplicableProducts `json:"ApplicableProducts" xml:"ApplicableProducts"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Region string `json:"Region" xml:"Region"` + TotalAmount string `json:"TotalAmount" xml:"TotalAmount"` + TotalAmountUnit string `json:"TotalAmountUnit" xml:"TotalAmountUnit"` + RemainingAmount string `json:"RemainingAmount" xml:"RemainingAmount"` + RemainingAmountUnit string `json:"RemainingAmountUnit" xml:"RemainingAmountUnit"` + EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` + ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` + Remark string `json:"Remark" xml:"Remark"` + PackageType string `json:"PackageType" xml:"PackageType"` + Status string `json:"Status" xml:"Status"` + DeductType string `json:"DeductType" xml:"DeductType"` + ApplicableProducts ApplicableProducts `json:"ApplicableProducts" xml:"ApplicableProducts"` } diff --git a/services/bssopenapi/struct_instance_list.go b/services/bssopenapi/struct_instance_list.go index d5d9bfca36..c3fc8e6d99 100644 --- a/services/bssopenapi/struct_instance_list.go +++ b/services/bssopenapi/struct_instance_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // InstanceList is a nested struct in bssopenapi response type InstanceList struct { - Instance []Instance `json:"Instance" xml:"Instance"` +Instance []Instance `json:"Instance" xml:"Instance"` } diff --git a/services/bssopenapi/struct_instances.go b/services/bssopenapi/struct_instances.go index 6b1f617903..ac5a7939bc 100644 --- a/services/bssopenapi/struct_instances.go +++ b/services/bssopenapi/struct_instances.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // Instances is a nested struct in bssopenapi response type Instances struct { - Instance []InstanceInQueryResourcePackageInstances `json:"Instance" xml:"Instance"` +Instance []InstanceInQueryResourcePackageInstances `json:"Instance" xml:"Instance"` } diff --git a/services/bssopenapi/struct_item.go b/services/bssopenapi/struct_item.go index 37d06ed4d9..5a8d930998 100644 --- a/services/bssopenapi/struct_item.go +++ b/services/bssopenapi/struct_item.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,56 +18,56 @@ package bssopenapi // Item is a nested struct in bssopenapi response type Item struct { - Tax float64 `json:"Tax" xml:"Tax"` - PreviousBillingCycleBalance float64 `json:"PreviousBillingCycleBalance" xml:"PreviousBillingCycleBalance"` - PayerAccount string `json:"PayerAccount" xml:"PayerAccount"` - UsageStartTime string `json:"UsageStartTime" xml:"UsageStartTime"` - SuborderID string `json:"SuborderID" xml:"SuborderID"` - SolutionCode string `json:"SolutionCode" xml:"SolutionCode"` - ProductDetail string `json:"ProductDetail" xml:"ProductDetail"` - Promotion string `json:"Promotion" xml:"Promotion"` - Seller string `json:"Seller" xml:"Seller"` - PretaxAmountLocal float64 `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"` - OutstandingAmount float64 `json:"OutstandingAmount" xml:"OutstandingAmount"` - ProductCode string `json:"ProductCode" xml:"ProductCode"` - Quantity string `json:"Quantity" xml:"Quantity"` - InvoiceDiscount float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"` - MybankPaymentAmount float64 `json:"MybankPaymentAmount" xml:"MybankPaymentAmount"` - PretaxGrossAmount float64 `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` - InstanceID string `json:"InstanceID" xml:"InstanceID"` - RecordID string `json:"RecordID" xml:"RecordID"` - Config string `json:"Config" xml:"Config"` - Status string `json:"Status" xml:"Status"` - Item string `json:"Item" xml:"Item"` - ProductName string `json:"ProductName" xml:"ProductName"` - Region string `json:"Region" xml:"Region"` - PaymentAmount float64 `json:"PaymentAmount" xml:"PaymentAmount"` - UsageEndTime string `json:"UsageEndTime" xml:"UsageEndTime"` - SolutionID string `json:"SolutionID" xml:"SolutionID"` - ClearedTime string `json:"ClearedTime" xml:"ClearedTime"` - PaymentTime string `json:"PaymentTime" xml:"PaymentTime"` - CreateTime string `json:"CreateTime" xml:"CreateTime"` - LinkedCustomerOrderID string `json:"LinkedCustomerOrderID" xml:"LinkedCustomerOrderID"` - AfterTaxAmount float64 `json:"AfterTaxAmount" xml:"AfterTaxAmount"` - ResourceGroup string `json:"ResourceGroup" xml:"ResourceGroup"` - Tag string `json:"Tag" xml:"Tag"` - OwnerID string `json:"OwnerID" xml:"OwnerID"` - SolutionName string `json:"SolutionName" xml:"SolutionName"` - SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` - DeductedByCashCoupons float64 `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"` - InvoiceNo string `json:"InvoiceNo" xml:"InvoiceNo"` - DiscountAmount float64 `json:"DiscountAmount" xml:"DiscountAmount"` - BillID string `json:"BillID" xml:"BillID"` - PaymentCurrency string `json:"PaymentCurrency" xml:"PaymentCurrency"` - ProductType string `json:"ProductType" xml:"ProductType"` - AccountDiscount float64 `json:"AccountDiscount" xml:"AccountDiscount"` - Currency string `json:"Currency" xml:"Currency"` - DeductedByPrepaidCard float64 `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"` - OriginalOrderID string `json:"OriginalOrderID" xml:"OriginalOrderID"` - PaymentTransactionID string `json:"PaymentTransactionID" xml:"PaymentTransactionID"` - OrderID string `json:"OrderID" xml:"OrderID"` - OrderType string `json:"OrderType" xml:"OrderType"` - DeductedByCoupons float64 `json:"DeductedByCoupons" xml:"DeductedByCoupons"` - ChargeDiscount float64 `json:"ChargeDiscount" xml:"ChargeDiscount"` - PretaxAmount float64 `json:"PretaxAmount" xml:"PretaxAmount"` + Tax float64 `json:"Tax" xml:"Tax"` + PreviousBillingCycleBalance float64 `json:"PreviousBillingCycleBalance" xml:"PreviousBillingCycleBalance"` + PayerAccount string `json:"PayerAccount" xml:"PayerAccount"` + UsageStartTime string `json:"UsageStartTime" xml:"UsageStartTime"` + SuborderID string `json:"SuborderID" xml:"SuborderID"` + SolutionCode string `json:"SolutionCode" xml:"SolutionCode"` + ProductDetail string `json:"ProductDetail" xml:"ProductDetail"` + Promotion string `json:"Promotion" xml:"Promotion"` + Seller string `json:"Seller" xml:"Seller"` + PretaxAmountLocal float64 `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"` + OutstandingAmount float64 `json:"OutstandingAmount" xml:"OutstandingAmount"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + Quantity string `json:"Quantity" xml:"Quantity"` + InvoiceDiscount float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"` + MybankPaymentAmount float64 `json:"MybankPaymentAmount" xml:"MybankPaymentAmount"` + PretaxGrossAmount float64 `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` + InstanceID string `json:"InstanceID" xml:"InstanceID"` + RecordID string `json:"RecordID" xml:"RecordID"` + Config string `json:"Config" xml:"Config"` + Status string `json:"Status" xml:"Status"` + Item string `json:"Item" xml:"Item"` + ProductName string `json:"ProductName" xml:"ProductName"` + Region string `json:"Region" xml:"Region"` + PaymentAmount float64 `json:"PaymentAmount" xml:"PaymentAmount"` + UsageEndTime string `json:"UsageEndTime" xml:"UsageEndTime"` + SolutionID string `json:"SolutionID" xml:"SolutionID"` + ClearedTime string `json:"ClearedTime" xml:"ClearedTime"` + PaymentTime string `json:"PaymentTime" xml:"PaymentTime"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + LinkedCustomerOrderID string `json:"LinkedCustomerOrderID" xml:"LinkedCustomerOrderID"` + AfterTaxAmount float64 `json:"AfterTaxAmount" xml:"AfterTaxAmount"` + ResourceGroup string `json:"ResourceGroup" xml:"ResourceGroup"` + Tag string `json:"Tag" xml:"Tag"` + OwnerID string `json:"OwnerID" xml:"OwnerID"` + SolutionName string `json:"SolutionName" xml:"SolutionName"` + SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` + DeductedByCashCoupons float64 `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"` + InvoiceNo string `json:"InvoiceNo" xml:"InvoiceNo"` + DiscountAmount float64 `json:"DiscountAmount" xml:"DiscountAmount"` + BillID string `json:"BillID" xml:"BillID"` + PaymentCurrency string `json:"PaymentCurrency" xml:"PaymentCurrency"` + ProductType string `json:"ProductType" xml:"ProductType"` + AccountDiscount float64 `json:"AccountDiscount" xml:"AccountDiscount"` + Currency string `json:"Currency" xml:"Currency"` + DeductedByPrepaidCard float64 `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"` + OriginalOrderID string `json:"OriginalOrderID" xml:"OriginalOrderID"` + OrderID string `json:"OrderID" xml:"OrderID"` + OrderType string `json:"OrderType" xml:"OrderType"` + PaymentTransactionID string `json:"PaymentTransactionID" xml:"PaymentTransactionID"` + DeductedByCoupons float64 `json:"DeductedByCoupons" xml:"DeductedByCoupons"` + ChargeDiscount float64 `json:"ChargeDiscount" xml:"ChargeDiscount"` + PretaxAmount float64 `json:"PretaxAmount" xml:"PretaxAmount"` } diff --git a/services/bssopenapi/struct_item_in_query_instance_bill.go b/services/bssopenapi/struct_item_in_query_instance_bill.go index 7636d99ed7..18593c956a 100644 --- a/services/bssopenapi/struct_item_in_query_instance_bill.go +++ b/services/bssopenapi/struct_item_in_query_instance_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,29 +18,37 @@ package bssopenapi // ItemInQueryInstanceBill is a nested struct in bssopenapi response type ItemInQueryInstanceBill struct { - InstanceID string `json:"InstanceID" xml:"InstanceID"` - ServicePeriod float64 `json:"ServicePeriod" xml:"ServicePeriod"` - BillingType string `json:"BillingType" xml:"BillingType"` - CostUnit string `json:"CostUnit" xml:"CostUnit"` - ProductCode string `json:"ProductCode" xml:"ProductCode"` - ProductType string `json:"ProductType" xml:"ProductType"` - SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` - ProductName string `json:"ProductName" xml:"ProductName"` - ProductDetail string `json:"ProductDetail" xml:"ProductDetail"` - OwnerID int `json:"OwnerID" xml:"OwnerID"` - BillingItem string `json:"BillingItem" xml:"BillingItem"` - ListPrice float64 `json:"ListPrice" xml:"ListPrice"` - ListPriceUnit string `json:"ListPriceUnit" xml:"ListPriceUnit"` - Usage float64 `json:"Usage" xml:"Usage"` - UsageUnit string `json:"UsageUnit" xml:"UsageUnit"` - DeductedByResourcePackage float64 `json:"DeductedByResourcePackage" xml:"DeductedByResourcePackage"` - PretaxGrossAmount float64 `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` - InvoiceDiscount float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"` - DeductedByCoupons float64 `json:"DeductedByCoupons" xml:"DeductedByCoupons"` - PretaxAmount float64 `json:"PretaxAmount" xml:"PretaxAmount"` - DeductedByCashCoupons float64 `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"` - DeductedByPrepaidCard float64 `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"` - PaymentAmount float64 `json:"PaymentAmount" xml:"PaymentAmount"` - OutstandingAmount float64 `json:"OutstandingAmount" xml:"OutstandingAmount"` - Currency string `json:"Currency" xml:"Currency"` + InstanceID string `json:"InstanceID" xml:"InstanceID"` + BillingType string `json:"BillingType" xml:"BillingType"` + CostUnit string `json:"CostUnit" xml:"CostUnit"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + ProductType string `json:"ProductType" xml:"ProductType"` + SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` + ProductName string `json:"ProductName" xml:"ProductName"` + ProductDetail string `json:"ProductDetail" xml:"ProductDetail"` + OwnerID int `json:"OwnerID" xml:"OwnerID"` + BillingItem string `json:"BillingItem" xml:"BillingItem"` + ListPrice float64 `json:"ListPrice" xml:"ListPrice"` + ListPriceUnit string `json:"ListPriceUnit" xml:"ListPriceUnit"` + Usage float64 `json:"Usage" xml:"Usage"` + UsageUnit string `json:"UsageUnit" xml:"UsageUnit"` + DeductedByResourcePackage float64 `json:"DeductedByResourcePackage" xml:"DeductedByResourcePackage"` + PretaxGrossAmount float64 `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` + InvoiceDiscount float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"` + DeductedByCoupons float64 `json:"DeductedByCoupons" xml:"DeductedByCoupons"` + PretaxAmount float64 `json:"PretaxAmount" xml:"PretaxAmount"` + DeductedByCashCoupons float64 `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"` + DeductedByPrepaidCard float64 `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"` + PaymentAmount float64 `json:"PaymentAmount" xml:"PaymentAmount"` + OutstandingAmount float64 `json:"OutstandingAmount" xml:"OutstandingAmount"` + Currency string `json:"Currency" xml:"Currency"` + NickName string `json:"NickName" xml:"NickName"` + ResourceGroup string `json:"ResourceGroup" xml:"ResourceGroup"` + Tag string `json:"Tag" xml:"Tag"` + InstanceConfig string `json:"InstanceConfig" xml:"InstanceConfig"` + InstanceSpec string `json:"InstanceSpec" xml:"InstanceSpec"` + InternetIP string `json:"InternetIP" xml:"InternetIP"` + IntranetIP string `json:"IntranetIP" xml:"IntranetIP"` + Region string `json:"Region" xml:"Region"` + Zone string `json:"Zone" xml:"Zone"` } diff --git a/services/bssopenapi/struct_items_in_query_bill.go b/services/bssopenapi/struct_items_in_query_bill.go index e3c5e4d367..f6c64e5597 100644 --- a/services/bssopenapi/struct_items_in_query_bill.go +++ b/services/bssopenapi/struct_items_in_query_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ItemsInQueryBill is a nested struct in bssopenapi response type ItemsInQueryBill struct { - Item []Item `json:"Item" xml:"Item"` +Item []Item `json:"Item" xml:"Item"` } diff --git a/services/bssopenapi/struct_items_in_query_bill_overview.go b/services/bssopenapi/struct_items_in_query_bill_overview.go index 829c624838..2cc87eeacf 100644 --- a/services/bssopenapi/struct_items_in_query_bill_overview.go +++ b/services/bssopenapi/struct_items_in_query_bill_overview.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ItemsInQueryBillOverview is a nested struct in bssopenapi response type ItemsInQueryBillOverview struct { - Item []Item `json:"Item" xml:"Item"` +Item []Item `json:"Item" xml:"Item"` } diff --git a/services/bssopenapi/struct_items_in_query_instance_bill.go b/services/bssopenapi/struct_items_in_query_instance_bill.go index d0acb50fe2..65a59bd6b6 100644 --- a/services/bssopenapi/struct_items_in_query_instance_bill.go +++ b/services/bssopenapi/struct_items_in_query_instance_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ItemsInQueryInstanceBill is a nested struct in bssopenapi response type ItemsInQueryInstanceBill struct { - Item []ItemInQueryInstanceBill `json:"Item" xml:"Item"` +Item []ItemInQueryInstanceBill `json:"Item" xml:"Item"` } diff --git a/services/bssopenapi/struct_items_in_query_monthly_bill.go b/services/bssopenapi/struct_items_in_query_monthly_bill.go index b36ad380af..41c63dc1cf 100644 --- a/services/bssopenapi/struct_items_in_query_monthly_bill.go +++ b/services/bssopenapi/struct_items_in_query_monthly_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ItemsInQueryMonthlyBill is a nested struct in bssopenapi response type ItemsInQueryMonthlyBill struct { - Item []Item `json:"Item" xml:"Item"` +Item []Item `json:"Item" xml:"Item"` } diff --git a/services/bssopenapi/struct_items_in_query_monthly_instance_consumption.go b/services/bssopenapi/struct_items_in_query_monthly_instance_consumption.go index e37028b7a0..0848c3b130 100644 --- a/services/bssopenapi/struct_items_in_query_monthly_instance_consumption.go +++ b/services/bssopenapi/struct_items_in_query_monthly_instance_consumption.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ItemsInQueryMonthlyInstanceConsumption is a nested struct in bssopenapi response type ItemsInQueryMonthlyInstanceConsumption struct { - Item []Item `json:"Item" xml:"Item"` +Item []Item `json:"Item" xml:"Item"` } diff --git a/services/bssopenapi/struct_items_in_query_settlement_bill.go b/services/bssopenapi/struct_items_in_query_settlement_bill.go index da09b7cce4..a43fc3dc56 100644 --- a/services/bssopenapi/struct_items_in_query_settlement_bill.go +++ b/services/bssopenapi/struct_items_in_query_settlement_bill.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ItemsInQuerySettlementBill is a nested struct in bssopenapi response type ItemsInQuerySettlementBill struct { - Item []Item `json:"Item" xml:"Item"` +Item []Item `json:"Item" xml:"Item"` } diff --git a/services/bssopenapi/struct_module.go b/services/bssopenapi/struct_module.go index 1d611d0e15..852084fce5 100644 --- a/services/bssopenapi/struct_module.go +++ b/services/bssopenapi/struct_module.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,64 +18,64 @@ package bssopenapi // Module is a nested struct in bssopenapi response type Module struct { - MonthGaapDeductedByPrepaidCard string `json:"MonthGaapDeductedByPrepaidCard" xml:"MonthGaapDeductedByPrepaidCard"` - DeductedByCashCoupons string `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"` - PayerAccount string `json:"PayerAccount" xml:"PayerAccount"` - PriceUnit string `json:"PriceUnit" xml:"PriceUnit"` - GaapPretaxAmountLocal string `json:"GaapPretaxAmountLocal" xml:"GaapPretaxAmountLocal"` - UsageStartDate string `json:"UsageStartDate" xml:"UsageStartDate"` - MonthGaapPaymentAmount string `json:"MonthGaapPaymentAmount" xml:"MonthGaapPaymentAmount"` - OrderId string `json:"OrderId" xml:"OrderId"` - UnallocatedDeductedByCoupons string `json:"UnallocatedDeductedByCoupons" xml:"UnallocatedDeductedByCoupons"` - ModuleName string `json:"ModuleName" xml:"ModuleName"` - PretaxGrossAmount string `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` - PaymentAmount string `json:"PaymentAmount" xml:"PaymentAmount"` - UnallocatedDeductedByCashCoupons string `json:"UnallocatedDeductedByCashCoupons" xml:"UnallocatedDeductedByCashCoupons"` - PretaxAmount string `json:"PretaxAmount" xml:"PretaxAmount"` - BillingCycle string `json:"BillingCycle" xml:"BillingCycle"` - UnallocatedPricingDiscount string `json:"UnallocatedPricingDiscount" xml:"UnallocatedPricingDiscount"` - GaapPretaxGrossAmount string `json:"GaapPretaxGrossAmount" xml:"GaapPretaxGrossAmount"` - ProductCode string `json:"ProductCode" xml:"ProductCode"` - InstanceID string `json:"InstanceID" xml:"InstanceID"` - UnallocatedPretaxAmount string `json:"UnallocatedPretaxAmount" xml:"UnallocatedPretaxAmount"` - PriceType string `json:"PriceType" xml:"PriceType"` - Config string `json:"Config" xml:"Config"` - GaapPricingDiscount string `json:"GaapPricingDiscount" xml:"GaapPricingDiscount"` - AccountingUnit string `json:"AccountingUnit" xml:"AccountingUnit"` - MonthGaapPretaxAmount string `json:"MonthGaapPretaxAmount" xml:"MonthGaapPretaxAmount"` - Region string `json:"Region" xml:"Region"` - PricingDiscount string `json:"PricingDiscount" xml:"PricingDiscount"` - GaapPretaxAmount string `json:"GaapPretaxAmount" xml:"GaapPretaxAmount"` - ResourceGroup string `json:"ResourceGroup" xml:"ResourceGroup"` - SubOrderId string `json:"SubOrderId" xml:"SubOrderId"` - UnallocatedDeductedByPrepaidCard string `json:"UnallocatedDeductedByPrepaidCard" xml:"UnallocatedDeductedByPrepaidCard"` - MonthGaapPretaxGrossAmount string `json:"MonthGaapPretaxGrossAmount" xml:"MonthGaapPretaxGrossAmount"` - UnallocatedPretaxGrossAmount string `json:"UnallocatedPretaxGrossAmount" xml:"UnallocatedPretaxGrossAmount"` - DeductedByCoupons string `json:"DeductedByCoupons" xml:"DeductedByCoupons"` - Tag string `json:"Tag" xml:"Tag"` - OwnerID string `json:"OwnerID" xml:"OwnerID"` - SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` - PayTime string `json:"PayTime" xml:"PayTime"` - GaapDeductedByPrepaidCard string `json:"GaapDeductedByPrepaidCard" xml:"GaapDeductedByPrepaidCard"` - ModuleCode string `json:"ModuleCode" xml:"ModuleCode"` - MonthGaapPretaxAmountLocal string `json:"MonthGaapPretaxAmountLocal" xml:"MonthGaapPretaxAmountLocal"` - GaapDeductedByCashCoupons string `json:"GaapDeductedByCashCoupons" xml:"GaapDeductedByCashCoupons"` - DeductedByPrepaidCard string `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"` - GaapDeductedByCoupons string `json:"GaapDeductedByCoupons" xml:"GaapDeductedByCoupons"` - PaymentCurrency string `json:"PaymentCurrency" xml:"PaymentCurrency"` - UnallocatedPretaxAmountLocal string `json:"UnallocatedPretaxAmountLocal" xml:"UnallocatedPretaxAmountLocal"` - ProductType string `json:"ProductType" xml:"ProductType"` - Currency string `json:"Currency" xml:"Currency"` - MonthGaapPricingDiscount string `json:"MonthGaapPricingDiscount" xml:"MonthGaapPricingDiscount"` - UsageEndDate string `json:"UsageEndDate" xml:"UsageEndDate"` - OrderType string `json:"OrderType" xml:"OrderType"` - GaapPaymentAmount string `json:"GaapPaymentAmount" xml:"GaapPaymentAmount"` - MonthGaapDeductedByCoupons string `json:"MonthGaapDeductedByCoupons" xml:"MonthGaapDeductedByCoupons"` - PriceUnitQuantity string `json:"PriceUnitQuantity" xml:"PriceUnitQuantity"` - PretaxAmountLocal string `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"` - BillType string `json:"BillType" xml:"BillType"` - UnallocatedPaymentAmount string `json:"UnallocatedPaymentAmount" xml:"UnallocatedPaymentAmount"` - MonthGaapDeductedByCashCoupons string `json:"MonthGaapDeductedByCashCoupons" xml:"MonthGaapDeductedByCashCoupons"` - ConfigList ConfigList `json:"ConfigList" xml:"ConfigList"` - TierPrices TierPrices `json:"TierPrices" xml:"TierPrices"` + MonthGaapDeductedByPrepaidCard string `json:"MonthGaapDeductedByPrepaidCard" xml:"MonthGaapDeductedByPrepaidCard"` + DeductedByCashCoupons string `json:"DeductedByCashCoupons" xml:"DeductedByCashCoupons"` + PayerAccount string `json:"PayerAccount" xml:"PayerAccount"` + PriceUnit string `json:"PriceUnit" xml:"PriceUnit"` + GaapPretaxAmountLocal string `json:"GaapPretaxAmountLocal" xml:"GaapPretaxAmountLocal"` + UsageStartDate string `json:"UsageStartDate" xml:"UsageStartDate"` + MonthGaapPaymentAmount string `json:"MonthGaapPaymentAmount" xml:"MonthGaapPaymentAmount"` + OrderId string `json:"OrderId" xml:"OrderId"` + UnallocatedDeductedByCoupons string `json:"UnallocatedDeductedByCoupons" xml:"UnallocatedDeductedByCoupons"` + ModuleName string `json:"ModuleName" xml:"ModuleName"` + PretaxGrossAmount string `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` + PaymentAmount string `json:"PaymentAmount" xml:"PaymentAmount"` + UnallocatedDeductedByCashCoupons string `json:"UnallocatedDeductedByCashCoupons" xml:"UnallocatedDeductedByCashCoupons"` + PretaxAmount string `json:"PretaxAmount" xml:"PretaxAmount"` + BillingCycle string `json:"BillingCycle" xml:"BillingCycle"` + UnallocatedPricingDiscount string `json:"UnallocatedPricingDiscount" xml:"UnallocatedPricingDiscount"` + GaapPretaxGrossAmount string `json:"GaapPretaxGrossAmount" xml:"GaapPretaxGrossAmount"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + InstanceID string `json:"InstanceID" xml:"InstanceID"` + UnallocatedPretaxAmount string `json:"UnallocatedPretaxAmount" xml:"UnallocatedPretaxAmount"` + PriceType string `json:"PriceType" xml:"PriceType"` + GaapPricingDiscount string `json:"GaapPricingDiscount" xml:"GaapPricingDiscount"` + Config string `json:"Config" xml:"Config"` + AccountingUnit string `json:"AccountingUnit" xml:"AccountingUnit"` + MonthGaapPretaxAmount string `json:"MonthGaapPretaxAmount" xml:"MonthGaapPretaxAmount"` + Region string `json:"Region" xml:"Region"` + PricingDiscount string `json:"PricingDiscount" xml:"PricingDiscount"` + GaapPretaxAmount string `json:"GaapPretaxAmount" xml:"GaapPretaxAmount"` + ResourceGroup string `json:"ResourceGroup" xml:"ResourceGroup"` + SubOrderId string `json:"SubOrderId" xml:"SubOrderId"` + UnallocatedDeductedByPrepaidCard string `json:"UnallocatedDeductedByPrepaidCard" xml:"UnallocatedDeductedByPrepaidCard"` + MonthGaapPretaxGrossAmount string `json:"MonthGaapPretaxGrossAmount" xml:"MonthGaapPretaxGrossAmount"` + UnallocatedPretaxGrossAmount string `json:"UnallocatedPretaxGrossAmount" xml:"UnallocatedPretaxGrossAmount"` + DeductedByCoupons string `json:"DeductedByCoupons" xml:"DeductedByCoupons"` + Tag string `json:"Tag" xml:"Tag"` + OwnerID string `json:"OwnerID" xml:"OwnerID"` + SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` + PayTime string `json:"PayTime" xml:"PayTime"` + GaapDeductedByPrepaidCard string `json:"GaapDeductedByPrepaidCard" xml:"GaapDeductedByPrepaidCard"` + ModuleCode string `json:"ModuleCode" xml:"ModuleCode"` + MonthGaapPretaxAmountLocal string `json:"MonthGaapPretaxAmountLocal" xml:"MonthGaapPretaxAmountLocal"` + GaapDeductedByCashCoupons string `json:"GaapDeductedByCashCoupons" xml:"GaapDeductedByCashCoupons"` + DeductedByPrepaidCard string `json:"DeductedByPrepaidCard" xml:"DeductedByPrepaidCard"` + GaapDeductedByCoupons string `json:"GaapDeductedByCoupons" xml:"GaapDeductedByCoupons"` + PaymentCurrency string `json:"PaymentCurrency" xml:"PaymentCurrency"` + UnallocatedPretaxAmountLocal string `json:"UnallocatedPretaxAmountLocal" xml:"UnallocatedPretaxAmountLocal"` + ProductType string `json:"ProductType" xml:"ProductType"` + Currency string `json:"Currency" xml:"Currency"` + MonthGaapPricingDiscount string `json:"MonthGaapPricingDiscount" xml:"MonthGaapPricingDiscount"` + UsageEndDate string `json:"UsageEndDate" xml:"UsageEndDate"` + OrderType string `json:"OrderType" xml:"OrderType"` + GaapPaymentAmount string `json:"GaapPaymentAmount" xml:"GaapPaymentAmount"` + MonthGaapDeductedByCoupons string `json:"MonthGaapDeductedByCoupons" xml:"MonthGaapDeductedByCoupons"` + PriceUnitQuantity string `json:"PriceUnitQuantity" xml:"PriceUnitQuantity"` + PretaxAmountLocal string `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"` + BillType string `json:"BillType" xml:"BillType"` + UnallocatedPaymentAmount string `json:"UnallocatedPaymentAmount" xml:"UnallocatedPaymentAmount"` + MonthGaapDeductedByCashCoupons string `json:"MonthGaapDeductedByCashCoupons" xml:"MonthGaapDeductedByCashCoupons"` + ConfigList ConfigList `json:"ConfigList" xml:"ConfigList"` + TierPrices TierPrices `json:"TierPrices" xml:"TierPrices"` } diff --git a/services/bssopenapi/struct_module_detail.go b/services/bssopenapi/struct_module_detail.go index ebd21389b9..58411cf8fa 100644 --- a/services/bssopenapi/struct_module_detail.go +++ b/services/bssopenapi/struct_module_detail.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,9 +18,9 @@ package bssopenapi // ModuleDetail is a nested struct in bssopenapi response type ModuleDetail struct { - InvoiceDiscount float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"` - UnitPrice float64 `json:"UnitPrice" xml:"UnitPrice"` - OriginalCost float64 `json:"OriginalCost" xml:"OriginalCost"` - CostAfterDiscount float64 `json:"CostAfterDiscount" xml:"CostAfterDiscount"` - ModuleCode string `json:"ModuleCode" xml:"ModuleCode"` + InvoiceDiscount float64 `json:"InvoiceDiscount" xml:"InvoiceDiscount"` + UnitPrice float64 `json:"UnitPrice" xml:"UnitPrice"` + OriginalCost float64 `json:"OriginalCost" xml:"OriginalCost"` + CostAfterDiscount float64 `json:"CostAfterDiscount" xml:"CostAfterDiscount"` + ModuleCode string `json:"ModuleCode" xml:"ModuleCode"` } diff --git a/services/bssopenapi/struct_module_details_in_get_pay_as_you_go_price.go b/services/bssopenapi/struct_module_details_in_get_pay_as_you_go_price.go index 5d32dd516d..425788a516 100644 --- a/services/bssopenapi/struct_module_details_in_get_pay_as_you_go_price.go +++ b/services/bssopenapi/struct_module_details_in_get_pay_as_you_go_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ModuleDetailsInGetPayAsYouGoPrice is a nested struct in bssopenapi response type ModuleDetailsInGetPayAsYouGoPrice struct { - ModuleDetail []ModuleDetail `json:"ModuleDetail" xml:"ModuleDetail"` +ModuleDetail []ModuleDetail `json:"ModuleDetail" xml:"ModuleDetail"` } diff --git a/services/bssopenapi/struct_module_details_in_get_subscription_price.go b/services/bssopenapi/struct_module_details_in_get_subscription_price.go index 30ae4e1c78..30bd9ef59b 100644 --- a/services/bssopenapi/struct_module_details_in_get_subscription_price.go +++ b/services/bssopenapi/struct_module_details_in_get_subscription_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ModuleDetailsInGetSubscriptionPrice is a nested struct in bssopenapi response type ModuleDetailsInGetSubscriptionPrice struct { - ModuleDetail []ModuleDetail `json:"ModuleDetail" xml:"ModuleDetail"` +ModuleDetail []ModuleDetail `json:"ModuleDetail" xml:"ModuleDetail"` } diff --git a/services/bssopenapi/struct_module_list.go b/services/bssopenapi/struct_module_list.go index 377cd5e083..eaa6e077c8 100644 --- a/services/bssopenapi/struct_module_list.go +++ b/services/bssopenapi/struct_module_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ModuleList is a nested struct in bssopenapi response type ModuleList struct { - Module []Module `json:"Module" xml:"Module"` +Module []Module `json:"Module" xml:"Module"` } diff --git a/services/bssopenapi/struct_modules_in_query_instance_gaap_cost.go b/services/bssopenapi/struct_modules_in_query_instance_gaap_cost.go index bcb041b0f7..422ddfd391 100644 --- a/services/bssopenapi/struct_modules_in_query_instance_gaap_cost.go +++ b/services/bssopenapi/struct_modules_in_query_instance_gaap_cost.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ModulesInQueryInstanceGaapCost is a nested struct in bssopenapi response type ModulesInQueryInstanceGaapCost struct { - Module []Module `json:"Module" xml:"Module"` +Module []Module `json:"Module" xml:"Module"` } diff --git a/services/bssopenapi/struct_modules_in_query_price_list.go b/services/bssopenapi/struct_modules_in_query_price_list.go index 7d40953909..2f0257d076 100644 --- a/services/bssopenapi/struct_modules_in_query_price_list.go +++ b/services/bssopenapi/struct_modules_in_query_price_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ModulesInQueryPriceList is a nested struct in bssopenapi response type ModulesInQueryPriceList struct { - Module []Module `json:"Module" xml:"Module"` +Module []Module `json:"Module" xml:"Module"` } diff --git a/services/bssopenapi/struct_oms_data.go b/services/bssopenapi/struct_oms_data.go index f2032b49f3..a865404fcf 100644 --- a/services/bssopenapi/struct_oms_data.go +++ b/services/bssopenapi/struct_oms_data.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // OmsData is a nested struct in bssopenapi response type OmsData struct { - Item []map[string]interface{} `json:"Item" xml:"Item"` +Item [] map[string]interface{} `json:"Item" xml:"Item"` } diff --git a/services/bssopenapi/struct_order.go b/services/bssopenapi/struct_order.go index 0e8989eb69..34c8a6be97 100644 --- a/services/bssopenapi/struct_order.go +++ b/services/bssopenapi/struct_order.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,27 +18,27 @@ package bssopenapi // Order is a nested struct in bssopenapi response type Order struct { - Region string `json:"Region" xml:"Region"` - UsageEndTime string `json:"UsageEndTime" xml:"UsageEndTime"` - PaymentTime string `json:"PaymentTime" xml:"PaymentTime"` - PaymentCurrency string `json:"PaymentCurrency" xml:"PaymentCurrency"` - CreateTime string `json:"CreateTime" xml:"CreateTime"` - ProductType string `json:"ProductType" xml:"ProductType"` - PaymentStatus string `json:"PaymentStatus" xml:"PaymentStatus"` - Currency string `json:"Currency" xml:"Currency"` - Operator string `json:"Operator" xml:"Operator"` - SubOrderId string `json:"SubOrderId" xml:"SubOrderId"` - ProductCode string `json:"ProductCode" xml:"ProductCode"` - InstanceIDs string `json:"InstanceIDs" xml:"InstanceIDs"` - AfterTaxAmount string `json:"AfterTaxAmount" xml:"AfterTaxAmount"` - OrderId string `json:"OrderId" xml:"OrderId"` - OrderType string `json:"OrderType" xml:"OrderType"` - Quantity string `json:"Quantity" xml:"Quantity"` - PretaxGrossAmount string `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` - PretaxAmountLocal string `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"` - SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` - Tax string `json:"Tax" xml:"Tax"` - Config string `json:"Config" xml:"Config"` - UsageStartTime string `json:"UsageStartTime" xml:"UsageStartTime"` - PretaxAmount string `json:"PretaxAmount" xml:"PretaxAmount"` + Region string `json:"Region" xml:"Region"` + UsageEndTime string `json:"UsageEndTime" xml:"UsageEndTime"` + PaymentTime string `json:"PaymentTime" xml:"PaymentTime"` + PaymentCurrency string `json:"PaymentCurrency" xml:"PaymentCurrency"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + ProductType string `json:"ProductType" xml:"ProductType"` + PaymentStatus string `json:"PaymentStatus" xml:"PaymentStatus"` + Currency string `json:"Currency" xml:"Currency"` + Operator string `json:"Operator" xml:"Operator"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + AfterTaxAmount string `json:"AfterTaxAmount" xml:"AfterTaxAmount"` + SubOrderId string `json:"SubOrderId" xml:"SubOrderId"` + InstanceIDs string `json:"InstanceIDs" xml:"InstanceIDs"` + OrderId string `json:"OrderId" xml:"OrderId"` + OrderType string `json:"OrderType" xml:"OrderType"` + Quantity string `json:"Quantity" xml:"Quantity"` + PretaxGrossAmount string `json:"PretaxGrossAmount" xml:"PretaxGrossAmount"` + PretaxAmountLocal string `json:"PretaxAmountLocal" xml:"PretaxAmountLocal"` + SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` + Tax string `json:"Tax" xml:"Tax"` + Config string `json:"Config" xml:"Config"` + UsageStartTime string `json:"UsageStartTime" xml:"UsageStartTime"` + PretaxAmount string `json:"PretaxAmount" xml:"PretaxAmount"` } diff --git a/services/bssopenapi/struct_order_list_in_get_order_detail.go b/services/bssopenapi/struct_order_list_in_get_order_detail.go index f3809690cb..b34ead6fcc 100644 --- a/services/bssopenapi/struct_order_list_in_get_order_detail.go +++ b/services/bssopenapi/struct_order_list_in_get_order_detail.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // OrderListInGetOrderDetail is a nested struct in bssopenapi response type OrderListInGetOrderDetail struct { - Order []Order `json:"Order" xml:"Order"` +Order []Order `json:"Order" xml:"Order"` } diff --git a/services/bssopenapi/struct_order_list_in_query_orders.go b/services/bssopenapi/struct_order_list_in_query_orders.go index 7ac9768a0c..e476d02ad6 100644 --- a/services/bssopenapi/struct_order_list_in_query_orders.go +++ b/services/bssopenapi/struct_order_list_in_query_orders.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // OrderListInQueryOrders is a nested struct in bssopenapi response type OrderListInQueryOrders struct { - Order []Order `json:"Order" xml:"Order"` +Order []Order `json:"Order" xml:"Order"` } diff --git a/services/bssopenapi/struct_package_type.go b/services/bssopenapi/struct_package_type.go index e2717affdf..502b6909f3 100644 --- a/services/bssopenapi/struct_package_type.go +++ b/services/bssopenapi/struct_package_type.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,8 +18,8 @@ package bssopenapi // PackageType is a nested struct in bssopenapi response type PackageType struct { - Name string `json:"Name" xml:"Name"` - Code string `json:"Code" xml:"Code"` - Properties Properties `json:"Properties" xml:"Properties"` - Specifications Specifications `json:"Specifications" xml:"Specifications"` + Name string `json:"Name" xml:"Name"` + Code string `json:"Code" xml:"Code"` + Properties Properties `json:"Properties" xml:"Properties"` + Specifications Specifications `json:"Specifications" xml:"Specifications"` } diff --git a/services/bssopenapi/struct_package_types.go b/services/bssopenapi/struct_package_types.go index a3275a803a..3365101b49 100644 --- a/services/bssopenapi/struct_package_types.go +++ b/services/bssopenapi/struct_package_types.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // PackageTypes is a nested struct in bssopenapi response type PackageTypes struct { - PackageType []PackageType `json:"PackageType" xml:"PackageType"` +PackageType []PackageType `json:"PackageType" xml:"PackageType"` } diff --git a/services/bssopenapi/struct_prepaid_card.go b/services/bssopenapi/struct_prepaid_card.go index f101ef8b0a..9214858803 100644 --- a/services/bssopenapi/struct_prepaid_card.go +++ b/services/bssopenapi/struct_prepaid_card.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,14 +18,14 @@ package bssopenapi // PrepaidCard is a nested struct in bssopenapi response type PrepaidCard struct { - PrepaidCardId int `json:"PrepaidCardId" xml:"PrepaidCardId"` - PrepaidCardNo string `json:"PrepaidCardNo" xml:"PrepaidCardNo"` - GrantedTime string `json:"GrantedTime" xml:"GrantedTime"` - EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` - ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` - ApplicableProducts string `json:"ApplicableProducts" xml:"ApplicableProducts"` - ApplicableScenarios string `json:"ApplicableScenarios" xml:"ApplicableScenarios"` - NominalValue string `json:"NominalValue" xml:"NominalValue"` - Balance string `json:"Balance" xml:"Balance"` - Status string `json:"Status" xml:"Status"` + PrepaidCardId int `json:"PrepaidCardId" xml:"PrepaidCardId"` + PrepaidCardNo string `json:"PrepaidCardNo" xml:"PrepaidCardNo"` + GrantedTime string `json:"GrantedTime" xml:"GrantedTime"` + EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` + ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` + ApplicableProducts string `json:"ApplicableProducts" xml:"ApplicableProducts"` + ApplicableScenarios string `json:"ApplicableScenarios" xml:"ApplicableScenarios"` + NominalValue string `json:"NominalValue" xml:"NominalValue"` + Balance string `json:"Balance" xml:"Balance"` + Status string `json:"Status" xml:"Status"` } diff --git a/services/bssopenapi/struct_product.go b/services/bssopenapi/struct_product.go index f19343854d..fee9e46a77 100644 --- a/services/bssopenapi/struct_product.go +++ b/services/bssopenapi/struct_product.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,8 +18,8 @@ package bssopenapi // Product is a nested struct in bssopenapi response type Product struct { - ProductCode string `json:"ProductCode" xml:"ProductCode"` - ProductName string `json:"ProductName" xml:"ProductName"` - ProductType string `json:"ProductType" xml:"ProductType"` - SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + ProductName string `json:"ProductName" xml:"ProductName"` + ProductType string `json:"ProductType" xml:"ProductType"` + SubscriptionType string `json:"SubscriptionType" xml:"SubscriptionType"` } diff --git a/services/bssopenapi/struct_product_list.go b/services/bssopenapi/struct_product_list.go index fcc05ffe41..675084d8a5 100644 --- a/services/bssopenapi/struct_product_list.go +++ b/services/bssopenapi/struct_product_list.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ProductList is a nested struct in bssopenapi response type ProductList struct { - Product []Product `json:"Product" xml:"Product"` +Product []Product `json:"Product" xml:"Product"` } diff --git a/services/bssopenapi/struct_promotion.go b/services/bssopenapi/struct_promotion.go index 568912a6e7..ca89009bc3 100644 --- a/services/bssopenapi/struct_promotion.go +++ b/services/bssopenapi/struct_promotion.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +18,6 @@ package bssopenapi // Promotion is a nested struct in bssopenapi response type Promotion struct { - Id int `json:"Id" xml:"Id"` - Name string `json:"Name" xml:"Name"` + Id int `json:"Id" xml:"Id"` + Name string `json:"Name" xml:"Name"` } diff --git a/services/bssopenapi/struct_promotion_detail.go b/services/bssopenapi/struct_promotion_detail.go index 85acb5bca8..89ea6fcfda 100644 --- a/services/bssopenapi/struct_promotion_detail.go +++ b/services/bssopenapi/struct_promotion_detail.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,7 +18,7 @@ package bssopenapi // PromotionDetail is a nested struct in bssopenapi response type PromotionDetail struct { - PromotionId int `json:"PromotionId" xml:"PromotionId"` - PromotionName string `json:"PromotionName" xml:"PromotionName"` - PromotionDesc string `json:"PromotionDesc" xml:"PromotionDesc"` + PromotionId int `json:"PromotionId" xml:"PromotionId"` + PromotionName string `json:"PromotionName" xml:"PromotionName"` + PromotionDesc string `json:"PromotionDesc" xml:"PromotionDesc"` } diff --git a/services/bssopenapi/struct_promotion_details_in_get_pay_as_you_go_price.go b/services/bssopenapi/struct_promotion_details_in_get_pay_as_you_go_price.go index 378bca4e2b..fb6af3297f 100644 --- a/services/bssopenapi/struct_promotion_details_in_get_pay_as_you_go_price.go +++ b/services/bssopenapi/struct_promotion_details_in_get_pay_as_you_go_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // PromotionDetailsInGetPayAsYouGoPrice is a nested struct in bssopenapi response type PromotionDetailsInGetPayAsYouGoPrice struct { - PromotionDetail []PromotionDetail `json:"PromotionDetail" xml:"PromotionDetail"` +PromotionDetail []PromotionDetail `json:"PromotionDetail" xml:"PromotionDetail"` } diff --git a/services/bssopenapi/struct_promotion_details_in_get_subscription_price.go b/services/bssopenapi/struct_promotion_details_in_get_subscription_price.go index 5a59c94717..db4ad33102 100644 --- a/services/bssopenapi/struct_promotion_details_in_get_subscription_price.go +++ b/services/bssopenapi/struct_promotion_details_in_get_subscription_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // PromotionDetailsInGetSubscriptionPrice is a nested struct in bssopenapi response type PromotionDetailsInGetSubscriptionPrice struct { - PromotionDetail []PromotionDetail `json:"PromotionDetail" xml:"PromotionDetail"` +PromotionDetail []PromotionDetail `json:"PromotionDetail" xml:"PromotionDetail"` } diff --git a/services/bssopenapi/struct_promotions.go b/services/bssopenapi/struct_promotions.go index ec8a54b719..555a94a3b2 100644 --- a/services/bssopenapi/struct_promotions.go +++ b/services/bssopenapi/struct_promotions.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // Promotions is a nested struct in bssopenapi response type Promotions struct { - Promotion []Promotion `json:"Promotion" xml:"Promotion"` +Promotion []Promotion `json:"Promotion" xml:"Promotion"` } diff --git a/services/bssopenapi/struct_properties.go b/services/bssopenapi/struct_properties.go index ba6b94f126..74a20c1e18 100644 --- a/services/bssopenapi/struct_properties.go +++ b/services/bssopenapi/struct_properties.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // Properties is a nested struct in bssopenapi response type Properties struct { - Property []Property `json:"Property" xml:"Property"` +Property []Property `json:"Property" xml:"Property"` } diff --git a/services/bssopenapi/struct_property.go b/services/bssopenapi/struct_property.go index 50aa722451..d85e656b35 100644 --- a/services/bssopenapi/struct_property.go +++ b/services/bssopenapi/struct_property.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,6 +18,6 @@ package bssopenapi // Property is a nested struct in bssopenapi response type Property struct { - Name string `json:"Name" xml:"Name"` - Value string `json:"Value" xml:"Value"` + Name string `json:"Name" xml:"Name"` + Value string `json:"Value" xml:"Value"` } diff --git a/services/bssopenapi/struct_redeem.go b/services/bssopenapi/struct_redeem.go index 5df1afa5db..9d6cb3cc2b 100644 --- a/services/bssopenapi/struct_redeem.go +++ b/services/bssopenapi/struct_redeem.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // Redeem is a nested struct in bssopenapi response type Redeem struct { - RedeemItem []RedeemItem `json:"RedeemItem" xml:"RedeemItem"` +RedeemItem []RedeemItem `json:"RedeemItem" xml:"RedeemItem"` } diff --git a/services/bssopenapi/struct_redeem_item.go b/services/bssopenapi/struct_redeem_item.go index 8fb04a7c38..a32742b4c3 100644 --- a/services/bssopenapi/struct_redeem_item.go +++ b/services/bssopenapi/struct_redeem_item.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,14 +18,14 @@ package bssopenapi // RedeemItem is a nested struct in bssopenapi response type RedeemItem struct { - RedeemId string `json:"RedeemId" xml:"RedeemId"` - RedeemNo string `json:"RedeemNo" xml:"RedeemNo"` - Status string `json:"Status" xml:"Status"` - GrantedTime string `json:"GrantedTime" xml:"GrantedTime"` - EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` - ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` - NominalValue string `json:"NominalValue" xml:"NominalValue"` - Balance string `json:"Balance" xml:"Balance"` - ApplicableProducts string `json:"ApplicableProducts" xml:"ApplicableProducts"` - Specification string `json:"Specification" xml:"Specification"` + RedeemId string `json:"RedeemId" xml:"RedeemId"` + RedeemNo string `json:"RedeemNo" xml:"RedeemNo"` + Status string `json:"Status" xml:"Status"` + GrantedTime string `json:"GrantedTime" xml:"GrantedTime"` + EffectiveTime string `json:"EffectiveTime" xml:"EffectiveTime"` + ExpiryTime string `json:"ExpiryTime" xml:"ExpiryTime"` + NominalValue string `json:"NominalValue" xml:"NominalValue"` + Balance string `json:"Balance" xml:"Balance"` + ApplicableProducts string `json:"ApplicableProducts" xml:"ApplicableProducts"` + Specification string `json:"Specification" xml:"Specification"` } diff --git a/services/bssopenapi/struct_resource_package.go b/services/bssopenapi/struct_resource_package.go index 995460dc09..4e64b4f556 100644 --- a/services/bssopenapi/struct_resource_package.go +++ b/services/bssopenapi/struct_resource_package.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,8 +18,8 @@ package bssopenapi // ResourcePackage is a nested struct in bssopenapi response type ResourcePackage struct { - ProductCode string `json:"ProductCode" xml:"ProductCode"` - ProductType string `json:"ProductType" xml:"ProductType"` - Name string `json:"Name" xml:"Name"` - PackageTypes PackageTypes `json:"PackageTypes" xml:"PackageTypes"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + ProductType string `json:"ProductType" xml:"ProductType"` + Name string `json:"Name" xml:"Name"` + PackageTypes PackageTypes `json:"PackageTypes" xml:"PackageTypes"` } diff --git a/services/bssopenapi/struct_resource_packages.go b/services/bssopenapi/struct_resource_packages.go index 141591251c..3b6714bd0f 100644 --- a/services/bssopenapi/struct_resource_packages.go +++ b/services/bssopenapi/struct_resource_packages.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // ResourcePackages is a nested struct in bssopenapi response type ResourcePackages struct { - ResourcePackage []ResourcePackage `json:"ResourcePackage" xml:"ResourcePackage"` +ResourcePackage []ResourcePackage `json:"ResourcePackage" xml:"ResourcePackage"` } diff --git a/services/bssopenapi/struct_specification.go b/services/bssopenapi/struct_specification.go index fee8398b88..a8c1a7758e 100644 --- a/services/bssopenapi/struct_specification.go +++ b/services/bssopenapi/struct_specification.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,7 +18,7 @@ package bssopenapi // Specification is a nested struct in bssopenapi response type Specification struct { - Name string `json:"Name" xml:"Name"` - Value string `json:"Value" xml:"Value"` - AvailableDurations AvailableDurations `json:"AvailableDurations" xml:"AvailableDurations"` + Name string `json:"Name" xml:"Name"` + Value string `json:"Value" xml:"Value"` + AvailableDurations AvailableDurations `json:"AvailableDurations" xml:"AvailableDurations"` } diff --git a/services/bssopenapi/struct_specifications.go b/services/bssopenapi/struct_specifications.go index a51d986687..fa66ec9338 100644 --- a/services/bssopenapi/struct_specifications.go +++ b/services/bssopenapi/struct_specifications.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // Specifications is a nested struct in bssopenapi response type Specifications struct { - Specification []Specification `json:"Specification" xml:"Specification"` +Specification []Specification `json:"Specification" xml:"Specification"` } diff --git a/services/bssopenapi/struct_tier_price.go b/services/bssopenapi/struct_tier_price.go index 4627d4430d..68d8cfd050 100644 --- a/services/bssopenapi/struct_tier_price.go +++ b/services/bssopenapi/struct_tier_price.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,11 +18,11 @@ package bssopenapi // TierPrice is a nested struct in bssopenapi response type TierPrice struct { - TierStart string `json:"TierStart" xml:"TierStart"` - StartSymbol string `json:"StartSymbol" xml:"StartSymbol"` - TierEnd string `json:"TierEnd" xml:"TierEnd"` - EndSymbol string `json:"EndSymbol" xml:"EndSymbol"` - TierType string `json:"TierType" xml:"TierType"` - PriceType string `json:"PriceType" xml:"PriceType"` - Price string `json:"Price" xml:"Price"` + TierStart string `json:"TierStart" xml:"TierStart"` + StartSymbol string `json:"StartSymbol" xml:"StartSymbol"` + TierEnd string `json:"TierEnd" xml:"TierEnd"` + EndSymbol string `json:"EndSymbol" xml:"EndSymbol"` + TierType string `json:"TierType" xml:"TierType"` + PriceType string `json:"PriceType" xml:"PriceType"` + Price string `json:"Price" xml:"Price"` } diff --git a/services/bssopenapi/struct_tier_prices.go b/services/bssopenapi/struct_tier_prices.go index 59bb44512b..57fd2d9e90 100644 --- a/services/bssopenapi/struct_tier_prices.go +++ b/services/bssopenapi/struct_tier_prices.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // TierPrices is a nested struct in bssopenapi response type TierPrices struct { - TierPrice []TierPrice `json:"TierPrice" xml:"TierPrice"` +TierPrice []TierPrice `json:"TierPrice" xml:"TierPrice"` } diff --git a/services/bssopenapi/struct_uid_list.go b/services/bssopenapi/struct_uid_list.go new file mode 100644 index 0000000000..2a46489d79 --- /dev/null +++ b/services/bssopenapi/struct_uid_list.go @@ -0,0 +1,22 @@ + +package bssopenapi + +//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. + +// UidList is a nested struct in bssopenapi response +type UidList struct { +Item [] string `json:"Item" xml:"Item"` +} diff --git a/services/bssopenapi/struct_values.go b/services/bssopenapi/struct_values.go index 715863c53a..5a1166dfbb 100644 --- a/services/bssopenapi/struct_values.go +++ b/services/bssopenapi/struct_values.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,5 +18,5 @@ package bssopenapi // Values is a nested struct in bssopenapi response type Values struct { - AttributeValue []AttributeValue `json:"AttributeValue" xml:"AttributeValue"` +AttributeValue []AttributeValue `json:"AttributeValue" xml:"AttributeValue"` } diff --git a/services/bssopenapi/subscribe_bill_to_oss.go b/services/bssopenapi/subscribe_bill_to_oss.go index 236202b417..a4ef0842d8 100644 --- a/services/bssopenapi/subscribe_bill_to_oss.go +++ b/services/bssopenapi/subscribe_bill_to_oss.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,92 +17,95 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // SubscribeBillToOSS invokes the bssopenapi.SubscribeBillToOSS API synchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribebilltooss.html func (client *Client) SubscribeBillToOSS(request *SubscribeBillToOSSRequest) (response *SubscribeBillToOSSResponse, err error) { - response = CreateSubscribeBillToOSSResponse() - err = client.DoAction(request, response) - return +response = CreateSubscribeBillToOSSResponse() +err = client.DoAction(request, response) +return } // SubscribeBillToOSSWithChan invokes the bssopenapi.SubscribeBillToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribebilltooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SubscribeBillToOSSWithChan(request *SubscribeBillToOSSRequest) (<-chan *SubscribeBillToOSSResponse, <-chan error) { - responseChan := make(chan *SubscribeBillToOSSResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SubscribeBillToOSS(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *SubscribeBillToOSSResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SubscribeBillToOSS(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // SubscribeBillToOSSWithCallback invokes the bssopenapi.SubscribeBillToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribebilltooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) SubscribeBillToOSSWithCallback(request *SubscribeBillToOSSRequest, callback func(response *SubscribeBillToOSSResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SubscribeBillToOSSResponse - var err error - defer close(result) - response, err = client.SubscribeBillToOSS(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) SubscribeBillToOSSWithCallback(request *SubscribeBillToOSSRequest, callback func(response *SubscribeBillToOSSResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SubscribeBillToOSSResponse +var err error +defer close(result) +response, err = client.SubscribeBillToOSS(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // SubscribeBillToOSSRequest is the request struct for api SubscribeBillToOSS type SubscribeBillToOSSRequest struct { - *requests.RpcRequest - SubscribeType string `position:"Query" name:"SubscribeType"` - SubscribeBucket string `position:"Query" name:"SubscribeBucket"` +*requests.RpcRequest + SubscribeType string `position:"Query" name:"SubscribeType"` + SubscribeBucket string `position:"Query" name:"SubscribeBucket"` } + // SubscribeBillToOSSResponse is the response struct for api SubscribeBillToOSS type SubscribeBillToOSSResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` } // CreateSubscribeBillToOSSRequest creates a request to invoke SubscribeBillToOSS API func CreateSubscribeBillToOSSRequest() (request *SubscribeBillToOSSRequest) { - request = &SubscribeBillToOSSRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeBillToOSS", "", "") - return +request = &SubscribeBillToOSSRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeBillToOSS", "", "") +return } // CreateSubscribeBillToOSSResponse creates a response to parse from SubscribeBillToOSS response func CreateSubscribeBillToOSSResponse() (response *SubscribeBillToOSSResponse) { - response = &SubscribeBillToOSSResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &SubscribeBillToOSSResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/subscribe_detail.go b/services/bssopenapi/subscribe_detail.go index aa136ce76c..e7f7de5149 100644 --- a/services/bssopenapi/subscribe_detail.go +++ b/services/bssopenapi/subscribe_detail.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,93 +17,96 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // SubscribeDetail invokes the bssopenapi.SubscribeDetail API synchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribedetail.html func (client *Client) SubscribeDetail(request *SubscribeDetailRequest) (response *SubscribeDetailResponse, err error) { - response = CreateSubscribeDetailResponse() - err = client.DoAction(request, response) - return +response = CreateSubscribeDetailResponse() +err = client.DoAction(request, response) +return } // SubscribeDetailWithChan invokes the bssopenapi.SubscribeDetail API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribedetail.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SubscribeDetailWithChan(request *SubscribeDetailRequest) (<-chan *SubscribeDetailResponse, <-chan error) { - responseChan := make(chan *SubscribeDetailResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SubscribeDetail(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *SubscribeDetailResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SubscribeDetail(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // SubscribeDetailWithCallback invokes the bssopenapi.SubscribeDetail API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribedetail.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) SubscribeDetailWithCallback(request *SubscribeDetailRequest, callback func(response *SubscribeDetailResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SubscribeDetailResponse - var err error - defer close(result) - response, err = client.SubscribeDetail(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) SubscribeDetailWithCallback(request *SubscribeDetailRequest, callback func(response *SubscribeDetailResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SubscribeDetailResponse +var err error +defer close(result) +response, err = client.SubscribeDetail(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // SubscribeDetailRequest is the request struct for api SubscribeDetail type SubscribeDetailRequest struct { - *requests.RpcRequest - BucketOwnerId requests.Integer `position:"Query" name:"BucketOwnerId"` - SubscribeType *[]string `position:"Query" name:"SubscribeType" type:"Repeated"` - SubscribeBucket string `position:"Query" name:"SubscribeBucket"` +*requests.RpcRequest + BucketOwnerId requests.Integer `position:"Query" name:"BucketOwnerId"` + SubscribeType *[]string `position:"Query" name:"SubscribeType" type:"Repeated"` + SubscribeBucket string `position:"Query" name:"SubscribeBucket"` } + // SubscribeDetailResponse is the response struct for api SubscribeDetail type SubscribeDetailResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` } // CreateSubscribeDetailRequest creates a request to invoke SubscribeDetail API func CreateSubscribeDetailRequest() (request *SubscribeDetailRequest) { - request = &SubscribeDetailRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeDetail", "", "") - return +request = &SubscribeDetailRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeDetail", "", "") +return } // CreateSubscribeDetailResponse creates a response to parse from SubscribeDetail response func CreateSubscribeDetailResponse() (response *SubscribeDetailResponse) { - response = &SubscribeDetailResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &SubscribeDetailResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/subscribe_export_to_oss.go b/services/bssopenapi/subscribe_export_to_oss.go index 6e11881835..360df6f8cf 100644 --- a/services/bssopenapi/subscribe_export_to_oss.go +++ b/services/bssopenapi/subscribe_export_to_oss.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,93 +17,96 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // SubscribeExportToOSS invokes the bssopenapi.SubscribeExportToOSS API synchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribeexporttooss.html func (client *Client) SubscribeExportToOSS(request *SubscribeExportToOSSRequest) (response *SubscribeExportToOSSResponse, err error) { - response = CreateSubscribeExportToOSSResponse() - err = client.DoAction(request, response) - return +response = CreateSubscribeExportToOSSResponse() +err = client.DoAction(request, response) +return } // SubscribeExportToOSSWithChan invokes the bssopenapi.SubscribeExportToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribeexporttooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SubscribeExportToOSSWithChan(request *SubscribeExportToOSSRequest) (<-chan *SubscribeExportToOSSResponse, <-chan error) { - responseChan := make(chan *SubscribeExportToOSSResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SubscribeExportToOSS(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *SubscribeExportToOSSResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.SubscribeExportToOSS(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // SubscribeExportToOSSWithCallback invokes the bssopenapi.SubscribeExportToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/subscribeexporttooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) SubscribeExportToOSSWithCallback(request *SubscribeExportToOSSRequest, callback func(response *SubscribeExportToOSSResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SubscribeExportToOSSResponse - var err error - defer close(result) - response, err = client.SubscribeExportToOSS(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) SubscribeExportToOSSWithCallback(request *SubscribeExportToOSSRequest, callback func(response *SubscribeExportToOSSResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *SubscribeExportToOSSResponse +var err error +defer close(result) +response, err = client.SubscribeExportToOSS(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // SubscribeExportToOSSRequest is the request struct for api SubscribeExportToOSS type SubscribeExportToOSSRequest struct { - *requests.RpcRequest - BucketOwnerId requests.Integer `position:"Query" name:"BucketOwnerId"` - SubscribeType *[]string `position:"Query" name:"SubscribeType" type:"Repeated"` - SubscribeBucket string `position:"Query" name:"SubscribeBucket"` +*requests.RpcRequest + BucketOwnerId requests.Integer `position:"Query" name:"BucketOwnerId"` + SubscribeType *[]string `position:"Query" name:"SubscribeType" type:"Repeated"` + SubscribeBucket string `position:"Query" name:"SubscribeBucket"` } + // SubscribeExportToOSSResponse is the response struct for api SubscribeExportToOSS type SubscribeExportToOSSResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` } // CreateSubscribeExportToOSSRequest creates a request to invoke SubscribeExportToOSS API func CreateSubscribeExportToOSSRequest() (request *SubscribeExportToOSSRequest) { - request = &SubscribeExportToOSSRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeExportToOSS", "", "") - return +request = &SubscribeExportToOSSRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "SubscribeExportToOSS", "", "") +return } // CreateSubscribeExportToOSSResponse creates a response to parse from SubscribeExportToOSS response func CreateSubscribeExportToOSSResponse() (response *SubscribeExportToOSSResponse) { - response = &SubscribeExportToOSSResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &SubscribeExportToOSSResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/unsubscribe_bill_to_oss.go b/services/bssopenapi/unsubscribe_bill_to_oss.go index 0d7c7439cd..d076bdf370 100644 --- a/services/bssopenapi/unsubscribe_bill_to_oss.go +++ b/services/bssopenapi/unsubscribe_bill_to_oss.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,91 +17,94 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // UnsubscribeBillToOSS invokes the bssopenapi.UnsubscribeBillToOSS API synchronously // api document: https://help.aliyun.com/api/bssopenapi/unsubscribebilltooss.html func (client *Client) UnsubscribeBillToOSS(request *UnsubscribeBillToOSSRequest) (response *UnsubscribeBillToOSSResponse, err error) { - response = CreateUnsubscribeBillToOSSResponse() - err = client.DoAction(request, response) - return +response = CreateUnsubscribeBillToOSSResponse() +err = client.DoAction(request, response) +return } // UnsubscribeBillToOSSWithChan invokes the bssopenapi.UnsubscribeBillToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/unsubscribebilltooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnsubscribeBillToOSSWithChan(request *UnsubscribeBillToOSSRequest) (<-chan *UnsubscribeBillToOSSResponse, <-chan error) { - responseChan := make(chan *UnsubscribeBillToOSSResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.UnsubscribeBillToOSS(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *UnsubscribeBillToOSSResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.UnsubscribeBillToOSS(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // UnsubscribeBillToOSSWithCallback invokes the bssopenapi.UnsubscribeBillToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/unsubscribebilltooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UnsubscribeBillToOSSWithCallback(request *UnsubscribeBillToOSSRequest, callback func(response *UnsubscribeBillToOSSResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *UnsubscribeBillToOSSResponse - var err error - defer close(result) - response, err = client.UnsubscribeBillToOSS(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) UnsubscribeBillToOSSWithCallback(request *UnsubscribeBillToOSSRequest, callback func(response *UnsubscribeBillToOSSResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *UnsubscribeBillToOSSResponse +var err error +defer close(result) +response, err = client.UnsubscribeBillToOSS(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // UnsubscribeBillToOSSRequest is the request struct for api UnsubscribeBillToOSS type UnsubscribeBillToOSSRequest struct { - *requests.RpcRequest - SubscribeType string `position:"Query" name:"SubscribeType"` +*requests.RpcRequest + SubscribeType string `position:"Query" name:"SubscribeType"` } + // UnsubscribeBillToOSSResponse is the response struct for api UnsubscribeBillToOSS type UnsubscribeBillToOSSResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` } // CreateUnsubscribeBillToOSSRequest creates a request to invoke UnsubscribeBillToOSS API func CreateUnsubscribeBillToOSSRequest() (request *UnsubscribeBillToOSSRequest) { - request = &UnsubscribeBillToOSSRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "UnsubscribeBillToOSS", "", "") - return +request = &UnsubscribeBillToOSSRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "UnsubscribeBillToOSS", "", "") +return } // CreateUnsubscribeBillToOSSResponse creates a response to parse from UnsubscribeBillToOSS response func CreateUnsubscribeBillToOSSResponse() (response *UnsubscribeBillToOSSResponse) { - response = &UnsubscribeBillToOSSResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &UnsubscribeBillToOSSResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + + diff --git a/services/bssopenapi/unsubscribe_export_to_oss.go b/services/bssopenapi/unsubscribe_export_to_oss.go index 958454d1f9..326cb3efe3 100644 --- a/services/bssopenapi/unsubscribe_export_to_oss.go +++ b/services/bssopenapi/unsubscribe_export_to_oss.go @@ -1,3 +1,4 @@ + package bssopenapi //Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,90 +17,93 @@ package bssopenapi // 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" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" +"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" ) // UnsubscribeExportToOSS invokes the bssopenapi.UnsubscribeExportToOSS API synchronously // api document: https://help.aliyun.com/api/bssopenapi/unsubscribeexporttooss.html func (client *Client) UnsubscribeExportToOSS(request *UnsubscribeExportToOSSRequest) (response *UnsubscribeExportToOSSResponse, err error) { - response = CreateUnsubscribeExportToOSSResponse() - err = client.DoAction(request, response) - return +response = CreateUnsubscribeExportToOSSResponse() +err = client.DoAction(request, response) +return } // UnsubscribeExportToOSSWithChan invokes the bssopenapi.UnsubscribeExportToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/unsubscribeexporttooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnsubscribeExportToOSSWithChan(request *UnsubscribeExportToOSSRequest) (<-chan *UnsubscribeExportToOSSResponse, <-chan error) { - responseChan := make(chan *UnsubscribeExportToOSSResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.UnsubscribeExportToOSS(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan +responseChan := make(chan *UnsubscribeExportToOSSResponse, 1) +errChan := make(chan error, 1) +err := client.AddAsyncTask(func() { +defer close(responseChan) +defer close(errChan) +response, err := client.UnsubscribeExportToOSS(request) +if err != nil { +errChan <- err +} else { +responseChan <- response +} +}) +if err != nil { +errChan <- err +close(responseChan) +close(errChan) +} +return responseChan, errChan } // UnsubscribeExportToOSSWithCallback invokes the bssopenapi.UnsubscribeExportToOSS API asynchronously // api document: https://help.aliyun.com/api/bssopenapi/unsubscribeexporttooss.html // asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UnsubscribeExportToOSSWithCallback(request *UnsubscribeExportToOSSRequest, callback func(response *UnsubscribeExportToOSSResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *UnsubscribeExportToOSSResponse - var err error - defer close(result) - response, err = client.UnsubscribeExportToOSS(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result +func (client *Client) UnsubscribeExportToOSSWithCallback(request *UnsubscribeExportToOSSRequest, callback func(response *UnsubscribeExportToOSSResponse, err error)) (<-chan int) { +result := make(chan int, 1) +err := client.AddAsyncTask(func() { +var response *UnsubscribeExportToOSSResponse +var err error +defer close(result) +response, err = client.UnsubscribeExportToOSS(request) +callback(response, err) +result <- 1 +}) +if err != nil { +defer close(result) +callback(nil, err) +result <- 0 +} +return result } // UnsubscribeExportToOSSRequest is the request struct for api UnsubscribeExportToOSS type UnsubscribeExportToOSSRequest struct { - *requests.RpcRequest +*requests.RpcRequest } + // UnsubscribeExportToOSSResponse is the response struct for api UnsubscribeExportToOSS type UnsubscribeExportToOSSResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` +*responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` } // CreateUnsubscribeExportToOSSRequest creates a request to invoke UnsubscribeExportToOSS API func CreateUnsubscribeExportToOSSRequest() (request *UnsubscribeExportToOSSRequest) { - request = &UnsubscribeExportToOSSRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("BssOpenApi", "2017-12-14", "UnsubscribeExportToOSS", "", "") - return +request = &UnsubscribeExportToOSSRequest{ +RpcRequest: &requests.RpcRequest{}, +} +request.InitWithApiInfo("BssOpenApi", "2017-12-14", "UnsubscribeExportToOSS", "", "") +return } // CreateUnsubscribeExportToOSSResponse creates a response to parse from UnsubscribeExportToOSS response func CreateUnsubscribeExportToOSSResponse() (response *UnsubscribeExportToOSSResponse) { - response = &UnsubscribeExportToOSSResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return +response = &UnsubscribeExportToOSSResponse{ +BaseResponse: &responses.BaseResponse{}, +} +return } + +