diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..19cf1859 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +workspace.xml +.DS_Store +.tmp +.settings +*~ +.pyc +*.py[co] +# IDEA IDE +.idea* +build/ +dist/ +out/ +.gitignore +coverage.* +.history/ +vendor/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..73dcad75 --- /dev/null +++ b/README.md @@ -0,0 +1,132 @@ +![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) + +# YuanJing OpenAPI SDK for Go + +## Requirements +- It's necessary for you to make sure your system have installed Go environment which version greater than 1.15.0. + +## Installation +If you use `go mod` to manage your dependence, you can use the following command: +``` +go get github.com/aliyun/alibabacloud-yjopenapi-go-client 1.1.20241219 +``` + +## Usage +``` +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/api" + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" +) + +configuration := api.DefaultConfiguration +configuration.Host = "host" +configuration.AccessKey = "Your Access Key" +configuration.SecretKey = "Your Secret Key" + +client := api.NewAPIClient(configuration) + +// {{Api}},{{Method}},{{Param}} is placeholder, take a look at Explain Of Usage Placeholder +result, response, error := client.{{Api}}.{{Method}}(&model.{{Params}}{}) + +// OpenAPI TraceId +traceId := response.Header.Get(client.Trace_Id) +// OpenAPI Status Code +statusCode := response.Header.Get(client.Result_Status) + +// OpenAPI result +_ := result +``` + +## Explain Of Usage Placeholder + +| Api | Method | Params | Result | Description | +| ------------ | ------------- | ------------- | ------------- | ------------- | + | *AdaptApi* | **CreateAndSubmitAll** | *CreateAndSubmitAllForms* | *AdaptCreateAndSubmitAllResult* | createAndSubmitAll | + | *AdaptApi* | **QueryRequestById** | *QueryRequestByIdForms* | *AdaptQueryRequestByIdResult* | queryRequestById | + | *AiApi* | **BatchUpdateKbVersion** | *BatchUpdateKbVersionForms* | *AiBatchUpdateKbVersionResult* | | + | *AiApi* | **CancelQueue** | *CancelQueueForms* | *AiCancelQueueResult* | 取消排队 | + | *AiApi* | **CreateNpcRole** | *CreateNpcRoleForms* | *AiCreateNpcRoleResult* | | + | *AiApi* | **DeleteModels** | *DeleteModelsForms* | *AiDeleteModelsResult* | 删除私有模型 | + | *AiApi* | **GetQueue** | *GetQueueForms* | *AiGetQueueResult* | 查询排队 | + | *AiApi* | **ListModels** | *ListModelsForms* | *AiListModelsResult* | 查看私有模型列表 | + | *AiApi* | **UpdateModels** | *UpdateModelsForms* | *AiUpdateModelsResult* | 修改私有模型信息 | + | *AiApi* | **UpdateNpcRole** | *UpdateNpcRoleForms* | *AiUpdateNpcRoleResult* | | + | *AiApi* | **UploadModels** | *UploadModelsForms* | *AiUploadModelsResult* | 上传私有模型 | + | *ConsoleAdminApi* | **ActivateDeployment** | *ActivateDeploymentForms* | *ConsoleAdminActivateDeploymentResult* | | + | *ConsoleAdminApi* | **AdaptGameVersion** | *AdaptGameVersionForms* | *ConsoleAdminAdaptGameVersionResult* | | + | *ConsoleAdminApi* | **AddGameToProject** | *AddGameToProjectForms* | *ConsoleAdminAddGameToProjectResult* | | + | *ConsoleAdminApi* | **BatchUpdateDispatchConfig** | *BatchUpdateDispatchConfigForms* | *ConsoleAdminBatchUpdateDispatchConfigResult* | 批量更新游戏各自调度配置 | + | *ConsoleAdminApi* | **CreateGame** | *CreateGameForms* | *ConsoleAdminCreateGameResult* | | + | *ConsoleAdminApi* | **CreateOrder** | *CreateOrderForms* | *ConsoleAdminCreateOrderResult* | 订单下单 | + | *ConsoleAdminApi* | **CreateProject** | *CreateProjectForms* | *ConsoleAdminCreateProjectResult* | | + | *ConsoleAdminApi* | **DeleteGame** | *DeleteGameForms* | *ConsoleAdminDeleteGameResult* | | + | *ConsoleAdminApi* | **DeleteGameVersion** | *DeleteGameVersionForms* | *ConsoleAdminDeleteGameVersionResult* | | + | *ConsoleAdminApi* | **DeleteProject** | *DeleteProjectForms* | *ConsoleAdminDeleteProjectResult* | | + | *ConsoleAdminApi* | **GetBillFlowInfo** | *GetBillFlowInfoForms* | *ConsoleAdminGetBillFlowInfoResult* | | + | *ConsoleAdminApi* | **GetGameInstanceContainerRatio** | *GetGameInstanceContainerRatioForms* | *ConsoleAdminGetGameInstanceContainerRatioResult* | | + | *ConsoleAdminApi* | **GetGameRecommendedInstance** | *GetGameRecommendedInstanceForms* | *ConsoleAdminGetGameRecommendedInstanceResult* | | + | *ConsoleAdminApi* | **GetGameVersion** | *GetGameVersionForms* | *ConsoleAdminGetGameVersionResult* | | + | *ConsoleAdminApi* | **GetGameVersionProgress** | *GetGameVersionProgressForms* | *ConsoleAdminGetGameVersionProgressResult* | | + | *ConsoleAdminApi* | **GetOrder** | *GetOrderForms* | *ConsoleAdminGetOrderResult* | 查询订单 | + | *ConsoleAdminApi* | **ListActivateableInstances** | *ListActivateableInstancesForms* | *ConsoleAdminListActivateableInstancesResult* | | + | *ConsoleAdminApi* | **ListActivatedInstances** | *ListActivatedInstancesForms* | *ConsoleAdminListActivatedInstancesResult* | | + | *ConsoleAdminApi* | **ListControllersOfGame** | *ListControllersOfGameForms* | *ConsoleAdminListControllersOfGameResult* | | + | *ConsoleAdminApi* | **ListDeployableInstances** | *ListDeployableInstancesForms* | *ConsoleAdminListDeployableInstancesResult* | | + | *ConsoleAdminApi* | **ListGameCcu** | *ListGameCcuForms* | *ConsoleAdminListGameCcuResult* | 分游戏实时并发 | + | *ConsoleAdminApi* | **ListGameDeployDetailsOfProject** | *ListGameDeployDetailsOfProjectForms* | *ConsoleAdminListGameDeployDetailsOfProjectResult* | 获取项目下游戏部署版本信息。 | + | *ConsoleAdminApi* | **ListGameVersions** | *ListGameVersionsForms* | *ConsoleAdminListGameVersionsResult* | | + | *ConsoleAdminApi* | **ListGames** | *ListGamesForms* | *ConsoleAdminListGamesResult* | | + | *ConsoleAdminApi* | **ListInstancesOfProject** | *ListInstancesOfProjectForms* | *ConsoleAdminListInstancesOfProjectResult* | 分页获取项目中的实例 | + | *ConsoleAdminApi* | **ListMonthBill** | *ListMonthBillForms* | *ConsoleAdminListMonthBillResult* | 月度账单列表 | + | *ConsoleAdminApi* | **ListProjects** | *ListProjectsForms* | *ConsoleAdminListProjectsResult* | | + | *ConsoleAdminApi* | **ListVersionDeployInstances** | *ListVersionDeployInstancesForms* | *ConsoleAdminListVersionDeployInstancesResult* | 获取项目下游戏版本的部署实例信息。 | + | *ConsoleAdminApi* | **QueryAdaptResultByVersionId** | *QueryAdaptResultByVersionIdForms* | *ConsoleAdminQueryAdaptResultByVersionIdResult* | 查询适配结果 | + | *ConsoleAdminApi* | **RecommendSpecification** | *RecommendSpecificationForms* | *ConsoleAdminRecommendSpecificationResult* | | + | *ConsoleAdminApi* | **RemoveGameFromProject** | *RemoveGameFromProjectForms* | *ConsoleAdminRemoveGameFromProjectResult* | | + | *ConsoleAdminApi* | **RtOverView** | *RtOverViewForms* | *ConsoleAdminRtOverViewResult* | 实时并发数 | + | *ConsoleAdminApi* | **RtTrend** | *RtTrendForms* | *ConsoleAdminRtTrendResult* | 实时并发趋势图 | + | *ConsoleAdminApi* | **SubmitDeployment** | *SubmitDeploymentForms* | *ConsoleAdminSubmitDeploymentResult* | | + | *ConsoleAdminApi* | **SubmitRefund** | *SubmitRefundForms* | *ConsoleAdminSubmitRefundResult* | 订单退订 | + | *ConsoleAdminApi* | **UploadGameVersionByDownload** | *UploadGameVersionByDownloadForms* | *ConsoleAdminUploadGameVersionByDownloadResult* | | + | *DispatchApi* | **BatchStopGame** | *BatchStopGameForms* | *BatchStopGameResult* | | + | *DispatchApi* | **CancelGameHang** | *CancelGameHangForms* | *CancelGameHangResult* | 取消游戏挂机 | + | *DispatchApi* | **ClientNotify** | *ClientNotifyForms* | *ClientNotifyResult* | clientNotify | + | *DispatchApi* | **GameNotify** | *GameNotifyForms* | *GameNotifyResult* | 游戏通知接口 | + | *DispatchApi* | **GetGameConcurrency** | *GetGameConcurrencyForms* | *GetGameConcurrencyResult* | 调用GetGameConcurrency获取游戏当前并发数 | + | *DispatchApi* | **GetStock** | *GetStockForms* | *GetStockResult* | 调用GetStock获取游戏当前库存 | + | *DispatchApi* | **GetStopGameToken** | *GetStopGameTokenForms* | *GetStopGameTokenResult* | 全量踢下线获取token | + | *DispatchApi* | **ListGameServerIp** | *ListGameServerIpForms* | *ListGameServerIpResult* | | + | *DispatchApi* | **QueryGameHang** | *QueryGameHangForms* | *QueryGameHangResult* | 查询游戏挂机状态 | + | *DispatchApi* | **QuerySessionStatus** | *QuerySessionStatusForms* | *QuerySessionStatusResult* | 查询会话当前状态 | + | *DispatchApi* | **ReplaceSlot** | *ReplaceSlotForms* | *ReplaceSlotResult* | replaceSlot | + | *DispatchApi* | **SetGameAlive** | *SetGameAliveForms* | *SetGameAliveResult* | 设置游戏可运行时长 | + | *DispatchApi* | **SetGameHang** | *SetGameHangForms* | *SetGameHangResult* | 设置游戏挂机 | + | *DispatchApi* | **StopGame** | *StopGameForms* | *StopGameResult* | 服务端发起,停止某个用户的某个游戏的某个会话 | + | *DispatchApi* | **StopPreopenContainer** | *StopPreopenContainerForms* | *StopPreopenContainerResult* | 停止预开容器 | + | *DispatchApi* | **TryToGetSlot** | *TryToGetSlotForms* | *TryToGetSlotResult* | 为用户调度分配游戏容器,容器一旦分配成功会被锁住,一段时间内不再分配给其他用户,过期释放。 | + | *DispatchApi* | **TryToGetSlots** | *TryToGetSlotsForms* | *TryToGetSlotsResult* | tryToGetSlots | + | *DispatchApi* | **UpdatePreopenStrategy** | *UpdatePreopenStrategyForms* | *UpdatePreopenStrategyResult* | 更新预开预起策略 | + | *LiveApi* | **QueryStatus** | *QueryStatusForms* | *LiveQueryStatusResult* | | + | *LiveApi* | **StartGameLive** | *StartGameLiveForms* | *LiveStartGameLiveResult* | | + | *LiveApi* | **StopGameLive** | *StopGameLiveForms* | *LiveStopGameLiveResult* | | + | *MultiplayApi* | **Close** | *CloseForms* | *MultiplayCloseResult* | | + | *MultiplayApi* | **Init** | *InitForms* | *MultiplayInitResult* | | + | *MultiplayApi* | **Join** | *JoinForms* | *MultiplayJoinResult* | | + | *MultiplayApi* | **Leave** | *LeaveForms* | *MultiplayLeaveResult* | | + | *MultiplayApi* | **Modify** | *ModifyForms* | *MultiplayModifyResult* | | + | *MultiplayApi* | **Query** | *QueryForms* | *MultiplayQueryResult* | | + | *TokenApi* | **GetPair** | | *GetPairResult* | 获取临时安全令牌(二元组) | + | *TokenApi* | **GetTriple** | | *GetTripleResult* | 获取临时安全令牌 | + | *UsercontrollerApi* | **DeleteGameArchive** | *DeleteGameArchiveForms* | *UsercontrollerDeleteGameArchiveResult* | | + | *UsercontrollerApi* | **GetGameTrialSurplusDuration** | *GetGameTrialSurplusDurationForms* | *UsercontrollerGetGameTrialSurplusDurationResult* | | + | *UsercontrollerApi* | **GetUserGameArchive** | *GetUserGameArchiveForms* | *UsercontrollerGetUserGameArchiveResult* | | + | *UsercontrollerApi* | **ListLatestGameArchive** | *ListLatestGameArchiveForms* | *UsercontrollerListLatestGameArchiveResult* | | + | *UsercontrollerApi* | **RestoreGameArchive** | *RestoreGameArchiveForms* | *UsercontrollerRestoreGameArchiveResult* | | + | *UsercontrollerApi* | **UpdateGameArchiveTagStatus** | *UpdateGameArchiveTagStatusForms* | *UsercontrollerUpdateGameArchiveTagStatusResult* | | + +## License +[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Copyright (c) 2009-present, Alibaba Cloud All rights reserved. + + diff --git a/client/api/adapt_api.go b/client/api/adapt_api.go new file mode 100644 index 00000000..8fd6150b --- /dev/null +++ b/client/api/adapt_api.go @@ -0,0 +1,188 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type AdaptApiService service + + +// CreateAndSubmitAll +/* + * createAndSubmitAll + * @param varForms model.AdaptCreateAndSubmitAllForms + */ +func (s *AdaptApiService) CreateAndSubmitAll( + varForms *model.AdaptCreateAndSubmitAllForms, +) (model.AdaptCreateAndSubmitAllResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AdaptCreateAndSubmitAllResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/adapt/createAndSubmitAll" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.GameId != nil { + varFormParams.Add("gameId", parameterToString(*varForms.GameId, "")) + } + if varForms != nil && varForms.GameName != nil { + varFormParams.Add("gameName", parameterToString(*varForms.GameName, "")) + } + if varForms != nil && varForms.GameVersionId != nil { + varFormParams.Add("gameVersionId", parameterToString(*varForms.GameVersionId, "")) + } + if varForms != nil && varForms.GameVersion != nil { + varFormParams.Add("gameVersion", parameterToString(*varForms.GameVersion, "")) + } + if varForms != nil && varForms.ResolutionList != nil { + varFormParams.Add("resolutionList", parameterToString(*varForms.ResolutionList, "")) + } + if varForms != nil && varForms.FrameRateList != nil { + varFormParams.Add("frameRateList", parameterToString(*varForms.FrameRateList, "")) + } + varFormParams.Add("platformType", parameterToString(varForms.PlatformType, "")) + varFormParams.Add("sourcePlatform", parameterToString(varForms.SourcePlatform, "")) + varFormParams.Add("records", parameterToString(varForms.Records, "")) + varFormParams.Add("mixGameVersionId", parameterToString(varForms.MixGameVersionId, "")) + varFormParams.Add("mixGameId", parameterToString(varForms.MixGameId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// QueryRequestById +/* + * queryRequestById + * @param varForms model.AdaptQueryRequestByIdForms + */ +func (s *AdaptApiService) QueryRequestById( + varForms *model.AdaptQueryRequestByIdForms, +) (model.AdaptQueryRequestByIdResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AdaptQueryRequestByIdResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/adapt/queryRequestById" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("id", parameterToString(varForms.Id, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/api/ai_api.go b/client/api/ai_api.go new file mode 100644 index 00000000..dd27f8f4 --- /dev/null +++ b/client/api/ai_api.go @@ -0,0 +1,740 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type AiApiService service + + +// BatchUpdateKbVersion +/* + * + * @param varForms model.AiBatchUpdateKbVersionForms + */ +func (s *AiApiService) BatchUpdateKbVersion( + varForms *model.AiBatchUpdateKbVersionForms, +) (model.AiBatchUpdateKbVersionResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiBatchUpdateKbVersionResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/batchUpdateKbVersion" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("roleIds", parameterToString(varForms.RoleIds, "multi")) + varFormParams.Add("kbId", parameterToString(varForms.KbId, "")) + varFormParams.Add("kbVersionId", parameterToString(varForms.KbVersionId, "")) + varFormParams.Add("operator", parameterToString(varForms.Operator, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// CancelQueue +/* + * 取消排队 + * @param varForms model.AiCancelQueueForms + */ +func (s *AiApiService) CancelQueue( + varForms *model.AiCancelQueueForms, +) (model.AiCancelQueueResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiCancelQueueResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/cancelQueue" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("taskId", parameterToString(varForms.TaskId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// CreateNpcRole +/* + * + * @param varForms model.AiCreateNpcRoleForms + */ +func (s *AiApiService) CreateNpcRole( + varForms *model.AiCreateNpcRoleForms, +) (model.AiCreateNpcRoleResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiCreateNpcRoleResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/createNpcRole" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("name", parameterToString(varForms.Name, "")) + varFormParams.Add("description", parameterToString(varForms.Description, "")) + varFormParams.Add("figureId", parameterToString(varForms.FigureId, "")) + varFormParams.Add("voiceId", parameterToString(varForms.VoiceId, "")) + varFormParams.Add("characters", parameterToString(varForms.Characters, "")) + varFormParams.Add("greetings", parameterToString(varForms.Greetings, "")) + varFormParams.Add("guidance", parameterToString(varForms.Guidance, "multi")) + if varForms != nil && varForms.KnowledgeBases != nil { + varFormParams.Add("knowledgeBases", parameterToString(*varForms.KnowledgeBases, "multi")) + } + if varForms != nil && varForms.PluginIds != nil { + varFormParams.Add("pluginIds", parameterToString(*varForms.PluginIds, "multi")) + } + varFormParams.Add("shortMemoryRound", parameterToString(varForms.ShortMemoryRound, "")) + varFormParams.Add("tenantId", parameterToString(varForms.TenantId, "")) + varFormParams.Add("operator", parameterToString(varForms.Operator, "")) + varFormParams.Add("llmModelId", parameterToString(varForms.LlmModelId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// DeleteModels +/* + * 删除私有模型 + * @param varForms model.AiDeleteModelsForms + */ +func (s *AiApiService) DeleteModels( + varForms *model.AiDeleteModelsForms, +) (model.AiDeleteModelsResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiDeleteModelsResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/deleteModels" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("resourceId", parameterToString(varForms.ResourceId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetQueue +/* + * 查询排队 + * @param varForms model.AiGetQueueForms + */ +func (s *AiApiService) GetQueue( + varForms *model.AiGetQueueForms, +) (model.AiGetQueueResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiGetQueueResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/getQueue" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("taskId", parameterToString(varForms.TaskId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListModels +/* + * 查看私有模型列表 + * @param varForms model.AiListModelsForms + */ +func (s *AiApiService) ListModels( + varForms *model.AiListModelsForms, +) (model.AiListModelsResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiListModelsResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/listModels" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.ModelType != nil { + varFormParams.Add("modelType", parameterToString(*varForms.ModelType, "")) + } + if varForms != nil && varForms.ModelFileType != nil { + varFormParams.Add("modelFileType", parameterToString(*varForms.ModelFileType, "")) + } + if varForms != nil && varForms.ModelSeries != nil { + varFormParams.Add("modelSeries", parameterToString(*varForms.ModelSeries, "")) + } + if varForms != nil && varForms.ModelFileName != nil { + varFormParams.Add("modelFileName", parameterToString(*varForms.ModelFileName, "")) + } + varFormParams.Add("pageNumber", parameterToString(varForms.PageNumber, "")) + varFormParams.Add("pageSize", parameterToString(varForms.PageSize, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// UpdateModels +/* + * 修改私有模型信息 + * @param varForms model.AiUpdateModelsForms + */ +func (s *AiApiService) UpdateModels( + varForms *model.AiUpdateModelsForms, +) (model.AiUpdateModelsResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiUpdateModelsResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/updateModels" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("resourceId", parameterToString(varForms.ResourceId, "")) + varFormParams.Add("desc", parameterToString(varForms.Desc, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// UpdateNpcRole +/* + * + * @param varForms model.AiUpdateNpcRoleForms + */ +func (s *AiApiService) UpdateNpcRole( + varForms *model.AiUpdateNpcRoleForms, +) (model.AiUpdateNpcRoleResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiUpdateNpcRoleResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/updateNpcRole" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("id", parameterToString(varForms.Id, "")) + varFormParams.Add("name", parameterToString(varForms.Name, "")) + varFormParams.Add("description", parameterToString(varForms.Description, "")) + varFormParams.Add("figureId", parameterToString(varForms.FigureId, "")) + varFormParams.Add("voiceId", parameterToString(varForms.VoiceId, "")) + varFormParams.Add("characters", parameterToString(varForms.Characters, "")) + varFormParams.Add("greetings", parameterToString(varForms.Greetings, "")) + varFormParams.Add("guidance", parameterToString(varForms.Guidance, "multi")) + if varForms != nil && varForms.KnowledgeBases != nil { + varFormParams.Add("knowledgeBases", parameterToString(*varForms.KnowledgeBases, "multi")) + } + if varForms != nil && varForms.PluginIds != nil { + varFormParams.Add("pluginIds", parameterToString(*varForms.PluginIds, "multi")) + } + varFormParams.Add("shortMemoryRound", parameterToString(varForms.ShortMemoryRound, "")) + varFormParams.Add("operator", parameterToString(varForms.Operator, "")) + varFormParams.Add("llmModelId", parameterToString(varForms.LlmModelId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// UploadModels +/* + * 上传私有模型 + * @param varForms model.AiUploadModelsForms + */ +func (s *AiApiService) UploadModels( + varForms *model.AiUploadModelsForms, +) (model.AiUploadModelsResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.AiUploadModelsResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/ai/uploadModels" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("modelType", parameterToString(varForms.ModelType, "")) + varFormParams.Add("modelName", parameterToString(varForms.ModelName, "")) + varFormParams.Add("modelFilePath", parameterToString(varForms.ModelFilePath, "")) + varFormParams.Add("modelFiles", parameterToString(varForms.ModelFiles, "multi")) + if varForms != nil && varForms.Desc != nil { + varFormParams.Add("desc", parameterToString(*varForms.Desc, "")) + } + varFormParams.Add("modelFileType", parameterToString(varForms.ModelFileType, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/api/client.go b/client/api/client.go new file mode 100644 index 00000000..dc81babf --- /dev/null +++ b/client/api/client.go @@ -0,0 +1,441 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "bytes" + "crypto/md5" + "crypto/rand" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "time" + "unicode/utf8" + +) + +const ( + Trace_Id string = "Traceid" + Result_Status string = "Result-Status" +) + +var ( + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") + + DefaultConfiguration = NewConfiguration() +) + +// APIClient manages communication with the API +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AdaptApi *AdaptApiService + + AiApi *AiApiService + + ConsoleAdminApi *ConsoleAdminApiService + + DispatchApi *DispatchApiService + + LiveApi *LiveApiService + + MultiplayApi *MultiplayApiService + + TokenApi *TokenApiService + + UsercontrollerApi *UsercontrollerApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AdaptApi = (*AdaptApiService)(&c.common) + c.AiApi = (*AiApiService)(&c.common) + c.ConsoleAdminApi = (*ConsoleAdminApiService)(&c.common) + c.DispatchApi = (*DispatchApiService)(&c.common) + c.LiveApi = (*LiveApiService)(&c.common) + c.MultiplayApi = (*MultiplayApiService)(&c.common) + c.TokenApi = (*TokenApiService)(&c.common) + c.UsercontrollerApi = (*UsercontrollerApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { +// var delimiter string + +// switch collectionFormat { +// case "pipes": +// delimiter = "|" +// case "ssv": +// delimiter = " " +// case "tsv": +// delimiter = "\t" +// case "csv": +// delimiter = "," +// } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { +// return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + if marshal, err := json.Marshal(obj); err != nil { + return "" + } else { + return string(marshal) + } + } + if reflect.TypeOf(obj).Kind() == reflect.Struct { + if marshal, err := json.Marshal(obj); err != nil { + return "" + } else { + return string(marshal) + } + } + return fmt.Sprintf("%v", obj) +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + path string, + method string, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, +) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // add form parameters + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", "cgw-client/1.0.0/go") + + // prepare sign headers + prepareSignHeader(queryParams, formParams, localVarRequest, c.cfg) + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } + expires = now.Add(lifetime) + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +func prepareSignHeader(queryParams url.Values, formParams url.Values, localVarRequest *http.Request, cfg *Configuration) { + accessKey := cfg.AccessKey + nonce := randNonce(16) + version := cfg.SignatureVersion + timestamp := time.Now().UTC().Format(time.RFC3339) + method := cfg.SignatureMethod + + values := url.Values{} + values.Add("AccessKey", accessKey) + values.Add("SignatureNonce", nonce) + values.Add("SignatureVersion", version) + values.Add("SignatureMethod", method) + values.Add("Timestamp", timestamp) + if len(queryParams) > 0 { + for s, i := range queryParams { + for _, s2 := range i { + values.Add(s, s2) + } + } + } + if len(formParams) > 0 { + for s, i := range formParams { + for _, s2 := range i { + values.Add(s, s2) + } + } + } + + sign := md5Hex([]byte(getSignRaw(values, localVarRequest.Method, cfg.SecretKey))) + localVarRequest.Header.Add("Signature", sign) + localVarRequest.Header.Add("Accesskey", accessKey) + localVarRequest.Header.Add("Signaturenonce", nonce) + localVarRequest.Header.Add("Signatureversion", version) + localVarRequest.Header.Add("Timestamp", timestamp) + localVarRequest.Header.Add("Signaturemethod", method) +} + +func md5Hex(data []byte) string { + md5Sum := md5.Sum(data) + return hex.EncodeToString(md5Sum[:]) +} + +func getSignRaw(values url.Values, method string, secret string) string { + return secret + "&" + keySignInput(values, method) +} + +func keySignInput(values url.Values, method string) string { + keys := make([]string, 0) + for s, _ := range values { + keys = append(keys, s) + } + sort.Strings(keys) + + stringToSign := method + "&" + encodeURLComponent("/") + + strs := make([]string, 0) + for _, k := range keys { + strs = append(strs, k+"="+encodeURLComponent(values.Get(k))) + } + return stringToSign + "&" + encodeURLComponent(strings.Join(strs, "&")) +} + +func encodeURLComponent(str string) string { + escape := url.QueryEscape(str) + escape = strings.ReplaceAll(escape, "+", "%20") + escape = strings.ReplaceAll(escape, "*", "%2A") + escape = strings.ReplaceAll(escape, "%7E", "~") + return escape +} + +func randNonce(n int) string { + b := make([]byte, n) + rand.Read(b) + return hex.EncodeToString(b) +} + +// GenericError Provides access to the body, error and model on returned errors. +type GenericError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericError) Model() interface{} { + return e.model +} + +type Configuration struct { + Host string `json:"host"` + Scheme string `json:"scheme"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + AccessKey string `json:"accessKey"` + SecretKey string `json:"secretKey"` + SignatureVersion string `json:"signatureVersion"` + SignatureMethod string `json:"signatureMethod"` + HTTPClient *http.Client +} + +func NewConfiguration() *Configuration { + return &Configuration{ + Scheme: "https", + SignatureVersion: "1.0", + SignatureMethod: "MD5", + HTTPClient: http.DefaultClient, + } +} \ No newline at end of file diff --git a/client/api/console_admin_api.go b/client/api/console_admin_api.go new file mode 100644 index 00000000..d9721985 --- /dev/null +++ b/client/api/console_admin_api.go @@ -0,0 +1,2867 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type ConsoleAdminApiService service + + +// ActivateDeployment +/* + * + * @param varForms model.ConsoleAdminActivateDeploymentForms + */ +func (s *ConsoleAdminApiService) ActivateDeployment( + varForms *model.ConsoleAdminActivateDeploymentForms, +) (model.ConsoleAdminActivateDeploymentResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminActivateDeploymentResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/activateDeployment" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + varFormParams.Add("versionId", parameterToString(varForms.VersionId, "")) + if varForms != nil && varForms.MaxConcurrency != nil { + varFormParams.Add("maxConcurrency", parameterToString(*varForms.MaxConcurrency, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// AdaptGameVersion +/* + * + * @param varForms model.ConsoleAdminAdaptGameVersionForms + */ +func (s *ConsoleAdminApiService) AdaptGameVersion( + varForms *model.ConsoleAdminAdaptGameVersionForms, +) (model.ConsoleAdminAdaptGameVersionResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminAdaptGameVersionResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/adaptGameVersion" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("versionId", parameterToString(varForms.VersionId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// AddGameToProject +/* + * + * @param varForms model.ConsoleAdminAddGameToProjectForms + */ +func (s *ConsoleAdminApiService) AddGameToProject( + varForms *model.ConsoleAdminAddGameToProjectForms, +) (model.ConsoleAdminAddGameToProjectResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminAddGameToProjectResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/addGameToProject" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// BatchUpdateDispatchConfig +/* + * 批量更新游戏各自调度配置 + * @param varForms model.ConsoleAdminBatchUpdateDispatchConfigForms + */ +func (s *ConsoleAdminApiService) BatchUpdateDispatchConfig( + varForms *model.ConsoleAdminBatchUpdateDispatchConfigForms, +) (model.ConsoleAdminBatchUpdateDispatchConfigResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminBatchUpdateDispatchConfigResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/batchUpdateDispatchConfig" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("mixProjectId", parameterToString(varForms.MixProjectId, "")) + varFormParams.Add("instanceId", parameterToString(varForms.InstanceId, "")) + varFormParams.Add("appName", parameterToString(varForms.AppName, "")) + varFormParams.Add("configList", parameterToString(varForms.ConfigList, "multi")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// CreateGame +/* + * + * @param varForms model.ConsoleAdminCreateGameForms + */ +func (s *ConsoleAdminApiService) CreateGame( + varForms *model.ConsoleAdminCreateGameForms, +) (model.ConsoleAdminCreateGameResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminCreateGameResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/createGame" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameName", parameterToString(varForms.GameName, "")) + varFormParams.Add("platformType", parameterToString(varForms.PlatformType, "")) + if varForms != nil && varForms.OsType != nil { + varFormParams.Add("osType", parameterToString(*varForms.OsType, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// CreateOrder +/* + * 订单下单 + * @param varForms model.ConsoleAdminCreateOrderForms + */ +func (s *ConsoleAdminApiService) CreateOrder( + varForms *model.ConsoleAdminCreateOrderForms, +) (model.ConsoleAdminCreateOrderResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminCreateOrderResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/createOrder" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("categoryCode", parameterToString(varForms.CategoryCode, "")) + varFormParams.Add("commodityCode", parameterToString(varForms.CommodityCode, "")) + if varForms != nil && varForms.InstanceId != nil { + varFormParams.Add("instanceId", parameterToString(*varForms.InstanceId, "")) + } + varFormParams.Add("primaryChargeItemCode", parameterToString(varForms.PrimaryChargeItemCode, "")) + varFormParams.Add("attributeRequestList", parameterToString(varForms.AttributeRequestList, "multi")) + varFormParams.Add("orderType", parameterToString(varForms.OrderType, "")) + if varForms != nil && varForms.AutoRenew != nil { + varFormParams.Add("autoRenew", parameterToString(*varForms.AutoRenew, "")) + } + if varForms != nil && varForms.CreateOrderExtParams != nil { + varFormParams.Add("createOrderExtParams", parameterToString(*varForms.CreateOrderExtParams, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// CreateProject +/* + * + * @param varForms model.ConsoleAdminCreateProjectForms + */ +func (s *ConsoleAdminApiService) CreateProject( + varForms *model.ConsoleAdminCreateProjectForms, +) (model.ConsoleAdminCreateProjectResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminCreateProjectResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/createProject" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("projectName", parameterToString(varForms.ProjectName, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// DeleteGame +/* + * + * @param varForms model.ConsoleAdminDeleteGameForms + */ +func (s *ConsoleAdminApiService) DeleteGame( + varForms *model.ConsoleAdminDeleteGameForms, +) (model.ConsoleAdminDeleteGameResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminDeleteGameResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/deleteGame" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// DeleteGameVersion +/* + * + * @param varForms model.ConsoleAdminDeleteGameVersionForms + */ +func (s *ConsoleAdminApiService) DeleteGameVersion( + varForms *model.ConsoleAdminDeleteGameVersionForms, +) (model.ConsoleAdminDeleteGameVersionResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminDeleteGameVersionResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/deleteGameVersion" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("versionId", parameterToString(varForms.VersionId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// DeleteProject +/* + * + * @param varForms model.ConsoleAdminDeleteProjectForms + */ +func (s *ConsoleAdminApiService) DeleteProject( + varForms *model.ConsoleAdminDeleteProjectForms, +) (model.ConsoleAdminDeleteProjectResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminDeleteProjectResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/deleteProject" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetBillFlowInfo +/* + * + * @param varForms model.ConsoleAdminGetBillFlowInfoForms + */ +func (s *ConsoleAdminApiService) GetBillFlowInfo( + varForms *model.ConsoleAdminGetBillFlowInfoForms, +) (model.ConsoleAdminGetBillFlowInfoResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminGetBillFlowInfoResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/getBillFlowInfo" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountingPeriodFrom", parameterToString(varForms.AccountingPeriodFrom, "")) + varFormParams.Add("accountingPeriodTo", parameterToString(varForms.AccountingPeriodTo, "")) + if varForms != nil && varForms.CommodityCode != nil { + varFormParams.Add("commodityCode", parameterToString(*varForms.CommodityCode, "")) + } + if varForms != nil && varForms.TenantId != nil { + varFormParams.Add("tenantId", parameterToString(*varForms.TenantId, "")) + } + if varForms != nil && varForms.OrderId != nil { + varFormParams.Add("orderId", parameterToString(*varForms.OrderId, "")) + } + if varForms != nil && varForms.Status != nil { + varFormParams.Add("status", parameterToString(*varForms.Status, "")) + } + if varForms != nil && varForms.ConsumeType != nil { + varFormParams.Add("consumeType", parameterToString(*varForms.ConsumeType, "")) + } + if varForms != nil && varForms.BillType != nil { + varFormParams.Add("billType", parameterToString(*varForms.BillType, "")) + } + if varForms != nil && varForms.PageNumber != nil { + varFormParams.Add("pageNumber", parameterToString(*varForms.PageNumber, "")) + } + if varForms != nil && varForms.PageSize != nil { + varFormParams.Add("pageSize", parameterToString(*varForms.PageSize, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetGameInstanceContainerRatio +/* + * + * @param varForms model.ConsoleAdminGetGameInstanceContainerRatioForms + */ +func (s *ConsoleAdminApiService) GetGameInstanceContainerRatio( + varForms *model.ConsoleAdminGetGameInstanceContainerRatioForms, +) (model.ConsoleAdminGetGameInstanceContainerRatioResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminGetGameInstanceContainerRatioResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/getGameInstanceContainerRatio" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("commodityInstanceId", parameterToString(varForms.CommodityInstanceId, "")) + varFormParams.Add("games", parameterToString(varForms.Games, "multi")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetGameRecommendedInstance +/* + * + * @param varForms model.ConsoleAdminGetGameRecommendedInstanceForms + */ +func (s *ConsoleAdminApiService) GetGameRecommendedInstance( + varForms *model.ConsoleAdminGetGameRecommendedInstanceForms, +) (model.ConsoleAdminGetGameRecommendedInstanceResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminGetGameRecommendedInstanceResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/getGameRecommendedInstance" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("game", parameterToString(varForms.Game, "")) + varFormParams.Add("commodityInstanceIds", parameterToString(varForms.CommodityInstanceIds, "multi")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetGameVersion +/* + * + * @param varForms model.ConsoleAdminGetGameVersionForms + */ +func (s *ConsoleAdminApiService) GetGameVersion( + varForms *model.ConsoleAdminGetGameVersionForms, +) (model.ConsoleAdminGetGameVersionResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminGetGameVersionResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/getGameVersion" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("versionId", parameterToString(varForms.VersionId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetGameVersionProgress +/* + * + * @param varForms model.ConsoleAdminGetGameVersionProgressForms + */ +func (s *ConsoleAdminApiService) GetGameVersionProgress( + varForms *model.ConsoleAdminGetGameVersionProgressForms, +) (model.ConsoleAdminGetGameVersionProgressResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminGetGameVersionProgressResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/getGameVersionProgress" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("taskId", parameterToString(varForms.TaskId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetOrder +/* + * 查询订单 + * @param varForms model.ConsoleAdminGetOrderForms + */ +func (s *ConsoleAdminApiService) GetOrder( + varForms *model.ConsoleAdminGetOrderForms, +) (model.ConsoleAdminGetOrderResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminGetOrderResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/getOrder" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("orderId", parameterToString(varForms.OrderId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListActivateableInstances +/* + * + * @param varForms model.ConsoleAdminListActivateableInstancesForms + */ +func (s *ConsoleAdminApiService) ListActivateableInstances( + varForms *model.ConsoleAdminListActivateableInstancesForms, +) (model.ConsoleAdminListActivateableInstancesResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListActivateableInstancesResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listActivateableInstances" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + varFormParams.Add("versionId", parameterToString(varForms.VersionId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListActivatedInstances +/* + * + * @param varForms model.ConsoleAdminListActivatedInstancesForms + */ +func (s *ConsoleAdminApiService) ListActivatedInstances( + varForms *model.ConsoleAdminListActivatedInstancesForms, +) (model.ConsoleAdminListActivatedInstancesResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListActivatedInstancesResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listActivatedInstances" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListControllersOfGame +/* + * + * @param varForms model.ConsoleAdminListControllersOfGameForms + */ +func (s *ConsoleAdminApiService) ListControllersOfGame( + varForms *model.ConsoleAdminListControllersOfGameForms, +) (model.ConsoleAdminListControllersOfGameResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListControllersOfGameResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listControllersOfGame" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + if varForms != nil && varForms.NextToken != nil { + varFormParams.Add("nextToken", parameterToString(*varForms.NextToken, "")) + } + if varForms != nil && varForms.MaxResults != nil { + varFormParams.Add("maxResults", parameterToString(*varForms.MaxResults, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListDeployableInstances +/* + * + * @param varForms model.ConsoleAdminListDeployableInstancesForms + */ +func (s *ConsoleAdminApiService) ListDeployableInstances( + varForms *model.ConsoleAdminListDeployableInstancesForms, +) (model.ConsoleAdminListDeployableInstancesResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListDeployableInstancesResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listDeployableInstances" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("versionId", parameterToString(varForms.VersionId, "")) + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + if varForms != nil && varForms.PageSize != nil { + varFormParams.Add("pageSize", parameterToString(*varForms.PageSize, "")) + } + if varForms != nil && varForms.PageNumber != nil { + varFormParams.Add("pageNumber", parameterToString(*varForms.PageNumber, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListGameCcu +/* + * 分游戏实时并发 + * @param varForms model.ConsoleAdminListGameCcuForms + */ +func (s *ConsoleAdminApiService) ListGameCcu( + varForms *model.ConsoleAdminListGameCcuForms, +) (model.ConsoleAdminListGameCcuResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListGameCcuResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listGameCcu" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.MixGameIds != nil { + varFormParams.Add("mixGameIds", parameterToString(*varForms.MixGameIds, "")) + } + if varForms != nil && varForms.ProjectIds != nil { + varFormParams.Add("projectIds", parameterToString(*varForms.ProjectIds, "")) + } + if varForms != nil && varForms.QueryTimeStart != nil { + varFormParams.Add("queryTimeStart", parameterToString(*varForms.QueryTimeStart, "")) + } + if varForms != nil && varForms.QueryTimeEnd != nil { + varFormParams.Add("queryTimeEnd", parameterToString(*varForms.QueryTimeEnd, "")) + } + if varForms != nil && varForms.PageNumber != nil { + varFormParams.Add("pageNumber", parameterToString(*varForms.PageNumber, "")) + } + if varForms != nil && varForms.PageSize != nil { + varFormParams.Add("pageSize", parameterToString(*varForms.PageSize, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListGameDeployDetailsOfProject +/* + * 获取项目下游戏部署版本信息。 + * @param varForms model.ConsoleAdminListGameDeployDetailsOfProjectForms + */ +func (s *ConsoleAdminApiService) ListGameDeployDetailsOfProject( + varForms *model.ConsoleAdminListGameDeployDetailsOfProjectForms, +) (model.ConsoleAdminListGameDeployDetailsOfProjectResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListGameDeployDetailsOfProjectResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listGameDeployDetailsOfProject" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.ProjectId != nil { + varFormParams.Add("projectId", parameterToString(*varForms.ProjectId, "")) + } + if varForms != nil && varForms.GameId != nil { + varFormParams.Add("gameId", parameterToString(*varForms.GameId, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListGameVersions +/* + * + * @param varForms model.ConsoleAdminListGameVersionsForms + */ +func (s *ConsoleAdminApiService) ListGameVersions( + varForms *model.ConsoleAdminListGameVersionsForms, +) (model.ConsoleAdminListGameVersionsResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListGameVersionsResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listGameVersions" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.NextToken != nil { + varFormParams.Add("nextToken", parameterToString(*varForms.NextToken, "")) + } + if varForms != nil && varForms.MaxResults != nil { + varFormParams.Add("maxResults", parameterToString(*varForms.MaxResults, "")) + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListGames +/* + * + * @param varForms model.ConsoleAdminListGamesForms + */ +func (s *ConsoleAdminApiService) ListGames( + varForms *model.ConsoleAdminListGamesForms, +) (model.ConsoleAdminListGamesResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListGamesResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listGames" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.NextToken != nil { + varFormParams.Add("nextToken", parameterToString(*varForms.NextToken, "")) + } + if varForms != nil && varForms.MaxResults != nil { + varFormParams.Add("maxResults", parameterToString(*varForms.MaxResults, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListInstancesOfProject +/* + * 分页获取项目中的实例 + * @param varForms model.ConsoleAdminListInstancesOfProjectForms + */ +func (s *ConsoleAdminApiService) ListInstancesOfProject( + varForms *model.ConsoleAdminListInstancesOfProjectForms, +) (model.ConsoleAdminListInstancesOfProjectResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListInstancesOfProjectResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listInstancesOfProject" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.NextToken != nil { + varFormParams.Add("nextToken", parameterToString(*varForms.NextToken, "")) + } + if varForms != nil && varForms.MaxResult != nil { + varFormParams.Add("maxResult", parameterToString(*varForms.MaxResult, "")) + } + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListMonthBill +/* + * 月度账单列表 + * @param varForms model.ConsoleAdminListMonthBillForms + */ +func (s *ConsoleAdminApiService) ListMonthBill( + varForms *model.ConsoleAdminListMonthBillForms, +) (model.ConsoleAdminListMonthBillResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListMonthBillResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listMonthBill" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountingPeriodFrom", parameterToString(varForms.AccountingPeriodFrom, "")) + varFormParams.Add("accountingPeriodTo", parameterToString(varForms.AccountingPeriodTo, "")) + if varForms != nil && varForms.Status != nil { + varFormParams.Add("status", parameterToString(*varForms.Status, "")) + } + if varForms != nil && varForms.PageNumber != nil { + varFormParams.Add("pageNumber", parameterToString(*varForms.PageNumber, "")) + } + if varForms != nil && varForms.PageSize != nil { + varFormParams.Add("pageSize", parameterToString(*varForms.PageSize, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListProjects +/* + * + * @param varForms model.ConsoleAdminListProjectsForms + */ +func (s *ConsoleAdminApiService) ListProjects( + varForms *model.ConsoleAdminListProjectsForms, +) (model.ConsoleAdminListProjectsResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListProjectsResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listProjects" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.NextToken != nil { + varFormParams.Add("nextToken", parameterToString(*varForms.NextToken, "")) + } + if varForms != nil && varForms.MaxResults != nil { + varFormParams.Add("maxResults", parameterToString(*varForms.MaxResults, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListVersionDeployInstances +/* + * 获取项目下游戏版本的部署实例信息。 + * @param varForms model.ConsoleAdminListVersionDeployInstancesForms + */ +func (s *ConsoleAdminApiService) ListVersionDeployInstances( + varForms *model.ConsoleAdminListVersionDeployInstancesForms, +) (model.ConsoleAdminListVersionDeployInstancesResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminListVersionDeployInstancesResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/listVersionDeployInstances" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.ProjectId != nil { + varFormParams.Add("projectId", parameterToString(*varForms.ProjectId, "")) + } + if varForms != nil && varForms.GameId != nil { + varFormParams.Add("gameId", parameterToString(*varForms.GameId, "")) + } + if varForms != nil && varForms.VersionId != nil { + varFormParams.Add("versionId", parameterToString(*varForms.VersionId, "")) + } + if varForms != nil && varForms.DeployStatus != nil { + varFormParams.Add("deployStatus", parameterToString(*varForms.DeployStatus, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// QueryAdaptResultByVersionId +/* + * 查询适配结果 + * @param varForms model.ConsoleAdminQueryAdaptResultByVersionIdForms + */ +func (s *ConsoleAdminApiService) QueryAdaptResultByVersionId( + varForms *model.ConsoleAdminQueryAdaptResultByVersionIdForms, +) (model.ConsoleAdminQueryAdaptResultByVersionIdResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminQueryAdaptResultByVersionIdResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/queryAdaptResultByVersionId" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("mixVersionId", parameterToString(varForms.MixVersionId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// RecommendSpecification +/* + * + * @param varForms model.ConsoleAdminRecommendSpecificationForms + */ +func (s *ConsoleAdminApiService) RecommendSpecification( + varForms *model.ConsoleAdminRecommendSpecificationForms, +) (model.ConsoleAdminRecommendSpecificationResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminRecommendSpecificationResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/recommendSpecification" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("gameVersionId", parameterToString(varForms.GameVersionId, "")) + varFormParams.Add("platformType", parameterToString(varForms.PlatformType, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// RemoveGameFromProject +/* + * + * @param varForms model.ConsoleAdminRemoveGameFromProjectForms + */ +func (s *ConsoleAdminApiService) RemoveGameFromProject( + varForms *model.ConsoleAdminRemoveGameFromProjectForms, +) (model.ConsoleAdminRemoveGameFromProjectResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminRemoveGameFromProjectResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/removeGameFromProject" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// RtOverView +/* + * 实时并发数 + * @param varForms model.ConsoleAdminRtOverViewForms + */ +func (s *ConsoleAdminApiService) RtOverView( + varForms *model.ConsoleAdminRtOverViewForms, +) (model.ConsoleAdminRtOverViewResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminRtOverViewResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/rtOverView" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.MixGameIds != nil { + varFormParams.Add("mixGameIds", parameterToString(*varForms.MixGameIds, "")) + } + if varForms != nil && varForms.ProjectIds != nil { + varFormParams.Add("projectIds", parameterToString(*varForms.ProjectIds, "")) + } + if varForms != nil && varForms.QueryTimeStart != nil { + varFormParams.Add("queryTimeStart", parameterToString(*varForms.QueryTimeStart, "")) + } + if varForms != nil && varForms.QueryTimeEnd != nil { + varFormParams.Add("queryTimeEnd", parameterToString(*varForms.QueryTimeEnd, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// RtTrend +/* + * 实时并发趋势图 + * @param varForms model.ConsoleAdminRtTrendForms + */ +func (s *ConsoleAdminApiService) RtTrend( + varForms *model.ConsoleAdminRtTrendForms, +) (model.ConsoleAdminRtTrendResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminRtTrendResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/rtTrend" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.GroupType != nil { + varFormParams.Add("groupType", parameterToString(*varForms.GroupType, "")) + } + if varForms != nil && varForms.IndicatorTypes != nil { + varFormParams.Add("indicatorTypes", parameterToString(*varForms.IndicatorTypes, "")) + } + if varForms != nil && varForms.MixGameIds != nil { + varFormParams.Add("mixGameIds", parameterToString(*varForms.MixGameIds, "")) + } + if varForms != nil && varForms.ProjectIds != nil { + varFormParams.Add("projectIds", parameterToString(*varForms.ProjectIds, "")) + } + if varForms != nil && varForms.QueryTimeStart != nil { + varFormParams.Add("queryTimeStart", parameterToString(*varForms.QueryTimeStart, "")) + } + if varForms != nil && varForms.QueryTimeEnd != nil { + varFormParams.Add("queryTimeEnd", parameterToString(*varForms.QueryTimeEnd, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// SubmitDeployment +/* + * + * @param varForms model.ConsoleAdminSubmitDeploymentForms + */ +func (s *ConsoleAdminApiService) SubmitDeployment( + varForms *model.ConsoleAdminSubmitDeploymentForms, +) (model.ConsoleAdminSubmitDeploymentResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminSubmitDeploymentResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/submitDeployment" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + varFormParams.Add("versionId", parameterToString(varForms.VersionId, "")) + varFormParams.Add("cloudGameInstanceIds", parameterToString(varForms.CloudGameInstanceIds, "")) + varFormParams.Add("operationType", parameterToString(varForms.OperationType, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// SubmitRefund +/* + * 订单退订 + * @param varForms model.ConsoleAdminSubmitRefundForms + */ +func (s *ConsoleAdminApiService) SubmitRefund( + varForms *model.ConsoleAdminSubmitRefundForms, +) (model.ConsoleAdminSubmitRefundResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminSubmitRefundResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/submitRefund" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("commodityCode", parameterToString(varForms.CommodityCode, "")) + varFormParams.Add("instanceId", parameterToString(varForms.InstanceId, "")) + varFormParams.Add("refundType", parameterToString(varForms.RefundType, "")) + if varForms != nil && varForms.RefundReason != nil { + varFormParams.Add("refundReason", parameterToString(*varForms.RefundReason, "")) + } + if varForms != nil && varForms.RefundReasonType != nil { + varFormParams.Add("refundReasonType", parameterToString(*varForms.RefundReasonType, "")) + } + if varForms != nil && varForms.TargetExpireTime != nil { + varFormParams.Add("targetExpireTime", parameterToString(*varForms.TargetExpireTime, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// UploadGameVersionByDownload +/* + * + * @param varForms model.ConsoleAdminUploadGameVersionByDownloadForms + */ +func (s *ConsoleAdminApiService) UploadGameVersionByDownload( + varForms *model.ConsoleAdminUploadGameVersionByDownloadForms, +) (model.ConsoleAdminUploadGameVersionByDownloadResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ConsoleAdminUploadGameVersionByDownloadResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/consoleAdmin/uploadGameVersionByDownload" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("hash", parameterToString(varForms.Hash, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("downloadType", parameterToString(varForms.DownloadType, "")) + varFormParams.Add("versionName", parameterToString(varForms.VersionName, "")) + if varForms != nil && varForms.OsManifest != nil { + varFormParams.Add("osManifest", parameterToString(*varForms.OsManifest, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/api/dispatch_api.go b/client/api/dispatch_api.go new file mode 100644 index 00000000..7a06d335 --- /dev/null +++ b/client/api/dispatch_api.go @@ -0,0 +1,1482 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type DispatchApiService service + + +// BatchStopGame +/* + * + * @param varForms model.BatchStopGameForms + */ +func (s *DispatchApiService) BatchStopGame( + varForms *model.BatchStopGameForms, +) (model.BatchStopGameResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.BatchStopGameResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/batchStopGame" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("token", parameterToString(varForms.Token, "")) + if varForms != nil && varForms.Reason != nil { + varFormParams.Add("reason", parameterToString(*varForms.Reason, "")) + } + if varForms != nil && varForms.TrackInfo != nil { + varFormParams.Add("trackInfo", parameterToString(*varForms.TrackInfo, "")) + } + if varForms != nil && varForms.Tags != nil { + varFormParams.Add("tags", parameterToString(*varForms.Tags, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// CancelGameHang +/* + * 取消游戏挂机 + * @param varForms model.CancelGameHangForms + */ +func (s *DispatchApiService) CancelGameHang( + varForms *model.CancelGameHangForms, +) (model.CancelGameHangResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.CancelGameHangResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/cancelGameHang" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ClientNotify +/* + * clientNotify + * @param varForms model.ClientNotifyForms + */ +func (s *DispatchApiService) ClientNotify( + varForms *model.ClientNotifyForms, +) (model.ClientNotifyResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ClientNotifyResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/clientNotify" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("value", parameterToString(varForms.Value, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GameNotify +/* + * 游戏通知接口 + * @param varForms model.GameNotifyForms + */ +func (s *DispatchApiService) GameNotify( + varForms *model.GameNotifyForms, +) (model.GameNotifyResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.GameNotifyResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/gameNotify" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("type", parameterToString(varForms.Type_, "")) + if varForms != nil && varForms.Value != nil { + varFormParams.Add("value", parameterToString(*varForms.Value, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetGameConcurrency +/* + * 调用GetGameConcurrency获取游戏当前并发数 + * @param varForms model.GetGameConcurrencyForms + */ +func (s *DispatchApiService) GetGameConcurrency( + varForms *model.GetGameConcurrencyForms, +) (model.GetGameConcurrencyResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.GetGameConcurrencyResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/getGameConcurrency" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + if varForms != nil && varForms.QueryQueueConcurrency != nil { + varFormParams.Add("queryQueueConcurrency", parameterToString(*varForms.QueryQueueConcurrency, "")) + } + if varForms != nil && varForms.QueueUserLevel != nil { + varFormParams.Add("queueUserLevel", parameterToString(*varForms.QueueUserLevel, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetStock +/* + * 调用GetStock获取游戏当前库存 + * @param varForms model.GetStockForms + */ +func (s *DispatchApiService) GetStock( + varForms *model.GetStockForms, +) (model.GetStockResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.GetStockResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/getStock" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.GameId != nil { + varFormParams.Add("gameId", parameterToString(*varForms.GameId, "")) + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("type", parameterToString(varForms.Type_, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetStopGameToken +/* + * 全量踢下线获取token + * @param varForms model.GetStopGameTokenForms + */ +func (s *DispatchApiService) GetStopGameToken( + varForms *model.GetStopGameTokenForms, +) (model.GetStopGameTokenResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.GetStopGameTokenResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/getStopGameToken" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListGameServerIp +/* + * + * @param varForms model.ListGameServerIpForms + */ +func (s *DispatchApiService) ListGameServerIp( + varForms *model.ListGameServerIpForms, +) (model.ListGameServerIpResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ListGameServerIpResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/listGameServerIp" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + if varForms != nil && varForms.PageSize != nil { + varFormParams.Add("pageSize", parameterToString(*varForms.PageSize, "")) + } + if varForms != nil && varForms.NextToken != nil { + varFormParams.Add("nextToken", parameterToString(*varForms.NextToken, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// QueryGameHang +/* + * 查询游戏挂机状态 + * @param varForms model.QueryGameHangForms + */ +func (s *DispatchApiService) QueryGameHang( + varForms *model.QueryGameHangForms, +) (model.QueryGameHangResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.QueryGameHangResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/queryGameHang" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// QuerySessionStatus +/* + * 查询会话当前状态 + * @param varForms model.QuerySessionStatusForms + */ +func (s *DispatchApiService) QuerySessionStatus( + varForms *model.QuerySessionStatusForms, +) (model.QuerySessionStatusResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.QuerySessionStatusResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/querySessionStatus" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ReplaceSlot +/* + * replaceSlot + * @param varForms model.ReplaceSlotForms + */ +func (s *DispatchApiService) ReplaceSlot( + varForms *model.ReplaceSlotForms, +) (model.ReplaceSlotResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.ReplaceSlotResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/replaceSlot" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("replaceSession", parameterToString(varForms.ReplaceSession, "")) + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + if varForms != nil && varForms.BizParam != nil { + varFormParams.Add("bizParam", parameterToString(*varForms.BizParam, "")) + } + if varForms != nil && varForms.ClientIp != nil { + varFormParams.Add("clientIp", parameterToString(*varForms.ClientIp, "")) + } + if varForms != nil && varForms.Tags != nil { + varFormParams.Add("tags", parameterToString(*varForms.Tags, "")) + } + if varForms != nil && varForms.Codec != nil { + varFormParams.Add("codec", parameterToString(*varForms.Codec, "")) + } + if varForms != nil && varForms.Resolution != nil { + varFormParams.Add("resolution", parameterToString(*varForms.Resolution, "")) + } + if varForms != nil && varForms.BitRate != nil { + varFormParams.Add("bitRate", parameterToString(*varForms.BitRate, "")) + } + if varForms != nil && varForms.Fps != nil { + varFormParams.Add("fps", parameterToString(*varForms.Fps, "")) + } + if varForms != nil && varForms.GameCmdParam != nil { + varFormParams.Add("gameCmdParam", parameterToString(*varForms.GameCmdParam, "")) + } + if varForms != nil && varForms.UserLevel != nil { + varFormParams.Add("userLevel", parameterToString(*varForms.UserLevel, "")) + } + if varForms != nil && varForms.StartParam != nil { + varFormParams.Add("startParam", parameterToString(*varForms.StartParam, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// SetGameAlive +/* + * 设置游戏可运行时长 + * @param varForms model.SetGameAliveForms + */ +func (s *DispatchApiService) SetGameAlive( + varForms *model.SetGameAliveForms, +) (model.SetGameAliveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.SetGameAliveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/setGameAlive" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("keepAlive", parameterToString(varForms.KeepAlive, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// SetGameHang +/* + * 设置游戏挂机 + * @param varForms model.SetGameHangForms + */ +func (s *DispatchApiService) SetGameHang( + varForms *model.SetGameHangForms, +) (model.SetGameHangResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.SetGameHangResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/setGameHang" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("duration", parameterToString(varForms.Duration, "")) + if varForms != nil && varForms.KickInTheGame != nil { + varFormParams.Add("kickInTheGame", parameterToString(*varForms.KickInTheGame, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// StopGame +/* + * 服务端发起,停止某个用户的某个游戏的某个会话 + * @param varForms model.StopGameForms + */ +func (s *DispatchApiService) StopGame( + varForms *model.StopGameForms, +) (model.StopGameResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.StopGameResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/stopGame" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + if varForms != nil && varForms.Reason != nil { + varFormParams.Add("reason", parameterToString(*varForms.Reason, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// StopPreopenContainer +/* + * 停止预开容器 + * @param varForms model.StopPreopenContainerForms + */ +func (s *DispatchApiService) StopPreopenContainer( + varForms *model.StopPreopenContainerForms, +) (model.StopPreopenContainerResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.StopPreopenContainerResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/stopPreopenContainer" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + if varForms != nil && varForms.NumberOfBatches != nil { + varFormParams.Add("numberOfBatches", parameterToString(*varForms.NumberOfBatches, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// TryToGetSlot +/* + * 为用户调度分配游戏容器,容器一旦分配成功会被锁住,一段时间内不再分配给其他用户,过期释放。 + * @param varForms model.TryToGetSlotForms + */ +func (s *DispatchApiService) TryToGetSlot( + varForms *model.TryToGetSlotForms, +) (model.TryToGetSlotResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.TryToGetSlotResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/tryToGetSlot" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + if varForms != nil && varForms.RegionId != nil { + varFormParams.Add("regionId", parameterToString(*varForms.RegionId, "")) + } + if varForms != nil && varForms.ReConnect != nil { + varFormParams.Add("reConnect", parameterToString(*varForms.ReConnect, "")) + } + if varForms != nil && varForms.BizParam != nil { + varFormParams.Add("bizParam", parameterToString(*varForms.BizParam, "")) + } + if varForms != nil && varForms.ClientIp != nil { + varFormParams.Add("clientIp", parameterToString(*varForms.ClientIp, "")) + } + if varForms != nil && varForms.Tags != nil { + varFormParams.Add("tags", parameterToString(*varForms.Tags, "")) + } + if varForms != nil && varForms.UserLevel != nil { + varFormParams.Add("userLevel", parameterToString(*varForms.UserLevel, "")) + } + if varForms != nil && varForms.Codec != nil { + varFormParams.Add("codec", parameterToString(*varForms.Codec, "")) + } + if varForms != nil && varForms.Resolution != nil { + varFormParams.Add("resolution", parameterToString(*varForms.Resolution, "")) + } + if varForms != nil && varForms.BitRate != nil { + varFormParams.Add("bitRate", parameterToString(*varForms.BitRate, "")) + } + if varForms != nil && varForms.Fps != nil { + varFormParams.Add("fps", parameterToString(*varForms.Fps, "")) + } + if varForms != nil && varForms.GameCmdParam != nil { + varFormParams.Add("gameCmdParam", parameterToString(*varForms.GameCmdParam, "")) + } + if varForms != nil && varForms.StartParam != nil { + varFormParams.Add("startParam", parameterToString(*varForms.StartParam, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// TryToGetSlots +/* + * tryToGetSlots + * @param varForms model.TryToGetSlotsForms + */ +func (s *DispatchApiService) TryToGetSlots( + varForms *model.TryToGetSlotsForms, +) (model.TryToGetSlotsResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.TryToGetSlotsResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/tryToGetSlots" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("parallelSchedule", parameterToString(varForms.ParallelSchedule, "")) + varFormParams.Add("requests", parameterToString(varForms.Requests, "multi")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// UpdatePreopenStrategy +/* + * 更新预开预起策略 + * @param varForms model.UpdatePreopenStrategyForms + */ +func (s *DispatchApiService) UpdatePreopenStrategy( + varForms *model.UpdatePreopenStrategyForms, +) (model.UpdatePreopenStrategyResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.UpdatePreopenStrategyResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/updatePreopenStrategy" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + if varForms != nil && varForms.PreStartCmd != nil { + varFormParams.Add("preStartCmd", parameterToString(*varForms.PreStartCmd, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/api/live_api.go b/client/api/live_api.go new file mode 100644 index 00000000..e6e2d1db --- /dev/null +++ b/client/api/live_api.go @@ -0,0 +1,254 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type LiveApiService service + + +// QueryStatus +/* + * + * @param varForms model.LiveQueryStatusForms + */ +func (s *LiveApiService) QueryStatus( + varForms *model.LiveQueryStatusForms, +) (model.LiveQueryStatusResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.LiveQueryStatusResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/live/queryStatus" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + if varForms != nil && varForms.LiveId != nil { + varFormParams.Add("liveId", parameterToString(*varForms.LiveId, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// StartGameLive +/* + * + * @param varForms model.LiveStartGameLiveForms + */ +func (s *LiveApiService) StartGameLive( + varForms *model.LiveStartGameLiveForms, +) (model.LiveStartGameLiveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.LiveStartGameLiveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/live/startGameLive" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("serverUrl", parameterToString(varForms.ServerUrl, "")) + varFormParams.Add("streamKey", parameterToString(varForms.StreamKey, "")) + if varForms != nil && varForms.Config != nil { + varFormParams.Add("config", parameterToString(*varForms.Config, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// StopGameLive +/* + * + * @param varForms model.LiveStopGameLiveForms + */ +func (s *LiveApiService) StopGameLive( + varForms *model.LiveStopGameLiveForms, +) (model.LiveStopGameLiveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.LiveStopGameLiveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/live/stopGameLive" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + if varForms != nil && varForms.LiveId != nil { + varFormParams.Add("liveId", parameterToString(*varForms.LiveId, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/api/multiplay_api.go b/client/api/multiplay_api.go new file mode 100644 index 00000000..fcfb5928 --- /dev/null +++ b/client/api/multiplay_api.go @@ -0,0 +1,484 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type MultiplayApiService service + + +// Close +/* + * + * @param varForms model.MultiplayCloseForms + */ +func (s *MultiplayApiService) Close( + varForms *model.MultiplayCloseForms, +) (model.MultiplayCloseResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.MultiplayCloseResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/multiplay/close" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("mpId", parameterToString(varForms.MpId, "")) + if varForms != nil && varForms.Reason != nil { + varFormParams.Add("reason", parameterToString(*varForms.Reason, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// Init +/* + * + * @param varForms model.MultiplayInitForms + */ +func (s *MultiplayApiService) Init( + varForms *model.MultiplayInitForms, +) (model.MultiplayInitResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.MultiplayInitResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/multiplay/init" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("gameSession", parameterToString(varForms.GameSession, "")) + varFormParams.Add("appKey", parameterToString(varForms.AppKey, "")) + if varForms != nil && varForms.Config != nil { + varFormParams.Add("config", parameterToString(*varForms.Config, "")) + } + if varForms != nil && varForms.Tokens != nil { + varFormParams.Add("tokens", parameterToString(*varForms.Tokens, "multi")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// Join +/* + * + * @param varForms model.MultiplayJoinForms + */ +func (s *MultiplayApiService) Join( + varForms *model.MultiplayJoinForms, +) (model.MultiplayJoinResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.MultiplayJoinResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/multiplay/join" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("mpId", parameterToString(varForms.MpId, "")) + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + if varForms != nil && varForms.ControlId != nil { + varFormParams.Add("controlId", parameterToString(*varForms.ControlId, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// Leave +/* + * + * @param varForms model.MultiplayLeaveForms + */ +func (s *MultiplayApiService) Leave( + varForms *model.MultiplayLeaveForms, +) (model.MultiplayLeaveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.MultiplayLeaveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/multiplay/leave" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("mpId", parameterToString(varForms.MpId, "")) + varFormParams.Add("kickOut", parameterToString(varForms.KickOut, "")) + if varForms != nil && varForms.Reason != nil { + varFormParams.Add("reason", parameterToString(*varForms.Reason, "")) + } + varFormParams.Add("tokenIds", parameterToString(varForms.TokenIds, "multi")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// Modify +/* + * + * @param varForms model.MultiplayModifyForms + */ +func (s *MultiplayApiService) Modify( + varForms *model.MultiplayModifyForms, +) (model.MultiplayModifyResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.MultiplayModifyResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/multiplay/modify" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("mpId", parameterToString(varForms.MpId, "")) + if varForms != nil && varForms.Tokens != nil { + varFormParams.Add("tokens", parameterToString(*varForms.Tokens, "multi")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// Query +/* + * + * @param varForms model.MultiplayQueryForms + */ +func (s *MultiplayApiService) Query( + varForms *model.MultiplayQueryForms, +) (model.MultiplayQueryResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.MultiplayQueryResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/multiplay/query" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("mpId", parameterToString(varForms.MpId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/api/token_api.go b/client/api/token_api.go new file mode 100644 index 00000000..30ad2ce4 --- /dev/null +++ b/client/api/token_api.go @@ -0,0 +1,162 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type TokenApiService service + + +// GetPair +/* + * 获取临时安全令牌(二元组) + */ +func (s *TokenApiService) GetPair( + +) (model.GetPairResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.GetPairResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/sts?type=pair" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetTriple +/* + * 获取临时安全令牌 + */ +func (s *TokenApiService) GetTriple( + +) (model.GetTripleResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.GetTripleResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/sts" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/api/usercontroller_api.go b/client/api/usercontroller_api.go new file mode 100644 index 00000000..66e8ba28 --- /dev/null +++ b/client/api/usercontroller_api.go @@ -0,0 +1,483 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package api + +import ( + "github.com/aliyun/alibabacloud-yjopenapi-go-client/client/model" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type UsercontrollerApiService service + + +// DeleteGameArchive +/* + * + * @param varForms model.UsercontrollerDeleteGameArchiveForms + */ +func (s *UsercontrollerApiService) DeleteGameArchive( + varForms *model.UsercontrollerDeleteGameArchiveForms, +) (model.UsercontrollerDeleteGameArchiveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.UsercontrollerDeleteGameArchiveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/usercontroller/deleteGameArchive" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("archiveId", parameterToString(varForms.ArchiveId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetGameTrialSurplusDuration +/* + * + * @param varForms model.UsercontrollerGetGameTrialSurplusDurationForms + */ +func (s *UsercontrollerApiService) GetGameTrialSurplusDuration( + varForms *model.UsercontrollerGetGameTrialSurplusDurationForms, +) (model.UsercontrollerGetGameTrialSurplusDurationResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.UsercontrollerGetGameTrialSurplusDurationResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/usercontroller/getGameTrialSurplusDuration" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// GetUserGameArchive +/* + * + * @param varForms model.UsercontrollerGetUserGameArchiveForms + */ +func (s *UsercontrollerApiService) GetUserGameArchive( + varForms *model.UsercontrollerGetUserGameArchiveForms, +) (model.UsercontrollerGetUserGameArchiveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.UsercontrollerGetUserGameArchiveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/usercontroller/getUserGameArchive" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("projectId", parameterToString(varForms.ProjectId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// ListLatestGameArchive +/* + * + * @param varForms model.UsercontrollerListLatestGameArchiveForms + */ +func (s *UsercontrollerApiService) ListLatestGameArchive( + varForms *model.UsercontrollerListLatestGameArchiveForms, +) (model.UsercontrollerListLatestGameArchiveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.UsercontrollerListLatestGameArchiveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/usercontroller/listLatestGameArchive" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + if varForms != nil && varForms.PageSize != nil { + varFormParams.Add("pageSize", parameterToString(*varForms.PageSize, "")) + } + if varForms != nil && varForms.PageNumber != nil { + varFormParams.Add("pageNumber", parameterToString(*varForms.PageNumber, "")) + } + if varForms != nil && varForms.TagStatus != nil { + varFormParams.Add("tagStatus", parameterToString(*varForms.TagStatus, "")) + } + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// RestoreGameArchive +/* + * + * @param varForms model.UsercontrollerRestoreGameArchiveForms + */ +func (s *UsercontrollerApiService) RestoreGameArchive( + varForms *model.UsercontrollerRestoreGameArchiveForms, +) (model.UsercontrollerRestoreGameArchiveResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.UsercontrollerRestoreGameArchiveResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/usercontroller/restoreGameArchive" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("archiveId", parameterToString(varForms.ArchiveId, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} + +// UpdateGameArchiveTagStatus +/* + * + * @param varForms model.UsercontrollerUpdateGameArchiveTagStatusForms + */ +func (s *UsercontrollerApiService) UpdateGameArchiveTagStatus( + varForms *model.UsercontrollerUpdateGameArchiveTagStatusForms, +) (model.UsercontrollerUpdateGameArchiveTagStatusResult, *http.Response, error) { + var ( + varHttpMethod = strings.ToUpper("Post") + varReturnValue model.UsercontrollerUpdateGameArchiveTagStatusResult + ) + + // create path and map variables + varPath := s.client.cfg.Scheme + "://" + s.client.cfg.Host + "/usercontroller/updateGameArchiveTagStatus" + + varHeaderParams := make(map[string]string) + varQueryParams := url.Values{} + varFormParams := url.Values{} + + // to determine the Content-Type header + varHttpContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + varHttpContentType := selectHeaderContentType(varHttpContentTypes) + if varHttpContentType != "" { + varHeaderParams["Content-Type"] = varHttpContentType + } + + // to determine the Accept header + varHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + varHttpHeaderAccept := selectHeaderAccept(varHttpHeaderAccepts) + if varHttpHeaderAccept != "" { + varHeaderParams["Accept"] = varHttpHeaderAccept + } + varFormParams.Add("accountId", parameterToString(varForms.AccountId, "")) + varFormParams.Add("gameId", parameterToString(varForms.GameId, "")) + varFormParams.Add("archiveId", parameterToString(varForms.ArchiveId, "")) + varFormParams.Add("tagStatus", parameterToString(varForms.TagStatus, "")) + + r, err := s.client.prepareRequest(varPath, varHttpMethod, varHeaderParams, varQueryParams, varFormParams) + if err != nil { + return varReturnValue, nil, err + } + + varHttpResponse, err := s.client.callAPI(r) + if err != nil || varHttpResponse == nil { + return varReturnValue, varHttpResponse, err + } + + defer varHttpResponse.Body.Close() + varBody, err := ioutil.ReadAll(varHttpResponse.Body) + if err != nil { + return varReturnValue, varHttpResponse, err + } + + if varHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = s.client.decode(&varReturnValue, varBody, varHttpResponse.Header.Get("Content-Type")) + if err == nil { + return varReturnValue, varHttpResponse, err + } + } + + if varHttpResponse.StatusCode >= 300 { + newErr := GenericError{ + body: varBody, + error: varHttpResponse.Status, + } + return varReturnValue, varHttpResponse, newErr + } + + return varReturnValue, varHttpResponse, nil +} diff --git a/client/model/adaptcreateandsubmitallforms.go b/client/model/adaptcreateandsubmitallforms.go new file mode 100644 index 00000000..cf4e308e --- /dev/null +++ b/client/model/adaptcreateandsubmitallforms.go @@ -0,0 +1,21 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AdaptCreateAndSubmitAllForms struct { + GameId *int32 `json:"gameId,omitempty"` + GameName *string `json:"gameName,omitempty"` + GameVersionId *int32 `json:"gameVersionId,omitempty"` + GameVersion *string `json:"gameVersion,omitempty"` + ResolutionList *string `json:"resolutionList,omitempty"` + FrameRateList *string `json:"frameRateList,omitempty"` + PlatformType int32 `json:"platformType"` + SourcePlatform int32 `json:"sourcePlatform"` + Records string `json:"records"` + MixGameVersionId string `json:"mixGameVersionId"` + MixGameId string `json:"mixGameId"` +} diff --git a/client/model/adaptcreateandsubmitallresult.go b/client/model/adaptcreateandsubmitallresult.go new file mode 100644 index 00000000..22798793 --- /dev/null +++ b/client/model/adaptcreateandsubmitallresult.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AdaptCreateAndSubmitAllResult struct { + Success bool `json:"success,omitempty"` + // 适配请求ID + Model int64 `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/adaptqueryrequestbyidforms.go b/client/model/adaptqueryrequestbyidforms.go new file mode 100644 index 00000000..b0fa36f5 --- /dev/null +++ b/client/model/adaptqueryrequestbyidforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AdaptQueryRequestByIdForms struct { + // 适配请求id + Id int64 `json:"id"` +} diff --git a/client/model/adaptqueryrequestbyidresult.go b/client/model/adaptqueryrequestbyidresult.go new file mode 100644 index 00000000..64c44406 --- /dev/null +++ b/client/model/adaptqueryrequestbyidresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AdaptQueryRequestByIdResult struct { + Success bool `json:"success,omitempty"` + Model AdaptQueryRequestByIdResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/adaptqueryrequestbyidresultmodel.go b/client/model/adaptqueryrequestbyidresultmodel.go new file mode 100644 index 00000000..98451c11 --- /dev/null +++ b/client/model/adaptqueryrequestbyidresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AdaptQueryRequestByIdResultModel struct { + // 状态0:待适配 1:适配中 2:适配完成 3:适配失败 + State int32 `json:"state,omitempty"` +} diff --git a/client/model/aibatchupdatekbversionforms.go b/client/model/aibatchupdatekbversionforms.go new file mode 100644 index 00000000..13b80a58 --- /dev/null +++ b/client/model/aibatchupdatekbversionforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiBatchUpdateKbVersionForms struct { + RoleIds []int64 `json:"roleIds"` + KbId int64 `json:"kbId"` + KbVersionId int64 `json:"kbVersionId"` + Operator string `json:"operator"` +} diff --git a/client/model/aibatchupdatekbversionresult.go b/client/model/aibatchupdatekbversionresult.go new file mode 100644 index 00000000..062e4e2f --- /dev/null +++ b/client/model/aibatchupdatekbversionresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiBatchUpdateKbVersionResult struct { + Success bool `json:"success,omitempty"` + Model map[string]string `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/aicancelqueueforms.go b/client/model/aicancelqueueforms.go new file mode 100644 index 00000000..c34536dc --- /dev/null +++ b/client/model/aicancelqueueforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiCancelQueueForms struct { + TaskId string `json:"taskId"` +} diff --git a/client/model/aicancelqueueresult.go b/client/model/aicancelqueueresult.go new file mode 100644 index 00000000..2dbf373b --- /dev/null +++ b/client/model/aicancelqueueresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiCancelQueueResult struct { + Success bool `json:"success,omitempty"` + Model AiCancelQueueResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/aicancelqueueresultmodel.go b/client/model/aicancelqueueresultmodel.go new file mode 100644 index 00000000..93f4ac8e --- /dev/null +++ b/client/model/aicancelqueueresultmodel.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiCancelQueueResultModel struct { + Msg string `json:"msg,omitempty"` + RequestId string `json:"requestId,omitempty"` + Success bool `json:"success,omitempty"` +} diff --git a/client/model/aicreatenpcroleforms.go b/client/model/aicreatenpcroleforms.go new file mode 100644 index 00000000..cad29213 --- /dev/null +++ b/client/model/aicreatenpcroleforms.go @@ -0,0 +1,23 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiCreateNpcRoleForms struct { + Name string `json:"name"` + Description string `json:"description"` + FigureId int64 `json:"figureId"` + VoiceId int64 `json:"voiceId"` + Characters string `json:"characters"` + Greetings string `json:"greetings"` + Guidance []string `json:"guidance"` + KnowledgeBases *[]AiCreateNpcRoleFormsKnowledgeBases `json:"knowledgeBases,omitempty"` + PluginIds *[]int64 `json:"pluginIds,omitempty"` + ShortMemoryRound int32 `json:"shortMemoryRound"` + TenantId int64 `json:"tenantId"` + Operator string `json:"operator"` + LlmModelId int64 `json:"llmModelId"` +} diff --git a/client/model/aicreatenpcroleformsknowledgebases.go b/client/model/aicreatenpcroleformsknowledgebases.go new file mode 100644 index 00000000..49657362 --- /dev/null +++ b/client/model/aicreatenpcroleformsknowledgebases.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiCreateNpcRoleFormsKnowledgeBases struct { + KnowledgeBaseVersionId int64 `json:"knowledgeBaseVersionId,omitempty"` + KnowledgeBaseId int64 `json:"knowledgeBaseId"` +} diff --git a/client/model/aicreatenpcroleresult.go b/client/model/aicreatenpcroleresult.go new file mode 100644 index 00000000..961b18a2 --- /dev/null +++ b/client/model/aicreatenpcroleresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiCreateNpcRoleResult struct { + Success bool `json:"success,omitempty"` + Model map[string]string `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/aideletemodelsforms.go b/client/model/aideletemodelsforms.go new file mode 100644 index 00000000..ea38095c --- /dev/null +++ b/client/model/aideletemodelsforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiDeleteModelsForms struct { + ResourceId string `json:"resourceId"` +} diff --git a/client/model/aideletemodelsresult.go b/client/model/aideletemodelsresult.go new file mode 100644 index 00000000..1b2ec66f --- /dev/null +++ b/client/model/aideletemodelsresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiDeleteModelsResult struct { + Success bool `json:"success,omitempty"` + Model AiDeleteModelsResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/aideletemodelsresultmodel.go b/client/model/aideletemodelsresultmodel.go new file mode 100644 index 00000000..65b090d2 --- /dev/null +++ b/client/model/aideletemodelsresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiDeleteModelsResultModel struct { + RequestId string `json:"requestId,omitempty"` + Success bool `json:"success,omitempty"` +} diff --git a/client/model/aigetqueueforms.go b/client/model/aigetqueueforms.go new file mode 100644 index 00000000..9dd56340 --- /dev/null +++ b/client/model/aigetqueueforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiGetQueueForms struct { + TaskId string `json:"taskId"` +} diff --git a/client/model/aigetqueueresult.go b/client/model/aigetqueueresult.go new file mode 100644 index 00000000..5140f44c --- /dev/null +++ b/client/model/aigetqueueresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiGetQueueResult struct { + Success bool `json:"success,omitempty"` + Model AiGetQueueResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/aigetqueueresultmodel.go b/client/model/aigetqueueresultmodel.go new file mode 100644 index 00000000..f7e16d16 --- /dev/null +++ b/client/model/aigetqueueresultmodel.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiGetQueueResultModel struct { + QueueNum string `json:"queueNum,omitempty"` + RequestId string `json:"requestId,omitempty"` + Status string `json:"status,omitempty"` +} diff --git a/client/model/ailistmodelsforms.go b/client/model/ailistmodelsforms.go new file mode 100644 index 00000000..84508092 --- /dev/null +++ b/client/model/ailistmodelsforms.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiListModelsForms struct { + ModelType *string `json:"modelType,omitempty"` + ModelFileType *string `json:"modelFileType,omitempty"` + ModelSeries *string `json:"modelSeries,omitempty"` + ModelFileName *string `json:"modelFileName,omitempty"` + PageNumber int32 `json:"pageNumber"` + PageSize int32 `json:"pageSize"` +} diff --git a/client/model/ailistmodelsresult.go b/client/model/ailistmodelsresult.go new file mode 100644 index 00000000..4ede7206 --- /dev/null +++ b/client/model/ailistmodelsresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiListModelsResult struct { + Success bool `json:"success,omitempty"` + Model AiListModelsResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/ailistmodelsresultmodel.go b/client/model/ailistmodelsresultmodel.go new file mode 100644 index 00000000..b8990738 --- /dev/null +++ b/client/model/ailistmodelsresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiListModelsResultModel struct { + ModelList AiListModelsResultModelModelList `json:"modelList,omitempty"` + RequestId string `json:"requestId,omitempty"` +} diff --git a/client/model/ailistmodelsresultmodelmodellist.go b/client/model/ailistmodelsresultmodelmodellist.go new file mode 100644 index 00000000..38f8f5c8 --- /dev/null +++ b/client/model/ailistmodelsresultmodelmodellist.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiListModelsResultModelModelList struct { + PageNumber string `json:"pageNumber,omitempty"` + PageSize string `json:"pageSize,omitempty"` + TotalCount int64 `json:"totalCount,omitempty"` + Items []AiListModelsResultModelModelListItems `json:"items,omitempty"` +} diff --git a/client/model/ailistmodelsresultmodelmodellistitems.go b/client/model/ailistmodelsresultmodelmodellistitems.go new file mode 100644 index 00000000..b2e70bd6 --- /dev/null +++ b/client/model/ailistmodelsresultmodelmodellistitems.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiListModelsResultModelModelListItems struct { + ModelSeries string `json:"modelSeries,omitempty"` + ModelType string `json:"modelType,omitempty"` + ModelFileType string `json:"modelFileType,omitempty"` + ModelFileName string `json:"modelFileName,omitempty"` + Url string `json:"url,omitempty"` + Desc string `json:"desc,omitempty"` +} diff --git a/client/model/aiupdatemodelsforms.go b/client/model/aiupdatemodelsforms.go new file mode 100644 index 00000000..479852fb --- /dev/null +++ b/client/model/aiupdatemodelsforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUpdateModelsForms struct { + ResourceId string `json:"resourceId"` + Desc string `json:"desc"` +} diff --git a/client/model/aiupdatemodelsresult.go b/client/model/aiupdatemodelsresult.go new file mode 100644 index 00000000..c8b4373b --- /dev/null +++ b/client/model/aiupdatemodelsresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUpdateModelsResult struct { + Success bool `json:"success,omitempty"` + Model AiUpdateModelsResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/aiupdatemodelsresultmodel.go b/client/model/aiupdatemodelsresultmodel.go new file mode 100644 index 00000000..6946f8b2 --- /dev/null +++ b/client/model/aiupdatemodelsresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUpdateModelsResultModel struct { + RequestId string `json:"requestId,omitempty"` + Success bool `json:"success,omitempty"` +} diff --git a/client/model/aiupdatenpcroleforms.go b/client/model/aiupdatenpcroleforms.go new file mode 100644 index 00000000..cf9cf6c0 --- /dev/null +++ b/client/model/aiupdatenpcroleforms.go @@ -0,0 +1,23 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUpdateNpcRoleForms struct { + Id int64 `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + FigureId int64 `json:"figureId"` + VoiceId int64 `json:"voiceId"` + Characters string `json:"characters"` + Greetings string `json:"greetings"` + Guidance []string `json:"guidance"` + KnowledgeBases *[]AiUpdateNpcRoleFormsKnowledgeBases `json:"knowledgeBases,omitempty"` + PluginIds *[]int64 `json:"pluginIds,omitempty"` + ShortMemoryRound int32 `json:"shortMemoryRound"` + Operator string `json:"operator"` + LlmModelId int64 `json:"llmModelId"` +} diff --git a/client/model/aiupdatenpcroleformsknowledgebases.go b/client/model/aiupdatenpcroleformsknowledgebases.go new file mode 100644 index 00000000..0ef3a185 --- /dev/null +++ b/client/model/aiupdatenpcroleformsknowledgebases.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUpdateNpcRoleFormsKnowledgeBases struct { + KnowledgeBaseVersionId int64 `json:"knowledgeBaseVersionId,omitempty"` + KnowledgeBaseId int64 `json:"knowledgeBaseId"` +} diff --git a/client/model/aiupdatenpcroleresult.go b/client/model/aiupdatenpcroleresult.go new file mode 100644 index 00000000..58b625af --- /dev/null +++ b/client/model/aiupdatenpcroleresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUpdateNpcRoleResult struct { + Success bool `json:"success,omitempty"` + Model map[string]string `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/aiuploadmodelsforms.go b/client/model/aiuploadmodelsforms.go new file mode 100644 index 00000000..460183ee --- /dev/null +++ b/client/model/aiuploadmodelsforms.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUploadModelsForms struct { + ModelType string `json:"modelType"` + ModelName string `json:"modelName"` + ModelFilePath string `json:"modelFilePath"` + ModelFiles []AiUploadModelsFormsModelFiles `json:"modelFiles"` + Desc *string `json:"desc,omitempty"` + ModelFileType string `json:"modelFileType"` +} diff --git a/client/model/aiuploadmodelsformsmodelfiles.go b/client/model/aiuploadmodelsformsmodelfiles.go new file mode 100644 index 00000000..5958d54a --- /dev/null +++ b/client/model/aiuploadmodelsformsmodelfiles.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUploadModelsFormsModelFiles struct { + FileName string `json:"fileName,omitempty"` + Url string `json:"url,omitempty"` +} diff --git a/client/model/aiuploadmodelsresult.go b/client/model/aiuploadmodelsresult.go new file mode 100644 index 00000000..adf8239b --- /dev/null +++ b/client/model/aiuploadmodelsresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type AiUploadModelsResult struct { + Success bool `json:"success,omitempty"` + Model map[string]string `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/batchstopgameforms.go b/client/model/batchstopgameforms.go new file mode 100644 index 00000000..40cb76b5 --- /dev/null +++ b/client/model/batchstopgameforms.go @@ -0,0 +1,22 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type BatchStopGameForms struct { + // Paas平台部署的游戏Id + GameId string `json:"gameId"` + // Paas平台AK(应用的AK,非服务端AK) + AppKey string `json:"appKey"` + // 通过接口获取的token + Token string `json:"token"` + // 踢人的原因,会透传到sdk侧 + Reason *string `json:"reason,omitempty"` + // TrackInfo,回传消息 + TrackInfo *string `json:"trackInfo,omitempty"` + // 支持多标签传输 + Tags *string `json:"tags,omitempty"` +} diff --git a/client/model/batchstopgameresult.go b/client/model/batchstopgameresult.go new file mode 100644 index 00000000..a3af19a1 --- /dev/null +++ b/client/model/batchstopgameresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type BatchStopGameResult struct { + Success bool `json:"success,omitempty"` + Model BatchStopGameResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/batchstopgameresultmodel.go b/client/model/batchstopgameresultmodel.go new file mode 100644 index 00000000..88bdf4a7 --- /dev/null +++ b/client/model/batchstopgameresultmodel.go @@ -0,0 +1,24 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type BatchStopGameResultModel struct { + // Paas平台游戏ID + GameId string `json:"gameId,omitempty"` + // 批量停止的回传trackInfo + TrackInfo string `json:"trackInfo,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 请求链路唯一标示 + RequestId string `json:"requestId,omitempty"` + // 调度执行结果 + Success bool `json:"success,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // 游戏归属的项目Id + ProjectId string `json:"projectId,omitempty"` +} diff --git a/client/model/cancelgamehangforms.go b/client/model/cancelgamehangforms.go new file mode 100644 index 00000000..99712138 --- /dev/null +++ b/client/model/cancelgamehangforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type CancelGameHangForms struct { + // 会话ID + GameSession string `json:"gameSession"` + // 项目应用AK + AppKey string `json:"appKey"` +} diff --git a/client/model/cancelgamehangresult.go b/client/model/cancelgamehangresult.go new file mode 100644 index 00000000..29159868 --- /dev/null +++ b/client/model/cancelgamehangresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type CancelGameHangResult struct { + Success bool `json:"success,omitempty"` + Model CancelGameHangResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/cancelgamehangresultmodel.go b/client/model/cancelgamehangresultmodel.go new file mode 100644 index 00000000..66f52852 --- /dev/null +++ b/client/model/cancelgamehangresultmodel.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type CancelGameHangResultModel struct { + // 错误Code + Code string `json:"code,omitempty"` + // 设置是否成功 + Success bool `json:"success,omitempty"` + // 错误Message + Message string `json:"message,omitempty"` + // 会话ID + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/clientnotifyforms.go b/client/model/clientnotifyforms.go new file mode 100644 index 00000000..9f37c75d --- /dev/null +++ b/client/model/clientnotifyforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ClientNotifyForms struct { + AppKey string `json:"appKey"` + GameSession string `json:"gameSession"` + Value string `json:"value"` +} diff --git a/client/model/clientnotifyresult.go b/client/model/clientnotifyresult.go new file mode 100644 index 00000000..a0357e0d --- /dev/null +++ b/client/model/clientnotifyresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ClientNotifyResult struct { + Success bool `json:"success,omitempty"` + Model ClientNotifyResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/clientnotifyresultmodel.go b/client/model/clientnotifyresultmodel.go new file mode 100644 index 00000000..910e04da --- /dev/null +++ b/client/model/clientnotifyresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ClientNotifyResultModel struct { + Code string `json:"code,omitempty"` + Success bool `json:"success,omitempty"` + Message string `json:"message,omitempty"` + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/consoleadminactivatedeploymentforms.go b/client/model/consoleadminactivatedeploymentforms.go new file mode 100644 index 00000000..5f53e5c6 --- /dev/null +++ b/client/model/consoleadminactivatedeploymentforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminActivateDeploymentForms struct { + GameId string `json:"gameId"` + ProjectId string `json:"projectId"` + VersionId string `json:"versionId"` + MaxConcurrency *int32 `json:"maxConcurrency,omitempty"` +} diff --git a/client/model/consoleadminactivatedeploymentresult.go b/client/model/consoleadminactivatedeploymentresult.go new file mode 100644 index 00000000..a3a3fba1 --- /dev/null +++ b/client/model/consoleadminactivatedeploymentresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminActivateDeploymentResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminActivateDeploymentResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminactivatedeploymentresultmodel.go b/client/model/consoleadminactivatedeploymentresultmodel.go new file mode 100644 index 00000000..e7224d6e --- /dev/null +++ b/client/model/consoleadminactivatedeploymentresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminActivateDeploymentResultModel struct { + Activated bool `json:"activated,omitempty"` +} diff --git a/client/model/consoleadminadaptgameversionforms.go b/client/model/consoleadminadaptgameversionforms.go new file mode 100644 index 00000000..f8366d2d --- /dev/null +++ b/client/model/consoleadminadaptgameversionforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminAdaptGameVersionForms struct { + VersionId string `json:"versionId"` +} diff --git a/client/model/consoleadminadaptgameversionresult.go b/client/model/consoleadminadaptgameversionresult.go new file mode 100644 index 00000000..1cf4de8e --- /dev/null +++ b/client/model/consoleadminadaptgameversionresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminAdaptGameVersionResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminAdaptGameVersionResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminadaptgameversionresultmodel.go b/client/model/consoleadminadaptgameversionresultmodel.go new file mode 100644 index 00000000..6aa750f9 --- /dev/null +++ b/client/model/consoleadminadaptgameversionresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminAdaptGameVersionResultModel struct { + TaskId string `json:"taskId,omitempty"` +} diff --git a/client/model/consoleadminaddgametoprojectforms.go b/client/model/consoleadminaddgametoprojectforms.go new file mode 100644 index 00000000..63df9283 --- /dev/null +++ b/client/model/consoleadminaddgametoprojectforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminAddGameToProjectForms struct { + ProjectId string `json:"projectId"` + GameId string `json:"gameId"` +} diff --git a/client/model/consoleadminaddgametoprojectresult.go b/client/model/consoleadminaddgametoprojectresult.go new file mode 100644 index 00000000..85578c54 --- /dev/null +++ b/client/model/consoleadminaddgametoprojectresult.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminAddGameToProjectResult struct { + Success bool `json:"success,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminbatchupdatedispatchconfigforms.go b/client/model/consoleadminbatchupdatedispatchconfigforms.go new file mode 100644 index 00000000..e7f1f46c --- /dev/null +++ b/client/model/consoleadminbatchupdatedispatchconfigforms.go @@ -0,0 +1,17 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminBatchUpdateDispatchConfigForms struct { + // 项目id(混淆) + MixProjectId string `json:"mixProjectId"` + // 实例id + InstanceId string `json:"instanceId"` + // 接入方唯一标识 + AppName string `json:"appName"` + ConfigList []ConsoleAdminBatchUpdateDispatchConfigFormsConfigList `json:"configList"` +} diff --git a/client/model/consoleadminbatchupdatedispatchconfigformsconfiglist.go b/client/model/consoleadminbatchupdatedispatchconfigformsconfiglist.go new file mode 100644 index 00000000..42c03815 --- /dev/null +++ b/client/model/consoleadminbatchupdatedispatchconfigformsconfiglist.go @@ -0,0 +1,22 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminBatchUpdateDispatchConfigFormsConfigList struct { + // 编码游戏id + MixGameId string `json:"mixGameId"` + // 独占并发数 + ExclusiveConcurrency int32 `json:"exclusiveConcurrency,omitempty"` + // 最大并发百分比-Double类型[0.0,1.0] + MaxConcurrencyPercent string `json:"maxConcurrencyPercent"` + // 独占并发百分比--Double类型[0.0,1.0] + ExclusiveConcurrencyPercent string `json:"exclusiveConcurrencyPercent"` + // 调度等级 + Priority int32 `json:"priority"` + // 最大并发数 + MaxConcurrency int32 `json:"maxConcurrency,omitempty"` +} diff --git a/client/model/consoleadminbatchupdatedispatchconfigresult.go b/client/model/consoleadminbatchupdatedispatchconfigresult.go new file mode 100644 index 00000000..56bec409 --- /dev/null +++ b/client/model/consoleadminbatchupdatedispatchconfigresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminBatchUpdateDispatchConfigResult struct { + Success bool `json:"success,omitempty"` + Model bool `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmincreategameforms.go b/client/model/consoleadmincreategameforms.go new file mode 100644 index 00000000..989696d2 --- /dev/null +++ b/client/model/consoleadmincreategameforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateGameForms struct { + GameName string `json:"gameName"` + PlatformType int64 `json:"platformType"` + OsType *int32 `json:"osType,omitempty"` +} diff --git a/client/model/consoleadmincreategameresult.go b/client/model/consoleadmincreategameresult.go new file mode 100644 index 00000000..9e40070a --- /dev/null +++ b/client/model/consoleadmincreategameresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateGameResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminCreateGameResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmincreategameresultmodel.go b/client/model/consoleadmincreategameresultmodel.go new file mode 100644 index 00000000..1f1d43d1 --- /dev/null +++ b/client/model/consoleadmincreategameresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateGameResultModel struct { + GameId string `json:"gameId,omitempty"` +} diff --git a/client/model/consoleadmincreateorderforms.go b/client/model/consoleadmincreateorderforms.go new file mode 100644 index 00000000..8a55c921 --- /dev/null +++ b/client/model/consoleadmincreateorderforms.go @@ -0,0 +1,25 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateOrderForms struct { + // 类目编码 + CategoryCode string `json:"categoryCode"` + // 商品编码 + CommodityCode string `json:"commodityCode"` + // 实例ID + InstanceId *string `json:"instanceId,omitempty"` + // 主计费项编码 + PrimaryChargeItemCode string `json:"primaryChargeItemCode"` + AttributeRequestList []ConsoleAdminCreateOrderFormsAttributeRequestList `json:"attributeRequestList"` + // 订单类型 + OrderType string `json:"orderType"` + // 是否开启自动续费 + AutoRenew *bool `json:"autoRenew,omitempty"` + // 下单扩展信息 + CreateOrderExtParams *string `json:"createOrderExtParams,omitempty"` +} diff --git a/client/model/consoleadmincreateorderformsattributerequestlist.go b/client/model/consoleadmincreateorderformsattributerequestlist.go new file mode 100644 index 00000000..b0836e91 --- /dev/null +++ b/client/model/consoleadmincreateorderformsattributerequestlist.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateOrderFormsAttributeRequestList struct { + // 属性编码 + AttributeCode string `json:"attributeCode"` + // 属性值(区间型专用) + AttributeValue int32 `json:"attributeValue,omitempty"` + // 属性值编码(枚举型,时长型 专用) + AttributeValueCode int64 `json:"attributeValueCode,omitempty"` + // 时长单位 + TimeUnit string `json:"timeUnit,omitempty"` +} diff --git a/client/model/consoleadmincreateorderresult.go b/client/model/consoleadmincreateorderresult.go new file mode 100644 index 00000000..9975f138 --- /dev/null +++ b/client/model/consoleadmincreateorderresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateOrderResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminCreateOrderResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmincreateorderresultmodel.go b/client/model/consoleadmincreateorderresultmodel.go new file mode 100644 index 00000000..d29e05d5 --- /dev/null +++ b/client/model/consoleadmincreateorderresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateOrderResultModel struct { + // 实例ID + InstanceId string `json:"instanceId,omitempty"` + // 订单ID + OrderId string `json:"orderId,omitempty"` +} diff --git a/client/model/consoleadmincreateprojectforms.go b/client/model/consoleadmincreateprojectforms.go new file mode 100644 index 00000000..b146faf5 --- /dev/null +++ b/client/model/consoleadmincreateprojectforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateProjectForms struct { + ProjectName string `json:"projectName"` +} diff --git a/client/model/consoleadmincreateprojectresult.go b/client/model/consoleadmincreateprojectresult.go new file mode 100644 index 00000000..a89d625e --- /dev/null +++ b/client/model/consoleadmincreateprojectresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateProjectResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminCreateProjectResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmincreateprojectresultmodel.go b/client/model/consoleadmincreateprojectresultmodel.go new file mode 100644 index 00000000..f7d59ddd --- /dev/null +++ b/client/model/consoleadmincreateprojectresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminCreateProjectResultModel struct { + ProjectId string `json:"projectId,omitempty"` +} diff --git a/client/model/consoleadmindeletegameforms.go b/client/model/consoleadmindeletegameforms.go new file mode 100644 index 00000000..aa67c8c2 --- /dev/null +++ b/client/model/consoleadmindeletegameforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminDeleteGameForms struct { + GameId string `json:"gameId"` +} diff --git a/client/model/consoleadmindeletegameresult.go b/client/model/consoleadmindeletegameresult.go new file mode 100644 index 00000000..d0b42526 --- /dev/null +++ b/client/model/consoleadmindeletegameresult.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminDeleteGameResult struct { + Success bool `json:"success,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmindeletegameversionforms.go b/client/model/consoleadmindeletegameversionforms.go new file mode 100644 index 00000000..7d5c2c60 --- /dev/null +++ b/client/model/consoleadmindeletegameversionforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminDeleteGameVersionForms struct { + VersionId string `json:"versionId"` +} diff --git a/client/model/consoleadmindeletegameversionresult.go b/client/model/consoleadmindeletegameversionresult.go new file mode 100644 index 00000000..bbdde034 --- /dev/null +++ b/client/model/consoleadmindeletegameversionresult.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminDeleteGameVersionResult struct { + Success bool `json:"success,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmindeleteprojectforms.go b/client/model/consoleadmindeleteprojectforms.go new file mode 100644 index 00000000..a95d4642 --- /dev/null +++ b/client/model/consoleadmindeleteprojectforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminDeleteProjectForms struct { + ProjectId string `json:"projectId"` +} diff --git a/client/model/consoleadmindeleteprojectresult.go b/client/model/consoleadmindeleteprojectresult.go new file mode 100644 index 00000000..94c91d4e --- /dev/null +++ b/client/model/consoleadmindeleteprojectresult.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminDeleteProjectResult struct { + Success bool `json:"success,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmingetbillflowinfoforms.go b/client/model/consoleadmingetbillflowinfoforms.go new file mode 100644 index 00000000..c8075be5 --- /dev/null +++ b/client/model/consoleadmingetbillflowinfoforms.go @@ -0,0 +1,20 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetBillFlowInfoForms struct { + AccountingPeriodFrom string `json:"accountingPeriodFrom"` + AccountingPeriodTo string `json:"accountingPeriodTo"` + CommodityCode *string `json:"commodityCode,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + OrderId *string `json:"orderId,omitempty"` + Status *string `json:"status,omitempty"` + ConsumeType *string `json:"consumeType,omitempty"` + BillType *string `json:"billType,omitempty"` + PageNumber *int32 `json:"pageNumber,omitempty"` + PageSize *int32 `json:"pageSize,omitempty"` +} diff --git a/client/model/consoleadmingetbillflowinforesult.go b/client/model/consoleadmingetbillflowinforesult.go new file mode 100644 index 00000000..ac4b1953 --- /dev/null +++ b/client/model/consoleadmingetbillflowinforesult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetBillFlowInfoResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminGetBillFlowInfoResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmingetbillflowinforesultmodel.go b/client/model/consoleadmingetbillflowinforesultmodel.go new file mode 100644 index 00000000..098365c5 --- /dev/null +++ b/client/model/consoleadmingetbillflowinforesultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetBillFlowInfoResultModel struct { + PageNumber int32 `json:"pageNumber,omitempty"` + Pagesize int32 `json:"pagesize,omitempty"` + TotalCount int32 `json:"totalCount,omitempty"` + Items []ConsoleAdminGetBillFlowInfoResultModelItems `json:"items,omitempty"` +} diff --git a/client/model/consoleadmingetbillflowinforesultmodelitems.go b/client/model/consoleadmingetbillflowinforesultmodelitems.go new file mode 100644 index 00000000..63207823 --- /dev/null +++ b/client/model/consoleadmingetbillflowinforesultmodelitems.go @@ -0,0 +1,26 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetBillFlowInfoResultModelItems struct { + ConsumePeriodStartTime int64 `json:"consumePeriodStartTime,omitempty"` + TotalUnclearAmount string `json:"totalUnclearAmount,omitempty"` + Amount int64 `json:"amount,omitempty"` + OrderId string `json:"orderId,omitempty"` + BillType string `json:"billType,omitempty"` + DiscountAmount string `json:"discountAmount,omitempty"` + ActualTotalPayAmount int64 `json:"actualTotalPayAmount,omitempty"` + RefundOrderId string `json:"refundOrderId,omitempty"` + ConsumePeriodEndTime int64 `json:"consumePeriodEndTime,omitempty"` + PayAmount int64 `json:"payAmount,omitempty"` + TenantName string `json:"tenantName,omitempty"` + SettlementStatus string `json:"settlementStatus,omitempty"` + VoucherPayAmount string `json:"voucherPayAmount,omitempty"` + AccountingPeriod string `json:"accountingPeriod,omitempty"` + ConsumeType string `json:"consumeType,omitempty"` + CommodityName string `json:"commodityName,omitempty"` +} diff --git a/client/model/consoleadmingetgameinstancecontainerratioforms.go b/client/model/consoleadmingetgameinstancecontainerratioforms.go new file mode 100644 index 00000000..6d190076 --- /dev/null +++ b/client/model/consoleadmingetgameinstancecontainerratioforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameInstanceContainerRatioForms struct { + CommodityInstanceId string `json:"commodityInstanceId"` + Games []ConsoleAdminGetGameInstanceContainerRatioFormsGames `json:"games"` +} diff --git a/client/model/consoleadmingetgameinstancecontainerratioformsgames.go b/client/model/consoleadmingetgameinstancecontainerratioformsgames.go new file mode 100644 index 00000000..195f6f27 --- /dev/null +++ b/client/model/consoleadmingetgameinstancecontainerratioformsgames.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameInstanceContainerRatioFormsGames struct { + MixId string `json:"mixId"` + MixVersionId string `json:"mixVersionId"` +} diff --git a/client/model/consoleadmingetgameinstancecontainerratioresult.go b/client/model/consoleadmingetgameinstancecontainerratioresult.go new file mode 100644 index 00000000..cbd63f6c --- /dev/null +++ b/client/model/consoleadmingetgameinstancecontainerratioresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameInstanceContainerRatioResult struct { + Success bool `json:"success,omitempty"` + Model []ConsoleAdminGetGameInstanceContainerRatioResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmingetgameinstancecontainerratioresultmodel.go b/client/model/consoleadmingetgameinstancecontainerratioresultmodel.go new file mode 100644 index 00000000..4dd8f2fc --- /dev/null +++ b/client/model/consoleadmingetgameinstancecontainerratioresultmodel.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameInstanceContainerRatioResultModel struct { + MixId string `json:"mixId,omitempty"` + MixVersionId string `json:"mixVersionId,omitempty"` + ContainerRatio string `json:"containerRatio,omitempty"` +} diff --git a/client/model/consoleadmingetgamerecommendedinstanceforms.go b/client/model/consoleadmingetgamerecommendedinstanceforms.go new file mode 100644 index 00000000..86eac6dc --- /dev/null +++ b/client/model/consoleadmingetgamerecommendedinstanceforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameRecommendedInstanceForms struct { + Game ConsoleAdminGetGameRecommendedInstanceFormsGame `json:"game"` + CommodityInstanceIds []string `json:"commodityInstanceIds"` +} diff --git a/client/model/consoleadmingetgamerecommendedinstanceformsgame.go b/client/model/consoleadmingetgamerecommendedinstanceformsgame.go new file mode 100644 index 00000000..a64cd68a --- /dev/null +++ b/client/model/consoleadmingetgamerecommendedinstanceformsgame.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameRecommendedInstanceFormsGame struct { + MixId string `json:"mixId"` + MixVersionId string `json:"mixVersionId"` +} diff --git a/client/model/consoleadmingetgamerecommendedinstanceresult.go b/client/model/consoleadmingetgamerecommendedinstanceresult.go new file mode 100644 index 00000000..26c61c44 --- /dev/null +++ b/client/model/consoleadmingetgamerecommendedinstanceresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameRecommendedInstanceResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminGetGameRecommendedInstanceResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmingetgamerecommendedinstanceresultmodel.go b/client/model/consoleadmingetgamerecommendedinstanceresultmodel.go new file mode 100644 index 00000000..dcd45156 --- /dev/null +++ b/client/model/consoleadmingetgamerecommendedinstanceresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameRecommendedInstanceResultModel struct { + CommodityInstanceId string `json:"commodityInstanceId,omitempty"` +} diff --git a/client/model/consoleadmingetgameversionforms.go b/client/model/consoleadmingetgameversionforms.go new file mode 100644 index 00000000..400e9818 --- /dev/null +++ b/client/model/consoleadmingetgameversionforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameVersionForms struct { + VersionId string `json:"versionId"` +} diff --git a/client/model/consoleadmingetgameversionprogressforms.go b/client/model/consoleadmingetgameversionprogressforms.go new file mode 100644 index 00000000..582b024e --- /dev/null +++ b/client/model/consoleadmingetgameversionprogressforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameVersionProgressForms struct { + TaskId string `json:"taskId"` +} diff --git a/client/model/consoleadmingetgameversionprogressresult.go b/client/model/consoleadmingetgameversionprogressresult.go new file mode 100644 index 00000000..b099ba24 --- /dev/null +++ b/client/model/consoleadmingetgameversionprogressresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameVersionProgressResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminGetGameVersionProgressResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmingetgameversionprogressresultmodel.go b/client/model/consoleadmingetgameversionprogressresultmodel.go new file mode 100644 index 00000000..26fddebd --- /dev/null +++ b/client/model/consoleadmingetgameversionprogressresultmodel.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameVersionProgressResultModel struct { + // 提供不固定的额外信息 + Extra map[string]string `json:"extra,omitempty"` + Description string `json:"description,omitempty"` + Event string `json:"event,omitempty"` + Status string `json:"status,omitempty"` +} diff --git a/client/model/consoleadmingetgameversionresult.go b/client/model/consoleadmingetgameversionresult.go new file mode 100644 index 00000000..d013c292 --- /dev/null +++ b/client/model/consoleadmingetgameversionresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameVersionResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminGetGameVersionResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmingetgameversionresultmodel.go b/client/model/consoleadmingetgameversionresultmodel.go new file mode 100644 index 00000000..759bc2d3 --- /dev/null +++ b/client/model/consoleadmingetgameversionresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetGameVersionResultModel struct { + VersionId string `json:"versionId,omitempty"` + VersionName string `json:"versionName,omitempty"` +} diff --git a/client/model/consoleadmingetorderforms.go b/client/model/consoleadmingetorderforms.go new file mode 100644 index 00000000..4fea7d89 --- /dev/null +++ b/client/model/consoleadmingetorderforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetOrderForms struct { + // 订单号 + OrderId string `json:"orderId"` +} diff --git a/client/model/consoleadmingetorderresult.go b/client/model/consoleadmingetorderresult.go new file mode 100644 index 00000000..c15cc107 --- /dev/null +++ b/client/model/consoleadmingetorderresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetOrderResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminGetOrderResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadmingetorderresultmodel.go b/client/model/consoleadmingetorderresultmodel.go new file mode 100644 index 00000000..ef2f9ab7 --- /dev/null +++ b/client/model/consoleadmingetorderresultmodel.go @@ -0,0 +1,90 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetOrderResultModel struct { + // 订单类型 + OrderType string `json:"orderType,omitempty"` + // 订单号 + OrderId string `json:"orderId,omitempty"` + // 配置详情 + AttributeList []ConsoleAdminGetOrderResultModelAttributeList `json:"attributeList,omitempty"` + // 付费方式 + ChargeType string `json:"chargeType,omitempty"` + // 优惠金额(单位:分) + DiscountAmount int64 `json:"discountAmount,omitempty"` + // 信控支付金额(单位:分) + CreditPayAmount int64 `json:"creditPayAmount,omitempty"` + // 降配退款金额 + DowngradeRefundAmount int64 `json:"downgradeRefundAmount,omitempty"` + // 降配信控应退款金额 + DowngradeCreditRefundAmount int64 `json:"downgradeCreditRefundAmount,omitempty"` + // 优惠详细信息 + DiscountDetail string `json:"discountDetail,omitempty"` + // 优惠名称 + PromotionName string `json:"promotionName,omitempty"` + // 实例ID + InstanceId string `json:"instanceId,omitempty"` + // 应付金额(单位:分) + PayAmount int64 `json:"payAmount,omitempty"` + // 租户名称 + TenantName string `json:"tenantName,omitempty"` + // 商品编码 + CommodityCode string `json:"commodityCode,omitempty"` + // 是否自动续费 + AutoRenew bool `json:"autoRenew,omitempty"` + // 币种 + Currency string `json:"currency,omitempty"` + // 开始时间 + StartTime int64 `json:"startTime,omitempty"` + // 降配现金应退款金额 + DowngradeBalanceRefundAmount int64 `json:"downgradeBalanceRefundAmount,omitempty"` + // 主计费项价格类型 + PrimaryPriceType string `json:"primaryPriceType,omitempty"` + // 订单完成时间 + FinishTime int64 `json:"finishTime,omitempty"` + // 订单总金额(单位:分) + Amount int64 `json:"amount,omitempty"` + // 数量 + Quantity int32 `json:"quantity,omitempty"` + // 发货完成时间 + DeliveryEndTime int64 `json:"deliveryEndTime,omitempty"` + // 售中退款时间 + RefundTime int64 `json:"refundTime,omitempty"` + // 购买时长单位 + BuyDurationUnit string `json:"buyDurationUnit,omitempty"` + // 主计费项编码 + PrimaryChargeItemCode string `json:"primaryChargeItemCode,omitempty"` + // 支付用户ID + PayUserId string `json:"payUserId,omitempty"` + // 类目编码 + CategoryCode string `json:"categoryCode,omitempty"` + // 购买时长 + BuyDuration int64 `json:"buyDuration,omitempty"` + // 余额支付金额(单位:分) + BalancePayAmount int64 `json:"balancePayAmount,omitempty"` + // 实付金额(单位:分) + ActualPayAmount int64 `json:"actualPayAmount,omitempty"` + // 订单创建时间 + CreateTime int64 `json:"createTime,omitempty"` + // 租户ID + TenantId int64 `json:"tenantId,omitempty"` + // 支付完成时间 + PaymentEndTime int64 `json:"paymentEndTime,omitempty"` + // 售卖类型 + BuyType string `json:"buyType,omitempty"` + // 代金券抵扣金额(单位:分) + VoucherPayAmount int64 `json:"voucherPayAmount,omitempty"` + // 下单用户ID + BuyerUserId string `json:"buyerUserId,omitempty"` + // 截止时间 + EndTime int64 `json:"endTime,omitempty"` + // 商品名称 + CommodityName string `json:"commodityName,omitempty"` + // 订单状态 + Status string `json:"status,omitempty"` +} diff --git a/client/model/consoleadmingetorderresultmodelattributelist.go b/client/model/consoleadmingetorderresultmodelattributelist.go new file mode 100644 index 00000000..ba9dcbcb --- /dev/null +++ b/client/model/consoleadmingetorderresultmodelattributelist.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminGetOrderResultModelAttributeList struct { + AttributeCode string `json:"attributeCode,omitempty"` + TimeStart int64 `json:"timeStart,omitempty"` + AttributeValueName string `json:"attributeValueName,omitempty"` + TimeTo int64 `json:"timeTo,omitempty"` + AttributeValue int32 `json:"attributeValue,omitempty"` + AttributeName string `json:"attributeName,omitempty"` + AttributeValueCode int64 `json:"attributeValueCode,omitempty"` + TimeUnit string `json:"timeUnit,omitempty"` +} diff --git a/client/model/consoleadminlistactivateableinstancesforms.go b/client/model/consoleadminlistactivateableinstancesforms.go new file mode 100644 index 00000000..255c9747 --- /dev/null +++ b/client/model/consoleadminlistactivateableinstancesforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivateableInstancesForms struct { + ProjectId string `json:"projectId"` + VersionId string `json:"versionId"` +} diff --git a/client/model/consoleadminlistactivateableinstancesresult.go b/client/model/consoleadminlistactivateableinstancesresult.go new file mode 100644 index 00000000..cb9b5c67 --- /dev/null +++ b/client/model/consoleadminlistactivateableinstancesresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivateableInstancesResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListActivateableInstancesResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistactivateableinstancesresultmodel.go b/client/model/consoleadminlistactivateableinstancesresultmodel.go new file mode 100644 index 00000000..fa409aa2 --- /dev/null +++ b/client/model/consoleadminlistactivateableinstancesresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivateableInstancesResultModel struct { + DataList []ConsoleAdminListActivateableInstancesResultModelDataList `json:"dataList,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistactivateableinstancesresultmodeldatalist.go b/client/model/consoleadminlistactivateableinstancesresultmodeldatalist.go new file mode 100644 index 00000000..300b9d7b --- /dev/null +++ b/client/model/consoleadminlistactivateableinstancesresultmodeldatalist.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivateableInstancesResultModelDataList struct { + CloudGameInstanceId string `json:"cloudGameInstanceId,omitempty"` + CloudGameInstanceName string `json:"cloudGameInstanceName,omitempty"` + ContainerCount int32 `json:"containerCount,omitempty"` + MaxConcurrency int32 `json:"maxConcurrency,omitempty"` +} diff --git a/client/model/consoleadminlistactivatedinstancesforms.go b/client/model/consoleadminlistactivatedinstancesforms.go new file mode 100644 index 00000000..91e2ba0d --- /dev/null +++ b/client/model/consoleadminlistactivatedinstancesforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivatedInstancesForms struct { + GameId string `json:"gameId"` + ProjectId string `json:"projectId"` +} diff --git a/client/model/consoleadminlistactivatedinstancesresult.go b/client/model/consoleadminlistactivatedinstancesresult.go new file mode 100644 index 00000000..4be33a3d --- /dev/null +++ b/client/model/consoleadminlistactivatedinstancesresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivatedInstancesResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListActivatedInstancesResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistactivatedinstancesresultmodel.go b/client/model/consoleadminlistactivatedinstancesresultmodel.go new file mode 100644 index 00000000..6e5a5742 --- /dev/null +++ b/client/model/consoleadminlistactivatedinstancesresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivatedInstancesResultModel struct { + DataList []ConsoleAdminListActivatedInstancesResultModelDataList `json:"dataList,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistactivatedinstancesresultmodeldatalist.go b/client/model/consoleadminlistactivatedinstancesresultmodeldatalist.go new file mode 100644 index 00000000..c11b9df4 --- /dev/null +++ b/client/model/consoleadminlistactivatedinstancesresultmodeldatalist.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListActivatedInstancesResultModelDataList struct { + CloudGameInstanceId string `json:"cloudGameInstanceId,omitempty"` + CloudGameInstanceName string `json:"cloudGameInstanceName,omitempty"` + ContainerCount int32 `json:"containerCount,omitempty"` + MaxConcurrency int32 `json:"maxConcurrency,omitempty"` +} diff --git a/client/model/consoleadminlistcontrollersofgameforms.go b/client/model/consoleadminlistcontrollersofgameforms.go new file mode 100644 index 00000000..3aaad1ad --- /dev/null +++ b/client/model/consoleadminlistcontrollersofgameforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListControllersOfGameForms struct { + GameId string `json:"gameId"` + NextToken *string `json:"nextToken,omitempty"` + MaxResults *int32 `json:"maxResults,omitempty"` +} diff --git a/client/model/consoleadminlistcontrollersofgameresult.go b/client/model/consoleadminlistcontrollersofgameresult.go new file mode 100644 index 00000000..0759caf6 --- /dev/null +++ b/client/model/consoleadminlistcontrollersofgameresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListControllersOfGameResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListControllersOfGameResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistcontrollersofgameresultmodel.go b/client/model/consoleadminlistcontrollersofgameresultmodel.go new file mode 100644 index 00000000..28dc385e --- /dev/null +++ b/client/model/consoleadminlistcontrollersofgameresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListControllersOfGameResultModel struct { + NextToken string `json:"nextToken,omitempty"` + MaxResults int32 `json:"maxResults,omitempty"` + DataList []ConsoleAdminListControllersOfGameResultModelDataList `json:"dataList,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistcontrollersofgameresultmodeldatalist.go b/client/model/consoleadminlistcontrollersofgameresultmodeldatalist.go new file mode 100644 index 00000000..c1c25116 --- /dev/null +++ b/client/model/consoleadminlistcontrollersofgameresultmodeldatalist.go @@ -0,0 +1,17 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListControllersOfGameResultModelDataList struct { + BgPic string `json:"bgPic,omitempty"` + Ctltype string `json:"ctltype,omitempty"` + Name string `json:"name,omitempty"` + Id string `json:"id,omitempty"` + Type_ int32 `json:"type,omitempty"` + Priority int32 `json:"priority,omitempty"` + Config string `json:"config,omitempty"` +} diff --git a/client/model/consoleadminlistdeployableinstancesforms.go b/client/model/consoleadminlistdeployableinstancesforms.go new file mode 100644 index 00000000..cc37fbed --- /dev/null +++ b/client/model/consoleadminlistdeployableinstancesforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListDeployableInstancesForms struct { + VersionId string `json:"versionId"` + ProjectId string `json:"projectId"` + PageSize *int64 `json:"pageSize,omitempty"` + PageNumber *int64 `json:"pageNumber,omitempty"` +} diff --git a/client/model/consoleadminlistdeployableinstancesresult.go b/client/model/consoleadminlistdeployableinstancesresult.go new file mode 100644 index 00000000..ff7ee1f3 --- /dev/null +++ b/client/model/consoleadminlistdeployableinstancesresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListDeployableInstancesResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListDeployableInstancesResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistdeployableinstancesresultmodel.go b/client/model/consoleadminlistdeployableinstancesresultmodel.go new file mode 100644 index 00000000..0f11fffd --- /dev/null +++ b/client/model/consoleadminlistdeployableinstancesresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListDeployableInstancesResultModel struct { + PageNumber int64 `json:"pageNumber,omitempty"` + DataList []ConsoleAdminListDeployableInstancesResultModelDataList `json:"dataList,omitempty"` + PageSize int64 `json:"pageSize,omitempty"` + TotalCount int64 `json:"totalCount,omitempty"` +} diff --git a/client/model/consoleadminlistdeployableinstancesresultmodeldatalist.go b/client/model/consoleadminlistdeployableinstancesresultmodeldatalist.go new file mode 100644 index 00000000..b5a44173 --- /dev/null +++ b/client/model/consoleadminlistdeployableinstancesresultmodeldatalist.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListDeployableInstancesResultModelDataList struct { + CloudGameInstanceId string `json:"cloudGameInstanceId,omitempty"` + CloudGameInstanceName string `json:"cloudGameInstanceName,omitempty"` +} diff --git a/client/model/consoleadminlistgameccuforms.go b/client/model/consoleadminlistgameccuforms.go new file mode 100644 index 00000000..47d61403 --- /dev/null +++ b/client/model/consoleadminlistgameccuforms.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameCcuForms struct { + MixGameIds *string `json:"mixGameIds,omitempty"` + ProjectIds *string `json:"projectIds,omitempty"` + QueryTimeStart *int64 `json:"queryTimeStart,omitempty"` + QueryTimeEnd *int64 `json:"queryTimeEnd,omitempty"` + PageNumber *int32 `json:"pageNumber,omitempty"` + PageSize *int32 `json:"pageSize,omitempty"` +} diff --git a/client/model/consoleadminlistgameccuresult.go b/client/model/consoleadminlistgameccuresult.go new file mode 100644 index 00000000..e864e6c1 --- /dev/null +++ b/client/model/consoleadminlistgameccuresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameCcuResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListGameCcuResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistgameccuresultmodel.go b/client/model/consoleadminlistgameccuresultmodel.go new file mode 100644 index 00000000..060c1b78 --- /dev/null +++ b/client/model/consoleadminlistgameccuresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameCcuResultModel struct { + PageNumber int32 `json:"pageNumber,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalCount int64 `json:"totalCount,omitempty"` + Items []ConsoleAdminListGameCcuResultModelItems `json:"items,omitempty"` +} diff --git a/client/model/consoleadminlistgameccuresultmodelitems.go b/client/model/consoleadminlistgameccuresultmodelitems.go new file mode 100644 index 00000000..60b19455 --- /dev/null +++ b/client/model/consoleadminlistgameccuresultmodelitems.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameCcuResultModelItems struct { + CcuValue string `json:"ccuValue,omitempty"` + GameName string `json:"gameName,omitempty"` + MixGameId string `json:"mixGameId,omitempty"` +} diff --git a/client/model/consoleadminlistgamedeploydetailsofprojectforms.go b/client/model/consoleadminlistgamedeploydetailsofprojectforms.go new file mode 100644 index 00000000..278bc931 --- /dev/null +++ b/client/model/consoleadminlistgamedeploydetailsofprojectforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameDeployDetailsOfProjectForms struct { + ProjectId *string `json:"projectId,omitempty"` + GameId *string `json:"gameId,omitempty"` +} diff --git a/client/model/consoleadminlistgamedeploydetailsofprojectresult.go b/client/model/consoleadminlistgamedeploydetailsofprojectresult.go new file mode 100644 index 00000000..4b947ab5 --- /dev/null +++ b/client/model/consoleadminlistgamedeploydetailsofprojectresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameDeployDetailsOfProjectResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListGameDeployDetailsOfProjectResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistgamedeploydetailsofprojectresultmodel.go b/client/model/consoleadminlistgamedeploydetailsofprojectresultmodel.go new file mode 100644 index 00000000..0e4acd45 --- /dev/null +++ b/client/model/consoleadminlistgamedeploydetailsofprojectresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameDeployDetailsOfProjectResultModel struct { + NextToken string `json:"nextToken,omitempty"` + MaxResults int32 `json:"maxResults,omitempty"` + DataList []ConsoleAdminListGameDeployDetailsOfProjectResultModelDataList `json:"dataList,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistgamedeploydetailsofprojectresultmodeldatalist.go b/client/model/consoleadminlistgamedeploydetailsofprojectresultmodeldatalist.go new file mode 100644 index 00000000..cb88353d --- /dev/null +++ b/client/model/consoleadminlistgamedeploydetailsofprojectresultmodeldatalist.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameDeployDetailsOfProjectResultModelDataList struct { + VersionId string `json:"versionId,omitempty"` + AutoActiveStatus string `json:"autoActiveStatus,omitempty"` + VersionName string `json:"versionName,omitempty"` + DeployStatus string `json:"deployStatus,omitempty"` +} diff --git a/client/model/consoleadminlistgamesforms.go b/client/model/consoleadminlistgamesforms.go new file mode 100644 index 00000000..3aac6d50 --- /dev/null +++ b/client/model/consoleadminlistgamesforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGamesForms struct { + NextToken *string `json:"nextToken,omitempty"` + MaxResults *int32 `json:"maxResults,omitempty"` +} diff --git a/client/model/consoleadminlistgamesresult.go b/client/model/consoleadminlistgamesresult.go new file mode 100644 index 00000000..7c08a65b --- /dev/null +++ b/client/model/consoleadminlistgamesresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGamesResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListGamesResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistgamesresultmodel.go b/client/model/consoleadminlistgamesresultmodel.go new file mode 100644 index 00000000..ce51a5d4 --- /dev/null +++ b/client/model/consoleadminlistgamesresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGamesResultModel struct { + MaxResults int32 `json:"maxResults,omitempty"` + NextToken string `json:"nextToken,omitempty"` + DataList []ConsoleAdminListGamesResultModelDataList `json:"dataList,omitempty"` + Count string `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistgamesresultmodeldatalist.go b/client/model/consoleadminlistgamesresultmodeldatalist.go new file mode 100644 index 00000000..010923aa --- /dev/null +++ b/client/model/consoleadminlistgamesresultmodeldatalist.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGamesResultModelDataList struct { + GameId string `json:"gameId,omitempty"` + GameName string `json:"gameName,omitempty"` + PlatformType int64 `json:"platformType,omitempty"` +} diff --git a/client/model/consoleadminlistgameversionsforms.go b/client/model/consoleadminlistgameversionsforms.go new file mode 100644 index 00000000..4d87e6c9 --- /dev/null +++ b/client/model/consoleadminlistgameversionsforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameVersionsForms struct { + NextToken *string `json:"nextToken,omitempty"` + MaxResults *int32 `json:"maxResults,omitempty"` + GameId string `json:"gameId"` +} diff --git a/client/model/consoleadminlistgameversionsresult.go b/client/model/consoleadminlistgameversionsresult.go new file mode 100644 index 00000000..abc11cbc --- /dev/null +++ b/client/model/consoleadminlistgameversionsresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameVersionsResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListGameVersionsResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistgameversionsresultmodel.go b/client/model/consoleadminlistgameversionsresultmodel.go new file mode 100644 index 00000000..e26a9cc2 --- /dev/null +++ b/client/model/consoleadminlistgameversionsresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameVersionsResultModel struct { + MaxResults int32 `json:"maxResults,omitempty"` + NextToken string `json:"nextToken,omitempty"` + DataList []ConsoleAdminListGameVersionsResultModelDataList `json:"dataList,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistgameversionsresultmodeldatalist.go b/client/model/consoleadminlistgameversionsresultmodeldatalist.go new file mode 100644 index 00000000..0798477a --- /dev/null +++ b/client/model/consoleadminlistgameversionsresultmodeldatalist.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListGameVersionsResultModelDataList struct { + VersionId string `json:"versionId,omitempty"` + AdaptState string `json:"adaptState,omitempty"` + AdaptFinishTime int64 `json:"adaptFinishTime,omitempty"` + VersionName string `json:"versionName,omitempty"` +} diff --git a/client/model/consoleadminlistinstancesofprojectforms.go b/client/model/consoleadminlistinstancesofprojectforms.go new file mode 100644 index 00000000..cd2e37e9 --- /dev/null +++ b/client/model/consoleadminlistinstancesofprojectforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListInstancesOfProjectForms struct { + NextToken *string `json:"nextToken,omitempty"` + MaxResult *int32 `json:"maxResult,omitempty"` + ProjectId string `json:"projectId"` +} diff --git a/client/model/consoleadminlistinstancesofprojectresult.go b/client/model/consoleadminlistinstancesofprojectresult.go new file mode 100644 index 00000000..3f17c99e --- /dev/null +++ b/client/model/consoleadminlistinstancesofprojectresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListInstancesOfProjectResult struct { + Success string `json:"success,omitempty"` + Model ConsoleAdminListInstancesOfProjectResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistinstancesofprojectresultmodel.go b/client/model/consoleadminlistinstancesofprojectresultmodel.go new file mode 100644 index 00000000..ad3d571f --- /dev/null +++ b/client/model/consoleadminlistinstancesofprojectresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListInstancesOfProjectResultModel struct { + MaxResult int32 `json:"maxResult,omitempty"` + NextToken string `json:"nextToken,omitempty"` + DataList []ConsoleAdminListInstancesOfProjectResultModelDataList `json:"dataList,omitempty"` + Count int32 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistinstancesofprojectresultmodeldatalist.go b/client/model/consoleadminlistinstancesofprojectresultmodeldatalist.go new file mode 100644 index 00000000..8ffca602 --- /dev/null +++ b/client/model/consoleadminlistinstancesofprojectresultmodeldatalist.go @@ -0,0 +1,25 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListInstancesOfProjectResultModelDataList struct { + CommoditySpecificationCnName string `json:"commoditySpecificationCnName,omitempty"` + BandwidthChargeType string `json:"bandwidthChargeType,omitempty"` + EffectiveTime int32 `json:"effectiveTime,omitempty"` + PlatformType string `json:"platformType,omitempty"` + PaymentType string `json:"paymentType,omitempty"` + Token string `json:"token,omitempty"` + ExpireTime int32 `json:"expireTime,omitempty"` + CommodityInstanceName string `json:"commodityInstanceName,omitempty"` + CommodityInstanceId string `json:"commodityInstanceId,omitempty"` + Region string `json:"region,omitempty"` + ProjectName string `json:"projectName,omitempty"` + ProjectId string `json:"projectId,omitempty"` + ContainerCount string `json:"containerCount,omitempty"` + Status string `json:"status,omitempty"` + TradeChannel string `json:"tradeChannel,omitempty"` +} diff --git a/client/model/consoleadminlistmonthbillforms.go b/client/model/consoleadminlistmonthbillforms.go new file mode 100644 index 00000000..88c08365 --- /dev/null +++ b/client/model/consoleadminlistmonthbillforms.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListMonthBillForms struct { + AccountingPeriodFrom string `json:"accountingPeriodFrom"` + AccountingPeriodTo string `json:"accountingPeriodTo"` + // 状态 + Status *string `json:"status,omitempty"` + PageNumber *int32 `json:"pageNumber,omitempty"` + PageSize *int32 `json:"pageSize,omitempty"` +} diff --git a/client/model/consoleadminlistmonthbillresult.go b/client/model/consoleadminlistmonthbillresult.go new file mode 100644 index 00000000..0fd3110c --- /dev/null +++ b/client/model/consoleadminlistmonthbillresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListMonthBillResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListMonthBillResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistmonthbillresultmodel.go b/client/model/consoleadminlistmonthbillresultmodel.go new file mode 100644 index 00000000..8813970d --- /dev/null +++ b/client/model/consoleadminlistmonthbillresultmodel.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListMonthBillResultModel struct { + // 页码 + PageNumber int32 `json:"pageNumber,omitempty"` + // 没页数量 + PageSize int32 `json:"pageSize,omitempty"` + // 总数量 + TotalCount int64 `json:"totalCount,omitempty"` + // 列表 + Items []ConsoleAdminListMonthBillResultModelItems `json:"items,omitempty"` +} diff --git a/client/model/consoleadminlistmonthbillresultmodelitems.go b/client/model/consoleadminlistmonthbillresultmodelitems.go new file mode 100644 index 00000000..f1b9b8a0 --- /dev/null +++ b/client/model/consoleadminlistmonthbillresultmodelitems.go @@ -0,0 +1,24 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListMonthBillResultModelItems struct { + // 到期还款日期 + LatestPaidTime string `json:"latestPaidTime,omitempty"` + // 租户名称 + TenantName string `json:"tenantName,omitempty"` + // 租户ID + TenantId int64 `json:"tenantId,omitempty"` + // 账单状态 + BillStatus string `json:"billStatus,omitempty"` + // 账期 + AccountingPeriod string `json:"accountingPeriod,omitempty"` + // 已出账的日期 + BillOutgoingTime string `json:"billOutgoingTime,omitempty"` + // 消费金额 + CashPayAmount int64 `json:"cashPayAmount,omitempty"` +} diff --git a/client/model/consoleadminlistprojectsforms.go b/client/model/consoleadminlistprojectsforms.go new file mode 100644 index 00000000..5a91012b --- /dev/null +++ b/client/model/consoleadminlistprojectsforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListProjectsForms struct { + NextToken *string `json:"nextToken,omitempty"` + MaxResults *int32 `json:"maxResults,omitempty"` +} diff --git a/client/model/consoleadminlistprojectsresult.go b/client/model/consoleadminlistprojectsresult.go new file mode 100644 index 00000000..c04cd956 --- /dev/null +++ b/client/model/consoleadminlistprojectsresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListProjectsResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListProjectsResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistprojectsresultmodel.go b/client/model/consoleadminlistprojectsresultmodel.go new file mode 100644 index 00000000..90521d44 --- /dev/null +++ b/client/model/consoleadminlistprojectsresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListProjectsResultModel struct { + MaxResults int32 `json:"maxResults,omitempty"` + NextToken string `json:"nextToken,omitempty"` + DataList []ConsoleAdminListProjectsResultModelDataList `json:"dataList,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistprojectsresultmodeldatalist.go b/client/model/consoleadminlistprojectsresultmodeldatalist.go new file mode 100644 index 00000000..922bbd4b --- /dev/null +++ b/client/model/consoleadminlistprojectsresultmodeldatalist.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListProjectsResultModelDataList struct { + ProjectName string `json:"projectName,omitempty"` + ProjectId string `json:"projectId,omitempty"` +} diff --git a/client/model/consoleadminlistversiondeployinstancesforms.go b/client/model/consoleadminlistversiondeployinstancesforms.go new file mode 100644 index 00000000..4eb56058 --- /dev/null +++ b/client/model/consoleadminlistversiondeployinstancesforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListVersionDeployInstancesForms struct { + ProjectId *string `json:"projectId,omitempty"` + GameId *string `json:"gameId,omitempty"` + VersionId *string `json:"versionId,omitempty"` + DeployStatus *string `json:"deployStatus,omitempty"` +} diff --git a/client/model/consoleadminlistversiondeployinstancesresult.go b/client/model/consoleadminlistversiondeployinstancesresult.go new file mode 100644 index 00000000..cbdf13f3 --- /dev/null +++ b/client/model/consoleadminlistversiondeployinstancesresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListVersionDeployInstancesResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminListVersionDeployInstancesResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminlistversiondeployinstancesresultmodel.go b/client/model/consoleadminlistversiondeployinstancesresultmodel.go new file mode 100644 index 00000000..0a956103 --- /dev/null +++ b/client/model/consoleadminlistversiondeployinstancesresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListVersionDeployInstancesResultModel struct { + NextToken string `json:"nextToken,omitempty"` + MaxResults int32 `json:"maxResults,omitempty"` + DataList []ConsoleAdminListVersionDeployInstancesResultModelDataList `json:"dataList,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/client/model/consoleadminlistversiondeployinstancesresultmodeldatalist.go b/client/model/consoleadminlistversiondeployinstancesresultmodeldatalist.go new file mode 100644 index 00000000..cd02b036 --- /dev/null +++ b/client/model/consoleadminlistversiondeployinstancesresultmodeldatalist.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminListVersionDeployInstancesResultModelDataList struct { + CloudGameInstanceId string `json:"cloudGameInstanceId,omitempty"` + CloudGameInstanceName string `json:"cloudGameInstanceName,omitempty"` +} diff --git a/client/model/consoleadminqueryadaptresultbyversionidforms.go b/client/model/consoleadminqueryadaptresultbyversionidforms.go new file mode 100644 index 00000000..0d20c7d9 --- /dev/null +++ b/client/model/consoleadminqueryadaptresultbyversionidforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminQueryAdaptResultByVersionIdForms struct { + MixVersionId string `json:"mixVersionId"` +} diff --git a/client/model/consoleadminqueryadaptresultbyversionidresult.go b/client/model/consoleadminqueryadaptresultbyversionidresult.go new file mode 100644 index 00000000..13bb160d --- /dev/null +++ b/client/model/consoleadminqueryadaptresultbyversionidresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminQueryAdaptResultByVersionIdResult struct { + Success bool `json:"success,omitempty"` + Model []ConsoleAdminQueryAdaptResultByVersionIdResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminqueryadaptresultbyversionidresultmodel.go b/client/model/consoleadminqueryadaptresultbyversionidresultmodel.go new file mode 100644 index 00000000..14cf0812 --- /dev/null +++ b/client/model/consoleadminqueryadaptresultbyversionidresultmodel.go @@ -0,0 +1,26 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminQueryAdaptResultByVersionIdResultModel struct { + AdaptFileSourceName string `json:"adaptFileSourceName,omitempty"` + DictFrameRate string `json:"dictFrameRate,omitempty"` + DictMachineTypeVm string `json:"dictMachineTypeVm,omitempty"` + ContainerType int32 `json:"containerType,omitempty"` + Sandbox int32 `json:"sandbox,omitempty"` + PlatformType int32 `json:"platformType,omitempty"` + Priority int32 `json:"priority,omitempty"` + Resolution string `json:"resolution,omitempty"` + AdaptFileSource string `json:"adaptFileSource,omitempty"` + Required int32 `json:"required,omitempty"` + MaxConcurrency int32 `json:"maxConcurrency,omitempty"` + State int32 `json:"state,omitempty"` + PipelineType int32 `json:"pipelineType,omitempty"` + DictPicQuality string `json:"dictPicQuality,omitempty"` + DictIsvName string `json:"dictIsvName,omitempty"` + CalculationEvaluation map[string]string `json:"calculationEvaluation,omitempty"` +} diff --git a/client/model/consoleadminrecommendspecificationforms.go b/client/model/consoleadminrecommendspecificationforms.go new file mode 100644 index 00000000..843c186b --- /dev/null +++ b/client/model/consoleadminrecommendspecificationforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRecommendSpecificationForms struct { + GameId string `json:"gameId"` + GameVersionId string `json:"gameVersionId"` + PlatformType int32 `json:"platformType"` +} diff --git a/client/model/consoleadminrecommendspecificationresult.go b/client/model/consoleadminrecommendspecificationresult.go new file mode 100644 index 00000000..afd3660f --- /dev/null +++ b/client/model/consoleadminrecommendspecificationresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRecommendSpecificationResult struct { + Success bool `json:"success,omitempty"` + Model []ConsoleAdminRecommendSpecificationResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminrecommendspecificationresultmodel.go b/client/model/consoleadminrecommendspecificationresultmodel.go new file mode 100644 index 00000000..7ae780b0 --- /dev/null +++ b/client/model/consoleadminrecommendspecificationresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRecommendSpecificationResultModel struct { + SpecificationCnName string `json:"specificationCnName,omitempty"` + SpecificationValueCode string `json:"specificationValueCode,omitempty"` + SpecificationName string `json:"specificationName,omitempty"` + SpecificationAttributeCode string `json:"specificationAttributeCode,omitempty"` +} diff --git a/client/model/consoleadminremovegamefromprojectforms.go b/client/model/consoleadminremovegamefromprojectforms.go new file mode 100644 index 00000000..e7ede190 --- /dev/null +++ b/client/model/consoleadminremovegamefromprojectforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRemoveGameFromProjectForms struct { + ProjectId string `json:"projectId"` + GameId string `json:"gameId"` +} diff --git a/client/model/consoleadminremovegamefromprojectresult.go b/client/model/consoleadminremovegamefromprojectresult.go new file mode 100644 index 00000000..84f41f4a --- /dev/null +++ b/client/model/consoleadminremovegamefromprojectresult.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRemoveGameFromProjectResult struct { + Success bool `json:"success,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminrtoverviewforms.go b/client/model/consoleadminrtoverviewforms.go new file mode 100644 index 00000000..6d861da6 --- /dev/null +++ b/client/model/consoleadminrtoverviewforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtOverViewForms struct { + MixGameIds *string `json:"mixGameIds,omitempty"` + ProjectIds *string `json:"projectIds,omitempty"` + QueryTimeStart *int64 `json:"queryTimeStart,omitempty"` + QueryTimeEnd *int64 `json:"queryTimeEnd,omitempty"` +} diff --git a/client/model/consoleadminrtoverviewresult.go b/client/model/consoleadminrtoverviewresult.go new file mode 100644 index 00000000..e8f7bb8f --- /dev/null +++ b/client/model/consoleadminrtoverviewresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtOverViewResult struct { + Success bool `json:"success,omitempty"` + Model []ConsoleAdminRtOverViewResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminrtoverviewresultmodel.go b/client/model/consoleadminrtoverviewresultmodel.go new file mode 100644 index 00000000..f9ca5318 --- /dev/null +++ b/client/model/consoleadminrtoverviewresultmodel.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtOverViewResultModel struct { + IndicatorType string `json:"indicatorType,omitempty"` + MaxValue string `json:"maxValue,omitempty"` + Name string `json:"name,omitempty"` +} diff --git a/client/model/consoleadminrttrendforms.go b/client/model/consoleadminrttrendforms.go new file mode 100644 index 00000000..ed78ee02 --- /dev/null +++ b/client/model/consoleadminrttrendforms.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtTrendForms struct { + GroupType *string `json:"groupType,omitempty"` + IndicatorTypes *string `json:"indicatorTypes,omitempty"` + MixGameIds *string `json:"mixGameIds,omitempty"` + ProjectIds *string `json:"projectIds,omitempty"` + QueryTimeStart *int64 `json:"queryTimeStart,omitempty"` + QueryTimeEnd *int64 `json:"queryTimeEnd,omitempty"` +} diff --git a/client/model/consoleadminrttrendresult.go b/client/model/consoleadminrttrendresult.go new file mode 100644 index 00000000..57c39cbc --- /dev/null +++ b/client/model/consoleadminrttrendresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtTrendResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminRtTrendResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminrttrendresultmodel.go b/client/model/consoleadminrttrendresultmodel.go new file mode 100644 index 00000000..4f267f4a --- /dev/null +++ b/client/model/consoleadminrttrendresultmodel.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtTrendResultModel struct { + Data []ConsoleAdminRtTrendResultModelData `json:"data,omitempty"` + MaxValue string `json:"maxValue,omitempty"` +} diff --git a/client/model/consoleadminrttrendresultmodeldata.go b/client/model/consoleadminrttrendresultmodeldata.go new file mode 100644 index 00000000..817b4314 --- /dev/null +++ b/client/model/consoleadminrttrendresultmodeldata.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtTrendResultModelData struct { + Data []ConsoleAdminRtTrendResultModelDataData `json:"data,omitempty"` + IndicatorType string `json:"indicatorType,omitempty"` + MaxValue string `json:"maxValue,omitempty"` + Name string `json:"name,omitempty"` +} diff --git a/client/model/consoleadminrttrendresultmodeldatadata.go b/client/model/consoleadminrttrendresultmodeldatadata.go new file mode 100644 index 00000000..abd2d583 --- /dev/null +++ b/client/model/consoleadminrttrendresultmodeldatadata.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminRtTrendResultModelDataData struct { + TimeStamp int64 `json:"timeStamp,omitempty"` + Value string `json:"value,omitempty"` +} diff --git a/client/model/consoleadminsubmitdeploymentforms.go b/client/model/consoleadminsubmitdeploymentforms.go new file mode 100644 index 00000000..cb8eb0e8 --- /dev/null +++ b/client/model/consoleadminsubmitdeploymentforms.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminSubmitDeploymentForms struct { + GameId string `json:"gameId"` + ProjectId string `json:"projectId"` + VersionId string `json:"versionId"` + CloudGameInstanceIds string `json:"cloudGameInstanceIds"` + OperationType string `json:"operationType"` +} diff --git a/client/model/consoleadminsubmitdeploymentresult.go b/client/model/consoleadminsubmitdeploymentresult.go new file mode 100644 index 00000000..cd42d927 --- /dev/null +++ b/client/model/consoleadminsubmitdeploymentresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminSubmitDeploymentResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminSubmitDeploymentResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminsubmitdeploymentresultmodel.go b/client/model/consoleadminsubmitdeploymentresultmodel.go new file mode 100644 index 00000000..d0dad55a --- /dev/null +++ b/client/model/consoleadminsubmitdeploymentresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminSubmitDeploymentResultModel struct { + TaskId string `json:"taskId,omitempty"` +} diff --git a/client/model/consoleadminsubmitrefundforms.go b/client/model/consoleadminsubmitrefundforms.go new file mode 100644 index 00000000..23a75c6f --- /dev/null +++ b/client/model/consoleadminsubmitrefundforms.go @@ -0,0 +1,22 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminSubmitRefundForms struct { + // 商品编码 + CommodityCode string `json:"commodityCode"` + // 实例ID + InstanceId string `json:"instanceId"` + // 退订类型 + RefundType string `json:"refundType"` + // 退订理由 + RefundReason *string `json:"refundReason,omitempty"` + // 退订理由类型 + RefundReasonType *string `json:"refundReasonType,omitempty"` + // 退订后的过期时间 退续费场景使用 + TargetExpireTime *string `json:"targetExpireTime,omitempty"` +} diff --git a/client/model/consoleadminsubmitrefundresult.go b/client/model/consoleadminsubmitrefundresult.go new file mode 100644 index 00000000..35181b1a --- /dev/null +++ b/client/model/consoleadminsubmitrefundresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminSubmitRefundResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminSubmitRefundResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminsubmitrefundresultmodel.go b/client/model/consoleadminsubmitrefundresultmodel.go new file mode 100644 index 00000000..c7dcefbb --- /dev/null +++ b/client/model/consoleadminsubmitrefundresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminSubmitRefundResultModel struct { + // refundOrderId + RefundOrderId string `json:"refundOrderId,omitempty"` + // 是否提交成功 + SubmitSuccess bool `json:"submitSuccess,omitempty"` +} diff --git a/client/model/consoleadminuploadgameversionbydownloadforms.go b/client/model/consoleadminuploadgameversionbydownloadforms.go new file mode 100644 index 00000000..9628f2ce --- /dev/null +++ b/client/model/consoleadminuploadgameversionbydownloadforms.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminUploadGameVersionByDownloadForms struct { + Hash string `json:"hash"` + GameId string `json:"gameId"` + DownloadType ConsoleAdminUploadGameVersionByDownloadFormsDownloadType `json:"downloadType"` + VersionName string `json:"versionName"` + OsManifest *string `json:"osManifest,omitempty"` +} diff --git a/client/model/consoleadminuploadgameversionbydownloadformsdownloadtype.go b/client/model/consoleadminuploadgameversionbydownloadformsdownloadtype.go new file mode 100644 index 00000000..b69681d0 --- /dev/null +++ b/client/model/consoleadminuploadgameversionbydownloadformsdownloadtype.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminUploadGameVersionByDownloadFormsDownloadType struct { + GameUrl *string `json:"gameUrl,omitempty"` + Type_ *string `json:"type,omitempty"` +} diff --git a/client/model/consoleadminuploadgameversionbydownloadresult.go b/client/model/consoleadminuploadgameversionbydownloadresult.go new file mode 100644 index 00000000..a4fb48a9 --- /dev/null +++ b/client/model/consoleadminuploadgameversionbydownloadresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminUploadGameVersionByDownloadResult struct { + Success bool `json:"success,omitempty"` + Model ConsoleAdminUploadGameVersionByDownloadResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/consoleadminuploadgameversionbydownloadresultmodel.go b/client/model/consoleadminuploadgameversionbydownloadresultmodel.go new file mode 100644 index 00000000..be1e0445 --- /dev/null +++ b/client/model/consoleadminuploadgameversionbydownloadresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ConsoleAdminUploadGameVersionByDownloadResultModel struct { + TaskId string `json:"taskId,omitempty"` +} diff --git a/client/model/gamenotifyforms.go b/client/model/gamenotifyforms.go new file mode 100644 index 00000000..8ec544e5 --- /dev/null +++ b/client/model/gamenotifyforms.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GameNotifyForms struct { + // appKey + AppKey string `json:"appKey"` + GameSession string `json:"gameSession"` + Type_ string `json:"type"` + Value *string `json:"value,omitempty"` +} diff --git a/client/model/gamenotifyresult.go b/client/model/gamenotifyresult.go new file mode 100644 index 00000000..def8afe5 --- /dev/null +++ b/client/model/gamenotifyresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GameNotifyResult struct { + Success bool `json:"success,omitempty"` + Model GameNotifyResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/gamenotifyresultmodel.go b/client/model/gamenotifyresultmodel.go new file mode 100644 index 00000000..535d6938 --- /dev/null +++ b/client/model/gamenotifyresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GameNotifyResultModel struct { + Code string `json:"code,omitempty"` + Success bool `json:"success,omitempty"` + Message string `json:"message,omitempty"` + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/getgameconcurrencyforms.go b/client/model/getgameconcurrencyforms.go new file mode 100644 index 00000000..5fcb0371 --- /dev/null +++ b/client/model/getgameconcurrencyforms.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetGameConcurrencyForms struct { + // 游戏ID + GameId string `json:"gameId"` + // 云游戏项目应用AK + AppKey string `json:"appKey"` + // 是否查询PaaS当前排队人数 + QueryQueueConcurrency *bool `json:"queryQueueConcurrency,omitempty"` + // 指定userLevel查询当前userLevel排队人数,不指定时,查询当前所有排队人数 + QueueUserLevel *int32 `json:"queueUserLevel,omitempty"` +} diff --git a/client/model/getgameconcurrencyresult.go b/client/model/getgameconcurrencyresult.go new file mode 100644 index 00000000..044aefc0 --- /dev/null +++ b/client/model/getgameconcurrencyresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetGameConcurrencyResult struct { + Success bool `json:"success,omitempty"` + Model GetGameConcurrencyResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/getgameconcurrencyresultmodel.go b/client/model/getgameconcurrencyresultmodel.go new file mode 100644 index 00000000..5bfdebff --- /dev/null +++ b/client/model/getgameconcurrencyresultmodel.go @@ -0,0 +1,28 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetGameConcurrencyResultModel struct { + // Paas平台游戏ID + GameId string `json:"gameId,omitempty"` + // 当前毫秒时间戳 + CurrentTime int64 `json:"currentTime,omitempty"` + // 当前游戏region维度游戏中人数统计 + PlayingRegionList []GetGameConcurrencyResultModelPlayingRegionList `json:"playingRegionList,omitempty"` + // 错误码 + Code string `json:"code,omitempty"` + // 当前游戏中人数 + PlayingTotal int64 `json:"playingTotal,omitempty"` + // 查询结果 + Success bool `json:"success,omitempty"` + // 当前排队人数 + QueuingTotal int64 `json:"queuingTotal,omitempty"` + // 错误信息 + Message string `json:"message,omitempty"` + // 游戏归属的项目Id + ProjectId string `json:"projectId,omitempty"` +} diff --git a/client/model/getgameconcurrencyresultmodelplayingregionlist.go b/client/model/getgameconcurrencyresultmodelplayingregionlist.go new file mode 100644 index 00000000..51187408 --- /dev/null +++ b/client/model/getgameconcurrencyresultmodelplayingregionlist.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetGameConcurrencyResultModelPlayingRegionList struct { + // 当前游戏指定region游戏中人数 + Ccu int64 `json:"ccu,omitempty"` + // 当前统计的regionId + RegionId string `json:"regionId,omitempty"` +} diff --git a/client/model/getpairresult.go b/client/model/getpairresult.go new file mode 100644 index 00000000..77f169ce --- /dev/null +++ b/client/model/getpairresult.go @@ -0,0 +1,20 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetPairResult struct { + // token失效时间戳,单位:秒 + Expired string `json:"expired,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // 临时token + Token string `json:"token,omitempty"` + // 临时secretKey + AccessSecret string `json:"accessSecret,omitempty"` +} diff --git a/client/model/getstockforms.go b/client/model/getstockforms.go new file mode 100644 index 00000000..85d8b26a --- /dev/null +++ b/client/model/getstockforms.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetStockForms struct { + // Paas平台部署的游戏Id + GameId *string `json:"gameId,omitempty"` + // 查询库存类型 + AppKey string `json:"appKey"` + // 通过接口获取的token + Type_ string `json:"type"` +} diff --git a/client/model/getstockresult.go b/client/model/getstockresult.go new file mode 100644 index 00000000..63c36d65 --- /dev/null +++ b/client/model/getstockresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetStockResult struct { + Success bool `json:"success,omitempty"` + Model GetStockResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/getstockresultmodel.go b/client/model/getstockresultmodel.go new file mode 100644 index 00000000..4f8852a4 --- /dev/null +++ b/client/model/getstockresultmodel.go @@ -0,0 +1,31 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetStockResultModel struct { + // Paas平台游戏ID + GameId string `json:"gameId,omitempty"` + // 当前毫秒时间戳 + CurrentTime int64 `json:"currentTime,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 请求链路唯一标示 + RequestId string `json:"requestId,omitempty"` + // 调度执行结果 + Success bool `json:"success,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // 总路数 + QuotaTotal int32 `json:"quotaTotal,omitempty"` + // 已使用路数 + UsedTotal int32 `json:"usedTotal,omitempty"` + // 游戏归属的项目Id + ProjectId string `json:"projectId,omitempty"` + // 可用剩余路数 + AvailableTotal int32 `json:"availableTotal,omitempty"` + InstanceStockList []GetStockResultModelInstanceStockList `json:"instanceStockList,omitempty"` +} diff --git a/client/model/getstockresultmodelinstancestocklist.go b/client/model/getstockresultmodelinstancestocklist.go new file mode 100644 index 00000000..41563aa0 --- /dev/null +++ b/client/model/getstockresultmodelinstancestocklist.go @@ -0,0 +1,28 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetStockResultModelInstanceStockList struct { + // 实例id + InstanceId string `json:"instanceId,omitempty"` + // 实例游戏当前可使用路数 + InstanceGameAvailableTotal int32 `json:"instanceGameAvailableTotal,omitempty"` + // 实例总路数 + InstanceTotal int32 `json:"instanceTotal,omitempty"` + // 实例可用路数 + InstanceAvailableTotal int32 `json:"instanceAvailableTotal,omitempty"` + // 实例配置游戏总路数 + InstanceGameTotal int32 `json:"instanceGameTotal,omitempty"` + // 实例已用路数 + InstanceUsedTotal int32 `json:"instanceUsedTotal,omitempty"` + // 实例游戏当前已使用路数 + InstanceGameUsedTotal int32 `json:"instanceGameUsedTotal,omitempty"` + // 实例大区ID + InstanceRegionId string `json:"instanceRegionId,omitempty"` + // 实例调度等级 + InstanceUserLevel int32 `json:"instanceUserLevel,omitempty"` +} diff --git a/client/model/getstopgametokenforms.go b/client/model/getstopgametokenforms.go new file mode 100644 index 00000000..6eb93c16 --- /dev/null +++ b/client/model/getstopgametokenforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetStopGameTokenForms struct { + // Paas平台部署的游戏Id + GameId string `json:"gameId"` + // Paas平台AK(应用的AK,非服务端AK) + AppKey string `json:"appKey"` +} diff --git a/client/model/getstopgametokenresult.go b/client/model/getstopgametokenresult.go new file mode 100644 index 00000000..8f58692f --- /dev/null +++ b/client/model/getstopgametokenresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetStopGameTokenResult struct { + Success bool `json:"success,omitempty"` + Model GetStopGameTokenResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/getstopgametokenresultmodel.go b/client/model/getstopgametokenresultmodel.go new file mode 100644 index 00000000..8b01fc97 --- /dev/null +++ b/client/model/getstopgametokenresultmodel.go @@ -0,0 +1,22 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetStopGameTokenResultModel struct { + // 当前token失效时间 + ExpireTime int64 `json:"expireTime,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 请求链路唯一标示 + RequestId string `json:"requestId,omitempty"` + // 调度执行结果 + Success bool `json:"success,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // token + Token string `json:"token,omitempty"` +} diff --git a/client/model/gettripleresult.go b/client/model/gettripleresult.go new file mode 100644 index 00000000..fe27752a --- /dev/null +++ b/client/model/gettripleresult.go @@ -0,0 +1,22 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type GetTripleResult struct { + // token失效时间戳,单位:秒 + Expired string `json:"expired,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 临时accessKey + AccessKey string `json:"accessKey,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // 临时token + Token string `json:"token,omitempty"` + // 临时secretKey + AccessSecret string `json:"accessSecret,omitempty"` +} diff --git a/client/model/listgameserveripforms.go b/client/model/listgameserveripforms.go new file mode 100644 index 00000000..765d824e --- /dev/null +++ b/client/model/listgameserveripforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ListGameServerIpForms struct { + // 分页大小,默认100 + PageSize *int64 `json:"pageSize,omitempty"` + // 分页标识 + NextToken *string `json:"nextToken,omitempty"` +} diff --git a/client/model/listgameserveripresult.go b/client/model/listgameserveripresult.go new file mode 100644 index 00000000..4cbde664 --- /dev/null +++ b/client/model/listgameserveripresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ListGameServerIpResult struct { + Success bool `json:"success,omitempty"` + Model ListGameServerIpResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/listgameserveripresultmodel.go b/client/model/listgameserveripresultmodel.go new file mode 100644 index 00000000..060fac50 --- /dev/null +++ b/client/model/listgameserveripresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ListGameServerIpResultModel struct { + NextToken string `json:"nextToken,omitempty"` + PageSize int64 `json:"pageSize,omitempty"` + TotalCount int64 `json:"totalCount,omitempty"` + IpList []string `json:"ipList,omitempty"` +} diff --git a/client/model/livequerystatusforms.go b/client/model/livequerystatusforms.go new file mode 100644 index 00000000..234f582a --- /dev/null +++ b/client/model/livequerystatusforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveQueryStatusForms struct { + AppKey string `json:"appKey"` + GameSession string `json:"gameSession"` + LiveId *string `json:"liveId,omitempty"` +} diff --git a/client/model/livequerystatusresult.go b/client/model/livequerystatusresult.go new file mode 100644 index 00000000..fbce0d3d --- /dev/null +++ b/client/model/livequerystatusresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveQueryStatusResult struct { + Success bool `json:"success,omitempty"` + Model LiveQueryStatusResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/livequerystatusresultmodel.go b/client/model/livequerystatusresultmodel.go new file mode 100644 index 00000000..6fe0b0c5 --- /dev/null +++ b/client/model/livequerystatusresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveQueryStatusResultModel struct { + LiveList []LiveQueryStatusResultModelLiveList `json:"liveList,omitempty"` +} diff --git a/client/model/livequerystatusresultmodellivelist.go b/client/model/livequerystatusresultmodellivelist.go new file mode 100644 index 00000000..67d6c4a6 --- /dev/null +++ b/client/model/livequerystatusresultmodellivelist.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveQueryStatusResultModelLiveList struct { + StreamKey string `json:"streamKey,omitempty"` + ServerUrl string `json:"serverUrl,omitempty"` + Message string `json:"message,omitempty"` + LiveId string `json:"liveId,omitempty"` + Config LiveQueryStatusResultModelLiveListConfig `json:"config,omitempty"` + Status string `json:"status,omitempty"` +} diff --git a/client/model/livequerystatusresultmodellivelistconfig.go b/client/model/livequerystatusresultmodellivelistconfig.go new file mode 100644 index 00000000..39a7f7a2 --- /dev/null +++ b/client/model/livequerystatusresultmodellivelistconfig.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveQueryStatusResultModelLiveListConfig struct { + FrameRate int32 `json:"frameRate,omitempty"` + Bitrate int32 `json:"bitrate,omitempty"` + Resolution string `json:"resolution,omitempty"` +} diff --git a/client/model/livestartgameliveforms.go b/client/model/livestartgameliveforms.go new file mode 100644 index 00000000..7490f760 --- /dev/null +++ b/client/model/livestartgameliveforms.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveStartGameLiveForms struct { + AppKey string `json:"appKey"` + GameSession string `json:"gameSession"` + ServerUrl string `json:"serverUrl"` + StreamKey string `json:"streamKey"` + Config *LiveStartGameLiveFormsConfig `json:"config,omitempty"` +} diff --git a/client/model/livestartgameliveformsconfig.go b/client/model/livestartgameliveformsconfig.go new file mode 100644 index 00000000..407ea555 --- /dev/null +++ b/client/model/livestartgameliveformsconfig.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveStartGameLiveFormsConfig struct { + FrameRate *int32 `json:"frameRate,omitempty"` + Bitrate *int32 `json:"bitrate,omitempty"` + Resolution *string `json:"resolution,omitempty"` +} diff --git a/client/model/livestartgameliveresult.go b/client/model/livestartgameliveresult.go new file mode 100644 index 00000000..7445bc92 --- /dev/null +++ b/client/model/livestartgameliveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveStartGameLiveResult struct { + Success bool `json:"success,omitempty"` + Model LiveStartGameLiveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/livestartgameliveresultmodel.go b/client/model/livestartgameliveresultmodel.go new file mode 100644 index 00000000..5976b23e --- /dev/null +++ b/client/model/livestartgameliveresultmodel.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveStartGameLiveResultModel struct { + Data bool `json:"data,omitempty"` + LiveId string `json:"liveId,omitempty"` + Status string `json:"status,omitempty"` +} diff --git a/client/model/livestopgameliveforms.go b/client/model/livestopgameliveforms.go new file mode 100644 index 00000000..6e8cf3b6 --- /dev/null +++ b/client/model/livestopgameliveforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveStopGameLiveForms struct { + AppKey string `json:"appKey"` + GameSession string `json:"gameSession"` + LiveId *string `json:"liveId,omitempty"` +} diff --git a/client/model/livestopgameliveresult.go b/client/model/livestopgameliveresult.go new file mode 100644 index 00000000..72627a14 --- /dev/null +++ b/client/model/livestopgameliveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveStopGameLiveResult struct { + Success bool `json:"success,omitempty"` + Model LiveStopGameLiveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/livestopgameliveresultmodel.go b/client/model/livestopgameliveresultmodel.go new file mode 100644 index 00000000..d93d1428 --- /dev/null +++ b/client/model/livestopgameliveresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type LiveStopGameLiveResultModel struct { + Data bool `json:"data,omitempty"` +} diff --git a/client/model/multiplaycloseforms.go b/client/model/multiplaycloseforms.go new file mode 100644 index 00000000..71e54c02 --- /dev/null +++ b/client/model/multiplaycloseforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayCloseForms struct { + MpId string `json:"mpId"` + Reason *string `json:"reason,omitempty"` +} diff --git a/client/model/multiplaycloseresult.go b/client/model/multiplaycloseresult.go new file mode 100644 index 00000000..b76a2cef --- /dev/null +++ b/client/model/multiplaycloseresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayCloseResult struct { + Success bool `json:"success,omitempty"` + Model MultiplayCloseResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/multiplaycloseresultmodel.go b/client/model/multiplaycloseresultmodel.go new file mode 100644 index 00000000..cae9686b --- /dev/null +++ b/client/model/multiplaycloseresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayCloseResultModel struct { + DataVer string `json:"dataVer,omitempty"` +} diff --git a/client/model/multiplayinitforms.go b/client/model/multiplayinitforms.go new file mode 100644 index 00000000..5b669a6c --- /dev/null +++ b/client/model/multiplayinitforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayInitForms struct { + GameSession string `json:"gameSession"` + AppKey string `json:"appKey"` + Config *MultiplayInitFormsConfig `json:"config,omitempty"` + Tokens *[]MultiplayInitFormsTokens `json:"tokens,omitempty"` +} diff --git a/client/model/multiplayinitformsconfig.go b/client/model/multiplayinitformsconfig.go new file mode 100644 index 00000000..9406dd00 --- /dev/null +++ b/client/model/multiplayinitformsconfig.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayInitFormsConfig struct { + MaxToken *int32 `json:"maxToken,omitempty"` + HostTimeout *int32 `json:"hostTimeout,omitempty"` + ConnectTimeout *int32 `json:"connectTimeout,omitempty"` + InputTimeout *int32 `json:"inputTimeout,omitempty"` +} diff --git a/client/model/multiplayinitformstokens.go b/client/model/multiplayinitformstokens.go new file mode 100644 index 00000000..6f9cfc2d --- /dev/null +++ b/client/model/multiplayinitformstokens.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayInitFormsTokens struct { + AccountId string `json:"accountId,omitempty"` + ControlId int32 `json:"controlId,omitempty"` +} diff --git a/client/model/multiplayinitresult.go b/client/model/multiplayinitresult.go new file mode 100644 index 00000000..500f573e --- /dev/null +++ b/client/model/multiplayinitresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayInitResult struct { + Success bool `json:"success,omitempty"` + Model MultiplayInitResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/multiplayinitresultmodel.go b/client/model/multiplayinitresultmodel.go new file mode 100644 index 00000000..1a5dad7c --- /dev/null +++ b/client/model/multiplayinitresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayInitResultModel struct { + CreatorTokenId string `json:"creatorTokenId,omitempty"` + Tokens []MultiplayInitResultModelTokens `json:"tokens,omitempty"` + DataVer string `json:"dataVer,omitempty"` + MpId string `json:"mpId,omitempty"` +} diff --git a/client/model/multiplayinitresultmodeltokens.go b/client/model/multiplayinitresultmodeltokens.go new file mode 100644 index 00000000..d14e09ba --- /dev/null +++ b/client/model/multiplayinitresultmodeltokens.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayInitResultModelTokens struct { + AccountId string `json:"accountId,omitempty"` + TokenId string `json:"tokenId,omitempty"` + Session string `json:"session,omitempty"` + ControlId int32 `json:"controlId,omitempty"` +} diff --git a/client/model/multiplayjoinforms.go b/client/model/multiplayjoinforms.go new file mode 100644 index 00000000..7633e12d --- /dev/null +++ b/client/model/multiplayjoinforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayJoinForms struct { + MpId string `json:"mpId"` + AccountId string `json:"accountId"` + ControlId *int32 `json:"controlId,omitempty"` +} diff --git a/client/model/multiplayjoinresult.go b/client/model/multiplayjoinresult.go new file mode 100644 index 00000000..2c5637eb --- /dev/null +++ b/client/model/multiplayjoinresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayJoinResult struct { + Success bool `json:"success,omitempty"` + Model MultiplayJoinResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/multiplayjoinresultmodel.go b/client/model/multiplayjoinresultmodel.go new file mode 100644 index 00000000..2753bb19 --- /dev/null +++ b/client/model/multiplayjoinresultmodel.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayJoinResultModel struct { + TokenId string `json:"tokenId,omitempty"` + Session string `json:"session,omitempty"` + DataVer string `json:"dataVer,omitempty"` +} diff --git a/client/model/multiplayleaveforms.go b/client/model/multiplayleaveforms.go new file mode 100644 index 00000000..981f6ca5 --- /dev/null +++ b/client/model/multiplayleaveforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayLeaveForms struct { + MpId string `json:"mpId"` + KickOut bool `json:"kickOut"` + Reason *string `json:"reason,omitempty"` + TokenIds []string `json:"tokenIds"` +} diff --git a/client/model/multiplayleaveresult.go b/client/model/multiplayleaveresult.go new file mode 100644 index 00000000..fbafca95 --- /dev/null +++ b/client/model/multiplayleaveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayLeaveResult struct { + Success bool `json:"success,omitempty"` + Model MultiplayLeaveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/multiplayleaveresultmodel.go b/client/model/multiplayleaveresultmodel.go new file mode 100644 index 00000000..5f352af1 --- /dev/null +++ b/client/model/multiplayleaveresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayLeaveResultModel struct { + DataVer string `json:"dataVer,omitempty"` +} diff --git a/client/model/multiplaymodifyforms.go b/client/model/multiplaymodifyforms.go new file mode 100644 index 00000000..3566aff0 --- /dev/null +++ b/client/model/multiplaymodifyforms.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayModifyForms struct { + MpId string `json:"mpId"` + Tokens *[]MultiplayModifyFormsTokens `json:"tokens,omitempty"` +} diff --git a/client/model/multiplaymodifyformstokens.go b/client/model/multiplaymodifyformstokens.go new file mode 100644 index 00000000..707acb4e --- /dev/null +++ b/client/model/multiplaymodifyformstokens.go @@ -0,0 +1,12 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayModifyFormsTokens struct { + TokenId string `json:"tokenId,omitempty"` + ControlId int32 `json:"controlId,omitempty"` +} diff --git a/client/model/multiplaymodifyresult.go b/client/model/multiplaymodifyresult.go new file mode 100644 index 00000000..d315de1a --- /dev/null +++ b/client/model/multiplaymodifyresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayModifyResult struct { + Success bool `json:"success,omitempty"` + Model MultiplayModifyResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/multiplaymodifyresultmodel.go b/client/model/multiplaymodifyresultmodel.go new file mode 100644 index 00000000..03c615fe --- /dev/null +++ b/client/model/multiplaymodifyresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayModifyResultModel struct { + DataVer string `json:"dataVer,omitempty"` +} diff --git a/client/model/multiplayqueryforms.go b/client/model/multiplayqueryforms.go new file mode 100644 index 00000000..6348cb3a --- /dev/null +++ b/client/model/multiplayqueryforms.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayQueryForms struct { + MpId string `json:"mpId"` +} diff --git a/client/model/multiplayqueryresult.go b/client/model/multiplayqueryresult.go new file mode 100644 index 00000000..a0a4be86 --- /dev/null +++ b/client/model/multiplayqueryresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayQueryResult struct { + Success bool `json:"success,omitempty"` + Model MultiplayQueryResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/multiplayqueryresultmodel.go b/client/model/multiplayqueryresultmodel.go new file mode 100644 index 00000000..4298cfed --- /dev/null +++ b/client/model/multiplayqueryresultmodel.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayQueryResultModel struct { + CreatorTokenId string `json:"creatorTokenId,omitempty"` + EndTs int64 `json:"endTs,omitempty"` + Tokens []MultiplayQueryResultModelTokens `json:"tokens,omitempty"` + DataVer string `json:"dataVer,omitempty"` + MpId string `json:"mpId,omitempty"` + Config MultiplayQueryResultModelConfig `json:"config,omitempty"` +} diff --git a/client/model/multiplayqueryresultmodelconfig.go b/client/model/multiplayqueryresultmodelconfig.go new file mode 100644 index 00000000..a28cc655 --- /dev/null +++ b/client/model/multiplayqueryresultmodelconfig.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayQueryResultModelConfig struct { + MaxToken int32 `json:"maxToken,omitempty"` + HostTimeout int32 `json:"hostTimeout,omitempty"` + ConnectTimeout int32 `json:"connectTimeout,omitempty"` + InputTimeout int32 `json:"inputTimeout,omitempty"` +} diff --git a/client/model/multiplayqueryresultmodeltokens.go b/client/model/multiplayqueryresultmodeltokens.go new file mode 100644 index 00000000..8569dd98 --- /dev/null +++ b/client/model/multiplayqueryresultmodeltokens.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type MultiplayQueryResultModelTokens struct { + AccountId string `json:"accountId,omitempty"` + TokenId string `json:"tokenId,omitempty"` + Session string `json:"session,omitempty"` + ControlId int32 `json:"controlId,omitempty"` +} diff --git a/client/model/querygamehangforms.go b/client/model/querygamehangforms.go new file mode 100644 index 00000000..a6967fb5 --- /dev/null +++ b/client/model/querygamehangforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type QueryGameHangForms struct { + // 会话ID + GameSession string `json:"gameSession"` + // 项目应用AK + AppKey string `json:"appKey"` +} diff --git a/client/model/querygamehangresult.go b/client/model/querygamehangresult.go new file mode 100644 index 00000000..c44c151d --- /dev/null +++ b/client/model/querygamehangresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type QueryGameHangResult struct { + Success bool `json:"success,omitempty"` + Model QueryGameHangResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/querygamehangresultmodel.go b/client/model/querygamehangresultmodel.go new file mode 100644 index 00000000..6d268bd2 --- /dev/null +++ b/client/model/querygamehangresultmodel.go @@ -0,0 +1,24 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type QueryGameHangResultModel struct { + // 挂机时长 + Duration int64 `json:"duration,omitempty"` + // 错误Code + Code string `json:"code,omitempty"` + // 开始挂机毫秒时间戳 + StartHangTimestamp int64 `json:"startHangTimestamp,omitempty"` + // 设置是否成功 + Success bool `json:"success,omitempty"` + // 错误Message + Message string `json:"message,omitempty"` + // 会话ID是否在挂机中 + Hanging bool `json:"hanging,omitempty"` + // 会话ID + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/querysessionstatusforms.go b/client/model/querysessionstatusforms.go new file mode 100644 index 00000000..2f3f0fd9 --- /dev/null +++ b/client/model/querysessionstatusforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type QuerySessionStatusForms struct { + // 会话ID + GameSession string `json:"gameSession"` + // 项目应用AK + AppKey string `json:"appKey"` +} diff --git a/client/model/querysessionstatusresult.go b/client/model/querysessionstatusresult.go new file mode 100644 index 00000000..b08e6038 --- /dev/null +++ b/client/model/querysessionstatusresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type QuerySessionStatusResult struct { + Success bool `json:"success,omitempty"` + Model QuerySessionStatusResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/querysessionstatusresultmodel.go b/client/model/querysessionstatusresultmodel.go new file mode 100644 index 00000000..66d557cb --- /dev/null +++ b/client/model/querysessionstatusresultmodel.go @@ -0,0 +1,38 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type QuerySessionStatusResultModel struct { + // 会话归属的游戏ID + GameId string `json:"gameId,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // 会话所属用户ID + AccountId string `json:"accountId,omitempty"` + // 会话调度毫秒时间戳 + DispatchTime int64 `json:"dispatchTime,omitempty"` + // 会话调度用户等级 + UserLevel int32 `json:"userLevel,omitempty"` + // 会话调度大区ID + RegionId string `json:"regionId,omitempty"` + // 是否成功 + Success bool `json:"success,omitempty"` + // 会话归属的租户ID + TenantId int64 `json:"tenantId,omitempty"` + // 会话停止毫秒时间戳 + StopTime int64 `json:"stopTime,omitempty"` + // 用户开始游戏毫秒时间戳 + PlayTime int64 `json:"playTime,omitempty"` + // 会话归属的项目ID + ProjectId string `json:"projectId,omitempty"` + // 会话ID + GameSession string `json:"gameSession,omitempty"` + // 会话当前状态:STARTED: 运行中,STOPPED: 已停止 + Status string `json:"status,omitempty"` +} diff --git a/client/model/replaceslotforms.go b/client/model/replaceslotforms.go new file mode 100644 index 00000000..a7fc9ebc --- /dev/null +++ b/client/model/replaceslotforms.go @@ -0,0 +1,24 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ReplaceSlotForms struct { + ReplaceSession string `json:"replaceSession"` + AccountId string `json:"accountId"` + GameId string `json:"gameId"` + AppKey string `json:"appKey"` + BizParam *string `json:"bizParam,omitempty"` + ClientIp *string `json:"clientIp,omitempty"` + Tags *string `json:"tags,omitempty"` + Codec *int32 `json:"codec,omitempty"` + Resolution *int32 `json:"resolution,omitempty"` + BitRate *int32 `json:"bitRate,omitempty"` + Fps *int32 `json:"fps,omitempty"` + GameCmdParam *string `json:"gameCmdParam,omitempty"` + UserLevel *int32 `json:"userLevel,omitempty"` + StartParam *ReplaceSlotFormsStartParam `json:"startParam,omitempty"` +} diff --git a/client/model/replaceslotformsstartparam.go b/client/model/replaceslotformsstartparam.go new file mode 100644 index 00000000..12dfefb7 Binary files /dev/null and b/client/model/replaceslotformsstartparam.go differ diff --git a/client/model/replaceslotresult.go b/client/model/replaceslotresult.go new file mode 100644 index 00000000..c319651f --- /dev/null +++ b/client/model/replaceslotresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ReplaceSlotResult struct { + Success bool `json:"success,omitempty"` + Model ReplaceSlotResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/replaceslotresultmodel.go b/client/model/replaceslotresultmodel.go new file mode 100644 index 00000000..82997087 --- /dev/null +++ b/client/model/replaceslotresultmodel.go @@ -0,0 +1,17 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type ReplaceSlotResultModel struct { + GameId string `json:"gameId,omitempty"` + AccountId string `json:"accountId,omitempty"` + Code string `json:"code,omitempty"` + RegionId string `json:"regionId,omitempty"` + Success bool `json:"success,omitempty"` + Message string `json:"message,omitempty"` + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/setgamealiveforms.go b/client/model/setgamealiveforms.go new file mode 100644 index 00000000..cacd00fd --- /dev/null +++ b/client/model/setgamealiveforms.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type SetGameAliveForms struct { + // 会话ID + GameSession string `json:"gameSession"` + // 项目应用AK + AppKey string `json:"appKey"` + // 游戏可运行时长 + KeepAlive int64 `json:"keepAlive"` +} diff --git a/client/model/setgamealiveresult.go b/client/model/setgamealiveresult.go new file mode 100644 index 00000000..6e649f1d --- /dev/null +++ b/client/model/setgamealiveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type SetGameAliveResult struct { + Success bool `json:"success,omitempty"` + Model SetGameAliveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/setgamealiveresultmodel.go b/client/model/setgamealiveresultmodel.go new file mode 100644 index 00000000..d00708bf --- /dev/null +++ b/client/model/setgamealiveresultmodel.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type SetGameAliveResultModel struct { + // 错误Code + Code string `json:"code,omitempty"` + // 设置是否成功 + Success bool `json:"success,omitempty"` + // 错误Message + Message string `json:"message,omitempty"` + // 会话ID + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/setgamehangforms.go b/client/model/setgamehangforms.go new file mode 100644 index 00000000..6d618e0c --- /dev/null +++ b/client/model/setgamehangforms.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type SetGameHangForms struct { + // 会话ID + GameSession string `json:"gameSession"` + // 项目应用AK + AppKey string `json:"appKey"` + // 挂机时长 + Duration int64 `json:"duration"` + // 是否踢出游戏中用户 + KickInTheGame *bool `json:"kickInTheGame,omitempty"` +} diff --git a/client/model/setgamehangresult.go b/client/model/setgamehangresult.go new file mode 100644 index 00000000..609c2c1a --- /dev/null +++ b/client/model/setgamehangresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type SetGameHangResult struct { + Success bool `json:"success,omitempty"` + Model SetGameHangResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/setgamehangresultmodel.go b/client/model/setgamehangresultmodel.go new file mode 100644 index 00000000..dd385866 --- /dev/null +++ b/client/model/setgamehangresultmodel.go @@ -0,0 +1,22 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type SetGameHangResultModel struct { + // 挂机时长,单位:秒 + Duration int64 `json:"duration,omitempty"` + // 错误Code + Code string `json:"code,omitempty"` + // 开始挂机毫秒时间戳 + StartHangTimestamp int64 `json:"startHangTimestamp,omitempty"` + // 设置是否成功 + Success bool `json:"success,omitempty"` + // 错误Message + Message string `json:"message,omitempty"` + // 会话ID + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/stopgameforms.go b/client/model/stopgameforms.go new file mode 100644 index 00000000..450810b7 --- /dev/null +++ b/client/model/stopgameforms.go @@ -0,0 +1,20 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type StopGameForms struct { + // 用户id,给到Paas平台和SDK,两者保持一致,全局唯一 + AccountId string `json:"accountId"` + // Paas平台部署的游戏Id + GameId string `json:"gameId"` + // Paas平台AK(应用的AK,非服务端AK) + AppKey string `json:"appKey"` + // 调度成功返回的GameSession + GameSession string `json:"gameSession"` + // 端侧从Paas sdk获取的调度业务参数 + Reason *string `json:"reason,omitempty"` +} diff --git a/client/model/stopgameresult.go b/client/model/stopgameresult.go new file mode 100644 index 00000000..622ab23f --- /dev/null +++ b/client/model/stopgameresult.go @@ -0,0 +1,17 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type StopGameResult struct { + // 是否成功 + Success bool `json:"success,omitempty"` + Model StopGameResultModel `json:"model,omitempty"` + // 错误信息 + MsgInfo string `json:"msgInfo,omitempty"` + // 错误码 + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/stopgameresultmodel.go b/client/model/stopgameresultmodel.go new file mode 100644 index 00000000..300555e6 --- /dev/null +++ b/client/model/stopgameresultmodel.go @@ -0,0 +1,20 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type StopGameResultModel struct { + // Paas平台游戏ID + GameId string `json:"gameId,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 调度执行结果 + Success bool `json:"success,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // 会话标识 + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/stoppreopencontainerforms.go b/client/model/stoppreopencontainerforms.go new file mode 100644 index 00000000..a2c5ff9a --- /dev/null +++ b/client/model/stoppreopencontainerforms.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type StopPreopenContainerForms struct { + // 云游戏项目appKey + AppKey string `json:"appKey"` + // 云游戏平台游戏ID + GameId string `json:"gameId"` + NumberOfBatches *int32 `json:"numberOfBatches,omitempty"` +} diff --git a/client/model/stoppreopencontainerresult.go b/client/model/stoppreopencontainerresult.go new file mode 100644 index 00000000..490bc026 --- /dev/null +++ b/client/model/stoppreopencontainerresult.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type StopPreopenContainerResult struct { + // 是否成功 + Success bool `json:"success,omitempty"` + // 返回值 + Model map[string]string `json:"model,omitempty"` + // 错误信息 + MsgInfo string `json:"msgInfo,omitempty"` + // 错误码 + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/trytogetslotforms.go b/client/model/trytogetslotforms.go new file mode 100644 index 00000000..dd91c570 --- /dev/null +++ b/client/model/trytogetslotforms.go @@ -0,0 +1,40 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotForms struct { + // 用户id,给到Paas平台和SDK,两者保持一致,全局唯一 + AccountId string `json:"accountId"` + // Paas平台部署的游戏Id + GameId string `json:"gameId"` + // Paas平台AK(应用的AK,非服务端AK) + AppKey string `json:"appKey"` + // 需要调度的区域 + RegionId *string `json:"regionId,omitempty"` + // false代表不使用断线重连,开启新游戏 + ReConnect *bool `json:"reConnect,omitempty"` + // 端侧从Paas sdk获取的调度业务参数 + BizParam *string `json:"bizParam,omitempty"` + // App端公网ip + ClientIp *string `json:"clientIp,omitempty"` + // 标签之间用半角逗号分隔 + Tags *string `json:"tags,omitempty"` + // 调度等级 + UserLevel *int32 `json:"userLevel,omitempty"` + // 编码 + Codec *int32 `json:"codec,omitempty"` + // 画质 + Resolution *int32 `json:"resolution,omitempty"` + // 码率 + BitRate *int32 `json:"bitRate,omitempty"` + // 帧率 + Fps *int32 `json:"fps,omitempty"` + // 启动命令,透传至ISV用于启动游戏 + GameCmdParam *string `json:"gameCmdParam,omitempty"` + // 游戏启动设置参数 + StartParam *TryToGetSlotFormsStartParam `json:"startParam,omitempty"` +} diff --git a/client/model/trytogetslotformsstartparam.go b/client/model/trytogetslotformsstartparam.go new file mode 100644 index 00000000..3d0de01a --- /dev/null +++ b/client/model/trytogetslotformsstartparam.go @@ -0,0 +1,46 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotFormsStartParam struct { + // 游戏调度实例等级 + ScheduleUserLevels *string `json:"scheduleUserLevels,omitempty"` + // 控制游戏运行时长 + KeepAlive *int64 `json:"keepAlive,omitempty"` + // 设备分辨率 + DeviceResolution *string `json:"deviceResolution,omitempty"` + // deviceDpi + DeviceDpi *int32 `json:"deviceDpi,omitempty"` + ArchiveUrl *string `json:"archiveUrl,omitempty"` + // 手游输入法控制 + GameInput *string `json:"gameInput,omitempty"` + // 启动待缩放分辨率 + Resolution *string `json:"resolution,omitempty"` + // 游戏中设备掉线后会话保活时长 + KeepDisconnectAlive *int64 `json:"keepDisconnectAlive,omitempty"` + // 应用渠道 + AppChannel *string `json:"appChannel,omitempty"` + // 设备DPR + DeviceDpr *int32 `json:"deviceDpr,omitempty"` + // 游戏初始化路径 + CloudInit *string `json:"cloudInit,omitempty"` + // 游戏脚本id + ScriptId *int32 `json:"scriptId,omitempty"` + // 码率自适应开关 + BitRateSelfAdaption *int32 `json:"bitRateSelfAdaption,omitempty"` + // 游戏中无操作时会话保活时长 + KeepNoPlayAlive *int64 `json:"keepNoPlayAlive,omitempty"` + // 设备号Android + Ssaid *string `json:"ssaid,omitempty"` + ArchiveMd5 *string `json:"archiveMd5,omitempty"` + // 设备id + SysDeviceId *string `json:"sysDeviceId,omitempty"` + // 设备型号 + DeviceModel *string `json:"deviceModel,omitempty"` + // 设备品牌 + DeviceBrand *string `json:"deviceBrand,omitempty"` +} diff --git a/client/model/trytogetslotresult.go b/client/model/trytogetslotresult.go new file mode 100644 index 00000000..9983b7f8 --- /dev/null +++ b/client/model/trytogetslotresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotResult struct { + Success bool `json:"success,omitempty"` + Model TryToGetSlotResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/trytogetslotresultmodel.go b/client/model/trytogetslotresultmodel.go new file mode 100644 index 00000000..dab457c3 --- /dev/null +++ b/client/model/trytogetslotresultmodel.go @@ -0,0 +1,34 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotResultModel struct { + // Paas平台游戏ID + GameId string `json:"gameId,omitempty"` + // 用户id,给到Paas平台和SDK,两者保持一致,全局唯一 + AccountId string `json:"accountId,omitempty"` + // 调度资源所在国家 + Country string `json:"country,omitempty"` + // 返回码 + Code string `json:"code,omitempty"` + // 调度资源所在省份 + Province string `json:"province,omitempty"` + // 分配的region + RegionId string `json:"regionId,omitempty"` + // 调度资源所在城市 + City string `json:"city,omitempty"` + // 调度资源运营商信息 + Operators []TryToGetSlotResultModelOperators `json:"operators,omitempty"` + // 调度执行结果 + Success bool `json:"success,omitempty"` + // 返回信息 + Message string `json:"message,omitempty"` + // 调度结果集 + SlotData string `json:"slotData,omitempty"` + // 会话标识 + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/trytogetslotresultmodeloperators.go b/client/model/trytogetslotresultmodeloperators.go new file mode 100644 index 00000000..594b2673 --- /dev/null +++ b/client/model/trytogetslotresultmodeloperators.go @@ -0,0 +1,16 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotResultModelOperators struct { + // 运营商英文名称 + OperatorEnName string `json:"operatorEnName,omitempty"` + // 运营商IP + OperatorIp string `json:"operatorIp,omitempty"` + // 运营商中文名称 + OperatorCnName string `json:"operatorCnName,omitempty"` +} diff --git a/client/model/trytogetslotsforms.go b/client/model/trytogetslotsforms.go new file mode 100644 index 00000000..c04fa870 --- /dev/null +++ b/client/model/trytogetslotsforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotsForms struct { + AppKey string `json:"appKey"` + ParallelSchedule bool `json:"parallelSchedule"` + Requests []TryToGetSlotsFormsRequests `json:"requests"` +} diff --git a/client/model/trytogetslotsformsrequests.go b/client/model/trytogetslotsformsrequests.go new file mode 100644 index 00000000..37ede230 --- /dev/null +++ b/client/model/trytogetslotsformsrequests.go @@ -0,0 +1,24 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotsFormsRequests struct { + GameId string `json:"gameId,omitempty"` + Fps int32 `json:"fps,omitempty"` + ReConnect bool `json:"reConnect,omitempty"` + Resolution int32 `json:"resolution,omitempty"` + Tags string `json:"tags,omitempty"` + GameCmdParam string `json:"gameCmdParam,omitempty"` + AccountId string `json:"accountId,omitempty"` + Codec int32 `json:"codec,omitempty"` + UserLevel int32 `json:"userLevel,omitempty"` + StartParam TryToGetSlotsFormsRequestsStartParam `json:"startParam,omitempty"` + RegionId string `json:"regionId,omitempty"` + BitRate int32 `json:"bitRate,omitempty"` + ClientIp string `json:"clientIp,omitempty"` + BizParam string `json:"bizParam,omitempty"` +} diff --git a/client/model/trytogetslotsformsrequestsstartparam.go b/client/model/trytogetslotsformsrequestsstartparam.go new file mode 100644 index 00000000..c4c9b8ca --- /dev/null +++ b/client/model/trytogetslotsformsrequestsstartparam.go @@ -0,0 +1,29 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotsFormsRequestsStartParam struct { + ScheduleUserLevels string `json:"scheduleUserLevels,omitempty"` + KeepAlive int64 `json:"keepAlive,omitempty"` + DeviceResolution string `json:"deviceResolution,omitempty"` + DeviceDpi int32 `json:"deviceDpi,omitempty"` + ArchiveUrl string `json:"archiveUrl,omitempty"` + GameInput string `json:"gameInput,omitempty"` + Resolution string `json:"resolution,omitempty"` + KeepDisconnectAlive int64 `json:"keepDisconnectAlive,omitempty"` + AppChannel string `json:"appChannel,omitempty"` + DeviceDpr int32 `json:"deviceDpr,omitempty"` + CloudInit string `json:"cloudInit,omitempty"` + ScriptId int32 `json:"scriptId,omitempty"` + BitRateSelfAdaption int32 `json:"bitRateSelfAdaption,omitempty"` + KeepNoPlayAlive int64 `json:"keepNoPlayAlive,omitempty"` + Ssaid string `json:"ssaid,omitempty"` + ArchiveMd5 string `json:"archiveMd5,omitempty"` + SysDeviceId string `json:"sysDeviceId,omitempty"` + DeviceModel string `json:"deviceModel,omitempty"` + DeviceBrand string `json:"deviceBrand,omitempty"` +} diff --git a/client/model/trytogetslotsresult.go b/client/model/trytogetslotsresult.go new file mode 100644 index 00000000..8f0ddf3f --- /dev/null +++ b/client/model/trytogetslotsresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotsResult struct { + Success bool `json:"success,omitempty"` + Model TryToGetSlotsResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/trytogetslotsresultmodel.go b/client/model/trytogetslotsresultmodel.go new file mode 100644 index 00000000..4a174da0 --- /dev/null +++ b/client/model/trytogetslotsresultmodel.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotsResultModel struct { + Code string `json:"code,omitempty"` + Success bool `json:"success,omitempty"` + Responses []TryToGetSlotsResultModelResponses `json:"responses,omitempty"` + Message string `json:"message,omitempty"` +} diff --git a/client/model/trytogetslotsresultmodelresponses.go b/client/model/trytogetslotsresultmodelresponses.go new file mode 100644 index 00000000..50793610 --- /dev/null +++ b/client/model/trytogetslotsresultmodelresponses.go @@ -0,0 +1,18 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type TryToGetSlotsResultModelResponses struct { + GameId string `json:"gameId,omitempty"` + AccountId string `json:"accountId,omitempty"` + Code string `json:"code,omitempty"` + RegionId string `json:"regionId,omitempty"` + Success bool `json:"success,omitempty"` + Message string `json:"message,omitempty"` + SlotData string `json:"slotData,omitempty"` + GameSession string `json:"gameSession,omitempty"` +} diff --git a/client/model/updatepreopenstrategyforms.go b/client/model/updatepreopenstrategyforms.go new file mode 100644 index 00000000..32e5b36b --- /dev/null +++ b/client/model/updatepreopenstrategyforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UpdatePreopenStrategyForms struct { + AppKey string `json:"appKey"` + GameId string `json:"gameId"` + PreStartCmd *string `json:"preStartCmd,omitempty"` +} diff --git a/client/model/updatepreopenstrategyresult.go b/client/model/updatepreopenstrategyresult.go new file mode 100644 index 00000000..a86b06b2 --- /dev/null +++ b/client/model/updatepreopenstrategyresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UpdatePreopenStrategyResult struct { + Success bool `json:"success,omitempty"` + Model map[string]string `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/usercontrollerdeletegamearchiveforms.go b/client/model/usercontrollerdeletegamearchiveforms.go new file mode 100644 index 00000000..803a5a10 --- /dev/null +++ b/client/model/usercontrollerdeletegamearchiveforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerDeleteGameArchiveForms struct { + AccountId string `json:"accountId"` + GameId string `json:"gameId"` + ArchiveId string `json:"archiveId"` +} diff --git a/client/model/usercontrollerdeletegamearchiveresult.go b/client/model/usercontrollerdeletegamearchiveresult.go new file mode 100644 index 00000000..469ef31b --- /dev/null +++ b/client/model/usercontrollerdeletegamearchiveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerDeleteGameArchiveResult struct { + Success bool `json:"success,omitempty"` + Model UsercontrollerDeleteGameArchiveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/usercontrollerdeletegamearchiveresultmodel.go b/client/model/usercontrollerdeletegamearchiveresultmodel.go new file mode 100644 index 00000000..9aa9b73e --- /dev/null +++ b/client/model/usercontrollerdeletegamearchiveresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerDeleteGameArchiveResultModel struct { + Status int32 `json:"status,omitempty"` +} diff --git a/client/model/usercontrollergetgametrialsurplusdurationforms.go b/client/model/usercontrollergetgametrialsurplusdurationforms.go new file mode 100644 index 00000000..fcf20791 --- /dev/null +++ b/client/model/usercontrollergetgametrialsurplusdurationforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetGameTrialSurplusDurationForms struct { + // 账号id + AccountId string `json:"accountId"` + GameId string `json:"gameId"` + ProjectId string `json:"projectId"` +} diff --git a/client/model/usercontrollergetgametrialsurplusdurationresult.go b/client/model/usercontrollergetgametrialsurplusdurationresult.go new file mode 100644 index 00000000..76c302d1 --- /dev/null +++ b/client/model/usercontrollergetgametrialsurplusdurationresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetGameTrialSurplusDurationResult struct { + Success bool `json:"success,omitempty"` + Model UsercontrollerGetGameTrialSurplusDurationResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/usercontrollergetgametrialsurplusdurationresultmodel.go b/client/model/usercontrollergetgametrialsurplusdurationresultmodel.go new file mode 100644 index 00000000..25e4652a --- /dev/null +++ b/client/model/usercontrollergetgametrialsurplusdurationresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetGameTrialSurplusDurationResultModel struct { + TrialPolicyResponses []UsercontrollerGetGameTrialSurplusDurationResultModelTrialPolicyResponses `json:"trialPolicyResponses,omitempty"` +} diff --git a/client/model/usercontrollergetgametrialsurplusdurationresultmodeltrialpolicyresponses.go b/client/model/usercontrollergetgametrialsurplusdurationresultmodeltrialpolicyresponses.go new file mode 100644 index 00000000..bf4ccb94 --- /dev/null +++ b/client/model/usercontrollergetgametrialsurplusdurationresultmodeltrialpolicyresponses.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetGameTrialSurplusDurationResultModelTrialPolicyResponses struct { + // 策略类型 + PolicyType string `json:"policyType,omitempty"` + // 剩余试玩时长 + SurplusDurationInSecond int64 `json:"surplusDurationInSecond,omitempty"` +} diff --git a/client/model/usercontrollergetusergamearchiveforms.go b/client/model/usercontrollergetusergamearchiveforms.go new file mode 100644 index 00000000..7db8a9d7 --- /dev/null +++ b/client/model/usercontrollergetusergamearchiveforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetUserGameArchiveForms struct { + AccountId string `json:"accountId"` + GameId string `json:"gameId"` + ProjectId string `json:"projectId"` +} diff --git a/client/model/usercontrollergetusergamearchiveresult.go b/client/model/usercontrollergetusergamearchiveresult.go new file mode 100644 index 00000000..8f6643f7 --- /dev/null +++ b/client/model/usercontrollergetusergamearchiveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetUserGameArchiveResult struct { + Success bool `json:"success,omitempty"` + Model UsercontrollerGetUserGameArchiveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/usercontrollergetusergamearchiveresultmodel.go b/client/model/usercontrollergetusergamearchiveresultmodel.go new file mode 100644 index 00000000..cbca1e32 --- /dev/null +++ b/client/model/usercontrollergetusergamearchiveresultmodel.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetUserGameArchiveResultModel struct { + UserGameArchiveDTO UsercontrollerGetUserGameArchiveResultModelUserGameArchiveDto `json:"userGameArchiveDTO,omitempty"` + DownloadUrl string `json:"downloadUrl,omitempty"` + ObjectMD5 string `json:"objectMD5,omitempty"` +} diff --git a/client/model/usercontrollergetusergamearchiveresultmodelusergamearchivedto.go b/client/model/usercontrollergetusergamearchiveresultmodelusergamearchivedto.go new file mode 100644 index 00000000..20c11a7d --- /dev/null +++ b/client/model/usercontrollergetusergamearchiveresultmodelusergamearchivedto.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerGetUserGameArchiveResultModelUserGameArchiveDto struct { + // 游戏会话ID + GameSessionId string `json:"gameSessionId,omitempty"` + // 存档生成时间 + GmtCreate int64 `json:"gmtCreate,omitempty"` +} diff --git a/client/model/usercontrollerlistlatestgamearchiveforms.go b/client/model/usercontrollerlistlatestgamearchiveforms.go new file mode 100644 index 00000000..78eb823a --- /dev/null +++ b/client/model/usercontrollerlistlatestgamearchiveforms.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerListLatestGameArchiveForms struct { + AccountId string `json:"accountId"` + GameId string `json:"gameId"` + PageSize *int32 `json:"pageSize,omitempty"` + PageNumber *int32 `json:"pageNumber,omitempty"` + TagStatus *int32 `json:"tagStatus,omitempty"` +} diff --git a/client/model/usercontrollerlistlatestgamearchiveresult.go b/client/model/usercontrollerlistlatestgamearchiveresult.go new file mode 100644 index 00000000..63df4dba --- /dev/null +++ b/client/model/usercontrollerlistlatestgamearchiveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerListLatestGameArchiveResult struct { + Success bool `json:"success,omitempty"` + Model UsercontrollerListLatestGameArchiveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/usercontrollerlistlatestgamearchiveresultmodel.go b/client/model/usercontrollerlistlatestgamearchiveresultmodel.go new file mode 100644 index 00000000..f0b82705 --- /dev/null +++ b/client/model/usercontrollerlistlatestgamearchiveresultmodel.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerListLatestGameArchiveResultModel struct { + PageNumber int32 `json:"pageNumber,omitempty"` + RequestId string `json:"requestId,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalCount int32 `json:"totalCount,omitempty"` + Items []UsercontrollerListLatestGameArchiveResultModelItems `json:"items,omitempty"` +} diff --git a/client/model/usercontrollerlistlatestgamearchiveresultmodelitems.go b/client/model/usercontrollerlistlatestgamearchiveresultmodelitems.go new file mode 100644 index 00000000..f81646d2 --- /dev/null +++ b/client/model/usercontrollerlistlatestgamearchiveresultmodelitems.go @@ -0,0 +1,15 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerListLatestGameArchiveResultModelItems struct { + GameId string `json:"gameId,omitempty"` + AccountId string `json:"accountId,omitempty"` + ArchiveTime int64 `json:"archiveTime,omitempty"` + TagStatus int32 `json:"tagStatus,omitempty"` + ArchiveId string `json:"archiveId,omitempty"` +} diff --git a/client/model/usercontrollerrestoregamearchiveforms.go b/client/model/usercontrollerrestoregamearchiveforms.go new file mode 100644 index 00000000..29ccf8e8 --- /dev/null +++ b/client/model/usercontrollerrestoregamearchiveforms.go @@ -0,0 +1,13 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerRestoreGameArchiveForms struct { + AccountId string `json:"accountId"` + GameId string `json:"gameId"` + ArchiveId string `json:"archiveId"` +} diff --git a/client/model/usercontrollerrestoregamearchiveresult.go b/client/model/usercontrollerrestoregamearchiveresult.go new file mode 100644 index 00000000..641a93ef --- /dev/null +++ b/client/model/usercontrollerrestoregamearchiveresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerRestoreGameArchiveResult struct { + Success bool `json:"success,omitempty"` + Model UsercontrollerRestoreGameArchiveResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/usercontrollerrestoregamearchiveresultmodel.go b/client/model/usercontrollerrestoregamearchiveresultmodel.go new file mode 100644 index 00000000..68494cfb --- /dev/null +++ b/client/model/usercontrollerrestoregamearchiveresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerRestoreGameArchiveResultModel struct { + Status int32 `json:"status,omitempty"` +} diff --git a/client/model/usercontrollerupdategamearchivetagstatusforms.go b/client/model/usercontrollerupdategamearchivetagstatusforms.go new file mode 100644 index 00000000..87522e51 --- /dev/null +++ b/client/model/usercontrollerupdategamearchivetagstatusforms.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerUpdateGameArchiveTagStatusForms struct { + AccountId string `json:"accountId"` + GameId string `json:"gameId"` + ArchiveId string `json:"archiveId"` + TagStatus int32 `json:"tagStatus"` +} diff --git a/client/model/usercontrollerupdategamearchivetagstatusresult.go b/client/model/usercontrollerupdategamearchivetagstatusresult.go new file mode 100644 index 00000000..e24ab76c --- /dev/null +++ b/client/model/usercontrollerupdategamearchivetagstatusresult.go @@ -0,0 +1,14 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerUpdateGameArchiveTagStatusResult struct { + Success bool `json:"success,omitempty"` + Model UsercontrollerUpdateGameArchiveTagStatusResultModel `json:"model,omitempty"` + MsgInfo string `json:"msgInfo,omitempty"` + MsgCode string `json:"msgCode,omitempty"` +} diff --git a/client/model/usercontrollerupdategamearchivetagstatusresultmodel.go b/client/model/usercontrollerupdategamearchivetagstatusresultmodel.go new file mode 100644 index 00000000..9bd8a975 --- /dev/null +++ b/client/model/usercontrollerupdategamearchivetagstatusresultmodel.go @@ -0,0 +1,11 @@ +// Package client +/* + * YuanJing OpenAPI SDK for Go + * + * + */ +package model + +type UsercontrollerUpdateGameArchiveTagStatusResultModel struct { + Status int32 `json:"status,omitempty"` +} diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..7f281e33 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/aliyun/alibabacloud-yjopenapi-go-client + +go 1.15