| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- package push
- //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"
- )
- func (client *Client) QueryPushDetail(request *QueryPushDetailRequest) (response *QueryPushDetailResponse, err error) {
- response = CreateQueryPushDetailResponse()
- err = client.DoAction(request, response)
- return
- }
- func (client *Client) QueryPushDetailWithChan(request *QueryPushDetailRequest) (<-chan *QueryPushDetailResponse, <-chan error) {
- responseChan := make(chan *QueryPushDetailResponse, 1)
- errChan := make(chan error, 1)
- err := client.AddAsyncTask(func() {
- defer close(responseChan)
- defer close(errChan)
- response, err := client.QueryPushDetail(request)
- if err != nil {
- errChan <- err
- } else {
- responseChan <- response
- }
- })
- if err != nil {
- errChan <- err
- close(responseChan)
- close(errChan)
- }
- return responseChan, errChan
- }
- func (client *Client) QueryPushDetailWithCallback(request *QueryPushDetailRequest, callback func(response *QueryPushDetailResponse, err error)) <-chan int {
- result := make(chan int, 1)
- err := client.AddAsyncTask(func() {
- var response *QueryPushDetailResponse
- var err error
- defer close(result)
- response, err = client.QueryPushDetail(request)
- callback(response, err)
- result <- 1
- })
- if err != nil {
- defer close(result)
- callback(nil, err)
- result <- 0
- }
- return result
- }
- type QueryPushDetailRequest struct {
- *requests.RpcRequest
- MessageId string `position:"Query" name:"MessageId"`
- AppKey requests.Integer `position:"Query" name:"AppKey"`
- }
- type QueryPushDetailResponse struct {
- *responses.BaseResponse
- RequestId string `json:"RequestId" xml:"RequestId"`
- AppKey int `json:"AppKey" xml:"AppKey"`
- Target string `json:"Target" xml:"Target"`
- TargetValue string `json:"TargetValue" xml:"TargetValue"`
- PushType string `json:"PushType" xml:"PushType"`
- DeviceType string `json:"DeviceType" xml:"DeviceType"`
- Title string `json:"Title" xml:"Title"`
- Body string `json:"Body" xml:"Body"`
- PushTime string `json:"PushTime" xml:"PushTime"`
- ExpireTime string `json:"ExpireTime" xml:"ExpireTime"`
- AntiHarassStartTime int `json:"AntiHarassStartTime" xml:"AntiHarassStartTime"`
- AntiHarassDuration int `json:"AntiHarassDuration" xml:"AntiHarassDuration"`
- StoreOffline bool `json:"StoreOffline" xml:"StoreOffline"`
- BatchNumber string `json:"BatchNumber" xml:"BatchNumber"`
- ProvinceId string `json:"ProvinceId" xml:"ProvinceId"`
- IOSApnsEnv string `json:"iOSApnsEnv" xml:"iOSApnsEnv"`
- IOSRemind bool `json:"iOSRemind" xml:"iOSRemind"`
- IOSRemindBody string `json:"iOSRemindBody" xml:"iOSRemindBody"`
- IOSBadge int `json:"iOSBadge" xml:"iOSBadge"`
- IOSMusic string `json:"iOSMusic" xml:"iOSMusic"`
- IOSSubtitle string `json:"iOSSubtitle" xml:"iOSSubtitle"`
- IOSNotificationCategory string `json:"iOSNotificationCategory" xml:"iOSNotificationCategory"`
- IOSMutableContent bool `json:"iOSMutableContent" xml:"iOSMutableContent"`
- IOSExtParameters string `json:"iOSExtParameters" xml:"iOSExtParameters"`
- AndroidNotifyType string `json:"AndroidNotifyType" xml:"AndroidNotifyType"`
- AndroidOpenType string `json:"AndroidOpenType" xml:"AndroidOpenType"`
- AndroidActivity string `json:"AndroidActivity" xml:"AndroidActivity"`
- AndroidMusic string `json:"AndroidMusic" xml:"AndroidMusic"`
- AndroidOpenUrl string `json:"AndroidOpenUrl" xml:"AndroidOpenUrl"`
- AndroidXiaoMiActivity string `json:"AndroidXiaoMiActivity" xml:"AndroidXiaoMiActivity"`
- AndroidXiaoMiNotifyTitle string `json:"AndroidXiaoMiNotifyTitle" xml:"AndroidXiaoMiNotifyTitle"`
- AndroidXiaoMiNotifyBody string `json:"AndroidXiaoMiNotifyBody" xml:"AndroidXiaoMiNotifyBody"`
- AndroidPopupActivity string `json:"AndroidPopupActivity" xml:"AndroidPopupActivity"`
- AndroidPopupTitle string `json:"AndroidPopupTitle" xml:"AndroidPopupTitle"`
- AndroidPopupBody string `json:"AndroidPopupBody" xml:"AndroidPopupBody"`
- AndroidNotificationBarType int `json:"AndroidNotificationBarType" xml:"AndroidNotificationBarType"`
- AndroidNotificationBarPriority int `json:"AndroidNotificationBarPriority" xml:"AndroidNotificationBarPriority"`
- AndroidExtParameters string `json:"AndroidExtParameters" xml:"AndroidExtParameters"`
- SmsTemplateName string `json:"SmsTemplateName" xml:"SmsTemplateName"`
- SmsSignName string `json:"SmsSignName" xml:"SmsSignName"`
- SmsParams string `json:"SmsParams" xml:"SmsParams"`
- SmsDelaySecs int `json:"SmsDelaySecs" xml:"SmsDelaySecs"`
- SmsSendPolicy int `json:"SmsSendPolicy" xml:"SmsSendPolicy"`
- }
- func CreateQueryPushDetailRequest() (request *QueryPushDetailRequest) {
- request = &QueryPushDetailRequest{
- RpcRequest: &requests.RpcRequest{},
- }
- request.InitWithApiInfo("Push", "2016-08-01", "QueryPushDetail", "", "")
- return
- }
- func CreateQueryPushDetailResponse() (response *QueryPushDetailResponse) {
- response = &QueryPushDetailResponse{
- BaseResponse: &responses.BaseResponse{},
- }
- return
- }
|