/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('imp', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model AddMemberRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识'),
  fromUserId?: string(name='FromUserId', description='邀请者用户ID'),
  toUserId?: string(name='ToUserId', description='被邀请用户ID'),
}

model AddMemberResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model AddMemberResponse = {
  headers: map[string]string(name='headers'),
  body: AddMemberResponseBody(name='body'),
}

async function addMemberWithOptions(request: AddMemberRequest, runtime: Util.RuntimeOptions): AddMemberResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AddMember', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function addMember(request: AddMemberRequest): AddMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return addMemberWithOptions(request, runtime);
}

model AgreeLinkMicRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识'),
  fromUserId?: string(name='FromUserId', description='同意者用户ID'),
  toUserId?: string(name='ToUserId', description='被同意用户ID'),
}

model AgreeLinkMicResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model AgreeLinkMicResponse = {
  headers: map[string]string(name='headers'),
  body: AgreeLinkMicResponseBody(name='body'),
}

async function agreeLinkMicWithOptions(request: AgreeLinkMicRequest, runtime: Util.RuntimeOptions): AgreeLinkMicResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AgreeLinkMic', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function agreeLinkMic(request: AgreeLinkMicRequest): AgreeLinkMicResponse {
  var runtime = new Util.RuntimeOptions{};
  return agreeLinkMicWithOptions(request, runtime);
}

model ApplyLinkMicRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识'),
  userId?: string(name='UserId', description='申请连麦用户'),
}

model ApplyLinkMicResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model ApplyLinkMicResponse = {
  headers: map[string]string(name='headers'),
  body: ApplyLinkMicResponseBody(name='body'),
}

async function applyLinkMicWithOptions(request: ApplyLinkMicRequest, runtime: Util.RuntimeOptions): ApplyLinkMicResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ApplyLinkMic', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function applyLinkMic(request: ApplyLinkMicRequest): ApplyLinkMicResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyLinkMicWithOptions(request, runtime);
}

model AttachStandardRoomHttpsCertificateRequest {
  appId?: string(name='AppId', description='应用唯一标识'),
  certificatePrivateKey?: string(name='CertificatePrivateKey', description='NGINX格式证书私钥'),
  certificatePublicKey?: string(name='CertificatePublicKey', description='NGINX格式证书公钥'),
  domainName?: string(name='DomainName', description='使用证书的确切域名'),
}

model AttachStandardRoomHttpsCertificateResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    certificateId?: string(name='CertificateId', description='证书Id'),
  }(name='Result', description='返回结果'),
}

model AttachStandardRoomHttpsCertificateResponse = {
  headers: map[string]string(name='headers'),
  body: AttachStandardRoomHttpsCertificateResponseBody(name='body'),
}

async function attachStandardRoomHttpsCertificateWithOptions(request: AttachStandardRoomHttpsCertificateRequest, runtime: Util.RuntimeOptions): AttachStandardRoomHttpsCertificateResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('AttachStandardRoomHttpsCertificate', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function attachStandardRoomHttpsCertificate(request: AttachStandardRoomHttpsCertificateRequest): AttachStandardRoomHttpsCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachStandardRoomHttpsCertificateWithOptions(request, runtime);
}

model BanAllCommentRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由调用CreateRoom返回。'),
  userId?: string(name='UserId', description='用户在房间内的唯一标识'),
}

model BanAllCommentResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: boolean(name='Result', description='操作成功标识'),
}

model BanAllCommentResponse = {
  headers: map[string]string(name='headers'),
  body: BanAllCommentResponseBody(name='body'),
}

async function banAllCommentWithOptions(request: BanAllCommentRequest, runtime: Util.RuntimeOptions): BanAllCommentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BanAllComment', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function banAllComment(request: BanAllCommentRequest): BanAllCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return banAllCommentWithOptions(request, runtime);
}

model BanCommentRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  banCommentTime?: long(name='BanCommentTime', description='禁言时长（秒）'),
  banCommentUser?: string(name='BanCommentUser', description='被禁言的用户在房间内的唯一标识'),
  roomId?: string(name='RoomId', description='房间唯一标识，由调用CreateRoom返回。'),
  userId?: string(name='UserId', description='用户在房间内的唯一标识'),
}

model BanCommentResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: boolean(name='Result', description='操作是否成功'),
}

model BanCommentResponse = {
  headers: map[string]string(name='headers'),
  body: BanCommentResponseBody(name='body'),
}

async function banCommentWithOptions(request: BanCommentRequest, runtime: Util.RuntimeOptions): BanCommentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BanComment', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function banComment(request: BanCommentRequest): BanCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return banCommentWithOptions(request, runtime);
}

model CancelApplyLinkMicRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识'),
  userId?: string(name='UserId', description='申请连麦用户'),
}

model CancelApplyLinkMicResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model CancelApplyLinkMicResponse = {
  headers: map[string]string(name='headers'),
  body: CancelApplyLinkMicResponseBody(name='body'),
}

async function cancelApplyLinkMicWithOptions(request: CancelApplyLinkMicRequest, runtime: Util.RuntimeOptions): CancelApplyLinkMicResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CancelApplyLinkMic', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function cancelApplyLinkMic(request: CancelApplyLinkMicRequest): CancelApplyLinkMicResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelApplyLinkMicWithOptions(request, runtime);
}

model CancelBanAllCommentRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由调用CreateRoom返回。'),
  userId?: string(name='UserId', description='用户在房间内的唯一标识'),
}

model CancelBanAllCommentResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: boolean(name='Result', description='操作成功标识'),
}

model CancelBanAllCommentResponse = {
  headers: map[string]string(name='headers'),
  body: CancelBanAllCommentResponseBody(name='body'),
}

async function cancelBanAllCommentWithOptions(request: CancelBanAllCommentRequest, runtime: Util.RuntimeOptions): CancelBanAllCommentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CancelBanAllComment', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function cancelBanAllComment(request: CancelBanAllCommentRequest): CancelBanAllCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelBanAllCommentWithOptions(request, runtime);
}

model CancelBanCommentRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  banCommentUser?: string(name='BanCommentUser', description='取消禁言的用户唯一标识'),
  roomId?: string(name='RoomId', description='房间唯一标识，由调用CreateRoom返回。'),
  userId?: string(name='UserId', description='用户在房间内的唯一标识'),
}

model CancelBanCommentResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: boolean(name='Result', description='操作成功标识'),
}

model CancelBanCommentResponse = {
  headers: map[string]string(name='headers'),
  body: CancelBanCommentResponseBody(name='body'),
}

async function cancelBanCommentWithOptions(request: CancelBanCommentRequest, runtime: Util.RuntimeOptions): CancelBanCommentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CancelBanComment', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function cancelBanComment(request: CancelBanCommentRequest): CancelBanCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelBanCommentWithOptions(request, runtime);
}

model CreateAppRequest {
  appName?: string(name='AppName', description='应用名称'),
  appTemplateId?: string(name='AppTemplateId', description='模板ID'),
}

model CreateAppResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    appId?: string(name='AppId', description='应用唯一标示'),
  }(name='Result', description='返回结果'),
}

model CreateAppResponse = {
  headers: map[string]string(name='headers'),
  body: CreateAppResponseBody(name='body'),
}

async function createAppWithOptions(request: CreateAppRequest, runtime: Util.RuntimeOptions): CreateAppResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateApp', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createApp(request: CreateAppRequest): CreateAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppWithOptions(request, runtime);
}

model CreateAppTemplateRequest {
  appTemplateName?: string(name='AppTemplateName', description='应用模板名称'),
  componentList?: [ string ](name='ComponentList', description='组件列表'),
  integrationMode?: string(name='IntegrationMode', description='集成方式（一体化SDK：paasSDK，样板间：standardRoom）'),
  scene?: string(name='Scene', description='应用模板场景，电商business，课堂classroom'),
}

model CreateAppTemplateShrinkRequest {
  appTemplateName?: string(name='AppTemplateName', description='应用模板名称'),
  componentListShrink?: string(name='ComponentList', description='组件列表'),
  integrationMode?: string(name='IntegrationMode', description='集成方式（一体化SDK：paasSDK，样板间：standardRoom）'),
  scene?: string(name='Scene', description='应用模板场景，电商business，课堂classroom'),
}

model CreateAppTemplateResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标示'),
  }(name='Result', description='返回结果'),
}

model CreateAppTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: CreateAppTemplateResponseBody(name='body'),
}

async function createAppTemplateWithOptions(tmpReq: CreateAppTemplateRequest, runtime: Util.RuntimeOptions): CreateAppTemplateResponse {
  Util.validateModel(tmpReq);
  var request = new CreateAppTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.componentList)) {
    request.componentListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.componentList, 'ComponentList', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateAppTemplate', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createAppTemplate(request: CreateAppTemplateRequest): CreateAppTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppTemplateWithOptions(request, runtime);
}

model CreateClassRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  createNickname?: string(name='CreateNickname', description='创建人用户昵称。'),
  createUserId?: string(name='CreateUserId', description='创建人用户ID。'),
  title?: string(name='Title', description='课堂标题'),
}

model CreateClassResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    classId?: string(name='ClassId', description='课堂唯一标识。'),
    confId?: string(name='ConfId', description='连麦会议唯一标识。'),
    createNickname?: string(name='CreateNickname', description='创建人昵称。'),
    createUserId?: string(name='CreateUserId', description='创建人ID。'),
    liveId?: string(name='LiveId', description='直播的唯一标识ID。'),
    roomId?: string(name='RoomId', description='房间ID'),
    status?: int32(name='Status', description='课堂状态，0:未开始 1:上课中 2:已下课。'),
    title?: string(name='Title', description='课堂标题。'),
    whiteboardId?: string(name='WhiteboardId', description='白板ID'),
    whiteboardRecordId?: string(name='WhiteboardRecordId', description='白板录制ID'),
  }(name='Result', description='API请求的返回结果结构体。'),
}

model CreateClassResponse = {
  headers: map[string]string(name='headers'),
  body: CreateClassResponseBody(name='body'),
}

async function createClassWithOptions(request: CreateClassRequest, runtime: Util.RuntimeOptions): CreateClassResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateClass', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createClass(request: CreateClassRequest): CreateClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClassWithOptions(request, runtime);
}

model CreateConferenceRequest {
  appId?: string(name='AppId', description='应用唯一标识，可以包含小写字母、数字，长度为6个字符。'),
  roomId?: string(name='RoomId', description='房间ID，最大长度36个字符，传空值，则随机生成一个房间ID。'),
  title?: string(name='Title', description='会议标题，支持中英文，最大长度256位。'),
  userId?: string(name='UserId', description='创建会议用户。'),
}

model CreateConferenceResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    conferenceId?: string(name='ConferenceId', description='会议的唯一标识ID。'),
  }(name='Result'),
}

model CreateConferenceResponse = {
  headers: map[string]string(name='headers'),
  body: CreateConferenceResponseBody(name='body'),
}

async function createConferenceWithOptions(request: CreateConferenceRequest, runtime: Util.RuntimeOptions): CreateConferenceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateConference', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createConference(request: CreateConferenceRequest): CreateConferenceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createConferenceWithOptions(request, runtime);
}

model CreateLiveRequest {
  anchorId?: string(name='AnchorId', description='主播ID，支持中英文，最大长度128位，缺省时主播为当前创建直播用户。'),
  appId?: string(name='AppId', description='应用唯一标识，可以包含小写字母、数字，长度为6个字符。'),
  codeLevel?: int32(name='CodeLevel', description='直播推流码率，缺省时默认为3。取值：  -1：流畅lld。 1：标清lsd。 2：高清lhd。 3：超清lud。'),
  introduction?: string(name='Introduction', description='直播简介，支持中英文，最大长度2048位。'),
  liveId?: string(name='LiveId', description='直播资源的唯一标识ID，缺省时系统自动生成36位随机uuid字符串。'),
  roomId?: string(name='RoomId', description='房间ID，最大长度36个字符，传空值，则随机生成一个房间ID。'),
  title?: string(name='Title', description='直播标题，支持中英文，最大长度256位。'),
  userId?: string(name='UserId', description='创建直播用户。'),
}

model CreateLiveResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    liveId?: string(name='LiveId', description='直播的唯一标识ID。'),
  }(name='Result'),
}

model CreateLiveResponse = {
  headers: map[string]string(name='headers'),
  body: CreateLiveResponseBody(name='body'),
}

async function createLiveWithOptions(request: CreateLiveRequest, runtime: Util.RuntimeOptions): CreateLiveResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateLive', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createLive(request: CreateLiveRequest): CreateLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveWithOptions(request, runtime);
}

model CreateLiveRoomRequest {
  anchorId?: string(name='AnchorId', description='主播id，仅支持英文和数字，最大长度36位。'),
  anchorNick?: string(name='AnchorNick', description='主播昵称。'),
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  coverUrl?: string(name='CoverUrl', description='封面，支持图片地址链接格式'),
  extension?: map[string]string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  notice?: string(name='Notice', description='公告，支持中英文，最大长度256位。'),
  title?: string(name='Title', description='标题，支持中英文，最大长度32位。'),
  userId?: string(name='UserId', description='操作人ID。'),
}

model CreateLiveRoomShrinkRequest {
  anchorId?: string(name='AnchorId', description='主播id，仅支持英文和数字，最大长度36位。'),
  anchorNick?: string(name='AnchorNick', description='主播昵称。'),
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  coverUrl?: string(name='CoverUrl', description='封面，支持图片地址链接格式'),
  extensionShrink?: string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  notice?: string(name='Notice', description='公告，支持中英文，最大长度256位。'),
  title?: string(name='Title', description='标题，支持中英文，最大长度32位。'),
  userId?: string(name='UserId', description='操作人ID。'),
}

model CreateLiveRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    anchorId?: string(name='AnchorId', description='主播ID。'),
    anchorNick?: string(name='AnchorNick', description='主播昵称。'),
    appId?: string(name='AppId', description='应用ID。'),
    artcInfo?: {
      artcH5Url?: string(name='ArtcH5Url', description='RTS转码流地址，推荐web端使用。'),
      artcUrl?: string(name='ArtcUrl', description='RTS原码流地址，推荐移动端使用。'),
    }(name='ArtcInfo', description='RTS低延迟播流信息。'),
    chatId?: string(name='ChatId', description='聊天ID。'),
    coverUrl?: string(name='CoverUrl', description='封面。'),
    extension?: map[string]string(name='Extension', description='直播拓展字段。'),
    hlsUrl?: string(name='HlsUrl', description='原画HLS播放地址。'),
    liveId?: string(name='LiveId', description='直播ID。'),
    liveUrl?: string(name='LiveUrl', description='直播拉流地址。'),
    notice?: string(name='Notice', description='公告。'),
    playbackUrl?: string(name='PlaybackUrl', description='直播回放地址。'),
    pluginInstanceInfoList?: [ 
      {
        createTime?: long(name='CreateTime', description='插件实例创建时间戳，单位：毫秒。'),
        extension?: map[string]string(name='Extension', description='插件拓展字段。'),
        pluginId?: string(name='PluginId', description='插件实例唯一标识。'),
        pluginType?: string(name='PluginType', description='插件唯一标识，取值：live-直播，wb-白板，chat-聊天，rtc。'),
      }
    ](name='PluginInstanceInfoList', description='活跃插件列表。'),
    pushUrl?: string(name='PushUrl', description='直播推流地址。'),
    roomId?: string(name='RoomId', description='房间ID。'),
    title?: string(name='Title', description='标题。'),
  }(name='Result', description='创建场景化直播返回的结果。'),
}

model CreateLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  body: CreateLiveRoomResponseBody(name='body'),
}

async function createLiveRoomWithOptions(tmpReq: CreateLiveRoomRequest, runtime: Util.RuntimeOptions): CreateLiveRoomResponse {
  Util.validateModel(tmpReq);
  var request = new CreateLiveRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateLiveRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createLiveRoom(request: CreateLiveRoomRequest): CreateLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveRoomWithOptions(request, runtime);
}

model CreateRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  extension?: map[string]string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  notice?: string(name='Notice', description='房间公告，支持中英文，最大长度256位。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由字母、数字、符号.和-组成，最大长度36位，传空则随机生成一个房间id。'),
  roomOwnerId?: string(name='RoomOwnerId', description='房主用户id，仅支持英文和数字，最大长度36位。'),
  templateId?: string(name='TemplateId', description='房间模板唯一标识，当前支持的取值：default，传空默认为default。'),
  title?: string(name='Title', description='房间标题，支持中英文，最大长度32位。'),
}

model CreateRoomShrinkRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  extensionShrink?: string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  notice?: string(name='Notice', description='房间公告，支持中英文，最大长度256位。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由字母、数字、符号.和-组成，最大长度36位，传空则随机生成一个房间id。'),
  roomOwnerId?: string(name='RoomOwnerId', description='房主用户id，仅支持英文和数字，最大长度36位。'),
  templateId?: string(name='TemplateId', description='房间模板唯一标识，当前支持的取值：default，传空默认为default。'),
  title?: string(name='Title', description='房间标题，支持中英文，最大长度32位。'),
}

model CreateRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    roomId?: string(name='RoomId', description='房间id'),
  }(name='Result', description='API请求的返回结果结构体。'),
}

model CreateRoomResponse = {
  headers: map[string]string(name='headers'),
  body: CreateRoomResponseBody(name='body'),
}

async function createRoomWithOptions(tmpReq: CreateRoomRequest, runtime: Util.RuntimeOptions): CreateRoomResponse {
  Util.validateModel(tmpReq);
  var request = new CreateRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createRoom(request: CreateRoomRequest): CreateRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRoomWithOptions(request, runtime);
}

model DeleteAppRequest {
  appId?: string(name='AppId', description='应用唯一标识'),
}

model DeleteAppResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model DeleteAppResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteAppResponseBody(name='body'),
}

async function deleteAppWithOptions(request: DeleteAppRequest, runtime: Util.RuntimeOptions): DeleteAppResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteApp', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteApp(request: DeleteAppRequest): DeleteAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppWithOptions(request, runtime);
}

model DeleteAppTemplateRequest {
  appTemplateId?: string(name='AppTemplateId', description='模板唯一标识'),
}

model DeleteAppTemplateResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model DeleteAppTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteAppTemplateResponseBody(name='body'),
}

async function deleteAppTemplateWithOptions(request: DeleteAppTemplateRequest, runtime: Util.RuntimeOptions): DeleteAppTemplateResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteAppTemplate', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteAppTemplate(request: DeleteAppTemplateRequest): DeleteAppTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppTemplateWithOptions(request, runtime);
}

model DeleteClassRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  classId?: string(name='ClassId', description='课堂唯一标识。'),
  userId?: string(name='UserId', description='操作人用户ID，仅支持中英文数字，下划线，中划线，1~36个字符。'),
}

model DeleteClassResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model DeleteClassResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteClassResponseBody(name='body'),
}

async function deleteClassWithOptions(request: DeleteClassRequest, runtime: Util.RuntimeOptions): DeleteClassResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteClass', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteClass(request: DeleteClassRequest): DeleteClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClassWithOptions(request, runtime);
}

model DeleteCommentRequest {
  appId?: string(name='AppId', description='应用唯一标识，可以包含小写字母、数字，长度为6个字符。'),
  commentIdList?: [ string ](name='CommentIdList', description='需要删除的弹幕id列表'),
  roomId?: string(name='RoomId', description='直播间唯一标识，在调用CreateRoom返回。'),
  userId?: string(name='UserId', description='删除的操作人ID。'),
}

model DeleteCommentResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    deleteResult?: boolean(name='DeleteResult', description='删除的结果'),
  }(name='Result', description='调用删除直播间弹幕的返回结果。'),
}

model DeleteCommentResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteCommentResponseBody(name='body'),
}

async function deleteCommentWithOptions(request: DeleteCommentRequest, runtime: Util.RuntimeOptions): DeleteCommentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteComment', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteComment(request: DeleteCommentRequest): DeleteCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCommentWithOptions(request, runtime);
}

model DeleteConferenceRequest {
  appId?: string(name='AppId', description='租户名'),
  conferenceId?: string(name='ConferenceId', description='会议资源的唯一标识ID'),
  roomId?: string(name='RoomId', description='房间ID，最大长度36位'),
  userId?: string(name='UserId', description='创建会议用户ID'),
}

model DeleteConferenceResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model DeleteConferenceResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteConferenceResponseBody(name='body'),
}

async function deleteConferenceWithOptions(request: DeleteConferenceRequest, runtime: Util.RuntimeOptions): DeleteConferenceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteConference', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteConference(request: DeleteConferenceRequest): DeleteConferenceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteConferenceWithOptions(request, runtime);
}

model DeleteLiveRequest {
  liveId?: string(name='LiveId', description='直播资源的唯一标识ID'),
}

model DeleteLiveResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model DeleteLiveResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteLiveResponseBody(name='body'),
}

async function deleteLiveWithOptions(request: DeleteLiveRequest, runtime: Util.RuntimeOptions): DeleteLiveResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteLive', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteLive(request: DeleteLiveRequest): DeleteLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveWithOptions(request, runtime);
}

model DeleteLiveRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveId?: string(name='LiveId', description='直播ID。'),
  userId?: string(name='UserId', description='操作人ID。'),
}

model DeleteLiveRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model DeleteLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteLiveRoomResponseBody(name='body'),
}

async function deleteLiveRoomWithOptions(request: DeleteLiveRoomRequest, runtime: Util.RuntimeOptions): DeleteLiveRoomResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteLiveRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteLiveRoom(request: DeleteLiveRoomRequest): DeleteLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveRoomWithOptions(request, runtime);
}

model DeleteRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由字母、数字、符号.和-组成，最大长度36位。'),
}

model DeleteRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model DeleteRoomResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteRoomResponseBody(name='body'),
}

async function deleteRoomWithOptions(request: DeleteRoomRequest, runtime: Util.RuntimeOptions): DeleteRoomResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteRoom(request: DeleteRoomRequest): DeleteRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRoomWithOptions(request, runtime);
}

model GetAppRequest {
  appId?: string(name='AppId', description='应用唯一标识'),
}

model GetAppResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    appConfigStatus?: string(name='AppConfigStatus', description='应用配置状态'),
    appKey?: string(name='AppKey', description='应用Key'),
    appName?: string(name='AppName', description='应用名称'),
    appStatus?: string(name='AppStatus', description='应用状态'),
    appTemplateId?: string(name='AppTemplateId', description='模板唯一标识'),
    appTemplateName?: string(name='AppTemplateName', description='模板名称'),
    componentList?: [ string ](name='ComponentList', description='组件列表。'),
    createTime?: string(name='CreateTime', description='创建时间'),
    integrationMode?: string(name='IntegrationMode', description='集成方式：- 一体化SDK：paasSDK - 样板间：standardRoom'),
    standardRoomInfo?: string(name='StandardRoomInfo', description='样板间信息'),
  }(name='Result', description='返回结果'),
}

model GetAppResponse = {
  headers: map[string]string(name='headers'),
  body: GetAppResponseBody(name='body'),
}

async function getAppWithOptions(request: GetAppRequest, runtime: Util.RuntimeOptions): GetAppResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetApp', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getApp(request: GetAppRequest): GetAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAppWithOptions(request, runtime);
}

model GetAppTemplateRequest {
  appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标识'),
}

model GetAppTemplateResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    appTemplateCreator?: string(name='AppTemplateCreator', description='应用模板创建者'),
    appTemplateName?: string(name='AppTemplateName', description='应用模板名称'),
    componentList?: [ string ](name='ComponentList', description='组件列表'),
    configList?: [ 
      {
        key?: string(name='Key', description='配置项'),
        value?: string(name='Value', description='配置项内容'),
      }
    ](name='ConfigList', description='配置列表'),
    createTime?: string(name='CreateTime', description='创建时间'),
    integrationMode?: string(name='IntegrationMode', description='集成方式：- 一体化SDK：paasSDK - 样板间：standardRoom'),
    scene?: string(name='Scene', description='应用模板场景，电商business，课堂classroom'),
    sdkInfo?: string(name='SdkInfo'),
    standardRoomInfo?: string(name='StandardRoomInfo', description='样板间信息'),
    status?: string(name='Status', description='应用模板使用状态'),
  }(name='Result', description='返回结果'),
}

model GetAppTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: GetAppTemplateResponseBody(name='body'),
}

async function getAppTemplateWithOptions(request: GetAppTemplateRequest, runtime: Util.RuntimeOptions): GetAppTemplateResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAppTemplate', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAppTemplate(request: GetAppTemplateRequest): GetAppTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAppTemplateWithOptions(request, runtime);
}

model GetAuthTokenRequest {
  appId?: string(name='AppId', description='用户的应用ID，在控制台创建应用时生成'),
  appKey?: string(name='AppKey', description='终端设备类型,通过控制台创建和查询'),
  deviceId?: string(name='DeviceId', description='终端设备ID'),
  userId?: string(name='UserId', description='用户UserId,在AppId下单独唯一'),
}

model GetAuthTokenResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    accessToken?: string(name='AccessToken', description='用于长链接建连的token'),
    accessTokenExpiredTime?: long(name='AccessTokenExpiredTime', description='登录token过期时间(毫秒)'),
    refreshToken?: string(name='RefreshToken', description='更新Token，若AccessToken过期，则可以使用RefreshToken再次获取新Token'),
  }(name='Result'),
}

model GetAuthTokenResponse = {
  headers: map[string]string(name='headers'),
  body: GetAuthTokenResponseBody(name='body'),
}

async function getAuthTokenWithOptions(request: GetAuthTokenRequest, runtime: Util.RuntimeOptions): GetAuthTokenResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAuthToken', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAuthToken(request: GetAuthTokenRequest): GetAuthTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAuthTokenWithOptions(request, runtime);
}

model GetClassDetailRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  classId?: string(name='ClassId', description='课堂唯一标识，由调用CreateClass返回。'),
  userId?: string(name='UserId', description='操作人用户ID。'),
}

model GetClassDetailResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    classId?: string(name='ClassId', description='课堂唯一标识，由调用CreateClass返回。'),
    confId?: string(name='ConfId', description='连麦会议唯一标识。'),
    createNickname?: string(name='CreateNickname', description='创建人昵称。'),
    createUserId?: string(name='CreateUserId', description='创建人ID。'),
    endTime?: long(name='EndTime', description='下课时间戳，毫秒。'),
    liveId?: string(name='LiveId', description='直播的唯一标识ID。'),
    roomId?: string(name='RoomId', description='房间ID'),
    startTime?: long(name='StartTime', description='开始上课时间戳，毫秒。'),
    status?: int32(name='Status', description='课堂状态，0:未开始 1:上课中 2:已下课。'),
    title?: string(name='Title', description='课堂标题。'),
    whiteboardId?: string(name='WhiteboardId', description='白板ID'),
    whiteboardRecordId?: string(name='WhiteboardRecordId', description='白板录制ID'),
  }(name='Result', description='API请求的返回结果结构体。'),
}

model GetClassDetailResponse = {
  headers: map[string]string(name='headers'),
  body: GetClassDetailResponseBody(name='body'),
}

async function getClassDetailWithOptions(request: GetClassDetailRequest, runtime: Util.RuntimeOptions): GetClassDetailResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetClassDetail', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getClassDetail(request: GetClassDetailRequest): GetClassDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getClassDetailWithOptions(request, runtime);
}

model GetConferenceRequest {
  conferenceId?: string(name='ConferenceId', description='会议资源唯一标识。'),
}

model GetConferenceResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    appId?: string(name='AppId', description='租户名'),
    conferenceId?: string(name='ConferenceId', description='会议资源唯一标识。'),
    createTime?: long(name='CreateTime', description='会议创建时间戳，单位：毫秒。'),
    playbackUrl?: string(name='PlaybackUrl', description='录制回放地址，m3u8格式，会议结束后10秒才会生成。'),
    roomId?: string(name='RoomId', description='房间ID。'),
    status?: string(name='Status', description='会议状态。'),
    title?: string(name='Title', description='会议标题。'),
    userId?: string(name='UserId', description='创建会议用户。'),
  }(name='Result', description='返回结果'),
}

model GetConferenceResponse = {
  headers: map[string]string(name='headers'),
  body: GetConferenceResponseBody(name='body'),
}

async function getConferenceWithOptions(request: GetConferenceRequest, runtime: Util.RuntimeOptions): GetConferenceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetConference', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getConference(request: GetConferenceRequest): GetConferenceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getConferenceWithOptions(request, runtime);
}

model GetDomainOwnerVerifyContentRequest {
  liveDomainName?: string(name='LiveDomainName', description='直播域名'),
}

model GetDomainOwnerVerifyContentResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    content?: string(name='Content', description='域名归属校验内容'),
  }(name='Result', description='返回结果'),
}

model GetDomainOwnerVerifyContentResponse = {
  headers: map[string]string(name='headers'),
  body: GetDomainOwnerVerifyContentResponseBody(name='body'),
}

async function getDomainOwnerVerifyContentWithOptions(request: GetDomainOwnerVerifyContentRequest, runtime: Util.RuntimeOptions): GetDomainOwnerVerifyContentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDomainOwnerVerifyContent', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDomainOwnerVerifyContent(request: GetDomainOwnerVerifyContentRequest): GetDomainOwnerVerifyContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDomainOwnerVerifyContentWithOptions(request, runtime);
}

model GetImpProductStatusResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: boolean(name='Result', description='开通状态'),
}

model GetImpProductStatusResponse = {
  headers: map[string]string(name='headers'),
  body: GetImpProductStatusResponseBody(name='body'),
}

async function getImpProductStatusWithOptions(runtime: Util.RuntimeOptions): GetImpProductStatusResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('GetImpProductStatus', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getImpProductStatus(): GetImpProductStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getImpProductStatusWithOptions(runtime);
}

model GetLiveRequest {
  liveId?: string(name='LiveId', description='直播资源的唯一标识ID'),
}

model GetLiveResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    anchorId?: string(name='AnchorId', description='主播ID'),
    appId?: string(name='AppId', description='租户名'),
    artcInfo?: {
      artcH5Url?: string(name='ArtcH5Url', description='原画转码地址'),
      artcUrl?: string(name='ArtcUrl', description='源码地址'),
    }(name='ArtcInfo', description='rts播流信息'),
    codeLevel?: int32(name='CodeLevel', description='直播推送分辨率 -1:lld 1:lsd 2:lhd 3:lud'),
    coverUrl?: string(name='CoverUrl', description='封面图片'),
    createTime?: long(name='CreateTime', description='直播创建时间（毫秒ms）'),
    duration?: long(name='Duration', description='直播持续时间（毫秒ms）'),
    endTime?: long(name='EndTime', description='直播结束时间（毫秒ms）'),
    hlsUrl?: string(name='HlsUrl', description='hls播放地址'),
    introduction?: string(name='Introduction', description='直播简介'),
    liveId?: string(name='LiveId', description='直播资源的唯一标识ID'),
    liveUrl?: string(name='LiveUrl', description='直播拉流地址'),
    playUrlInfoList?: [ 
      {
        codeLevel?: int32(name='CodeLevel', description='直播拉取分辨率 -1:lld 1:lsd 2:lhd 3:lud'),
        flvUrl?: string(name='FlvUrl', description='flv拉流地址'),
        hlsUrl?: string(name='HlsUrl', description='hls拉流地址'),
        rtmpUrl?: string(name='RtmpUrl', description='rtmp拉流地址'),
      }
    ](name='PlayUrlInfoList', description='多分辨率多协议播放信息'),
    playbackUrl?: string(name='PlaybackUrl', description='直播回放地址'),
    pushUrl?: string(name='PushUrl', description='直播推流地址'),
    roomId?: string(name='RoomId', description='房间id'),
    status?: string(name='Status', description='直播状态：Created-已创建，未开播，Living-直播中，End-直播结束'),
    title?: string(name='Title', description='直播标题'),
    userDefineField?: string(name='UserDefineField', description='用户自定义数据存储'),
    userId?: string(name='UserId', description='创建直播用户'),
  }(name='Result'),
}

model GetLiveResponse = {
  headers: map[string]string(name='headers'),
  body: GetLiveResponseBody(name='body'),
}

async function getLiveWithOptions(request: GetLiveRequest, runtime: Util.RuntimeOptions): GetLiveResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLive', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLive(request: GetLiveRequest): GetLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveWithOptions(request, runtime);
}

model GetLiveDomainStatusRequest {
  appId?: string(name='AppId', description='应用唯一标识'),
  liveDomainList?: [ string ](name='LiveDomainList', description='直播域名列表'),
  liveDomainType?: string(name='LiveDomainType', description='直播域名类型，推流域名: push, 拉流域名: pull, 回放域名: palyback'),
}

model GetLiveDomainStatusShrinkRequest {
  appId?: string(name='AppId', description='应用唯一标识'),
  liveDomainListShrink?: string(name='LiveDomainList', description='直播域名列表'),
  liveDomainType?: string(name='LiveDomainType', description='直播域名类型，推流域名: push, 拉流域名: pull, 回放域名: palyback'),
}

model GetLiveDomainStatusResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    liveDomainInfoList?: [ 
      {
        cname?: string(name='Cname', description='直播域名CNAME'),
        domain?: string(name='Domain', description='直播域名'),
        status?: string(name='Status', description='直播域名状态'),
      }
    ](name='LiveDomainInfoList', description='直播域名信息列表'),
  }(name='Result', description='返回结果'),
}

model GetLiveDomainStatusResponse = {
  headers: map[string]string(name='headers'),
  body: GetLiveDomainStatusResponseBody(name='body'),
}

async function getLiveDomainStatusWithOptions(tmpReq: GetLiveDomainStatusRequest, runtime: Util.RuntimeOptions): GetLiveDomainStatusResponse {
  Util.validateModel(tmpReq);
  var request = new GetLiveDomainStatusShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.liveDomainList)) {
    request.liveDomainListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.liveDomainList, 'LiveDomainList', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLiveDomainStatus', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLiveDomainStatus(request: GetLiveDomainStatusRequest): GetLiveDomainStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveDomainStatusWithOptions(request, runtime);
}

model GetLiveRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveId?: string(name='LiveId', description='直播ID。'),
}

model GetLiveRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    anchorId?: string(name='AnchorId', description='主播ID。'),
    anchorNick?: string(name='AnchorNick', description='主播昵称'),
    appId?: string(name='AppId', description='应用ID。'),
    artcInfo?: {
      artcH5Url?: string(name='ArtcH5Url', description='RTS转码流地址，推荐web端使用。'),
      artcUrl?: string(name='ArtcUrl', description='RTS原码流地址，推荐移动端使用。'),
    }(name='ArtcInfo', description='RTS低延迟播流信息。'),
    chatId?: string(name='ChatId', description='聊天ID。'),
    coverUrl?: string(name='CoverUrl', description='封面。'),
    createTime?: long(name='CreateTime', description='直播创建时间，单位：毫秒。'),
    endTime?: long(name='EndTime', description='直播结束时间，单位：毫秒。'),
    extension?: map[string]string(name='Extension', description='直播拓展字段。'),
    hlsUrl?: string(name='HlsUrl', description='原画HLS播放地址。'),
    liveId?: string(name='LiveId', description='直播ID。'),
    liveUrl?: string(name='LiveUrl', description='直播拉流地址。'),
    notice?: string(name='Notice', description='公告。'),
    onlineCount?: long(name='OnlineCount', description='在线用户数。'),
    playbackUrl?: string(name='PlaybackUrl', description='直播回放地址。'),
    pluginInstanceInfoList?: [ 
      {
        createTime?: long(name='CreateTime', description='插件实例创建时间戳，单位：毫秒。'),
        extension?: map[string]string(name='Extension', description='插件拓展字段。'),
        pluginId?: string(name='PluginId', description='插件实例唯一标识。'),
        pluginType?: string(name='PluginType', description='插件唯一标识，取值：live-直播，wb-白板，chat-聊天，rtc。'),
      }
    ](name='PluginInstanceInfoList', description='活跃插件列表。'),
    pushUrl?: string(name='PushUrl', description='直播推流地址。'),
    pv?: long(name='Pv', description='访问用户人次。'),
    roomId?: string(name='RoomId', description='房间ID。'),
    startTime?: long(name='StartTime', description='直播开始时间，单位：毫秒。'),
    status?: int32(name='Status', description='直播状态，0-在播 1-下播。'),
    title?: string(name='Title', description='标题。'),
    uv?: long(name='Uv', description='访问用户数。'),
  }(name='Result', description='创建场景化直播返回的结果。'),
}

model GetLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  body: GetLiveRoomResponseBody(name='body'),
}

async function getLiveRoomWithOptions(request: GetLiveRoomRequest, runtime: Util.RuntimeOptions): GetLiveRoomResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLiveRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLiveRoom(request: GetLiveRoomRequest): GetLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveRoomWithOptions(request, runtime);
}

model GetLiveRoomStatisticsRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveId?: string(name='LiveId', description='直播ID。'),
}

model GetLiveRoomStatisticsResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    endTime?: long(name='EndTime', description='直播结束时间，单位：毫秒。'),
    liveId?: string(name='LiveId', description='直播ID。'),
    messageCount?: long(name='MessageCount', description='互动消息数。'),
    pv?: long(name='Pv', description='访问用户人次。'),
    startTime?: long(name='StartTime', description='直播开始时间，单位：毫秒。'),
    status?: int32(name='Status', description='直播状态，0-已创建 1-直播中 2-已关闭。'),
    uv?: long(name='Uv', description='访问用户数。'),
    watchLiveTime?: long(name='WatchLiveTime', description='总观看时长，单位：毫秒。'),
  }(name='Result', description='创建场景化直播返回的结果。'),
}

model GetLiveRoomStatisticsResponse = {
  headers: map[string]string(name='headers'),
  body: GetLiveRoomStatisticsResponseBody(name='body'),
}

async function getLiveRoomStatisticsWithOptions(request: GetLiveRoomStatisticsRequest, runtime: Util.RuntimeOptions): GetLiveRoomStatisticsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLiveRoomStatistics', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLiveRoomStatistics(request: GetLiveRoomStatisticsRequest): GetLiveRoomStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveRoomStatisticsWithOptions(request, runtime);
}

model GetLiveRoomUserStatisticsRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveId?: string(name='LiveId', description='直播ID。'),
  pageNumber?: string(name='PageNumber', description='查询页码，从1开始，传空默认查询第1页。'),
  pageSize?: string(name='PageSize', description='每页显示个数，最大支持50，参数为空默认显示个数为10。'),
}

model GetLiveRoomUserStatisticsResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    hasMore?: boolean(name='HasMore', description='是否还有下一页。'),
    liveId?: string(name='LiveId', description='直播ID。'),
    pageTotal?: int32(name='PageTotal', description='用户总页数。'),
    totalCount?: int32(name='TotalCount', description='用户总数'),
    userStatisticsList?: [ 
      {
        userId?: string(name='UserId', description='用户ID。'),
        watchLiveTime?: long(name='WatchLiveTime', description='观看时长，单位：毫秒。'),
      }
    ](name='UserStatisticsList', description='用户观看数据列表。'),
  }(name='Result', description='创建场景化直播返回的结果。'),
}

model GetLiveRoomUserStatisticsResponse = {
  headers: map[string]string(name='headers'),
  body: GetLiveRoomUserStatisticsResponseBody(name='body'),
}

async function getLiveRoomUserStatisticsWithOptions(request: GetLiveRoomUserStatisticsRequest, runtime: Util.RuntimeOptions): GetLiveRoomUserStatisticsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLiveRoomUserStatistics', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLiveRoomUserStatistics(request: GetLiveRoomUserStatisticsRequest): GetLiveRoomUserStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveRoomUserStatisticsWithOptions(request, runtime);
}

model GetRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由字母、数字、符号.和-组成，最大长度36位。'),
}

model GetRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    roomInfo?: {
      appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
      createTime?: long(name='CreateTime', description='房间创建时间戳，单位：毫秒。'),
      extension?: map[string]string(name='Extension', description='房间拓展字段。'),
      notice?: string(name='Notice', description='房间公告。'),
      onlineCount?: long(name='OnlineCount', description='在线用户数。'),
      pluginInstanceInfoList?: [ 
        {
          createTime?: long(name='CreateTime', description='插件实例创建时间戳，单位：毫秒。'),
          extension?: map[string]string(name='Extension', description='插件拓展字段。'),
          pluginId?: string(name='PluginId', description='插件实例唯一标识。'),
          pluginType?: string(name='PluginType', description='插件唯一标识，取值：live-直播，wb-白板，chat-聊天，rtc。'),
        }
      ](name='PluginInstanceInfoList', description='活跃插件列表。'),
      pv?: long(name='Pv', description='访问用户人次。'),
      roomId?: string(name='RoomId', description='房间唯一标识。'),
      roomOwnerId?: string(name='RoomOwnerId', description='房主用户id。'),
      templateId?: string(name='TemplateId', description='创建房间使用的模板id。'),
      title?: string(name='Title', description='房间标题。'),
      uv?: long(name='Uv', description='访问用户数。'),
    }(name='RoomInfo', description='房间信息。'),
  }(name='Result', description='查询房间信息返回结果。'),
}

model GetRoomResponse = {
  headers: map[string]string(name='headers'),
  body: GetRoomResponseBody(name='body'),
}

async function getRoomWithOptions(request: GetRoomRequest, runtime: Util.RuntimeOptions): GetRoomResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getRoom(request: GetRoomRequest): GetRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRoomWithOptions(request, runtime);
}

model GetStandardRoomHttpsCertificateRequest {
  certificateId?: string(name='CertificateId', description='证书ID'),
}

model GetStandardRoomHttpsCertificateResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    certificateName?: string(name='CertificateName', description='证书名称'),
    createTime?: string(name='CreateTime', description='证书创建时间'),
    domainName?: string(name='DomainName', description='使用证书的确切域名'),
    expireTime?: string(name='ExpireTime', description='证书过期时间'),
  }(name='Result', description='返回结果'),
}

model GetStandardRoomHttpsCertificateResponse = {
  headers: map[string]string(name='headers'),
  body: GetStandardRoomHttpsCertificateResponseBody(name='body'),
}

async function getStandardRoomHttpsCertificateWithOptions(request: GetStandardRoomHttpsCertificateRequest, runtime: Util.RuntimeOptions): GetStandardRoomHttpsCertificateResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetStandardRoomHttpsCertificate', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getStandardRoomHttpsCertificate(request: GetStandardRoomHttpsCertificateRequest): GetStandardRoomHttpsCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getStandardRoomHttpsCertificateWithOptions(request, runtime);
}

model GetStandardRoomJumpUrlRequest {
  appId?: string(name='AppId', description='用户的应用ID，在控制台创建应用时生成'),
  appKey?: string(name='AppKey', description='终端设备类型,通过控制台创建和查询'),
  bizId?: string(name='BizId', description='资源ID：根据业务类型来定，比如直播ID，课堂ID等'),
  bizType?: string(name='BizType', description='业务类型：互动直播live，互动课堂class'),
  platform?: string(name='Platform', description='平台：win, mac, android, ios, web'),
  userId?: string(name='UserId', description='用户UserId,在AppId下单独唯一'),
  userNick?: string(name='UserNick', description='用户昵称'),
}

model GetStandardRoomJumpUrlResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    standardRoomJumpUrl?: string(name='StandardRoomJumpUrl', description='样板间跳转协议地址'),
  }(name='Result'),
}

model GetStandardRoomJumpUrlResponse = {
  headers: map[string]string(name='headers'),
  body: GetStandardRoomJumpUrlResponseBody(name='body'),
}

async function getStandardRoomJumpUrlWithOptions(request: GetStandardRoomJumpUrlRequest, runtime: Util.RuntimeOptions): GetStandardRoomJumpUrlResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetStandardRoomJumpUrl', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getStandardRoomJumpUrl(request: GetStandardRoomJumpUrlRequest): GetStandardRoomJumpUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getStandardRoomJumpUrlWithOptions(request, runtime);
}

model ListAppTemplatesRequest {
  pageNumber?: string(name='PageNumber', description='查询页码，参数为空默认查询第1页。'),
  pageSize?: string(name='PageSize', description='每页显示个数，参数为空默认显示个数为10。'),
}

model ListAppTemplatesResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    appTemplateInfoList?: [ 
      {
        appTemplateCreator?: string(name='AppTemplateCreator', description='应用模板创建者'),
        appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标识'),
        appTemplateName?: string(name='AppTemplateName', description='应用模板名称'),
        componentList?: [ string ](name='ComponentList', description='组件列表'),
        configList?: [ 
          {
            key?: string(name='Key', description='配置项'),
            value?: string(name='Value', description='配置项内容'),
          }
        ](name='ConfigList', description='配置列表'),
        createTime?: string(name='CreateTime', description='创建时间'),
        integrationMode?: string(name='IntegrationMode', description='集成方式：- 一体化SDK：paasSDK - 样板间：standardRoom'),
        scene?: string(name='Scene', description='应用模板场景，电商business，课堂classroom'),
        sdkInfo?: string(name='SdkInfo', description='SDK信息'),
        standardRoomInfo?: string(name='StandardRoomInfo', description='样板间信息'),
        status?: string(name='Status', description='应用模板使用状态'),
      }
    ](name='AppTemplateInfoList', description='应用模板信息列表'),
    pageTotal?: int32(name='PageTotal', description='总页数'),
    totalCount?: int32(name='TotalCount', description='总条目数'),
  }(name='Result', description='返回结果'),
}

model ListAppTemplatesResponse = {
  headers: map[string]string(name='headers'),
  body: ListAppTemplatesResponseBody(name='body'),
}

async function listAppTemplatesWithOptions(request: ListAppTemplatesRequest, runtime: Util.RuntimeOptions): ListAppTemplatesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListAppTemplates', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listAppTemplates(request: ListAppTemplatesRequest): ListAppTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppTemplatesWithOptions(request, runtime);
}

model ListApplyLinkMicUsersRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识符'),
  pageNumber?: int32(name='PageNumber', description='查询页码，从第1页开始。'),
  pageSize?: int32(name='PageSize', description='每页显示个数，最大显示个数为100。'),
}

model ListApplyLinkMicUsersResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    applyLinkMicUserList?: [ string ](name='ApplyLinkMicUserList', description='会议申请连麦用户列表。'),
    hasMore?: boolean(name='HasMore', description='是否还有下一页成员列表。'),
    pageTotal?: int32(name='PageTotal', description='改会议的申请连麦成员总页数。'),
    totalCount?: int32(name='TotalCount', description='该会议的申请连麦成员总数。'),
  }(name='Result', description='返回结果'),
}

model ListApplyLinkMicUsersResponse = {
  headers: map[string]string(name='headers'),
  body: ListApplyLinkMicUsersResponseBody(name='body'),
}

async function listApplyLinkMicUsersWithOptions(request: ListApplyLinkMicUsersRequest, runtime: Util.RuntimeOptions): ListApplyLinkMicUsersResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListApplyLinkMicUsers', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listApplyLinkMicUsers(request: ListApplyLinkMicUsersRequest): ListApplyLinkMicUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApplyLinkMicUsersWithOptions(request, runtime);
}

model ListAppsRequest {
  integrationMode?: string(name='IntegrationMode', description='集成方式：- 一体化SDK：paasSDK - 样板间：standardRoom'),
  pageNumber?: int32(name='PageNumber', description='查询页码，参数为空默认查询第1页。'),
  pageSize?: int32(name='PageSize', description='每页显示个数，参数为空默认显示个数为10。'),
  status?: string(name='Status', description='应用状态'),
}

model ListAppsResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    appInfoList?: [ 
      {
        appConfigStatus?: string(name='AppConfigStatus', description='应用配置状态'),
        appId?: string(name='AppId', description='应用唯一标识符'),
        appKey?: string(name='AppKey', description='应用Key'),
        appName?: string(name='AppName', description='应用名称'),
        appStatus?: string(name='AppStatus', description='应用状态'),
        appTemplateId?: string(name='AppTemplateId', description='模板唯一标识'),
        appTemplateName?: string(name='AppTemplateName', description='模板名称'),
        componentList?: [ string ](name='ComponentList', description='应用组件列表'),
        createTime?: string(name='CreateTime', description='应用创建时间'),
        integrationMode?: string(name='IntegrationMode', description='集成方式：- 一体化SDK：paasSDK - 样板间：standardRoom'),
        standardRoomInfo?: string(name='StandardRoomInfo', description='样板间信息'),
      }
    ](name='AppInfoList', description='App信息列表'),
    pageTotal?: int32(name='PageTotal', description='总页数'),
    totalCount?: int32(name='TotalCount', description='总条目数'),
  }(name='Result', description='返回结果体'),
}

model ListAppsResponse = {
  headers: map[string]string(name='headers'),
  body: ListAppsResponseBody(name='body'),
}

async function listAppsWithOptions(request: ListAppsRequest, runtime: Util.RuntimeOptions): ListAppsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListApps', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listApps(request: ListAppsRequest): ListAppsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppsWithOptions(request, runtime);
}

model ListCommentsRequest {
  appId?: string(name='AppId', description='用户的应用ID，在控制台创建应用时生成。包含小写字母、数字，长度为6个字符。'),
  pageNum?: int32(name='PageNum', description='查询弹幕消息列表的分页页数。应该从1开始，每次分页拉取时递增。'),
  pageSize?: int32(name='PageSize', description='查询弹幕消息列表的分页大小。最小不得小于1，最大不得超过100。如果超过100，会被截断为前100条。'),
  roomId?: string(name='RoomId', description='房间的唯一标识，在调用CreateRoom时返回。'),
  sortType?: int32(name='SortType', description='查询弹幕消息列表的排序方式。取值仅限0和1，其中0表示按照弹幕消息创建时间递增的顺序拉取，1表示按照弹幕消息创建时间递减的时间拉取。'),
  userId?: string(name='UserId', description='操作人用户ID，表示谁执行了查询弹幕消息列表的操作。'),
}

model ListCommentsResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    commentVOList?: [ 
      {
        appId?: string(name='AppId', description='应用ID。'),
        commentId?: string(name='CommentId', description='弹幕消息的唯一ID标识。'),
        content?: string(name='Content', description='弹幕消息的内容。'),
        createAt?: long(name='CreateAt', description='弹幕消息的创建时间，Unix时间戳，单位：毫秒。'),
        extension?: map[string]string(name='Extension', description='扩展字段。'),
        roomId?: string(name='RoomId', description='房间ID。'),
        senderId?: string(name='SenderId', description='弹幕消息的发送者ID标识。'),
        senderNick?: string(name='SenderNick', description='弹幕消息发送者的昵称。'),
      }
    ](name='CommentVOList', description='弹幕消息列表。'),
    hasMore?: boolean(name='HasMore', description='是否还有下一页数据。true表示还有，false表示没有。'),
    pageTotal?: int32(name='PageTotal', description='分页查询弹幕消息列表的总页数。'),
    totalCount?: int32(name='TotalCount', description='弹幕消息的总数。'),
  }(name='Result', description='调用查询弹幕消息列表的返回结果。'),
}

model ListCommentsResponse = {
  headers: map[string]string(name='headers'),
  body: ListCommentsResponseBody(name='body'),
}

async function listCommentsWithOptions(request: ListCommentsRequest, runtime: Util.RuntimeOptions): ListCommentsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListComments', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listComments(request: ListCommentsRequest): ListCommentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCommentsWithOptions(request, runtime);
}

model ListComponentsRequest {
  appId?: string(name='AppId', description='应用唯一标识'),
  appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标识'),
}

model ListComponentsResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    componentCategory?: [ 
      {
        list?: [ 
          {
            componentName?: string(name='ComponentName', description='组件名称'),
            componentType?: string(name='ComponentType', description='组件类型'),
            inUse?: string(name='InUse', description='是否使用'),
          }
        ](name='List', description='类别下的组件列表'),
        type?: string(name='Type', description='组件类别'),
      }
    ](name='ComponentCategory', description='组件信息'),
    configGroup?: [ 
      {
        category?: string(name='Category'),
        key?: string(name='Key'),
        value?: string(name='Value'),
      }
    ](name='ConfigGroup', description='配置信息'),
    sceneList?: [ 
      {
        componentCategory?: [ 
          {
            list?: [ 
              {
                componentName?: string(name='ComponentName', description='组件名称'),
                componentType?: string(name='ComponentType', description='组件类型'),
                inUse?: string(name='InUse', description='是否使用'),
              }
            ](name='List', description='类别下的组件列表'),
            type?: string(name='Type', description='组件类别'),
          }
        ](name='ComponentCategory', description='组件信息'),
        scene?: string(name='Scene', description='场景类别'),
      }
    ](name='SceneList', description='场景列表'),
  }(name='Result', description='返回结果体'),
}

model ListComponentsResponse = {
  headers: map[string]string(name='headers'),
  body: ListComponentsResponseBody(name='body'),
}

async function listComponentsWithOptions(request: ListComponentsRequest, runtime: Util.RuntimeOptions): ListComponentsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListComponents', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listComponents(request: ListComponentsRequest): ListComponentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listComponentsWithOptions(request, runtime);
}

model ListConferenceUsersRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识符'),
  pageNumber?: int32(name='PageNumber', description='查询页码，从第1页开始。'),
  pageSize?: int32(name='PageSize', description='每页显示个数，最大显示个数为100。'),
}

model ListConferenceUsersResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: {
    conferenceUserList?: [ 
      {
        status?: string(name='Status', description='用户状态。'),
        userId?: string(name='UserId', description='用户ID。'),
      }
    ](name='ConferenceUserList', description='会议用户列表。'),
    hasMore?: boolean(name='HasMore', description='是否还有数据'),
    pageTotal?: int32(name='PageTotal', description='总页数'),
    totalCount?: int32(name='TotalCount', description='总条目数'),
  }(name='Result', description='返回结果'),
}

model ListConferenceUsersResponse = {
  headers: map[string]string(name='headers'),
  body: ListConferenceUsersResponseBody(name='body'),
}

async function listConferenceUsersWithOptions(request: ListConferenceUsersRequest, runtime: Util.RuntimeOptions): ListConferenceUsersResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListConferenceUsers', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listConferenceUsers(request: ListConferenceUsersRequest): ListConferenceUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listConferenceUsersWithOptions(request, runtime);
}

model ListLiveRoomsRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  pageNumber?: int32(name='PageNumber', description='查询页码，从1开始，传空默认查询第1页。'),
  pageSize?: int32(name='PageSize', description='每页显示个数，最大支持50，参数为空默认显示个数为10。'),
  status?: int32(name='Status', description='直播状态，0-在播 1-下播，不传则返回所有直播。'),
}

model ListLiveRoomsResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    hasMore?: boolean(name='HasMore', description='是否还有下一页。'),
    liveList?: [ 
      {
        anchorId?: string(name='AnchorId', description='主播ID。'),
        anchorNick?: string(name='AnchorNick', description='主播昵称。'),
        appId?: string(name='AppId', description='应用ID。'),
        chatId?: string(name='ChatId', description='聊天ID。'),
        coverUrl?: string(name='CoverUrl', description='封面。'),
        extension?: map[string]string(name='Extension', description='直播拓展字段。'),
        liveId?: string(name='LiveId', description='直播ID。'),
        notice?: string(name='Notice', description='公告。'),
        onlineCount?: long(name='OnlineCount', description='在线用户数。'),
        pv?: long(name='Pv', description='访问用户人次。'),
        roomId?: string(name='RoomId', description='房间ID。'),
        status?: int32(name='Status', description='直播状态，0-在播 1-下播。'),
        title?: string(name='Title', description='标题。'),
        uv?: long(name='Uv', description='访问用户数。'),
      }
    ](name='LiveList', description='直播列表信息。'),
    pageTotal?: int32(name='PageTotal', description='直播总页数。'),
    totalCount?: int32(name='TotalCount', description='直播总数。'),
  }(name='Result', description='创建场景化直播返回的结果。'),
}

model ListLiveRoomsResponse = {
  headers: map[string]string(name='headers'),
  body: ListLiveRoomsResponseBody(name='body'),
}

async function listLiveRoomsWithOptions(request: ListLiveRoomsRequest, runtime: Util.RuntimeOptions): ListLiveRoomsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListLiveRooms', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listLiveRooms(request: ListLiveRoomsRequest): ListLiveRoomsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveRoomsWithOptions(request, runtime);
}

model ListLiveRoomsByIdRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveIdList?: [ string ](name='LiveIdList', description='直播ID列表。'),
}

model ListLiveRoomsByIdShrinkRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveIdListShrink?: string(name='LiveIdList', description='直播ID列表。'),
}

model ListLiveRoomsByIdResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    liveList?: [ 
      {
        anchorId?: string(name='AnchorId', description='主播ID。'),
        anchorNick?: string(name='AnchorNick', description='主播昵称。'),
        appId?: string(name='AppId', description='应用ID。'),
        chatId?: string(name='ChatId', description='聊天ID。'),
        coverUrl?: string(name='CoverUrl', description='封面。'),
        extension?: map[string]string(name='Extension', description='直播拓展字段。'),
        liveId?: string(name='LiveId', description='直播ID。'),
        notice?: string(name='Notice', description='公告。'),
        onlineCount?: long(name='OnlineCount', description='在线用户数。'),
        pv?: long(name='Pv', description='访问用户人次。'),
        roomId?: string(name='RoomId', description='房间ID。'),
        status?: int32(name='Status', description='直播状态，0-在播 1-下播。'),
        title?: string(name='Title', description='标题。'),
        uv?: long(name='Uv', description='访问用户数。'),
      }
    ](name='LiveList', description='直播列表信息。'),
  }(name='Result', description='创建场景化直播返回的结果。'),
}

model ListLiveRoomsByIdResponse = {
  headers: map[string]string(name='headers'),
  body: ListLiveRoomsByIdResponseBody(name='body'),
}

async function listLiveRoomsByIdWithOptions(tmpReq: ListLiveRoomsByIdRequest, runtime: Util.RuntimeOptions): ListLiveRoomsByIdResponse {
  Util.validateModel(tmpReq);
  var request = new ListLiveRoomsByIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.liveIdList)) {
    request.liveIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.liveIdList, 'LiveIdList', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListLiveRoomsById', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listLiveRoomsById(request: ListLiveRoomsByIdRequest): ListLiveRoomsByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveRoomsByIdWithOptions(request, runtime);
}

model ListRoomLivesRequest {
  appId?: string(name='AppId', description='应用唯一标识，可以包含小写字母、数字，长度为6个字符。'),
  queryTimestamp?: long(name='QueryTimestamp', description='拉取在这个时间戳之前创建的直播，单位毫秒，不传则默认拉取最新创建的。'),
  roomId?: string(name='RoomId', description='房间ID，最大长度36个字符。'),
  roomIdList?: [ string ](name='RoomIdList', description='房间ID列表，可指定多个房间id，过滤优先级高于RoomId。'),
  size?: int32(name='Size', description='拉取直播数量。'),
  status?: int32(name='Status', description='直播状态筛选条件，0-直播 1-下播，不传则返回全部状态'),
}

model ListRoomLivesShrinkRequest {
  appId?: string(name='AppId', description='应用唯一标识，可以包含小写字母、数字，长度为6个字符。'),
  queryTimestamp?: long(name='QueryTimestamp', description='拉取在这个时间戳之前创建的直播，单位毫秒，不传则默认拉取最新创建的。'),
  roomId?: string(name='RoomId', description='房间ID，最大长度36个字符。'),
  roomIdListShrink?: string(name='RoomIdList', description='房间ID列表，可指定多个房间id，过滤优先级高于RoomId。'),
  size?: int32(name='Size', description='拉取直播数量。'),
  status?: int32(name='Status', description='直播状态筛选条件，0-直播 1-下播，不传则返回全部状态'),
}

model ListRoomLivesResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    hasMore?: boolean(name='HasMore', description='是否还有下一页直播列表。'),
    liveList?: [ 
      {
        appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
        extension?: map[string]string(name='Extension', description='房间拓展字段。'),
        liveId?: string(name='LiveId', description='直播id。'),
        notice?: string(name='Notice', description='房间公告。'),
        onlineCount?: long(name='OnlineCount', description='在线用户数。'),
        pv?: long(name='Pv', description='用户访问人次。'),
        roomId?: string(name='RoomId', description='房间唯一标识。'),
        roomOwnerId?: string(name='RoomOwnerId', description='房主用户id。'),
        status?: int32(name='Status', description='直播状态，0-在播 1-不在播。'),
        title?: string(name='Title', description='房间标题。'),
        uv?: long(name='Uv', description='用户访问数。'),
      }
    ](name='LiveList', description='直播列表信息。'),
    nextQueryTimestamp?: long(name='NextQueryTimestamp', description='下一个拉取的时间戳，单位毫秒。'),
  }(name='Result', description='API请求的返回结果结构体。'),
}

model ListRoomLivesResponse = {
  headers: map[string]string(name='headers'),
  body: ListRoomLivesResponseBody(name='body'),
}

async function listRoomLivesWithOptions(tmpReq: ListRoomLivesRequest, runtime: Util.RuntimeOptions): ListRoomLivesResponse {
  Util.validateModel(tmpReq);
  var request = new ListRoomLivesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.roomIdList)) {
    request.roomIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.roomIdList, 'RoomIdList', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListRoomLives', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listRoomLives(request: ListRoomLivesRequest): ListRoomLivesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRoomLivesWithOptions(request, runtime);
}

model ListRoomsRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  pageNumber?: int32(name='PageNumber', description='查询页码，从1开始，传空默认查询第1页。'),
  pageSize?: int32(name='PageSize', description='每页显示个数，最大支持50，参数为空默认显示个数为10。'),
}

model ListRoomsResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    hasMore?: boolean(name='HasMore', description='是否还有下一页房间列表。'),
    pageTotal?: int32(name='PageTotal', description='该应用的房间总页数。'),
    roomInfoList?: [ 
      {
        appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
        createTime?: string(name='CreateTime', description='房间创建时间戳，单位：毫秒。'),
        extension?: map[string]string(name='Extension', description='房间拓展字段。'),
        notice?: string(name='Notice', description='房间公告。'),
        onlineCount?: long(name='OnlineCount', description='用户在线数。'),
        pluginInstanceInfoList?: [ 
          {
            createTime?: long(name='CreateTime', description='插件实例创建时间戳，单位：毫秒。'),
            extension?: map[string]string(name='Extension', description='插件拓展字段。'),
            pluginId?: string(name='PluginId', description='插件实例唯一标识。'),
            pluginType?: string(name='PluginType', description='插件唯一标识，取值：live-直播，wb-白板，chat-聊天，rtc。'),
          }
        ](name='PluginInstanceInfoList', description='活跃插件列表。'),
        roomId?: string(name='RoomId', description='房间唯一标识。'),
        roomOwnerId?: string(name='RoomOwnerId', description='房主用户id。'),
        templateId?: string(name='TemplateId', description='创建房间使用的模板id。'),
        title?: string(name='Title', description='房间标题。'),
        uv?: long(name='Uv', description='用户访问数。'),
      }
    ](name='RoomInfoList', description='房间列表信息。'),
    totalCount?: int32(name='TotalCount', description='该应用的房间总数。'),
  }(name='Result', description='API请求的返回结果结构体。'),
}

model ListRoomsResponse = {
  headers: map[string]string(name='headers'),
  body: ListRoomsResponseBody(name='body'),
}

async function listRoomsWithOptions(request: ListRoomsRequest, runtime: Util.RuntimeOptions): ListRoomsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListRooms', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listRooms(request: ListRoomsRequest): ListRoomsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRoomsWithOptions(request, runtime);
}

model PublishLiveRequest {
  liveId?: string(name='LiveId', description='直播资源的唯一标识ID'),
  userId?: string(name='UserId', description='当前用户Id'),
}

model PublishLiveResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    anchorId?: string(name='AnchorId', description='主播ID'),
    liveId?: string(name='LiveId', description='直播资源的唯一标识ID'),
    liveUrl?: string(name='LiveUrl', description='直播拉流地址'),
    pushUrl?: string(name='PushUrl', description='直播推流地址'),
    status?: string(name='Status', description='直播状态：Created-已创建未开播，Living-直播中，End-直播结束'),
  }(name='Result'),
}

model PublishLiveResponse = {
  headers: map[string]string(name='headers'),
  body: PublishLiveResponseBody(name='body'),
}

async function publishLiveWithOptions(request: PublishLiveRequest, runtime: Util.RuntimeOptions): PublishLiveResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('PublishLive', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function publishLive(request: PublishLiveRequest): PublishLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return publishLiveWithOptions(request, runtime);
}

model PublishLiveRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveId?: string(name='LiveId', description='直播ID。'),
  userId?: string(name='UserId', description='操作人ID。'),
}

model PublishLiveRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    liveId?: string(name='LiveId', description='直播ID。'),
    liveUrl?: string(name='LiveUrl', description='直播拉流地址。'),
    pushUrl?: string(name='PushUrl', description='直播推流地址。'),
  }(name='Result', description='创建场景化直播返回的结果。'),
}

model PublishLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  body: PublishLiveRoomResponseBody(name='body'),
}

async function publishLiveRoomWithOptions(request: PublishLiveRoomRequest, runtime: Util.RuntimeOptions): PublishLiveRoomResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('PublishLiveRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function publishLiveRoom(request: PublishLiveRoomRequest): PublishLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return publishLiveRoomWithOptions(request, runtime);
}

model RejectLinkMicRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识'),
  fromUserId?: string(name='FromUserId', description='同意者用户ID'),
  toUserId?: string(name='ToUserId', description='被同意用户ID'),
}

model RejectLinkMicResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model RejectLinkMicResponse = {
  headers: map[string]string(name='headers'),
  body: RejectLinkMicResponseBody(name='body'),
}

async function rejectLinkMicWithOptions(request: RejectLinkMicRequest, runtime: Util.RuntimeOptions): RejectLinkMicResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RejectLinkMic', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function rejectLinkMic(request: RejectLinkMicRequest): RejectLinkMicResponse {
  var runtime = new Util.RuntimeOptions{};
  return rejectLinkMicWithOptions(request, runtime);
}

model RemoveMemberRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识'),
  fromUserId?: string(name='FromUserId', description='邀请者用户ID'),
  toUserId?: string(name='ToUserId', description='被邀请用户ID'),
}

model RemoveMemberResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model RemoveMemberResponse = {
  headers: map[string]string(name='headers'),
  body: RemoveMemberResponseBody(name='body'),
}

async function removeMemberWithOptions(request: RemoveMemberRequest, runtime: Util.RuntimeOptions): RemoveMemberResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RemoveMember', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function removeMember(request: RemoveMemberRequest): RemoveMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeMemberWithOptions(request, runtime);
}

model SendCommentRequest {
  appId?: string(name='AppId', description='应用唯一标识，可以包含小写字母、数字，长度为6个字符。'),
  content?: string(name='Content', description='发送的文本内容。最大的长度不超过256个字节。'),
  extension?: map[string]string(name='Extension', description='扩展字段，服务端仅做透传。'),
  roomId?: string(name='RoomId', description='直播间唯一标识，在调用CreateRoom返回。'),
  senderId?: string(name='SenderId', description='弹幕发送者的用户ID，最大长度不超过32个字节。'),
}

model SendCommentShrinkRequest {
  appId?: string(name='AppId', description='应用唯一标识，可以包含小写字母、数字，长度为6个字符。'),
  content?: string(name='Content', description='发送的文本内容。最大的长度不超过256个字节。'),
  extensionShrink?: string(name='Extension', description='扩展字段，服务端仅做透传。'),
  roomId?: string(name='RoomId', description='直播间唯一标识，在调用CreateRoom返回。'),
  senderId?: string(name='SenderId', description='弹幕发送者的用户ID，最大长度不超过32个字节。'),
}

model SendCommentResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。'),
  result?: {
    commentVO?: {
      commentId?: string(name='CommentId', description='弹幕的唯一ID。'),
      content?: string(name='Content', description='弹幕的内容。'),
      createAt?: long(name='CreateAt', description='弹幕的创建时间，Unix时间戳，单位：毫秒。'),
      extension?: map[string]string(name='Extension', description='扩展字段。'),
      senderId?: string(name='SenderId', description='弹幕的发送者ID标识。'),
      senderNick?: string(name='SenderNick', description='弹幕发送者的昵称。'),
    }(name='CommentVO', description='返回的弹幕数据模型。'),
  }(name='Result', description='调用发送直播间弹幕的返回结果。'),
}

model SendCommentResponse = {
  headers: map[string]string(name='headers'),
  body: SendCommentResponseBody(name='body'),
}

async function sendCommentWithOptions(tmpReq: SendCommentRequest, runtime: Util.RuntimeOptions): SendCommentResponse {
  Util.validateModel(tmpReq);
  var request = new SendCommentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SendComment', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function sendComment(request: SendCommentRequest): SendCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendCommentWithOptions(request, runtime);
}

model SendCustomMessageToAllRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  body?: string(name='Body', description='消息体内容。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由调用CreateRoom返回。'),
}

model SendCustomMessageToAllResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    messageId?: string(name='MessageId', description='消息的唯一ID标识。由数字、大小写字母组成，长度不超过20。'),
  }(name='Result', description='API请求的返回结果结构体。'),
}

model SendCustomMessageToAllResponse = {
  headers: map[string]string(name='headers'),
  body: SendCustomMessageToAllResponseBody(name='body'),
}

async function sendCustomMessageToAllWithOptions(request: SendCustomMessageToAllRequest, runtime: Util.RuntimeOptions): SendCustomMessageToAllResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SendCustomMessageToAll', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function sendCustomMessageToAll(request: SendCustomMessageToAllRequest): SendCustomMessageToAllResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendCustomMessageToAllWithOptions(request, runtime);
}

model SendCustomMessageToUsersRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  body?: string(name='Body', description='消息体内容。'),
  receiverList?: [ string ](name='ReceiverList', description='消息指定的接收人ID列表。'),
  roomId?: string(name='RoomId', description='房间唯一标识，由调用CreateRoom返回。'),
}

model SendCustomMessageToUsersResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
  result?: {
    messageId?: string(name='MessageId', description='消息的唯一ID标识。由数字、大小写字母组成，长度不超过20。'),
  }(name='Result', description='API请求的返回结果结构体。'),
}

model SendCustomMessageToUsersResponse = {
  headers: map[string]string(name='headers'),
  body: SendCustomMessageToUsersResponseBody(name='body'),
}

async function sendCustomMessageToUsersWithOptions(request: SendCustomMessageToUsersRequest, runtime: Util.RuntimeOptions): SendCustomMessageToUsersResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SendCustomMessageToUsers', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function sendCustomMessageToUsers(request: SendCustomMessageToUsersRequest): SendCustomMessageToUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendCustomMessageToUsersWithOptions(request, runtime);
}

model StopClassRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  classId?: string(name='ClassId', description='课堂唯一标识。'),
  userId?: string(name='UserId', description='操作者用户ID。'),
}

model StopClassResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model StopClassResponse = {
  headers: map[string]string(name='headers'),
  body: StopClassResponseBody(name='body'),
}

async function stopClassWithOptions(request: StopClassRequest, runtime: Util.RuntimeOptions): StopClassResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('StopClass', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function stopClass(request: StopClassRequest): StopClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopClassWithOptions(request, runtime);
}

model StopLiveRequest {
  appId?: string(name='AppId', description='租户名'),
  liveId?: string(name='LiveId', description='直播资源的唯一标识ID'),
  roomId?: string(name='RoomId', description='房间ID，最大长度36位'),
  userId?: string(name='UserId', description='创建直播用户ID'),
}

model StopLiveResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model StopLiveResponse = {
  headers: map[string]string(name='headers'),
  body: StopLiveResponseBody(name='body'),
}

async function stopLiveWithOptions(request: StopLiveRequest, runtime: Util.RuntimeOptions): StopLiveResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('StopLive', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function stopLive(request: StopLiveRequest): StopLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopLiveWithOptions(request, runtime);
}

model StopLiveRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  liveId?: string(name='LiveId', description='直播ID。'),
  userId?: string(name='UserId', description='操作人ID。'),
}

model StopLiveRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model StopLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  body: StopLiveRoomResponseBody(name='body'),
}

async function stopLiveRoomWithOptions(request: StopLiveRoomRequest, runtime: Util.RuntimeOptions): StopLiveRoomResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('StopLiveRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function stopLiveRoom(request: StopLiveRoomRequest): StopLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopLiveRoomWithOptions(request, runtime);
}

model UpdateAppRequest {
  appId?: string(name='AppId', description='应用唯一标识'),
  appName?: string(name='AppName', description='应用名称'),
  appStatus?: string(name='AppStatus', description='应用状态'),
}

model UpdateAppResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model UpdateAppResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateAppResponseBody(name='body'),
}

async function updateAppWithOptions(request: UpdateAppRequest, runtime: Util.RuntimeOptions): UpdateAppResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateApp', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateApp(request: UpdateAppRequest): UpdateAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAppWithOptions(request, runtime);
}

model UpdateAppTemplateRequest {
  appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标识'),
  appTemplateName?: string(name='AppTemplateName', description='应用模板名称'),
  componentList?: [ string ](name='ComponentList', description='组件列表'),
}

model UpdateAppTemplateShrinkRequest {
  appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标识'),
  appTemplateName?: string(name='AppTemplateName', description='应用模板名称'),
  componentListShrink?: string(name='ComponentList', description='组件列表'),
}

model UpdateAppTemplateResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model UpdateAppTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateAppTemplateResponseBody(name='body'),
}

async function updateAppTemplateWithOptions(tmpReq: UpdateAppTemplateRequest, runtime: Util.RuntimeOptions): UpdateAppTemplateResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateAppTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.componentList)) {
    request.componentListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.componentList, 'ComponentList', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateAppTemplate', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateAppTemplate(request: UpdateAppTemplateRequest): UpdateAppTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAppTemplateWithOptions(request, runtime);
}

model UpdateAppTemplateConfigRequest {
  appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标识'),
  configList?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='ConfigList', description='更新配置'),
}

model UpdateAppTemplateConfigShrinkRequest {
  appTemplateId?: string(name='AppTemplateId', description='应用模板唯一标识'),
  configListShrink?: string(name='ConfigList', description='更新配置'),
}

model UpdateAppTemplateConfigResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model UpdateAppTemplateConfigResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateAppTemplateConfigResponseBody(name='body'),
}

async function updateAppTemplateConfigWithOptions(tmpReq: UpdateAppTemplateConfigRequest, runtime: Util.RuntimeOptions): UpdateAppTemplateConfigResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateAppTemplateConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.configList)) {
    request.configListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.configList, 'ConfigList', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateAppTemplateConfig', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateAppTemplateConfig(request: UpdateAppTemplateConfigRequest): UpdateAppTemplateConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAppTemplateConfigWithOptions(request, runtime);
}

model UpdateClassRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  classId?: string(name='ClassId', description='课堂唯一标识。'),
  createNickname?: string(name='CreateNickname', description='创建人用户昵称，1~32个字符。'),
  createUserId?: string(name='CreateUserId', description='创建人用户ID，仅支持中英文数字，下划线，中划线，1~36个字符。'),
  title?: string(name='Title', description='课堂标题，1~32个字符。'),
}

model UpdateClassResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model UpdateClassResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateClassResponseBody(name='body'),
}

async function updateClassWithOptions(request: UpdateClassRequest, runtime: Util.RuntimeOptions): UpdateClassResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateClass', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateClass(request: UpdateClassRequest): UpdateClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateClassWithOptions(request, runtime);
}

model UpdateConferenceRequest {
  conferenceId?: string(name='ConferenceId', description='会议唯一标识'),
  title?: string(name='Title', description='会议标题'),
}

model UpdateConferenceResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model UpdateConferenceResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateConferenceResponseBody(name='body'),
}

async function updateConferenceWithOptions(request: UpdateConferenceRequest, runtime: Util.RuntimeOptions): UpdateConferenceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateConference', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateConference(request: UpdateConferenceRequest): UpdateConferenceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateConferenceWithOptions(request, runtime);
}

model UpdateLiveRequest {
  introduction?: string(name='Introduction', description='直播简介，支持中英文，最大长度2048位'),
  liveId?: string(name='LiveId', description='直播资源的唯一标识ID'),
  title?: string(name='Title', description='直播标题，支持中英文，最大长度256位'),
}

model UpdateLiveResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
}

model UpdateLiveResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateLiveResponseBody(name='body'),
}

async function updateLiveWithOptions(request: UpdateLiveRequest, runtime: Util.RuntimeOptions): UpdateLiveResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateLive', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateLive(request: UpdateLiveRequest): UpdateLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveWithOptions(request, runtime);
}

model UpdateLiveRoomRequest {
  anchorId?: string(name='AnchorId', description='主播id，仅支持英文和数字，最大长度36位。'),
  anchorNick?: string(name='AnchorNick', description='主播昵称。'),
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  coverUrl?: string(name='CoverUrl', description='封面，支持图片地址链接格式'),
  extension?: map[string]string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  liveId?: string(name='LiveId', description='直播ID。'),
  notice?: string(name='Notice', description='公告，支持中英文，最大长度256位。'),
  title?: string(name='Title', description='标题，支持中英文，最大长度32位。'),
  userId?: string(name='UserId', description='操作人ID。'),
}

model UpdateLiveRoomShrinkRequest {
  anchorId?: string(name='AnchorId', description='主播id，仅支持英文和数字，最大长度36位。'),
  anchorNick?: string(name='AnchorNick', description='主播昵称。'),
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  coverUrl?: string(name='CoverUrl', description='封面，支持图片地址链接格式'),
  extensionShrink?: string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  liveId?: string(name='LiveId', description='直播ID。'),
  notice?: string(name='Notice', description='公告，支持中英文，最大长度256位。'),
  title?: string(name='Title', description='标题，支持中英文，最大长度32位。'),
  userId?: string(name='UserId', description='操作人ID。'),
}

model UpdateLiveRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model UpdateLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateLiveRoomResponseBody(name='body'),
}

async function updateLiveRoomWithOptions(tmpReq: UpdateLiveRoomRequest, runtime: Util.RuntimeOptions): UpdateLiveRoomResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateLiveRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateLiveRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateLiveRoom(request: UpdateLiveRoomRequest): UpdateLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveRoomWithOptions(request, runtime);
}

model UpdateRoomRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  extension?: map[string]string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  notice?: string(name='Notice', description='房间公告，支持中英文，最大长度256位。'),
  roomId?: string(name='RoomId', description='房间唯一标识。'),
  roomOwnerId?: string(name='RoomOwnerId', description='房主用户id，仅支持英文和数字，最大长度36位。'),
  title?: string(name='Title', description='房间标题，支持中英文，最大长度32位。'),
}

model UpdateRoomShrinkRequest {
  appId?: string(name='AppId', description='应用唯一标识，由6位小写字母、数字组成。'),
  extensionShrink?: string(name='Extension', description='拓展字段，按需传递，需要额外记录的房间属性。'),
  notice?: string(name='Notice', description='房间公告，支持中英文，最大长度256位。'),
  roomId?: string(name='RoomId', description='房间唯一标识。'),
  roomOwnerId?: string(name='RoomOwnerId', description='房主用户id，仅支持英文和数字，最大长度36位。'),
  title?: string(name='Title', description='房间标题，支持中英文，最大长度32位。'),
}

model UpdateRoomResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request'),
}

model UpdateRoomResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateRoomResponseBody(name='body'),
}

async function updateRoomWithOptions(tmpReq: UpdateRoomRequest, runtime: Util.RuntimeOptions): UpdateRoomResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateRoom', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateRoom(request: UpdateRoomRequest): UpdateRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateRoomWithOptions(request, runtime);
}

model VerifyDomainOwnerRequest {
  liveDomainName?: string(name='LiveDomainName', description='直播域名'),
}

model VerifyDomainOwnerResponseBody = {
  requestId?: string(name='RequestId', description='请求ID'),
  result?: boolean(name='Result', description='返回结果'),
}

model VerifyDomainOwnerResponse = {
  headers: map[string]string(name='headers'),
  body: VerifyDomainOwnerResponseBody(name='body'),
}

async function verifyDomainOwnerWithOptions(request: VerifyDomainOwnerRequest, runtime: Util.RuntimeOptions): VerifyDomainOwnerResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('VerifyDomainOwner', '2021-06-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function verifyDomainOwner(request: VerifyDomainOwnerRequest): VerifyDomainOwnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyDomainOwnerWithOptions(request, runtime);
}

