1// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//    http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package v20190929
16
17import (
18    "encoding/json"
19    tcerr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
20    tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
21)
22
23type DismissRoomRequest struct {
24	*tchttp.BaseRequest
25
26	// 表示游戏资源唯一 ID, 由后台自动分配, 无法修改。
27	GameId *string `json:"GameId,omitempty" name:"GameId"`
28
29	// 表示游戏房间唯一ID。
30	RoomId *string `json:"RoomId,omitempty" name:"RoomId"`
31}
32
33func (r *DismissRoomRequest) ToJsonString() string {
34    b, _ := json.Marshal(r)
35    return string(b)
36}
37
38// FromJsonString It is highly **NOT** recommended to use this function
39// because it has no param check, nor strict type check
40func (r *DismissRoomRequest) FromJsonString(s string) error {
41	f := make(map[string]interface{})
42	if err := json.Unmarshal([]byte(s), &f); err != nil {
43		return err
44	}
45	delete(f, "GameId")
46	delete(f, "RoomId")
47	if len(f) > 0 {
48		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DismissRoomRequest has unknown keys!", "")
49	}
50	return json.Unmarshal([]byte(s), &r)
51}
52
53type DismissRoomResponse struct {
54	*tchttp.BaseResponse
55	Response *struct {
56
57		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
58		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
59	} `json:"Response"`
60}
61
62func (r *DismissRoomResponse) ToJsonString() string {
63    b, _ := json.Marshal(r)
64    return string(b)
65}
66
67// FromJsonString It is highly **NOT** recommended to use this function
68// because it has no param check, nor strict type check
69func (r *DismissRoomResponse) FromJsonString(s string) error {
70	return json.Unmarshal([]byte(s), &r)
71}
72