// This file is auto-generated, don't edit it. Thanks.
package dingmi_1_0

import (
	openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
	gatewayclient "github.com/alibabacloud-go/gateway-dingtalk/client"
	openapiutil "github.com/alibabacloud-go/openapi-util/service"
	util "github.com/alibabacloud-go/tea-utils/v2/service"
	"github.com/alibabacloud-go/tea/tea"
)

type AddRobotInstanceToGroupHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s AddRobotInstanceToGroupHeaders) String() string {
	return tea.Prettify(s)
}

func (s AddRobotInstanceToGroupHeaders) GoString() string {
	return s.String()
}

func (s *AddRobotInstanceToGroupHeaders) SetCommonHeaders(v map[string]*string) *AddRobotInstanceToGroupHeaders {
	s.CommonHeaders = v
	return s
}

func (s *AddRobotInstanceToGroupHeaders) SetXAcsDingtalkAccessToken(v string) *AddRobotInstanceToGroupHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type AddRobotInstanceToGroupRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// abcd123
	ChatbotId *string `json:"chatbotId,omitempty" xml:"chatbotId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// cidxxxx
	OpenConversationId *string `json:"openConversationId,omitempty" xml:"openConversationId,omitempty"`
}

func (s AddRobotInstanceToGroupRequest) String() string {
	return tea.Prettify(s)
}

func (s AddRobotInstanceToGroupRequest) GoString() string {
	return s.String()
}

func (s *AddRobotInstanceToGroupRequest) SetChatbotId(v string) *AddRobotInstanceToGroupRequest {
	s.ChatbotId = &v
	return s
}

func (s *AddRobotInstanceToGroupRequest) SetOpenConversationId(v string) *AddRobotInstanceToGroupRequest {
	s.OpenConversationId = &v
	return s
}

type AddRobotInstanceToGroupResponseBody struct {
	// example:
	//
	// true
	Result *bool `json:"result,omitempty" xml:"result,omitempty"`
}

func (s AddRobotInstanceToGroupResponseBody) String() string {
	return tea.Prettify(s)
}

func (s AddRobotInstanceToGroupResponseBody) GoString() string {
	return s.String()
}

func (s *AddRobotInstanceToGroupResponseBody) SetResult(v bool) *AddRobotInstanceToGroupResponseBody {
	s.Result = &v
	return s
}

type AddRobotInstanceToGroupResponse struct {
	Headers    map[string]*string                   `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                               `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *AddRobotInstanceToGroupResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s AddRobotInstanceToGroupResponse) String() string {
	return tea.Prettify(s)
}

func (s AddRobotInstanceToGroupResponse) GoString() string {
	return s.String()
}

func (s *AddRobotInstanceToGroupResponse) SetHeaders(v map[string]*string) *AddRobotInstanceToGroupResponse {
	s.Headers = v
	return s
}

func (s *AddRobotInstanceToGroupResponse) SetStatusCode(v int32) *AddRobotInstanceToGroupResponse {
	s.StatusCode = &v
	return s
}

func (s *AddRobotInstanceToGroupResponse) SetBody(v *AddRobotInstanceToGroupResponseBody) *AddRobotInstanceToGroupResponse {
	s.Body = v
	return s
}

type AskRobotHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s AskRobotHeaders) String() string {
	return tea.Prettify(s)
}

func (s AskRobotHeaders) GoString() string {
	return s.String()
}

func (s *AskRobotHeaders) SetCommonHeaders(v map[string]*string) *AskRobotHeaders {
	s.CommonHeaders = v
	return s
}

func (s *AskRobotHeaders) SetXAcsDingtalkAccessToken(v string) *AskRobotHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type AskRobotRequest struct {
	DingUserId *string `json:"dingUserId,omitempty" xml:"dingUserId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 小蜜机器人能做什么
	Question *string `json:"question,omitempty" xml:"question,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// abcd1234
	RobotAppKey *string `json:"robotAppKey,omitempty" xml:"robotAppKey,omitempty"`
	// example:
	//
	// 1234
	SessionUuid *string `json:"sessionUuid,omitempty" xml:"sessionUuid,omitempty"`
}

func (s AskRobotRequest) String() string {
	return tea.Prettify(s)
}

func (s AskRobotRequest) GoString() string {
	return s.String()
}

func (s *AskRobotRequest) SetDingUserId(v string) *AskRobotRequest {
	s.DingUserId = &v
	return s
}

func (s *AskRobotRequest) SetQuestion(v string) *AskRobotRequest {
	s.Question = &v
	return s
}

func (s *AskRobotRequest) SetRobotAppKey(v string) *AskRobotRequest {
	s.RobotAppKey = &v
	return s
}

func (s *AskRobotRequest) SetSessionUuid(v string) *AskRobotRequest {
	s.SessionUuid = &v
	return s
}

type AskRobotResponseBody struct {
	// example:
	//
	// {\"sessionUuid\":\"op_2c35e603af6c4e62bcf5xxxx\",\"answerType\":\"recommendAnswer\",\"recommendAnswerContent\":[\"通讯录上人员可以排序吗？\"]}
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s AskRobotResponseBody) String() string {
	return tea.Prettify(s)
}

func (s AskRobotResponseBody) GoString() string {
	return s.String()
}

func (s *AskRobotResponseBody) SetResult(v string) *AskRobotResponseBody {
	s.Result = &v
	return s
}

type AskRobotResponse struct {
	Headers    map[string]*string    `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *AskRobotResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s AskRobotResponse) String() string {
	return tea.Prettify(s)
}

func (s AskRobotResponse) GoString() string {
	return s.String()
}

func (s *AskRobotResponse) SetHeaders(v map[string]*string) *AskRobotResponse {
	s.Headers = v
	return s
}

func (s *AskRobotResponse) SetStatusCode(v int32) *AskRobotResponse {
	s.StatusCode = &v
	return s
}

func (s *AskRobotResponse) SetBody(v *AskRobotResponseBody) *AskRobotResponse {
	s.Body = v
	return s
}

type GetDingMeBaseDataHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s GetDingMeBaseDataHeaders) String() string {
	return tea.Prettify(s)
}

func (s GetDingMeBaseDataHeaders) GoString() string {
	return s.String()
}

func (s *GetDingMeBaseDataHeaders) SetCommonHeaders(v map[string]*string) *GetDingMeBaseDataHeaders {
	s.CommonHeaders = v
	return s
}

func (s *GetDingMeBaseDataHeaders) SetXAcsDingtalkAccessToken(v string) *GetDingMeBaseDataHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type GetDingMeBaseDataRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// dsfsfr434
	AppKey *string `json:"appKey,omitempty" xml:"appKey,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// true
	ByDay *bool `json:"byDay,omitempty" xml:"byDay,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 20210506
	EndDay *string `json:"endDay,omitempty" xml:"endDay,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 20210405
	StartDay *string `json:"startDay,omitempty" xml:"startDay,omitempty"`
}

func (s GetDingMeBaseDataRequest) String() string {
	return tea.Prettify(s)
}

func (s GetDingMeBaseDataRequest) GoString() string {
	return s.String()
}

func (s *GetDingMeBaseDataRequest) SetAppKey(v string) *GetDingMeBaseDataRequest {
	s.AppKey = &v
	return s
}

func (s *GetDingMeBaseDataRequest) SetByDay(v bool) *GetDingMeBaseDataRequest {
	s.ByDay = &v
	return s
}

func (s *GetDingMeBaseDataRequest) SetEndDay(v string) *GetDingMeBaseDataRequest {
	s.EndDay = &v
	return s
}

func (s *GetDingMeBaseDataRequest) SetStartDay(v string) *GetDingMeBaseDataRequest {
	s.StartDay = &v
	return s
}

type GetDingMeBaseDataResponseBody struct {
	// This parameter is required.
	FromCache *bool `json:"fromCache,omitempty" xml:"fromCache,omitempty"`
	// This parameter is required.
	Rawset []map[string]*string `json:"rawset,omitempty" xml:"rawset,omitempty" type:"Repeated"`
	// This parameter is required.
	Runtime *int64 `json:"runtime,omitempty" xml:"runtime,omitempty"`
	// This parameter is required.
	Tips map[string]interface{} `json:"tips,omitempty" xml:"tips,omitempty"`
}

func (s GetDingMeBaseDataResponseBody) String() string {
	return tea.Prettify(s)
}

func (s GetDingMeBaseDataResponseBody) GoString() string {
	return s.String()
}

func (s *GetDingMeBaseDataResponseBody) SetFromCache(v bool) *GetDingMeBaseDataResponseBody {
	s.FromCache = &v
	return s
}

func (s *GetDingMeBaseDataResponseBody) SetRawset(v []map[string]*string) *GetDingMeBaseDataResponseBody {
	s.Rawset = v
	return s
}

func (s *GetDingMeBaseDataResponseBody) SetRuntime(v int64) *GetDingMeBaseDataResponseBody {
	s.Runtime = &v
	return s
}

func (s *GetDingMeBaseDataResponseBody) SetTips(v map[string]interface{}) *GetDingMeBaseDataResponseBody {
	s.Tips = v
	return s
}

type GetDingMeBaseDataResponse struct {
	Headers    map[string]*string             `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                         `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *GetDingMeBaseDataResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s GetDingMeBaseDataResponse) String() string {
	return tea.Prettify(s)
}

func (s GetDingMeBaseDataResponse) GoString() string {
	return s.String()
}

func (s *GetDingMeBaseDataResponse) SetHeaders(v map[string]*string) *GetDingMeBaseDataResponse {
	s.Headers = v
	return s
}

func (s *GetDingMeBaseDataResponse) SetStatusCode(v int32) *GetDingMeBaseDataResponse {
	s.StatusCode = &v
	return s
}

func (s *GetDingMeBaseDataResponse) SetBody(v *GetDingMeBaseDataResponseBody) *GetDingMeBaseDataResponse {
	s.Body = v
	return s
}

type GetIntelligentRobotInfoHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s GetIntelligentRobotInfoHeaders) String() string {
	return tea.Prettify(s)
}

func (s GetIntelligentRobotInfoHeaders) GoString() string {
	return s.String()
}

func (s *GetIntelligentRobotInfoHeaders) SetCommonHeaders(v map[string]*string) *GetIntelligentRobotInfoHeaders {
	s.CommonHeaders = v
	return s
}

func (s *GetIntelligentRobotInfoHeaders) SetXAcsDingtalkAccessToken(v string) *GetIntelligentRobotInfoHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type GetIntelligentRobotInfoRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// abcd1234
	RobotAppKey *string `json:"robotAppKey,omitempty" xml:"robotAppKey,omitempty"`
}

func (s GetIntelligentRobotInfoRequest) String() string {
	return tea.Prettify(s)
}

func (s GetIntelligentRobotInfoRequest) GoString() string {
	return s.String()
}

func (s *GetIntelligentRobotInfoRequest) SetRobotAppKey(v string) *GetIntelligentRobotInfoRequest {
	s.RobotAppKey = &v
	return s
}

type GetIntelligentRobotInfoResponseBody struct {
	// example:
	//
	// abcd1234
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s GetIntelligentRobotInfoResponseBody) String() string {
	return tea.Prettify(s)
}

func (s GetIntelligentRobotInfoResponseBody) GoString() string {
	return s.String()
}

func (s *GetIntelligentRobotInfoResponseBody) SetResult(v string) *GetIntelligentRobotInfoResponseBody {
	s.Result = &v
	return s
}

type GetIntelligentRobotInfoResponse struct {
	Headers    map[string]*string                   `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                               `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *GetIntelligentRobotInfoResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s GetIntelligentRobotInfoResponse) String() string {
	return tea.Prettify(s)
}

func (s GetIntelligentRobotInfoResponse) GoString() string {
	return s.String()
}

func (s *GetIntelligentRobotInfoResponse) SetHeaders(v map[string]*string) *GetIntelligentRobotInfoResponse {
	s.Headers = v
	return s
}

func (s *GetIntelligentRobotInfoResponse) SetStatusCode(v int32) *GetIntelligentRobotInfoResponse {
	s.StatusCode = &v
	return s
}

func (s *GetIntelligentRobotInfoResponse) SetBody(v *GetIntelligentRobotInfoResponseBody) *GetIntelligentRobotInfoResponse {
	s.Body = v
	return s
}

type GetOfficialAccountRobotInfoHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s GetOfficialAccountRobotInfoHeaders) String() string {
	return tea.Prettify(s)
}

func (s GetOfficialAccountRobotInfoHeaders) GoString() string {
	return s.String()
}

func (s *GetOfficialAccountRobotInfoHeaders) SetCommonHeaders(v map[string]*string) *GetOfficialAccountRobotInfoHeaders {
	s.CommonHeaders = v
	return s
}

func (s *GetOfficialAccountRobotInfoHeaders) SetXAcsDingtalkAccessToken(v string) *GetOfficialAccountRobotInfoHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type GetOfficialAccountRobotInfoRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// 机器人类型参数，服务窗机器人：1，客户群内机器人：2
	Type *string `json:"type,omitempty" xml:"type,omitempty"`
}

func (s GetOfficialAccountRobotInfoRequest) String() string {
	return tea.Prettify(s)
}

func (s GetOfficialAccountRobotInfoRequest) GoString() string {
	return s.String()
}

func (s *GetOfficialAccountRobotInfoRequest) SetType(v string) *GetOfficialAccountRobotInfoRequest {
	s.Type = &v
	return s
}

type GetOfficialAccountRobotInfoResponseBody struct {
	// This parameter is required.
	//
	// example:
	//
	// 123
	AppId *int64 `json:"appId,omitempty" xml:"appId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 小蜜客服机器人
	Brief *string `json:"brief,omitempty" xml:"brief,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 小蜜客服机器人是7*24小时智能问答机器人
	Description *string `json:"description,omitempty" xml:"description,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// xxxx
	Icon *string `json:"icon,omitempty" xml:"icon,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 小蜜机器人
	Name *string `json:"name,omitempty" xml:"name,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// xxxx
	PreviewMediaUrl *string `json:"previewMediaUrl,omitempty" xml:"previewMediaUrl,omitempty"`
}

func (s GetOfficialAccountRobotInfoResponseBody) String() string {
	return tea.Prettify(s)
}

func (s GetOfficialAccountRobotInfoResponseBody) GoString() string {
	return s.String()
}

func (s *GetOfficialAccountRobotInfoResponseBody) SetAppId(v int64) *GetOfficialAccountRobotInfoResponseBody {
	s.AppId = &v
	return s
}

func (s *GetOfficialAccountRobotInfoResponseBody) SetBrief(v string) *GetOfficialAccountRobotInfoResponseBody {
	s.Brief = &v
	return s
}

func (s *GetOfficialAccountRobotInfoResponseBody) SetDescription(v string) *GetOfficialAccountRobotInfoResponseBody {
	s.Description = &v
	return s
}

func (s *GetOfficialAccountRobotInfoResponseBody) SetIcon(v string) *GetOfficialAccountRobotInfoResponseBody {
	s.Icon = &v
	return s
}

func (s *GetOfficialAccountRobotInfoResponseBody) SetName(v string) *GetOfficialAccountRobotInfoResponseBody {
	s.Name = &v
	return s
}

func (s *GetOfficialAccountRobotInfoResponseBody) SetPreviewMediaUrl(v string) *GetOfficialAccountRobotInfoResponseBody {
	s.PreviewMediaUrl = &v
	return s
}

type GetOfficialAccountRobotInfoResponse struct {
	Headers    map[string]*string                       `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                                   `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *GetOfficialAccountRobotInfoResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s GetOfficialAccountRobotInfoResponse) String() string {
	return tea.Prettify(s)
}

func (s GetOfficialAccountRobotInfoResponse) GoString() string {
	return s.String()
}

func (s *GetOfficialAccountRobotInfoResponse) SetHeaders(v map[string]*string) *GetOfficialAccountRobotInfoResponse {
	s.Headers = v
	return s
}

func (s *GetOfficialAccountRobotInfoResponse) SetStatusCode(v int32) *GetOfficialAccountRobotInfoResponse {
	s.StatusCode = &v
	return s
}

func (s *GetOfficialAccountRobotInfoResponse) SetBody(v *GetOfficialAccountRobotInfoResponseBody) *GetOfficialAccountRobotInfoResponse {
	s.Body = v
	return s
}

type GetWebChannelUserTokenHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s GetWebChannelUserTokenHeaders) String() string {
	return tea.Prettify(s)
}

func (s GetWebChannelUserTokenHeaders) GoString() string {
	return s.String()
}

func (s *GetWebChannelUserTokenHeaders) SetCommonHeaders(v map[string]*string) *GetWebChannelUserTokenHeaders {
	s.CommonHeaders = v
	return s
}

func (s *GetWebChannelUserTokenHeaders) SetXAcsDingtalkAccessToken(v string) *GetWebChannelUserTokenHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type GetWebChannelUserTokenRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// 123abc
	ForeignId *string `json:"foreignId,omitempty" xml:"foreignId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 客户abc
	Nick *string `json:"nick,omitempty" xml:"nick,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 123
	Source *int64 `json:"source,omitempty" xml:"source,omitempty"`
}

func (s GetWebChannelUserTokenRequest) String() string {
	return tea.Prettify(s)
}

func (s GetWebChannelUserTokenRequest) GoString() string {
	return s.String()
}

func (s *GetWebChannelUserTokenRequest) SetForeignId(v string) *GetWebChannelUserTokenRequest {
	s.ForeignId = &v
	return s
}

func (s *GetWebChannelUserTokenRequest) SetNick(v string) *GetWebChannelUserTokenRequest {
	s.Nick = &v
	return s
}

func (s *GetWebChannelUserTokenRequest) SetSource(v int64) *GetWebChannelUserTokenRequest {
	s.Source = &v
	return s
}

type GetWebChannelUserTokenResponseBody struct {
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s GetWebChannelUserTokenResponseBody) String() string {
	return tea.Prettify(s)
}

func (s GetWebChannelUserTokenResponseBody) GoString() string {
	return s.String()
}

func (s *GetWebChannelUserTokenResponseBody) SetResult(v string) *GetWebChannelUserTokenResponseBody {
	s.Result = &v
	return s
}

type GetWebChannelUserTokenResponse struct {
	Headers    map[string]*string                  `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                              `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *GetWebChannelUserTokenResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s GetWebChannelUserTokenResponse) String() string {
	return tea.Prettify(s)
}

func (s GetWebChannelUserTokenResponse) GoString() string {
	return s.String()
}

func (s *GetWebChannelUserTokenResponse) SetHeaders(v map[string]*string) *GetWebChannelUserTokenResponse {
	s.Headers = v
	return s
}

func (s *GetWebChannelUserTokenResponse) SetStatusCode(v int32) *GetWebChannelUserTokenResponse {
	s.StatusCode = &v
	return s
}

func (s *GetWebChannelUserTokenResponse) SetBody(v *GetWebChannelUserTokenResponseBody) *GetWebChannelUserTokenResponse {
	s.Body = v
	return s
}

type PushCustomerGroupMessageHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s PushCustomerGroupMessageHeaders) String() string {
	return tea.Prettify(s)
}

func (s PushCustomerGroupMessageHeaders) GoString() string {
	return s.String()
}

func (s *PushCustomerGroupMessageHeaders) SetCommonHeaders(v map[string]*string) *PushCustomerGroupMessageHeaders {
	s.CommonHeaders = v
	return s
}

func (s *PushCustomerGroupMessageHeaders) SetXAcsDingtalkAccessToken(v string) *PushCustomerGroupMessageHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type PushCustomerGroupMessageRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// cidxxxx
	ConversationId *string `json:"conversationId,omitempty" xml:"conversationId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// sampleText
	MsgKey *string `json:"msgKey,omitempty" xml:"msgKey,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// eyJjb250ZW50IjogIua1i+ivleWGheWuuSJ9(即{"content": "测试内容"}的base64编码值)
	MsgParam *string `json:"msgParam,omitempty" xml:"msgParam,omitempty"`
}

func (s PushCustomerGroupMessageRequest) String() string {
	return tea.Prettify(s)
}

func (s PushCustomerGroupMessageRequest) GoString() string {
	return s.String()
}

func (s *PushCustomerGroupMessageRequest) SetConversationId(v string) *PushCustomerGroupMessageRequest {
	s.ConversationId = &v
	return s
}

func (s *PushCustomerGroupMessageRequest) SetMsgKey(v string) *PushCustomerGroupMessageRequest {
	s.MsgKey = &v
	return s
}

func (s *PushCustomerGroupMessageRequest) SetMsgParam(v string) *PushCustomerGroupMessageRequest {
	s.MsgParam = &v
	return s
}

type PushCustomerGroupMessageResponseBody struct {
	// This parameter is required.
	//
	// example:
	//
	// 1234abcd
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s PushCustomerGroupMessageResponseBody) String() string {
	return tea.Prettify(s)
}

func (s PushCustomerGroupMessageResponseBody) GoString() string {
	return s.String()
}

func (s *PushCustomerGroupMessageResponseBody) SetResult(v string) *PushCustomerGroupMessageResponseBody {
	s.Result = &v
	return s
}

type PushCustomerGroupMessageResponse struct {
	Headers    map[string]*string                    `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                                `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *PushCustomerGroupMessageResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s PushCustomerGroupMessageResponse) String() string {
	return tea.Prettify(s)
}

func (s PushCustomerGroupMessageResponse) GoString() string {
	return s.String()
}

func (s *PushCustomerGroupMessageResponse) SetHeaders(v map[string]*string) *PushCustomerGroupMessageResponse {
	s.Headers = v
	return s
}

func (s *PushCustomerGroupMessageResponse) SetStatusCode(v int32) *PushCustomerGroupMessageResponse {
	s.StatusCode = &v
	return s
}

func (s *PushCustomerGroupMessageResponse) SetBody(v *PushCustomerGroupMessageResponseBody) *PushCustomerGroupMessageResponse {
	s.Body = v
	return s
}

type PushIntelligentRobotGroupMessageHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s PushIntelligentRobotGroupMessageHeaders) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotGroupMessageHeaders) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotGroupMessageHeaders) SetCommonHeaders(v map[string]*string) *PushIntelligentRobotGroupMessageHeaders {
	s.CommonHeaders = v
	return s
}

func (s *PushIntelligentRobotGroupMessageHeaders) SetXAcsDingtalkAccessToken(v string) *PushIntelligentRobotGroupMessageHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type PushIntelligentRobotGroupMessageRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// abcd1234
	ChatbotId *string `json:"chatbotId,omitempty" xml:"chatbotId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// sampleText
	MsgKey *string `json:"msgKey,omitempty" xml:"msgKey,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// eyJjb250ZW50IjogIua1i+ivleWGheWuuSJ9(即{"content": "测试内容"}的base64编码值)
	MsgParam *string `json:"msgParam,omitempty" xml:"msgParam,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// cidxxxx
	OpenConversationId *string `json:"openConversationId,omitempty" xml:"openConversationId,omitempty"`
}

func (s PushIntelligentRobotGroupMessageRequest) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotGroupMessageRequest) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotGroupMessageRequest) SetChatbotId(v string) *PushIntelligentRobotGroupMessageRequest {
	s.ChatbotId = &v
	return s
}

func (s *PushIntelligentRobotGroupMessageRequest) SetMsgKey(v string) *PushIntelligentRobotGroupMessageRequest {
	s.MsgKey = &v
	return s
}

func (s *PushIntelligentRobotGroupMessageRequest) SetMsgParam(v string) *PushIntelligentRobotGroupMessageRequest {
	s.MsgParam = &v
	return s
}

func (s *PushIntelligentRobotGroupMessageRequest) SetOpenConversationId(v string) *PushIntelligentRobotGroupMessageRequest {
	s.OpenConversationId = &v
	return s
}

type PushIntelligentRobotGroupMessageResponseBody struct {
	// example:
	//
	// 1234
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s PushIntelligentRobotGroupMessageResponseBody) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotGroupMessageResponseBody) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotGroupMessageResponseBody) SetResult(v string) *PushIntelligentRobotGroupMessageResponseBody {
	s.Result = &v
	return s
}

type PushIntelligentRobotGroupMessageResponse struct {
	Headers    map[string]*string                            `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                                        `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *PushIntelligentRobotGroupMessageResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s PushIntelligentRobotGroupMessageResponse) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotGroupMessageResponse) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotGroupMessageResponse) SetHeaders(v map[string]*string) *PushIntelligentRobotGroupMessageResponse {
	s.Headers = v
	return s
}

func (s *PushIntelligentRobotGroupMessageResponse) SetStatusCode(v int32) *PushIntelligentRobotGroupMessageResponse {
	s.StatusCode = &v
	return s
}

func (s *PushIntelligentRobotGroupMessageResponse) SetBody(v *PushIntelligentRobotGroupMessageResponseBody) *PushIntelligentRobotGroupMessageResponse {
	s.Body = v
	return s
}

type PushIntelligentRobotMessageHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s PushIntelligentRobotMessageHeaders) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotMessageHeaders) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotMessageHeaders) SetCommonHeaders(v map[string]*string) *PushIntelligentRobotMessageHeaders {
	s.CommonHeaders = v
	return s
}

func (s *PushIntelligentRobotMessageHeaders) SetXAcsDingtalkAccessToken(v string) *PushIntelligentRobotMessageHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type PushIntelligentRobotMessageRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// abcd123
	ChatbotId *string `json:"chatbotId,omitempty" xml:"chatbotId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// sampleText
	MsgKey *string `json:"msgKey,omitempty" xml:"msgKey,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// eyJjb250ZW50IjogIua1i+ivleWGheWuuSJ9(即{"content": "测试内容"}的base64编码值)
	MsgParam *string `json:"msgParam,omitempty" xml:"msgParam,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 123456abc
	UserId *string `json:"userId,omitempty" xml:"userId,omitempty"`
}

func (s PushIntelligentRobotMessageRequest) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotMessageRequest) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotMessageRequest) SetChatbotId(v string) *PushIntelligentRobotMessageRequest {
	s.ChatbotId = &v
	return s
}

func (s *PushIntelligentRobotMessageRequest) SetMsgKey(v string) *PushIntelligentRobotMessageRequest {
	s.MsgKey = &v
	return s
}

func (s *PushIntelligentRobotMessageRequest) SetMsgParam(v string) *PushIntelligentRobotMessageRequest {
	s.MsgParam = &v
	return s
}

func (s *PushIntelligentRobotMessageRequest) SetUserId(v string) *PushIntelligentRobotMessageRequest {
	s.UserId = &v
	return s
}

type PushIntelligentRobotMessageResponseBody struct {
	// example:
	//
	// 1234
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s PushIntelligentRobotMessageResponseBody) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotMessageResponseBody) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotMessageResponseBody) SetResult(v string) *PushIntelligentRobotMessageResponseBody {
	s.Result = &v
	return s
}

type PushIntelligentRobotMessageResponse struct {
	Headers    map[string]*string                       `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                                   `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *PushIntelligentRobotMessageResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s PushIntelligentRobotMessageResponse) String() string {
	return tea.Prettify(s)
}

func (s PushIntelligentRobotMessageResponse) GoString() string {
	return s.String()
}

func (s *PushIntelligentRobotMessageResponse) SetHeaders(v map[string]*string) *PushIntelligentRobotMessageResponse {
	s.Headers = v
	return s
}

func (s *PushIntelligentRobotMessageResponse) SetStatusCode(v int32) *PushIntelligentRobotMessageResponse {
	s.StatusCode = &v
	return s
}

func (s *PushIntelligentRobotMessageResponse) SetBody(v *PushIntelligentRobotMessageResponseBody) *PushIntelligentRobotMessageResponse {
	s.Body = v
	return s
}

type PushOfficialAccountMessageHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s PushOfficialAccountMessageHeaders) String() string {
	return tea.Prettify(s)
}

func (s PushOfficialAccountMessageHeaders) GoString() string {
	return s.String()
}

func (s *PushOfficialAccountMessageHeaders) SetCommonHeaders(v map[string]*string) *PushOfficialAccountMessageHeaders {
	s.CommonHeaders = v
	return s
}

func (s *PushOfficialAccountMessageHeaders) SetXAcsDingtalkAccessToken(v string) *PushOfficialAccountMessageHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type PushOfficialAccountMessageRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// sampleText
	MsgKey *string `json:"msgKey,omitempty" xml:"msgKey,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// eyJjb250ZW50IjogIua1i+ivleWGheWuuSJ9(即{"content": "测试内容"}的base64编码值)
	MsgParam *string `json:"msgParam,omitempty" xml:"msgParam,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 123456abc
	UserId *string `json:"userId,omitempty" xml:"userId,omitempty"`
}

func (s PushOfficialAccountMessageRequest) String() string {
	return tea.Prettify(s)
}

func (s PushOfficialAccountMessageRequest) GoString() string {
	return s.String()
}

func (s *PushOfficialAccountMessageRequest) SetMsgKey(v string) *PushOfficialAccountMessageRequest {
	s.MsgKey = &v
	return s
}

func (s *PushOfficialAccountMessageRequest) SetMsgParam(v string) *PushOfficialAccountMessageRequest {
	s.MsgParam = &v
	return s
}

func (s *PushOfficialAccountMessageRequest) SetUserId(v string) *PushOfficialAccountMessageRequest {
	s.UserId = &v
	return s
}

type PushOfficialAccountMessageResponseBody struct {
	// This parameter is required.
	//
	// example:
	//
	// 1234abcd
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s PushOfficialAccountMessageResponseBody) String() string {
	return tea.Prettify(s)
}

func (s PushOfficialAccountMessageResponseBody) GoString() string {
	return s.String()
}

func (s *PushOfficialAccountMessageResponseBody) SetResult(v string) *PushOfficialAccountMessageResponseBody {
	s.Result = &v
	return s
}

type PushOfficialAccountMessageResponse struct {
	Headers    map[string]*string                      `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                                  `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *PushOfficialAccountMessageResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s PushOfficialAccountMessageResponse) String() string {
	return tea.Prettify(s)
}

func (s PushOfficialAccountMessageResponse) GoString() string {
	return s.String()
}

func (s *PushOfficialAccountMessageResponse) SetHeaders(v map[string]*string) *PushOfficialAccountMessageResponse {
	s.Headers = v
	return s
}

func (s *PushOfficialAccountMessageResponse) SetStatusCode(v int32) *PushOfficialAccountMessageResponse {
	s.StatusCode = &v
	return s
}

func (s *PushOfficialAccountMessageResponse) SetBody(v *PushOfficialAccountMessageResponseBody) *PushOfficialAccountMessageResponse {
	s.Body = v
	return s
}

type PushRobotMessageHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s PushRobotMessageHeaders) String() string {
	return tea.Prettify(s)
}

func (s PushRobotMessageHeaders) GoString() string {
	return s.String()
}

func (s *PushRobotMessageHeaders) SetCommonHeaders(v map[string]*string) *PushRobotMessageHeaders {
	s.CommonHeaders = v
	return s
}

func (s *PushRobotMessageHeaders) SetXAcsDingtalkAccessToken(v string) *PushRobotMessageHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type PushRobotMessageRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// 1234
	ChatbotId *string `json:"chatbotId,omitempty" xml:"chatbotId,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// sampleText
	MsgKey *string `json:"msgKey,omitempty" xml:"msgKey,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// eyJjb250ZW50IjogIua1i+ivleWGheWuuSJ9(即{"content": "测试内容"}的base64编码值)
	MsgParam *string `json:"msgParam,omitempty" xml:"msgParam,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 123456abc
	UserId *string `json:"userId,omitempty" xml:"userId,omitempty"`
}

func (s PushRobotMessageRequest) String() string {
	return tea.Prettify(s)
}

func (s PushRobotMessageRequest) GoString() string {
	return s.String()
}

func (s *PushRobotMessageRequest) SetChatbotId(v string) *PushRobotMessageRequest {
	s.ChatbotId = &v
	return s
}

func (s *PushRobotMessageRequest) SetMsgKey(v string) *PushRobotMessageRequest {
	s.MsgKey = &v
	return s
}

func (s *PushRobotMessageRequest) SetMsgParam(v string) *PushRobotMessageRequest {
	s.MsgParam = &v
	return s
}

func (s *PushRobotMessageRequest) SetUserId(v string) *PushRobotMessageRequest {
	s.UserId = &v
	return s
}

type PushRobotMessageResponseBody struct {
	// example:
	//
	// 12345
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s PushRobotMessageResponseBody) String() string {
	return tea.Prettify(s)
}

func (s PushRobotMessageResponseBody) GoString() string {
	return s.String()
}

func (s *PushRobotMessageResponseBody) SetResult(v string) *PushRobotMessageResponseBody {
	s.Result = &v
	return s
}

type PushRobotMessageResponse struct {
	Headers    map[string]*string            `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                        `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *PushRobotMessageResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s PushRobotMessageResponse) String() string {
	return tea.Prettify(s)
}

func (s PushRobotMessageResponse) GoString() string {
	return s.String()
}

func (s *PushRobotMessageResponse) SetHeaders(v map[string]*string) *PushRobotMessageResponse {
	s.Headers = v
	return s
}

func (s *PushRobotMessageResponse) SetStatusCode(v int32) *PushRobotMessageResponse {
	s.StatusCode = &v
	return s
}

func (s *PushRobotMessageResponse) SetBody(v *PushRobotMessageResponseBody) *PushRobotMessageResponse {
	s.Body = v
	return s
}

type ReplyRobotHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s ReplyRobotHeaders) String() string {
	return tea.Prettify(s)
}

func (s ReplyRobotHeaders) GoString() string {
	return s.String()
}

func (s *ReplyRobotHeaders) SetCommonHeaders(v map[string]*string) *ReplyRobotHeaders {
	s.CommonHeaders = v
	return s
}

func (s *ReplyRobotHeaders) SetXAcsDingtalkAccessToken(v string) *ReplyRobotHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type ReplyRobotRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// {"bizParamMap":{"proxySessionId":"DINGTALK_RYnVfayNAe_4000006001201145"},"msgType":"text","text":"测试回复机器人消息"}
	ProxyMessageStr *string `json:"proxyMessageStr,omitempty" xml:"proxyMessageStr,omitempty"`
}

func (s ReplyRobotRequest) String() string {
	return tea.Prettify(s)
}

func (s ReplyRobotRequest) GoString() string {
	return s.String()
}

func (s *ReplyRobotRequest) SetProxyMessageStr(v string) *ReplyRobotRequest {
	s.ProxyMessageStr = &v
	return s
}

type ReplyRobotResponseBody struct {
	// example:
	//
	// true
	Result *bool `json:"result,omitempty" xml:"result,omitempty"`
}

func (s ReplyRobotResponseBody) String() string {
	return tea.Prettify(s)
}

func (s ReplyRobotResponseBody) GoString() string {
	return s.String()
}

func (s *ReplyRobotResponseBody) SetResult(v bool) *ReplyRobotResponseBody {
	s.Result = &v
	return s
}

type ReplyRobotResponse struct {
	Headers    map[string]*string      `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                  `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *ReplyRobotResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s ReplyRobotResponse) String() string {
	return tea.Prettify(s)
}

func (s ReplyRobotResponse) GoString() string {
	return s.String()
}

func (s *ReplyRobotResponse) SetHeaders(v map[string]*string) *ReplyRobotResponse {
	s.Headers = v
	return s
}

func (s *ReplyRobotResponse) SetStatusCode(v int32) *ReplyRobotResponse {
	s.StatusCode = &v
	return s
}

func (s *ReplyRobotResponse) SetBody(v *ReplyRobotResponseBody) *ReplyRobotResponse {
	s.Body = v
	return s
}

type UpdateOfficialAccountRobotInfoHeaders struct {
	CommonHeaders           map[string]*string `json:"commonHeaders,omitempty" xml:"commonHeaders,omitempty"`
	XAcsDingtalkAccessToken *string            `json:"x-acs-dingtalk-access-token,omitempty" xml:"x-acs-dingtalk-access-token,omitempty"`
}

func (s UpdateOfficialAccountRobotInfoHeaders) String() string {
	return tea.Prettify(s)
}

func (s UpdateOfficialAccountRobotInfoHeaders) GoString() string {
	return s.String()
}

func (s *UpdateOfficialAccountRobotInfoHeaders) SetCommonHeaders(v map[string]*string) *UpdateOfficialAccountRobotInfoHeaders {
	s.CommonHeaders = v
	return s
}

func (s *UpdateOfficialAccountRobotInfoHeaders) SetXAcsDingtalkAccessToken(v string) *UpdateOfficialAccountRobotInfoHeaders {
	s.XAcsDingtalkAccessToken = &v
	return s
}

type UpdateOfficialAccountRobotInfoRequest struct {
	// This parameter is required.
	//
	// example:
	//
	// xxxx
	Avatar *string `json:"avatar,omitempty" xml:"avatar,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 小蜜客服机器人
	Brief *string `json:"brief,omitempty" xml:"brief,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 小蜜客服机器人是7*24小时智能问答机器人
	Description *string `json:"description,omitempty" xml:"description,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 小蜜机器人
	Name *string `json:"name,omitempty" xml:"name,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// xxxx
	PreviewMediaUrl *string `json:"previewMediaUrl,omitempty" xml:"previewMediaUrl,omitempty"`
	// This parameter is required.
	//
	// example:
	//
	// 机器人类型参数，服务窗机器人：1，客户群内机器人：2
	Type *string `json:"type,omitempty" xml:"type,omitempty"`
}

func (s UpdateOfficialAccountRobotInfoRequest) String() string {
	return tea.Prettify(s)
}

func (s UpdateOfficialAccountRobotInfoRequest) GoString() string {
	return s.String()
}

func (s *UpdateOfficialAccountRobotInfoRequest) SetAvatar(v string) *UpdateOfficialAccountRobotInfoRequest {
	s.Avatar = &v
	return s
}

func (s *UpdateOfficialAccountRobotInfoRequest) SetBrief(v string) *UpdateOfficialAccountRobotInfoRequest {
	s.Brief = &v
	return s
}

func (s *UpdateOfficialAccountRobotInfoRequest) SetDescription(v string) *UpdateOfficialAccountRobotInfoRequest {
	s.Description = &v
	return s
}

func (s *UpdateOfficialAccountRobotInfoRequest) SetName(v string) *UpdateOfficialAccountRobotInfoRequest {
	s.Name = &v
	return s
}

func (s *UpdateOfficialAccountRobotInfoRequest) SetPreviewMediaUrl(v string) *UpdateOfficialAccountRobotInfoRequest {
	s.PreviewMediaUrl = &v
	return s
}

func (s *UpdateOfficialAccountRobotInfoRequest) SetType(v string) *UpdateOfficialAccountRobotInfoRequest {
	s.Type = &v
	return s
}

type UpdateOfficialAccountRobotInfoResponseBody struct {
	// This parameter is required.
	//
	// example:
	//
	// success
	Result *string `json:"result,omitempty" xml:"result,omitempty"`
}

func (s UpdateOfficialAccountRobotInfoResponseBody) String() string {
	return tea.Prettify(s)
}

func (s UpdateOfficialAccountRobotInfoResponseBody) GoString() string {
	return s.String()
}

func (s *UpdateOfficialAccountRobotInfoResponseBody) SetResult(v string) *UpdateOfficialAccountRobotInfoResponseBody {
	s.Result = &v
	return s
}

type UpdateOfficialAccountRobotInfoResponse struct {
	Headers    map[string]*string                          `json:"headers,omitempty" xml:"headers,omitempty"`
	StatusCode *int32                                      `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
	Body       *UpdateOfficialAccountRobotInfoResponseBody `json:"body,omitempty" xml:"body,omitempty"`
}

func (s UpdateOfficialAccountRobotInfoResponse) String() string {
	return tea.Prettify(s)
}

func (s UpdateOfficialAccountRobotInfoResponse) GoString() string {
	return s.String()
}

func (s *UpdateOfficialAccountRobotInfoResponse) SetHeaders(v map[string]*string) *UpdateOfficialAccountRobotInfoResponse {
	s.Headers = v
	return s
}

func (s *UpdateOfficialAccountRobotInfoResponse) SetStatusCode(v int32) *UpdateOfficialAccountRobotInfoResponse {
	s.StatusCode = &v
	return s
}

func (s *UpdateOfficialAccountRobotInfoResponse) SetBody(v *UpdateOfficialAccountRobotInfoResponseBody) *UpdateOfficialAccountRobotInfoResponse {
	s.Body = v
	return s
}

type Client struct {
	openapi.Client
}

func NewClient(config *openapi.Config) (*Client, error) {
	client := new(Client)
	err := client.Init(config)
	return client, err
}

func (client *Client) Init(config *openapi.Config) (_err error) {
	_err = client.Client.Init(config)
	if _err != nil {
		return _err
	}
	gatewayClient, _err := gatewayclient.NewClient()
	if _err != nil {
		return _err
	}

	client.Spi = gatewayClient
	client.EndpointRule = tea.String("")
	if tea.BoolValue(util.Empty(client.Endpoint)) {
		client.Endpoint = tea.String("api.dingtalk.com")
	}

	return nil
}

// Summary:
//
// 添加智能客服机器人到钉钉群
//
// @param request - AddRobotInstanceToGroupRequest
//
// @param headers - AddRobotInstanceToGroupHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return AddRobotInstanceToGroupResponse
func (client *Client) AddRobotInstanceToGroupWithOptions(request *AddRobotInstanceToGroupRequest, headers *AddRobotInstanceToGroupHeaders, runtime *util.RuntimeOptions) (_result *AddRobotInstanceToGroupResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.ChatbotId)) {
		body["chatbotId"] = request.ChatbotId
	}

	if !tea.BoolValue(util.IsUnset(request.OpenConversationId)) {
		body["openConversationId"] = request.OpenConversationId
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("AddRobotInstanceToGroup"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/intelligentRobots/groups"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("json"),
		BodyType:    tea.String("json"),
	}
	_result = &AddRobotInstanceToGroupResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 添加智能客服机器人到钉钉群
//
// @param request - AddRobotInstanceToGroupRequest
//
// @return AddRobotInstanceToGroupResponse
func (client *Client) AddRobotInstanceToGroup(request *AddRobotInstanceToGroupRequest) (_result *AddRobotInstanceToGroupResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &AddRobotInstanceToGroupHeaders{}
	_result = &AddRobotInstanceToGroupResponse{}
	_body, _err := client.AddRobotInstanceToGroupWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 调用小蜜机器人的问答能力
//
// @param request - AskRobotRequest
//
// @param headers - AskRobotHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return AskRobotResponse
func (client *Client) AskRobotWithOptions(request *AskRobotRequest, headers *AskRobotHeaders, runtime *util.RuntimeOptions) (_result *AskRobotResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.DingUserId)) {
		body["dingUserId"] = request.DingUserId
	}

	if !tea.BoolValue(util.IsUnset(request.Question)) {
		body["question"] = request.Question
	}

	if !tea.BoolValue(util.IsUnset(request.RobotAppKey)) {
		body["robotAppKey"] = request.RobotAppKey
	}

	if !tea.BoolValue(util.IsUnset(request.SessionUuid)) {
		body["sessionUuid"] = request.SessionUuid
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("AskRobot"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/robots/ask"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &AskRobotResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 调用小蜜机器人的问答能力
//
// @param request - AskRobotRequest
//
// @return AskRobotResponse
func (client *Client) AskRobot(request *AskRobotRequest) (_result *AskRobotResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &AskRobotHeaders{}
	_result = &AskRobotResponse{}
	_body, _err := client.AskRobotWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 小蜜机器人数据统计指标
//
// @param request - GetDingMeBaseDataRequest
//
// @param headers - GetDingMeBaseDataHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return GetDingMeBaseDataResponse
func (client *Client) GetDingMeBaseDataWithOptions(request *GetDingMeBaseDataRequest, headers *GetDingMeBaseDataHeaders, runtime *util.RuntimeOptions) (_result *GetDingMeBaseDataResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	query := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.AppKey)) {
		query["appKey"] = request.AppKey
	}

	if !tea.BoolValue(util.IsUnset(request.ByDay)) {
		query["byDay"] = request.ByDay
	}

	if !tea.BoolValue(util.IsUnset(request.EndDay)) {
		query["endDay"] = request.EndDay
	}

	if !tea.BoolValue(util.IsUnset(request.StartDay)) {
		query["startDay"] = request.StartDay
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Query:   openapiutil.Query(query),
	}
	params := &openapi.Params{
		Action:      tea.String("GetDingMeBaseData"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/robots/data"),
		Method:      tea.String("GET"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("json"),
		BodyType:    tea.String("json"),
	}
	_result = &GetDingMeBaseDataResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 小蜜机器人数据统计指标
//
// @param request - GetDingMeBaseDataRequest
//
// @return GetDingMeBaseDataResponse
func (client *Client) GetDingMeBaseData(request *GetDingMeBaseDataRequest) (_result *GetDingMeBaseDataResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &GetDingMeBaseDataHeaders{}
	_result = &GetDingMeBaseDataResponse{}
	_body, _err := client.GetDingMeBaseDataWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 获取智能客服机器人信息
//
// @param request - GetIntelligentRobotInfoRequest
//
// @param headers - GetIntelligentRobotInfoHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return GetIntelligentRobotInfoResponse
func (client *Client) GetIntelligentRobotInfoWithOptions(request *GetIntelligentRobotInfoRequest, headers *GetIntelligentRobotInfoHeaders, runtime *util.RuntimeOptions) (_result *GetIntelligentRobotInfoResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	query := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.RobotAppKey)) {
		query["robotAppKey"] = request.RobotAppKey
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Query:   openapiutil.Query(query),
	}
	params := &openapi.Params{
		Action:      tea.String("GetIntelligentRobotInfo"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/intelligentRobots/infos"),
		Method:      tea.String("GET"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("json"),
		BodyType:    tea.String("json"),
	}
	_result = &GetIntelligentRobotInfoResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 获取智能客服机器人信息
//
// @param request - GetIntelligentRobotInfoRequest
//
// @return GetIntelligentRobotInfoResponse
func (client *Client) GetIntelligentRobotInfo(request *GetIntelligentRobotInfoRequest) (_result *GetIntelligentRobotInfoResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &GetIntelligentRobotInfoHeaders{}
	_result = &GetIntelligentRobotInfoResponse{}
	_body, _err := client.GetIntelligentRobotInfoWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 获取服务窗机器人信息
//
// @param request - GetOfficialAccountRobotInfoRequest
//
// @param headers - GetOfficialAccountRobotInfoHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return GetOfficialAccountRobotInfoResponse
func (client *Client) GetOfficialAccountRobotInfoWithOptions(request *GetOfficialAccountRobotInfoRequest, headers *GetOfficialAccountRobotInfoHeaders, runtime *util.RuntimeOptions) (_result *GetOfficialAccountRobotInfoResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	query := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.Type)) {
		query["type"] = request.Type
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Query:   openapiutil.Query(query),
	}
	params := &openapi.Params{
		Action:      tea.String("GetOfficialAccountRobotInfo"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/officialAccounts/robots"),
		Method:      tea.String("GET"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &GetOfficialAccountRobotInfoResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 获取服务窗机器人信息
//
// @param request - GetOfficialAccountRobotInfoRequest
//
// @return GetOfficialAccountRobotInfoResponse
func (client *Client) GetOfficialAccountRobotInfo(request *GetOfficialAccountRobotInfoRequest) (_result *GetOfficialAccountRobotInfoResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &GetOfficialAccountRobotInfoHeaders{}
	_result = &GetOfficialAccountRobotInfoResponse{}
	_body, _err := client.GetOfficialAccountRobotInfoWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 小蜜客服网页渠道获取三方用户token
//
// @param request - GetWebChannelUserTokenRequest
//
// @param headers - GetWebChannelUserTokenHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return GetWebChannelUserTokenResponse
func (client *Client) GetWebChannelUserTokenWithOptions(request *GetWebChannelUserTokenRequest, headers *GetWebChannelUserTokenHeaders, runtime *util.RuntimeOptions) (_result *GetWebChannelUserTokenResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.ForeignId)) {
		body["foreignId"] = request.ForeignId
	}

	if !tea.BoolValue(util.IsUnset(request.Nick)) {
		body["nick"] = request.Nick
	}

	if !tea.BoolValue(util.IsUnset(request.Source)) {
		body["source"] = request.Source
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("GetWebChannelUserToken"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/webChannels/userTokens"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &GetWebChannelUserTokenResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 小蜜客服网页渠道获取三方用户token
//
// @param request - GetWebChannelUserTokenRequest
//
// @return GetWebChannelUserTokenResponse
func (client *Client) GetWebChannelUserToken(request *GetWebChannelUserTokenRequest) (_result *GetWebChannelUserTokenResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &GetWebChannelUserTokenHeaders{}
	_result = &GetWebChannelUserTokenResponse{}
	_body, _err := client.GetWebChannelUserTokenWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 通过小蜜机器人在客户群内推送消息
//
// @param request - PushCustomerGroupMessageRequest
//
// @param headers - PushCustomerGroupMessageHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return PushCustomerGroupMessageResponse
func (client *Client) PushCustomerGroupMessageWithOptions(request *PushCustomerGroupMessageRequest, headers *PushCustomerGroupMessageHeaders, runtime *util.RuntimeOptions) (_result *PushCustomerGroupMessageResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.ConversationId)) {
		body["conversationId"] = request.ConversationId
	}

	if !tea.BoolValue(util.IsUnset(request.MsgKey)) {
		body["msgKey"] = request.MsgKey
	}

	if !tea.BoolValue(util.IsUnset(request.MsgParam)) {
		body["msgParam"] = request.MsgParam
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("PushCustomerGroupMessage"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/officialAccounts/robots/groupMessages/send"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &PushCustomerGroupMessageResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 通过小蜜机器人在客户群内推送消息
//
// @param request - PushCustomerGroupMessageRequest
//
// @return PushCustomerGroupMessageResponse
func (client *Client) PushCustomerGroupMessage(request *PushCustomerGroupMessageRequest) (_result *PushCustomerGroupMessageResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &PushCustomerGroupMessageHeaders{}
	_result = &PushCustomerGroupMessageResponse{}
	_body, _err := client.PushCustomerGroupMessageWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 推送智能客服机器人钉钉群聊消息
//
// @param request - PushIntelligentRobotGroupMessageRequest
//
// @param headers - PushIntelligentRobotGroupMessageHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return PushIntelligentRobotGroupMessageResponse
func (client *Client) PushIntelligentRobotGroupMessageWithOptions(request *PushIntelligentRobotGroupMessageRequest, headers *PushIntelligentRobotGroupMessageHeaders, runtime *util.RuntimeOptions) (_result *PushIntelligentRobotGroupMessageResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.ChatbotId)) {
		body["chatbotId"] = request.ChatbotId
	}

	if !tea.BoolValue(util.IsUnset(request.MsgKey)) {
		body["msgKey"] = request.MsgKey
	}

	if !tea.BoolValue(util.IsUnset(request.MsgParam)) {
		body["msgParam"] = request.MsgParam
	}

	if !tea.BoolValue(util.IsUnset(request.OpenConversationId)) {
		body["openConversationId"] = request.OpenConversationId
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("PushIntelligentRobotGroupMessage"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/intelligentRobots/groupMessages/send"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &PushIntelligentRobotGroupMessageResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 推送智能客服机器人钉钉群聊消息
//
// @param request - PushIntelligentRobotGroupMessageRequest
//
// @return PushIntelligentRobotGroupMessageResponse
func (client *Client) PushIntelligentRobotGroupMessage(request *PushIntelligentRobotGroupMessageRequest) (_result *PushIntelligentRobotGroupMessageResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &PushIntelligentRobotGroupMessageHeaders{}
	_result = &PushIntelligentRobotGroupMessageResponse{}
	_body, _err := client.PushIntelligentRobotGroupMessageWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 智能客服机器人推送消息
//
// @param request - PushIntelligentRobotMessageRequest
//
// @param headers - PushIntelligentRobotMessageHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return PushIntelligentRobotMessageResponse
func (client *Client) PushIntelligentRobotMessageWithOptions(request *PushIntelligentRobotMessageRequest, headers *PushIntelligentRobotMessageHeaders, runtime *util.RuntimeOptions) (_result *PushIntelligentRobotMessageResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.ChatbotId)) {
		body["chatbotId"] = request.ChatbotId
	}

	if !tea.BoolValue(util.IsUnset(request.MsgKey)) {
		body["msgKey"] = request.MsgKey
	}

	if !tea.BoolValue(util.IsUnset(request.MsgParam)) {
		body["msgParam"] = request.MsgParam
	}

	if !tea.BoolValue(util.IsUnset(request.UserId)) {
		body["userId"] = request.UserId
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("PushIntelligentRobotMessage"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/intelligentRobots/oToMessages/send"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &PushIntelligentRobotMessageResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 智能客服机器人推送消息
//
// @param request - PushIntelligentRobotMessageRequest
//
// @return PushIntelligentRobotMessageResponse
func (client *Client) PushIntelligentRobotMessage(request *PushIntelligentRobotMessageRequest) (_result *PushIntelligentRobotMessageResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &PushIntelligentRobotMessageHeaders{}
	_result = &PushIntelligentRobotMessageResponse{}
	_body, _err := client.PushIntelligentRobotMessageWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 通过服务窗机器人推送单聊消息
//
// @param request - PushOfficialAccountMessageRequest
//
// @param headers - PushOfficialAccountMessageHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return PushOfficialAccountMessageResponse
func (client *Client) PushOfficialAccountMessageWithOptions(request *PushOfficialAccountMessageRequest, headers *PushOfficialAccountMessageHeaders, runtime *util.RuntimeOptions) (_result *PushOfficialAccountMessageResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.MsgKey)) {
		body["msgKey"] = request.MsgKey
	}

	if !tea.BoolValue(util.IsUnset(request.MsgParam)) {
		body["msgParam"] = request.MsgParam
	}

	if !tea.BoolValue(util.IsUnset(request.UserId)) {
		body["userId"] = request.UserId
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("PushOfficialAccountMessage"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/officialAccounts/robots/oToMessages/send"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &PushOfficialAccountMessageResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 通过服务窗机器人推送单聊消息
//
// @param request - PushOfficialAccountMessageRequest
//
// @return PushOfficialAccountMessageResponse
func (client *Client) PushOfficialAccountMessage(request *PushOfficialAccountMessageRequest) (_result *PushOfficialAccountMessageResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &PushOfficialAccountMessageHeaders{}
	_result = &PushOfficialAccountMessageResponse{}
	_body, _err := client.PushOfficialAccountMessageWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 通过小蜜客服机器人推送单聊消息
//
// @param request - PushRobotMessageRequest
//
// @param headers - PushRobotMessageHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return PushRobotMessageResponse
func (client *Client) PushRobotMessageWithOptions(request *PushRobotMessageRequest, headers *PushRobotMessageHeaders, runtime *util.RuntimeOptions) (_result *PushRobotMessageResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.ChatbotId)) {
		body["chatbotId"] = request.ChatbotId
	}

	if !tea.BoolValue(util.IsUnset(request.MsgKey)) {
		body["msgKey"] = request.MsgKey
	}

	if !tea.BoolValue(util.IsUnset(request.MsgParam)) {
		body["msgParam"] = request.MsgParam
	}

	if !tea.BoolValue(util.IsUnset(request.UserId)) {
		body["userId"] = request.UserId
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("PushRobotMessage"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/robots/oToMessages/send"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &PushRobotMessageResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 通过小蜜客服机器人推送单聊消息
//
// @param request - PushRobotMessageRequest
//
// @return PushRobotMessageResponse
func (client *Client) PushRobotMessage(request *PushRobotMessageRequest) (_result *PushRobotMessageResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &PushRobotMessageHeaders{}
	_result = &PushRobotMessageResponse{}
	_body, _err := client.PushRobotMessageWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 异步回复机器人消息
//
// @param request - ReplyRobotRequest
//
// @param headers - ReplyRobotHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return ReplyRobotResponse
func (client *Client) ReplyRobotWithOptions(request *ReplyRobotRequest, headers *ReplyRobotHeaders, runtime *util.RuntimeOptions) (_result *ReplyRobotResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.ProxyMessageStr)) {
		body["proxyMessageStr"] = request.ProxyMessageStr
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("ReplyRobot"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/robots/reply"),
		Method:      tea.String("POST"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("json"),
		BodyType:    tea.String("json"),
	}
	_result = &ReplyRobotResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 异步回复机器人消息
//
// @param request - ReplyRobotRequest
//
// @return ReplyRobotResponse
func (client *Client) ReplyRobot(request *ReplyRobotRequest) (_result *ReplyRobotResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &ReplyRobotHeaders{}
	_result = &ReplyRobotResponse{}
	_body, _err := client.ReplyRobotWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}

// Summary:
//
// 更新服务窗机器人信息
//
// @param request - UpdateOfficialAccountRobotInfoRequest
//
// @param headers - UpdateOfficialAccountRobotInfoHeaders
//
// @param runtime - runtime options for this request RuntimeOptions
//
// @return UpdateOfficialAccountRobotInfoResponse
func (client *Client) UpdateOfficialAccountRobotInfoWithOptions(request *UpdateOfficialAccountRobotInfoRequest, headers *UpdateOfficialAccountRobotInfoHeaders, runtime *util.RuntimeOptions) (_result *UpdateOfficialAccountRobotInfoResponse, _err error) {
	_err = util.ValidateModel(request)
	if _err != nil {
		return _result, _err
	}
	query := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.Type)) {
		query["type"] = request.Type
	}

	body := map[string]interface{}{}
	if !tea.BoolValue(util.IsUnset(request.Avatar)) {
		body["avatar"] = request.Avatar
	}

	if !tea.BoolValue(util.IsUnset(request.Brief)) {
		body["brief"] = request.Brief
	}

	if !tea.BoolValue(util.IsUnset(request.Description)) {
		body["description"] = request.Description
	}

	if !tea.BoolValue(util.IsUnset(request.Name)) {
		body["name"] = request.Name
	}

	if !tea.BoolValue(util.IsUnset(request.PreviewMediaUrl)) {
		body["previewMediaUrl"] = request.PreviewMediaUrl
	}

	realHeaders := make(map[string]*string)
	if !tea.BoolValue(util.IsUnset(headers.CommonHeaders)) {
		realHeaders = headers.CommonHeaders
	}

	if !tea.BoolValue(util.IsUnset(headers.XAcsDingtalkAccessToken)) {
		realHeaders["x-acs-dingtalk-access-token"] = util.ToJSONString(headers.XAcsDingtalkAccessToken)
	}

	req := &openapi.OpenApiRequest{
		Headers: realHeaders,
		Query:   openapiutil.Query(query),
		Body:    openapiutil.ParseToMap(body),
	}
	params := &openapi.Params{
		Action:      tea.String("UpdateOfficialAccountRobotInfo"),
		Version:     tea.String("dingmi_1.0"),
		Protocol:    tea.String("HTTP"),
		Pathname:    tea.String("/v1.0/dingmi/officialAccounts/robots"),
		Method:      tea.String("PUT"),
		AuthType:    tea.String("AK"),
		Style:       tea.String("ROA"),
		ReqBodyType: tea.String("none"),
		BodyType:    tea.String("json"),
	}
	_result = &UpdateOfficialAccountRobotInfoResponse{}
	_body, _err := client.Execute(params, req, runtime)
	if _err != nil {
		return _result, _err
	}
	_err = tea.Convert(_body, &_result)
	return _result, _err
}

// Summary:
//
// 更新服务窗机器人信息
//
// @param request - UpdateOfficialAccountRobotInfoRequest
//
// @return UpdateOfficialAccountRobotInfoResponse
func (client *Client) UpdateOfficialAccountRobotInfo(request *UpdateOfficialAccountRobotInfoRequest) (_result *UpdateOfficialAccountRobotInfoResponse, _err error) {
	runtime := &util.RuntimeOptions{}
	headers := &UpdateOfficialAccountRobotInfoHeaders{}
	_result = &UpdateOfficialAccountRobotInfoResponse{}
	_body, _err := client.UpdateOfficialAccountRobotInfoWithOptions(request, headers, runtime)
	if _err != nil {
		return _result, _err
	}
	_result = _body
	return _result, _err
}
