浏览代码

UBSMS SDK Auto Released By shenshi,Version:1.53.52

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 年之前
父节点
当前提交
124a3e8052

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-03-15 Version: 1.53.52
+1,  Update Dependency
+
 2019-03-15 Version: 1.53.51
 1,  Update Dependency
 

+ 81 - 0
services/ubsms/client.go

@@ -0,0 +1,81 @@
+package ubsms
+
+//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"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	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
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://help.aliyun.com/document_detail/66217.html
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://help.aliyun.com/document_detail/66223.html
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// attention: rsa key pair auth is only Japan regions available
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	return
+}

+ 106 - 0
services/ubsms/describe_business_status.go

@@ -0,0 +1,106 @@
+package ubsms
+
+//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"
+)
+
+// DescribeBusinessStatus invokes the ubsms.DescribeBusinessStatus API synchronously
+// api document: https://help.aliyun.com/api/ubsms/describebusinessstatus.html
+func (client *Client) DescribeBusinessStatus(request *DescribeBusinessStatusRequest) (response *DescribeBusinessStatusResponse, err error) {
+	response = CreateDescribeBusinessStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeBusinessStatusWithChan invokes the ubsms.DescribeBusinessStatus API asynchronously
+// api document: https://help.aliyun.com/api/ubsms/describebusinessstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeBusinessStatusWithChan(request *DescribeBusinessStatusRequest) (<-chan *DescribeBusinessStatusResponse, <-chan error) {
+	responseChan := make(chan *DescribeBusinessStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeBusinessStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeBusinessStatusWithCallback invokes the ubsms.DescribeBusinessStatus API asynchronously
+// api document: https://help.aliyun.com/api/ubsms/describebusinessstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeBusinessStatusWithCallback(request *DescribeBusinessStatusRequest, callback func(response *DescribeBusinessStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeBusinessStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeBusinessStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeBusinessStatusRequest is the request struct for api DescribeBusinessStatus
+type DescribeBusinessStatusRequest struct {
+	*requests.RpcRequest
+	Password  string `position:"Query" name:"Password"`
+	CallerBid string `position:"Query" name:"callerBid"`
+}
+
+// DescribeBusinessStatusResponse is the response struct for api DescribeBusinessStatus
+type DescribeBusinessStatusResponse struct {
+	*responses.BaseResponse
+	RequestId              string                 `json:"RequestId" xml:"RequestId"`
+	Success                bool                   `json:"Success" xml:"Success"`
+	UserBusinessStatusList UserBusinessStatusList `json:"UserBusinessStatusList" xml:"UserBusinessStatusList"`
+}
+
+// CreateDescribeBusinessStatusRequest creates a request to invoke DescribeBusinessStatus API
+func CreateDescribeBusinessStatusRequest() (request *DescribeBusinessStatusRequest) {
+	request = &DescribeBusinessStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ubsms", "2015-06-23", "DescribeBusinessStatus", "ubsms", "openAPI")
+	return
+}
+
+// CreateDescribeBusinessStatusResponse creates a response to parse from DescribeBusinessStatus response
+func CreateDescribeBusinessStatusResponse() (response *DescribeBusinessStatusResponse) {
+	response = &DescribeBusinessStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/ubsms/notify_user_business_command.go

@@ -0,0 +1,110 @@
+package ubsms
+
+//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"
+)
+
+// NotifyUserBusinessCommand invokes the ubsms.NotifyUserBusinessCommand API synchronously
+// api document: https://help.aliyun.com/api/ubsms/notifyuserbusinesscommand.html
+func (client *Client) NotifyUserBusinessCommand(request *NotifyUserBusinessCommandRequest) (response *NotifyUserBusinessCommandResponse, err error) {
+	response = CreateNotifyUserBusinessCommandResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// NotifyUserBusinessCommandWithChan invokes the ubsms.NotifyUserBusinessCommand API asynchronously
+// api document: https://help.aliyun.com/api/ubsms/notifyuserbusinesscommand.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) NotifyUserBusinessCommandWithChan(request *NotifyUserBusinessCommandRequest) (<-chan *NotifyUserBusinessCommandResponse, <-chan error) {
+	responseChan := make(chan *NotifyUserBusinessCommandResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.NotifyUserBusinessCommand(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// NotifyUserBusinessCommandWithCallback invokes the ubsms.NotifyUserBusinessCommand API asynchronously
+// api document: https://help.aliyun.com/api/ubsms/notifyuserbusinesscommand.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) NotifyUserBusinessCommandWithCallback(request *NotifyUserBusinessCommandRequest, callback func(response *NotifyUserBusinessCommandResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *NotifyUserBusinessCommandResponse
+		var err error
+		defer close(result)
+		response, err = client.NotifyUserBusinessCommand(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// NotifyUserBusinessCommandRequest is the request struct for api NotifyUserBusinessCommand
+type NotifyUserBusinessCommandRequest struct {
+	*requests.RpcRequest
+	Uid         string `position:"Query" name:"Uid"`
+	Password    string `position:"Query" name:"Password"`
+	InstanceId  string `position:"Query" name:"InstanceId"`
+	ServiceCode string `position:"Query" name:"ServiceCode"`
+	ClientToken string `position:"Query" name:"ClientToken"`
+	Cmd         string `position:"Query" name:"Cmd"`
+	Region      string `position:"Query" name:"Region"`
+}
+
+// NotifyUserBusinessCommandResponse is the response struct for api NotifyUserBusinessCommand
+type NotifyUserBusinessCommandResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+}
+
+// CreateNotifyUserBusinessCommandRequest creates a request to invoke NotifyUserBusinessCommand API
+func CreateNotifyUserBusinessCommandRequest() (request *NotifyUserBusinessCommandRequest) {
+	request = &NotifyUserBusinessCommandRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ubsms", "2015-06-23", "NotifyUserBusinessCommand", "ubsms", "openAPI")
+	return
+}
+
+// CreateNotifyUserBusinessCommandResponse creates a response to parse from NotifyUserBusinessCommand response
+func CreateNotifyUserBusinessCommandResponse() (response *NotifyUserBusinessCommandResponse) {
+	response = &NotifyUserBusinessCommandResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/ubsms/set_user_business_status.go

@@ -0,0 +1,107 @@
+package ubsms
+
+//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"
+)
+
+// SetUserBusinessStatus invokes the ubsms.SetUserBusinessStatus API synchronously
+// api document: https://help.aliyun.com/api/ubsms/setuserbusinessstatus.html
+func (client *Client) SetUserBusinessStatus(request *SetUserBusinessStatusRequest) (response *SetUserBusinessStatusResponse, err error) {
+	response = CreateSetUserBusinessStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SetUserBusinessStatusWithChan invokes the ubsms.SetUserBusinessStatus API asynchronously
+// api document: https://help.aliyun.com/api/ubsms/setuserbusinessstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetUserBusinessStatusWithChan(request *SetUserBusinessStatusRequest) (<-chan *SetUserBusinessStatusResponse, <-chan error) {
+	responseChan := make(chan *SetUserBusinessStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SetUserBusinessStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SetUserBusinessStatusWithCallback invokes the ubsms.SetUserBusinessStatus API asynchronously
+// api document: https://help.aliyun.com/api/ubsms/setuserbusinessstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SetUserBusinessStatusWithCallback(request *SetUserBusinessStatusRequest, callback func(response *SetUserBusinessStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SetUserBusinessStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.SetUserBusinessStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SetUserBusinessStatusRequest is the request struct for api SetUserBusinessStatus
+type SetUserBusinessStatusRequest struct {
+	*requests.RpcRequest
+	Uid         string `position:"Query" name:"Uid"`
+	StatusValue string `position:"Query" name:"StatusValue"`
+	Service     string `position:"Query" name:"Service"`
+	StatusKey   string `position:"Query" name:"StatusKey"`
+}
+
+// SetUserBusinessStatusResponse is the response struct for api SetUserBusinessStatus
+type SetUserBusinessStatusResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+}
+
+// CreateSetUserBusinessStatusRequest creates a request to invoke SetUserBusinessStatus API
+func CreateSetUserBusinessStatusRequest() (request *SetUserBusinessStatusRequest) {
+	request = &SetUserBusinessStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ubsms", "2015-06-23", "SetUserBusinessStatus", "ubsms", "openAPI")
+	return
+}
+
+// CreateSetUserBusinessStatusResponse creates a response to parse from SetUserBusinessStatus response
+func CreateSetUserBusinessStatusResponse() (response *SetUserBusinessStatusResponse) {
+	response = &SetUserBusinessStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 22 - 0
services/ubsms/struct_status.go

@@ -0,0 +1,22 @@
+package ubsms
+
+//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.
+
+// Status is a nested struct in ubsms response
+type Status struct {
+	StatusKey   string `json:"StatusKey" xml:"StatusKey"`
+	StatusValue string `json:"StatusValue" xml:"StatusValue"`
+}

+ 21 - 0
services/ubsms/struct_statuses.go

@@ -0,0 +1,21 @@
+package ubsms
+
+//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.
+
+// Statuses is a nested struct in ubsms response
+type Statuses struct {
+	Status []Status `json:"Status" xml:"Status"`
+}

+ 23 - 0
services/ubsms/struct_user_business_status.go

@@ -0,0 +1,23 @@
+package ubsms
+
+//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.
+
+// UserBusinessStatus is a nested struct in ubsms response
+type UserBusinessStatus struct {
+	Uid         string   `json:"Uid" xml:"Uid"`
+	ServiceCode string   `json:"ServiceCode" xml:"ServiceCode"`
+	Statuses    Statuses `json:"Statuses" xml:"Statuses"`
+}

+ 21 - 0
services/ubsms/struct_user_business_status_list.go

@@ -0,0 +1,21 @@
+package ubsms
+
+//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.
+
+// UserBusinessStatusList is a nested struct in ubsms response
+type UserBusinessStatusList struct {
+	UserBusinessStatus []UserBusinessStatus `json:"UserBusinessStatus" xml:"UserBusinessStatus"`
+}