/**
 *
 */
import Util;
import OpenApi;

import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('miniapplcdp', @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 GenerateAuthTokenRequest {
  appId?: string(name='AppId'),
}

model GenerateAuthTokenResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    jwtToken?: string(name='JwtToken'),
  }(name='Data'),
}

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

async function generateAuthTokenWithOptions(request: GenerateAuthTokenRequest, runtime: Util.RuntimeOptions): GenerateAuthTokenResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GenerateAuthToken', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function generateAuthToken(request: GenerateAuthTokenRequest): GenerateAuthTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return generateAuthTokenWithOptions(request, runtime);
}

model GetAppModelRequest {
  appId?: string(name='AppId'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model GetAppModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function getAppModelWithOptions(request: GetAppModelRequest, runtime: Util.RuntimeOptions): GetAppModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAppModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAppModel(request: GetAppModelRequest): GetAppModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAppModelWithOptions(request, runtime);
}

model ListModelsByPageRequest {
  appId?: string(name='AppId'),
  modelName?: string(name='ModelName'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
  modelType?: string(name='ModelType'),
  withContent?: boolean(name='WithContent'),
}

model ListModelsByPageResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    pageNumber?: int32(name='PageNumber'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listModelsByPageWithOptions(request: ListModelsByPageRequest, runtime: Util.RuntimeOptions): ListModelsByPageResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListModelsByPage', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listModelsByPage(request: ListModelsByPageRequest): ListModelsByPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return listModelsByPageWithOptions(request, runtime);
}

model BatchCreateModelRequest {
  appId?: string(name='AppId'),
  modelDataJson?: string(name='ModelDataJson'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model BatchCreateModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function batchCreateModelWithOptions(request: BatchCreateModelRequest, runtime: Util.RuntimeOptions): BatchCreateModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BatchCreateModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function batchCreateModel(request: BatchCreateModelRequest): BatchCreateModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchCreateModelWithOptions(request, runtime);
}

model ListResourcesRequest {
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  moduleId?: string(name='ModuleId'),
  resourceName?: string(name='ResourceName'),
  scope?: string(name='Scope'),
  resourceType?: string(name='ResourceType'),
  withContent?: boolean(name='WithContent'),
}

model ListResourcesResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        moduleId?: string(name='ModuleId'),
        createTime?: string(name='CreateTime'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        resourceType?: string(name='ResourceType'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        scope?: string(name='Scope'),
        resourceId?: string(name='ResourceId'),
        content?: map[string]any(name='Content'),
        resourceName?: string(name='ResourceName'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listResourcesWithOptions(request: ListResourcesRequest, runtime: Util.RuntimeOptions): ListResourcesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListResources', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listResources(request: ListResourcesRequest): ListResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listResourcesWithOptions(request, runtime);
}

model GetEnvironmentRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
}

model GetEnvironmentResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    currentPublishId?: string(name='CurrentPublishId'),
    modifiedTime?: string(name='ModifiedTime'),
    appId?: string(name='AppId'),
    createTime?: string(name='CreateTime'),
    endpoint?: string(name='Endpoint'),
    envId?: string(name='EnvId'),
    envType?: string(name='EnvType'),
    publishingId?: string(name='PublishingId'),
  }(name='Data'),
}

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

async function getEnvironmentWithOptions(request: GetEnvironmentRequest, runtime: Util.RuntimeOptions): GetEnvironmentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetEnvironment', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getEnvironment(request: GetEnvironmentRequest): GetEnvironmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEnvironmentWithOptions(request, runtime);
}

model UpdateModuleRequest {
  description?: string(name='Description'),
  moduleId?: string(name='ModuleId'),
  moduleName?: string(name='ModuleName'),
}

model UpdateModuleResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleName?: string(name='ModuleName'),
    modifiedTime?: string(name='ModifiedTime'),
    moduleId?: string(name='ModuleId'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    targetAppSource?: string(name='TargetAppSource'),
  }(name='Data'),
}

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

async function updateModuleWithOptions(request: UpdateModuleRequest, runtime: Util.RuntimeOptions): UpdateModuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateModule', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateModule(request: UpdateModuleRequest): UpdateModuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateModuleWithOptions(request, runtime);
}

model CreateLogicModelRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  encodeType?: string(name='EncodeType'),
  content?: string(name='Content'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model CreateLogicModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function createLogicModelWithOptions(request: CreateLogicModelRequest, runtime: Util.RuntimeOptions): CreateLogicModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateLogicModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createLogicModel(request: CreateLogicModelRequest): CreateLogicModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLogicModelWithOptions(request, runtime);
}

model DeleteCommitRequest {
  appId?: string(name='AppId'),
  commitId?: string(name='CommitId'),
}

model DeleteCommitResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    commitType?: string(name='CommitType'),
    modifiedTime?: string(name='ModifiedTime'),
    commitId?: string(name='CommitId'),
    appId?: string(name='AppId'),
    createTime?: string(name='CreateTime'),
    rollbackToCommitId?: string(name='RollbackToCommitId'),
    commitLog?: string(name='CommitLog'),
  }(name='Data'),
}

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

async function deleteCommitWithOptions(request: DeleteCommitRequest, runtime: Util.RuntimeOptions): DeleteCommitResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteCommit', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteCommit(request: DeleteCommitRequest): DeleteCommitResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCommitWithOptions(request, runtime);
}

model UpdateResourceInfoRequest {
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  moduleId?: string(name='ModuleId'),
  resourceName?: string(name='ResourceName'),
  resourceId?: string(name='ResourceId'),
  scope?: string(name='Scope'),
}

model UpdateResourceInfoResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleId?: string(name='ModuleId'),
    createTime?: string(name='CreateTime'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    resourceType?: string(name='ResourceType'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    scope?: string(name='Scope'),
    resourceId?: string(name='ResourceId'),
    content?: map[string]any(name='Content'),
    resourceName?: string(name='ResourceName'),
  }(name='Data'),
}

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

async function updateResourceInfoWithOptions(request: UpdateResourceInfoRequest, runtime: Util.RuntimeOptions): UpdateResourceInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateResourceInfo', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateResourceInfo(request: UpdateResourceInfoRequest): UpdateResourceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateResourceInfoWithOptions(request, runtime);
}

model GetResourceRequest {
  appId?: string(name='AppId'),
  moduleId?: string(name='ModuleId'),
  resourceId?: string(name='ResourceId'),
  scope?: string(name='Scope'),
}

model GetResourceResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleId?: string(name='ModuleId'),
    createTime?: string(name='CreateTime'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    resourceType?: string(name='ResourceType'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    scope?: string(name='Scope'),
    resourceId?: string(name='ResourceId'),
    content?: map[string]any(name='Content'),
    resourceName?: string(name='ResourceName'),
  }(name='Data'),
}

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

async function getResourceWithOptions(request: GetResourceRequest, runtime: Util.RuntimeOptions): GetResourceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetResource', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getResource(request: GetResourceRequest): GetResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getResourceWithOptions(request, runtime);
}

model StopAppServerRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
}

model StopAppServerResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    envId?: string(name='EnvId'),
    appId?: string(name='AppId'),
    appServerStatus?: string(name='AppServerStatus'),
  }(name='Data'),
}

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

async function stopAppServerWithOptions(request: StopAppServerRequest, runtime: Util.RuntimeOptions): StopAppServerResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('StopAppServer', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function stopAppServer(request: StopAppServerRequest): StopAppServerResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopAppServerWithOptions(request, runtime);
}

model ListResourcesByPageRequest {
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  moduleId?: string(name='ModuleId'),
  resourceName?: string(name='ResourceName'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  scope?: string(name='Scope'),
  resourceType?: string(name='ResourceType'),
  withContent?: boolean(name='WithContent'),
}

model ListResourcesByPageResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    pageNumber?: int32(name='PageNumber'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    items?: [ 
      {
        moduleId?: string(name='ModuleId'),
        createTime?: string(name='CreateTime'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        resourceType?: string(name='ResourceType'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        scope?: string(name='Scope'),
        resourceId?: string(name='ResourceId'),
        content?: map[string]any(name='Content'),
        resourceName?: string(name='ResourceName'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listResourcesByPageWithOptions(request: ListResourcesByPageRequest, runtime: Util.RuntimeOptions): ListResourcesByPageResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListResourcesByPage', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listResourcesByPage(request: ListResourcesByPageRequest): ListResourcesByPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return listResourcesByPageWithOptions(request, runtime);
}

model GenerateAppUserPasswordRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
  userName?: string(name='UserName'),
}

model GenerateAppUserPasswordResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    userName?: string(name='UserName'),
    password?: string(name='Password'),
  }(name='Data'),
}

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

async function generateAppUserPasswordWithOptions(request: GenerateAppUserPasswordRequest, runtime: Util.RuntimeOptions): GenerateAppUserPasswordResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GenerateAppUserPassword', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function generateAppUserPassword(request: GenerateAppUserPasswordRequest): GenerateAppUserPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return generateAppUserPasswordWithOptions(request, runtime);
}

model UpdateAppModelContentRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  encodeType?: string(name='EncodeType'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model UpdateAppModelContentResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function updateAppModelContentWithOptions(request: UpdateAppModelContentRequest, runtime: Util.RuntimeOptions): UpdateAppModelContentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateAppModelContent', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateAppModelContent(request: UpdateAppModelContentRequest): UpdateAppModelContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAppModelContentWithOptions(request, runtime);
}

model DeleteModelRequest {
  appId?: string(name='AppId'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model DeleteModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function deleteModelWithOptions(request: DeleteModelRequest, runtime: Util.RuntimeOptions): DeleteModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteModel(request: DeleteModelRequest): DeleteModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteModelWithOptions(request, runtime);
}

model GetModelPackRequest {
  appId?: string(name='AppId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model GetModelPackResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    dataModels?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        modelId?: string(name='ModelId'),
        attributes?: [  map[string]any ](name='Attributes'),
      }
    ](name='DataModels'),
    pageModels?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        modelId?: string(name='ModelId'),
      }
    ](name='PageModels'),
    logicModels?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        modelId?: string(name='ModelId'),
      }
    ](name='LogicModels'),
    appModel?: {
      createTime?: string(name='CreateTime'),
      modelType?: string(name='ModelType'),
      subType?: string(name='SubType'),
      revision?: int32(name='Revision'),
      modifiedTime?: string(name='ModifiedTime'),
      description?: string(name='Description'),
      schemaVersion?: string(name='SchemaVersion'),
      appId?: string(name='AppId'),
      props?: map[string]any(name='Props'),
      modelStatus?: string(name='ModelStatus'),
      modelName?: string(name='ModelName'),
      content?: map[string]any(name='Content'),
      modelId?: string(name='ModelId'),
    }(name='AppModel'),
  }(name='Data'),
}

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

async function getModelPackWithOptions(request: GetModelPackRequest, runtime: Util.RuntimeOptions): GetModelPackResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetModelPack', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getModelPack(request: GetModelPackRequest): GetModelPackResponse {
  var runtime = new Util.RuntimeOptions{};
  return getModelPackWithOptions(request, runtime);
}

model CloneAppRequest {
  appId?: string(name='AppId'),
}

model CloneAppResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    appStatus?: string(name='AppStatus'),
    appName?: string(name='AppName'),
    isTemplate?: boolean(name='IsTemplate'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    appId?: string(name='AppId'),
    icon?: string(name='Icon'),
    appType?: string(name='AppType'),
    source?: string(name='Source'),
    lastEditTime?: string(name='LastEditTime'),
  }(name='Data'),
}

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

async function cloneAppWithOptions(request: CloneAppRequest, runtime: Util.RuntimeOptions): CloneAppResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CloneApp', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function cloneApp(request: CloneAppRequest): CloneAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return cloneAppWithOptions(request, runtime);
}

model CreateModelRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  encodeType?: string(name='EncodeType'),
  content?: string(name='Content'),
  modelId?: string(name='ModelId'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
  modelType?: string(name='ModelType'),
}

model CreateModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function createModelWithOptions(request: CreateModelRequest, runtime: Util.RuntimeOptions): CreateModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createModel(request: CreateModelRequest): CreateModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createModelWithOptions(request, runtime);
}

model ListEnvironmentOverviewsRequest {
  appId?: string(name='AppId'),
}

model ListEnvironmentOverviewsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        modifiedTime?: string(name='ModifiedTime'),
        envStatus?: string(name='EnvStatus'),
        currentPublish?: map[string]any(name='CurrentPublish'),
        opsRecord?: map[string]any(name='OpsRecord'),
        createTime?: string(name='CreateTime'),
        appId?: string(name='AppId'),
        endpoint?: string(name='Endpoint'),
        publishing?: map[string]any(name='Publishing'),
        envId?: string(name='EnvId'),
        config?: map[string]any(name='Config'),
        envType?: string(name='EnvType'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listEnvironmentOverviewsWithOptions(request: ListEnvironmentOverviewsRequest, runtime: Util.RuntimeOptions): ListEnvironmentOverviewsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListEnvironmentOverviews', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listEnvironmentOverviews(request: ListEnvironmentOverviewsRequest): ListEnvironmentOverviewsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEnvironmentOverviewsWithOptions(request, runtime);
}

model CheckDomainRequest {
  appId?: string(name='AppId'),
  domain?: string(name='Domain'),
  envId?: string(name='EnvId'),
  domainType?: string(name='DomainType'),
}

model CheckDomainResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    valid?: boolean(name='Valid'),
  }(name='Data'),
}

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

async function checkDomainWithOptions(request: CheckDomainRequest, runtime: Util.RuntimeOptions): CheckDomainResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CheckDomain', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function checkDomain(request: CheckDomainRequest): CheckDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkDomainWithOptions(request, runtime);
}

model BatchDeleteResourcesRequest {
  appId?: string(name='AppId'),
  moduleId?: string(name='ModuleId'),
  resourceIdList?: string(name='ResourceIdList'),
  scope?: string(name='Scope'),
}

model BatchDeleteResourcesResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        moduleId?: string(name='ModuleId'),
        createTime?: string(name='CreateTime'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        resourceType?: string(name='ResourceType'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        scope?: string(name='Scope'),
        resourceId?: string(name='ResourceId'),
        content?: map[string]any(name='Content'),
        resourceName?: string(name='ResourceName'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function batchDeleteResourcesWithOptions(request: BatchDeleteResourcesRequest, runtime: Util.RuntimeOptions): BatchDeleteResourcesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BatchDeleteResources', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function batchDeleteResources(request: BatchDeleteResourcesRequest): BatchDeleteResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchDeleteResourcesWithOptions(request, runtime);
}

model UpdateDataModelContentRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  encodeType?: string(name='EncodeType'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model UpdateDataModelContentResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
    attributes?: [  map[string]any ](name='Attributes'),
  }(name='Data'),
}

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

async function updateDataModelContentWithOptions(request: UpdateDataModelContentRequest, runtime: Util.RuntimeOptions): UpdateDataModelContentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateDataModelContent', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateDataModelContent(request: UpdateDataModelContentRequest): UpdateDataModelContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDataModelContentWithOptions(request, runtime);
}

model GetModuleRequest {
  moduleId?: string(name='ModuleId'),
}

model GetModuleResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleName?: string(name='ModuleName'),
    modifiedTime?: string(name='ModifiedTime'),
    moduleId?: string(name='ModuleId'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    targetAppSource?: string(name='TargetAppSource'),
  }(name='Data'),
}

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

async function getModuleWithOptions(request: GetModuleRequest, runtime: Util.RuntimeOptions): GetModuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetModule', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getModule(request: GetModuleRequest): GetModuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return getModuleWithOptions(request, runtime);
}

model StartAppServerRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
}

model StartAppServerResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    envId?: string(name='EnvId'),
    appId?: string(name='AppId'),
    appServerStatus?: string(name='AppServerStatus'),
  }(name='Data'),
}

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

async function startAppServerWithOptions(request: StartAppServerRequest, runtime: Util.RuntimeOptions): StartAppServerResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('StartAppServer', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function startAppServer(request: StartAppServerRequest): StartAppServerResponse {
  var runtime = new Util.RuntimeOptions{};
  return startAppServerWithOptions(request, runtime);
}

model GetDataModelRequest {
  appId?: string(name='AppId'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model GetDataModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
    attributes?: [  map[string]any ](name='Attributes'),
  }(name='Data'),
}

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

async function getDataModelWithOptions(request: GetDataModelRequest, runtime: Util.RuntimeOptions): GetDataModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDataModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDataModel(request: GetDataModelRequest): GetDataModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDataModelWithOptions(request, runtime);
}

model ListLogicModelsRequest {
  appId?: string(name='AppId'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
  withContent?: boolean(name='WithContent'),
}

model ListLogicModelsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listLogicModelsWithOptions(request: ListLogicModelsRequest, runtime: Util.RuntimeOptions): ListLogicModelsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListLogicModels', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listLogicModels(request: ListLogicModelsRequest): ListLogicModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLogicModelsWithOptions(request, runtime);
}

model ListDomainsRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
}

model ListDomainsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        applied?: boolean(name='Applied'),
        domain?: string(name='Domain'),
        appId?: string(name='AppId'),
        path?: string(name='Path'),
        deleted?: boolean(name='Deleted'),
        envId?: string(name='EnvId'),
        domainType?: string(name='DomainType'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listDomainsWithOptions(request: ListDomainsRequest, runtime: Util.RuntimeOptions): ListDomainsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListDomains', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listDomains(request: ListDomainsRequest): ListDomainsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDomainsWithOptions(request, runtime);
}

model UpdateModelInfoRequest {
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  modelId?: string(name='ModelId'),
  modelName?: string(name='ModelName'),
  permission?: string(name='Permission'),
  schemaVersion?: string(name='SchemaVersion'),
}

model UpdateModelInfoResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function updateModelInfoWithOptions(request: UpdateModelInfoRequest, runtime: Util.RuntimeOptions): UpdateModelInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateModelInfo', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateModelInfo(request: UpdateModelInfoRequest): UpdateModelInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateModelInfoWithOptions(request, runtime);
}

model GetDefaultAppUserRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
}

model GetDefaultAppUserResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    userName?: string(name='UserName'),
    hasPassword?: boolean(name='HasPassword'),
  }(name='Data'),
}

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

async function getDefaultAppUserWithOptions(request: GetDefaultAppUserRequest, runtime: Util.RuntimeOptions): GetDefaultAppUserResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDefaultAppUser', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDefaultAppUser(request: GetDefaultAppUserRequest): GetDefaultAppUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDefaultAppUserWithOptions(request, runtime);
}

model GetUserResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    userType?: string(name='UserType'),
    userStatus?: string(name='UserStatus'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
  }(name='Data'),
}

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

async function getUserWithOptions(runtime: Util.RuntimeOptions): GetUserResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('GetUser', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getUser(): GetUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserWithOptions(runtime);
}

model ListPublishesRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  publishStatus?: string(name='PublishStatus'),
  publishType?: string(name='PublishType'),
}

model ListPublishesResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    pageNumber?: int32(name='PageNumber'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    items?: [ 
      {
        commitId?: string(name='CommitId'),
        createTime?: string(name='CreateTime'),
        publishStatus?: string(name='PublishStatus'),
        completionTime?: string(name='CompletionTime'),
        versionNumber?: string(name='VersionNumber'),
        startTime?: string(name='StartTime'),
        modifiedTime?: string(name='ModifiedTime'),
        publishId?: string(name='PublishId'),
        publishType?: string(name='PublishType'),
        description?: string(name='Description'),
        appId?: string(name='AppId'),
        envId?: string(name='EnvId'),
        reason?: string(name='Reason'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listPublishesWithOptions(request: ListPublishesRequest, runtime: Util.RuntimeOptions): ListPublishesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPublishes', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPublishes(request: ListPublishesRequest): ListPublishesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPublishesWithOptions(request, runtime);
}

model GetPageModelRequest {
  appId?: string(name='AppId'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model GetPageModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function getPageModelWithOptions(request: GetPageModelRequest, runtime: Util.RuntimeOptions): GetPageModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPageModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPageModel(request: GetPageModelRequest): GetPageModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPageModelWithOptions(request, runtime);
}

model CreateResourceRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  schemaVersion?: string(name='SchemaVersion'),
  description?: string(name='Description'),
  content?: string(name='Content'),
  moduleId?: string(name='ModuleId'),
  resourceName?: string(name='ResourceName'),
  scope?: string(name='Scope'),
  resourceType?: string(name='ResourceType'),
}

model CreateResourceResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleId?: string(name='ModuleId'),
    createTime?: string(name='CreateTime'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    resourceType?: string(name='ResourceType'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    scope?: string(name='Scope'),
    resourceId?: string(name='ResourceId'),
    content?: map[string]any(name='Content'),
    resourceName?: string(name='ResourceName'),
  }(name='Data'),
}

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

async function createResourceWithOptions(request: CreateResourceRequest, runtime: Util.RuntimeOptions): CreateResourceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateResource', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createResource(request: CreateResourceRequest): CreateResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createResourceWithOptions(request, runtime);
}

model GetDomainOverviewRequest {
  appId?: string(name='AppId'),
  domain?: string(name='Domain'),
  envId?: string(name='EnvId'),
}

model GetDomainOverviewResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    domain?: string(name='Domain'),
    applied?: boolean(name='Applied'),
    certificate?: map[string]any(name='Certificate'),
    appId?: string(name='AppId'),
    path?: string(name='Path'),
    deleted?: boolean(name='Deleted'),
    envId?: string(name='EnvId'),
    cname?: string(name='Cname'),
    domainType?: string(name='DomainType'),
  }(name='Data'),
}

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

async function getDomainOverviewWithOptions(request: GetDomainOverviewRequest, runtime: Util.RuntimeOptions): GetDomainOverviewResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDomainOverview', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDomainOverview(request: GetDomainOverviewRequest): GetDomainOverviewResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDomainOverviewWithOptions(request, runtime);
}

model GetHistoryStatsRequest {
  appId?: string(name='AppId'),
  endDate?: string(name='EndDate'),
  startDate?: string(name='StartDate'),
}

model GetHistoryStatsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    historyPv?: map[string]any(name='HistoryPv'),
    historyUv?: map[string]any(name='HistoryUv'),
  }(name='Data'),
}

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

async function getHistoryStatsWithOptions(request: GetHistoryStatsRequest, runtime: Util.RuntimeOptions): GetHistoryStatsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetHistoryStats', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getHistoryStats(request: GetHistoryStatsRequest): GetHistoryStatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getHistoryStatsWithOptions(request, runtime);
}

model CreatePublishRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  commitId?: string(name='CommitId'),
  description?: string(name='Description'),
  envType?: string(name='EnvType'),
  publishType?: string(name='PublishType'),
  versionNumber?: string(name='VersionNumber'),
}

model CreatePublishResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    commitId?: string(name='CommitId'),
    createTime?: string(name='CreateTime'),
    publishStatus?: string(name='PublishStatus'),
    completionTime?: string(name='CompletionTime'),
    versionNumber?: string(name='VersionNumber'),
    startTime?: string(name='StartTime'),
    modifiedTime?: string(name='ModifiedTime'),
    publishId?: string(name='PublishId'),
    publishType?: string(name='PublishType'),
    description?: string(name='Description'),
    appId?: string(name='AppId'),
    envId?: string(name='EnvId'),
    reason?: string(name='Reason'),
    subTasks?: [  map[string]any ](name='SubTasks'),
  }(name='Data'),
}

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

async function createPublishWithOptions(request: CreatePublishRequest, runtime: Util.RuntimeOptions): CreatePublishResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreatePublish', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createPublish(request: CreatePublishRequest): CreatePublishResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPublishWithOptions(request, runtime);
}

model GetArtifactRequest {
  appId?: string(name='AppId'),
  artifactId?: string(name='ArtifactId'),
}

model GetArtifactResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    artifactId?: string(name='ArtifactId'),
    modifiedTime?: string(name='ModifiedTime'),
    appId?: string(name='AppId'),
    createTime?: string(name='CreateTime'),
    artifactType?: string(name='ArtifactType'),
    available?: boolean(name='Available'),
    url?: string(name='Url'),
  }(name='Data'),
}

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

async function getArtifactWithOptions(request: GetArtifactRequest, runtime: Util.RuntimeOptions): GetArtifactResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetArtifact', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getArtifact(request: GetArtifactRequest): GetArtifactResponse {
  var runtime = new Util.RuntimeOptions{};
  return getArtifactWithOptions(request, runtime);
}

model GetLogicModelRequest {
  appId?: string(name='AppId'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model GetLogicModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function getLogicModelWithOptions(request: GetLogicModelRequest, runtime: Util.RuntimeOptions): GetLogicModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLogicModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLogicModel(request: GetLogicModelRequest): GetLogicModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLogicModelWithOptions(request, runtime);
}

model GetDomainCnameRequest {
  appId?: string(name='AppId'),
  domain?: string(name='Domain'),
  envId?: string(name='EnvId'),
  domainType?: string(name='DomainType'),
}

model GetDomainCnameResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    cname?: string(name='Cname'),
  }(name='Data'),
}

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

async function getDomainCnameWithOptions(request: GetDomainCnameRequest, runtime: Util.RuntimeOptions): GetDomainCnameResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetDomainCname', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getDomainCname(request: GetDomainCnameRequest): GetDomainCnameResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDomainCnameWithOptions(request, runtime);
}

model ListPageModelsRequest {
  appId?: string(name='AppId'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
  withContent?: boolean(name='WithContent'),
}

model ListPageModelsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listPageModelsWithOptions(request: ListPageModelsRequest, runtime: Util.RuntimeOptions): ListPageModelsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPageModels', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPageModels(request: ListPageModelsRequest): ListPageModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPageModelsWithOptions(request, runtime);
}

model UpdateDataModelAttributesRequest {
  appId?: string(name='AppId'),
  attributes?: string(name='Attributes'),
  encodeType?: string(name='EncodeType'),
  modelId?: string(name='ModelId'),
}

model UpdateDataModelAttributesResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
    attributes?: [  map[string]any ](name='Attributes'),
  }(name='Data'),
}

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

async function updateDataModelAttributesWithOptions(request: UpdateDataModelAttributesRequest, runtime: Util.RuntimeOptions): UpdateDataModelAttributesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateDataModelAttributes', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateDataModelAttributes(request: UpdateDataModelAttributesRequest): UpdateDataModelAttributesResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDataModelAttributesWithOptions(request, runtime);
}

model UpdateLogicModelContentRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  encodeType?: string(name='EncodeType'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model UpdateLogicModelContentResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function updateLogicModelContentWithOptions(request: UpdateLogicModelContentRequest, runtime: Util.RuntimeOptions): UpdateLogicModelContentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateLogicModelContent', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateLogicModelContent(request: UpdateLogicModelContentRequest): UpdateLogicModelContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLogicModelContentWithOptions(request, runtime);
}

model UpdateAppRequest {
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  icon?: string(name='Icon'),
  appName?: string(name='AppName'),
}

model UpdateAppResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    appStatus?: string(name='AppStatus'),
    appName?: string(name='AppName'),
    isTemplate?: boolean(name='IsTemplate'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    appId?: string(name='AppId'),
    icon?: string(name='Icon'),
    appType?: string(name='AppType'),
    source?: string(name='Source'),
    lastEditTime?: string(name='LastEditTime'),
  }(name='Data'),
}

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', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

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

model GetModelRequest {
  appId?: string(name='AppId'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model GetModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function getModelWithOptions(request: GetModelRequest, runtime: Util.RuntimeOptions): GetModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getModel(request: GetModelRequest): GetModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return getModelWithOptions(request, runtime);
}

model ListModelsRequest {
  appId?: string(name='AppId'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
  modelType?: string(name='ModelType'),
  withContent?: boolean(name='WithContent'),
}

model ListModelsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listModelsWithOptions(request: ListModelsRequest, runtime: Util.RuntimeOptions): ListModelsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListModels', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listModels(request: ListModelsRequest): ListModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listModelsWithOptions(request, runtime);
}

model ListEnvironmentsRequest {
  appId?: string(name='AppId'),
  envType?: string(name='EnvType'),
}

model ListEnvironmentsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        currentPublishId?: string(name='CurrentPublishId'),
        modifiedTime?: string(name='ModifiedTime'),
        appId?: string(name='AppId'),
        createTime?: string(name='CreateTime'),
        endpoint?: string(name='Endpoint'),
        envId?: string(name='EnvId'),
        envType?: string(name='EnvType'),
        publishingId?: string(name='PublishingId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listEnvironmentsWithOptions(request: ListEnvironmentsRequest, runtime: Util.RuntimeOptions): ListEnvironmentsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListEnvironments', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listEnvironments(request: ListEnvironmentsRequest): ListEnvironmentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEnvironmentsWithOptions(request, runtime);
}

model GetCommitRequest {
  appId?: string(name='AppId'),
  commitId?: string(name='CommitId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model GetCommitResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    commitType?: string(name='CommitType'),
    modifiedTime?: string(name='ModifiedTime'),
    commitId?: string(name='CommitId'),
    appId?: string(name='AppId'),
    createTime?: string(name='CreateTime'),
    rollbackToCommitId?: string(name='RollbackToCommitId'),
    appModel?: map[string]any(name='AppModel'),
    commitLog?: string(name='CommitLog'),
    logicModels?: [  map[string]any ](name='LogicModels'),
    pageModels?: [  map[string]any ](name='PageModels'),
    dataModels?: [  map[string]any ](name='DataModels'),
  }(name='Data'),
}

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

async function getCommitWithOptions(request: GetCommitRequest, runtime: Util.RuntimeOptions): GetCommitResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetCommit', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getCommit(request: GetCommitRequest): GetCommitResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCommitWithOptions(request, runtime);
}

model ListModulesRequest {
  description?: string(name='Description'),
  moduleName?: string(name='ModuleName'),
  targetAppSource?: string(name='TargetAppSource'),
}

model ListModulesResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        moduleName?: string(name='ModuleName'),
        modifiedTime?: string(name='ModifiedTime'),
        moduleId?: string(name='ModuleId'),
        description?: string(name='Description'),
        createTime?: string(name='CreateTime'),
        targetAppSource?: string(name='TargetAppSource'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listModulesWithOptions(request: ListModulesRequest, runtime: Util.RuntimeOptions): ListModulesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListModules', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listModules(request: ListModulesRequest): ListModulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listModulesWithOptions(request, runtime);
}

model DeleteAppRequest {
  appId?: string(name='AppId'),
}

model DeleteAppResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    appStatus?: string(name='AppStatus'),
    appName?: string(name='AppName'),
    isTemplate?: boolean(name='IsTemplate'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    appId?: string(name='AppId'),
    icon?: string(name='Icon'),
    appType?: string(name='AppType'),
    source?: string(name='Source'),
    lastEditTime?: string(name='LastEditTime'),
  }(name='Data'),
}

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', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

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

model UpdateResourceRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  description?: string(name='Description'),
  moduleId?: string(name='ModuleId'),
  resourceName?: string(name='ResourceName'),
  resourceId?: string(name='ResourceId'),
  scope?: string(name='Scope'),
}

model UpdateResourceResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleId?: string(name='ModuleId'),
    createTime?: string(name='CreateTime'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    resourceType?: string(name='ResourceType'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    scope?: string(name='Scope'),
    resourceId?: string(name='ResourceId'),
    content?: map[string]any(name='Content'),
    resourceName?: string(name='ResourceName'),
  }(name='Data'),
}

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

async function updateResourceWithOptions(request: UpdateResourceRequest, runtime: Util.RuntimeOptions): UpdateResourceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateResource', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateResource(request: UpdateResourceRequest): UpdateResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateResourceWithOptions(request, runtime);
}

model CreateCommitRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  commitLog?: string(name='CommitLog'),
  rollbackToCommitId?: string(name='RollbackToCommitId'),
  schemaVersion?: string(name='SchemaVersion'),
  commitType?: string(name='CommitType'),
}

model CreateCommitResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    commitType?: string(name='CommitType'),
    modifiedTime?: string(name='ModifiedTime'),
    commitId?: string(name='CommitId'),
    appId?: string(name='AppId'),
    createTime?: string(name='CreateTime'),
    rollbackToCommitId?: string(name='RollbackToCommitId'),
    commitLog?: string(name='CommitLog'),
  }(name='Data'),
}

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

async function createCommitWithOptions(request: CreateCommitRequest, runtime: Util.RuntimeOptions): CreateCommitResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateCommit', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createCommit(request: CreateCommitRequest): CreateCommitResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCommitWithOptions(request, runtime);
}

model ResetAppUserPasswordRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
  userName?: string(name='UserName'),
}

model ResetAppUserPasswordResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    userName?: string(name='UserName'),
    password?: string(name='Password'),
  }(name='Data'),
}

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

async function resetAppUserPasswordWithOptions(request: ResetAppUserPasswordRequest, runtime: Util.RuntimeOptions): ResetAppUserPasswordResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ResetAppUserPassword', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function resetAppUserPassword(request: ResetAppUserPasswordRequest): ResetAppUserPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetAppUserPasswordWithOptions(request, runtime);
}

model RestoreModelRequest {
  appId?: string(name='AppId'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model RestoreModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function restoreModelWithOptions(request: RestoreModelRequest, runtime: Util.RuntimeOptions): RestoreModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RestoreModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function restoreModel(request: RestoreModelRequest): RestoreModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return restoreModelWithOptions(request, runtime);
}

model UpdateAppModelRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  encodeType?: string(name='EncodeType'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model UpdateAppModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function updateAppModelWithOptions(request: UpdateAppModelRequest, runtime: Util.RuntimeOptions): UpdateAppModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateAppModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateAppModel(request: UpdateAppModelRequest): UpdateAppModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAppModelWithOptions(request, runtime);
}

model ListAppsRequest {
  description?: string(name='Description'),
  appName?: string(name='AppName'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  source?: string(name='Source'),
  template?: boolean(name='Template'),
  appType?: string(name='AppType'),
}

model ListAppsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    pageNumber?: int32(name='PageNumber'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    items?: [ 
      {
        appStatus?: string(name='AppStatus'),
        appName?: string(name='AppName'),
        isTemplate?: boolean(name='IsTemplate'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        createTime?: string(name='CreateTime'),
        appId?: string(name='AppId'),
        icon?: string(name='Icon'),
        appType?: string(name='AppType'),
        source?: string(name='Source'),
        lastEditTime?: string(name='LastEditTime'),
      }
    ](name='Items'),
  }(name='Data'),
}

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', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

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

model CreateTemplateAppRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
}

model CreateTemplateAppResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    appStatus?: string(name='AppStatus'),
    appName?: string(name='AppName'),
    isTemplate?: boolean(name='IsTemplate'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    appId?: string(name='AppId'),
    icon?: string(name='Icon'),
    appType?: string(name='AppType'),
    source?: string(name='Source'),
    lastEditTime?: string(name='LastEditTime'),
  }(name='Data'),
}

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

async function createTemplateAppWithOptions(request: CreateTemplateAppRequest, runtime: Util.RuntimeOptions): CreateTemplateAppResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateTemplateApp', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createTemplateApp(request: CreateTemplateAppRequest): CreateTemplateAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTemplateAppWithOptions(request, runtime);
}

model ListCommitsRequest {
  appId?: string(name='AppId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListCommitsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    pageNumber?: int32(name='PageNumber'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    items?: [ 
      {
        commitType?: string(name='CommitType'),
        modifiedTime?: string(name='ModifiedTime'),
        commitId?: string(name='CommitId'),
        appId?: string(name='AppId'),
        createTime?: string(name='CreateTime'),
        rollbackToCommitId?: string(name='RollbackToCommitId'),
        commitLog?: string(name='CommitLog'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listCommitsWithOptions(request: ListCommitsRequest, runtime: Util.RuntimeOptions): ListCommitsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListCommits', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listCommits(request: ListCommitsRequest): ListCommitsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCommitsWithOptions(request, runtime);
}

model ListPublishVersionsRequest {
  appId?: string(name='AppId'),
  envId?: string(name='EnvId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListPublishVersionsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    pageNumber?: int32(name='PageNumber'),
    pageSize?: int32(name='PageSize'),
    totalCount?: int32(name='TotalCount'),
    items?: [ 
      {
        commitId?: string(name='CommitId'),
        createTime?: string(name='CreateTime'),
        publishStatus?: string(name='PublishStatus'),
        completionTime?: string(name='CompletionTime'),
        versionNumber?: string(name='VersionNumber'),
        startTime?: string(name='StartTime'),
        modifiedTime?: string(name='ModifiedTime'),
        publishId?: string(name='PublishId'),
        publishType?: string(name='PublishType'),
        description?: string(name='Description'),
        appId?: string(name='AppId'),
        envId?: string(name='EnvId'),
        reason?: string(name='Reason'),
        subTasks?: [  map[string]any ](name='SubTasks'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listPublishVersionsWithOptions(request: ListPublishVersionsRequest, runtime: Util.RuntimeOptions): ListPublishVersionsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPublishVersions', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPublishVersions(request: ListPublishVersionsRequest): ListPublishVersionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPublishVersionsWithOptions(request, runtime);
}

model ListSystemModelsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listSystemModelsWithOptions(runtime: Util.RuntimeOptions): ListSystemModelsResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('ListSystemModels', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listSystemModels(): ListSystemModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSystemModelsWithOptions(runtime);
}

model UpdatePageModelContentRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  encodeType?: string(name='EncodeType'),
  modelId?: string(name='ModelId'),
  schemaVersion?: string(name='SchemaVersion'),
}

model UpdatePageModelContentResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function updatePageModelContentWithOptions(request: UpdatePageModelContentRequest, runtime: Util.RuntimeOptions): UpdatePageModelContentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdatePageModelContent', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updatePageModelContent(request: UpdatePageModelContentRequest): UpdatePageModelContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return updatePageModelContentWithOptions(request, runtime);
}

model GetAppSecretRequest {
  appId?: string(name='AppId'),
}

model GetAppSecretResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    appSecret?: string(name='AppSecret'),
    appId?: string(name='AppId'),
  }(name='Data'),
}

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

async function getAppSecretWithOptions(request: GetAppSecretRequest, runtime: Util.RuntimeOptions): GetAppSecretResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAppSecret', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAppSecret(request: GetAppSecretRequest): GetAppSecretResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAppSecretWithOptions(request, runtime);
}

model SetEnvironmentDefaultDomainRequest {
  appId?: string(name='AppId'),
  domain?: string(name='Domain'),
  domainType?: string(name='DomainType'),
  envId?: string(name='EnvId'),
}

model SetEnvironmentDefaultDomainResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    defaultMasterDomain?: string(name='DefaultMasterDomain'),
    staticDomainApplied?: boolean(name='StaticDomainApplied'),
    defaultStaticDomain?: string(name='DefaultStaticDomain'),
    staticDomain?: string(name='StaticDomain'),
    configChanged?: boolean(name='ConfigChanged'),
    masterDomain?: string(name='MasterDomain'),
    masterDomainApplied?: boolean(name='MasterDomainApplied'),
  }(name='Data'),
}

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

async function setEnvironmentDefaultDomainWithOptions(request: SetEnvironmentDefaultDomainRequest, runtime: Util.RuntimeOptions): SetEnvironmentDefaultDomainResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SetEnvironmentDefaultDomain', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function setEnvironmentDefaultDomain(request: SetEnvironmentDefaultDomainRequest): SetEnvironmentDefaultDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return setEnvironmentDefaultDomainWithOptions(request, runtime);
}

model GetRealtimeStatsRequest {
  appId?: string(name='AppId'),
}

model GetRealtimeStatsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    totalUvCount?: map[string]any(name='TotalUvCount'),
    totalPvCount?: map[string]any(name='TotalPvCount'),
    todayPvCount?: map[string]any(name='TodayPvCount'),
    todayUvCount?: map[string]any(name='TodayUvCount'),
  }(name='Data'),
}

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

async function getRealtimeStatsWithOptions(request: GetRealtimeStatsRequest, runtime: Util.RuntimeOptions): GetRealtimeStatsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetRealtimeStats', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getRealtimeStats(request: GetRealtimeStatsRequest): GetRealtimeStatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRealtimeStatsWithOptions(request, runtime);
}

model CreateModuleRequest {
  clientToken?: string(name='ClientToken'),
  description?: string(name='Description'),
  moduleName?: string(name='ModuleName'),
  targetAppSource?: string(name='TargetAppSource'),
}

model CreateModuleResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleName?: string(name='ModuleName'),
    modifiedTime?: string(name='ModifiedTime'),
    moduleId?: string(name='ModuleId'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    targetAppSource?: string(name='TargetAppSource'),
  }(name='Data'),
}

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

async function createModuleWithOptions(request: CreateModuleRequest, runtime: Util.RuntimeOptions): CreateModuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateModule', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createModule(request: CreateModuleRequest): CreateModuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createModuleWithOptions(request, runtime);
}

model DeleteModuleRequest {
  moduleId?: string(name='ModuleId'),
}

model DeleteModuleResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleName?: string(name='ModuleName'),
    modifiedTime?: string(name='ModifiedTime'),
    moduleId?: string(name='ModuleId'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    targetAppSource?: string(name='TargetAppSource'),
  }(name='Data'),
}

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

async function deleteModuleWithOptions(request: DeleteModuleRequest, runtime: Util.RuntimeOptions): DeleteModuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteModule', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteModule(request: DeleteModuleRequest): DeleteModuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteModuleWithOptions(request, runtime);
}

model BatchDeleteModelRequest {
  appId?: string(name='AppId'),
  modelIdList?: string(name='ModelIdList'),
  schemaVersion?: string(name='SchemaVersion'),
}

model BatchDeleteModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function batchDeleteModelWithOptions(request: BatchDeleteModelRequest, runtime: Util.RuntimeOptions): BatchDeleteModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BatchDeleteModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function batchDeleteModel(request: BatchDeleteModelRequest): BatchDeleteModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchDeleteModelWithOptions(request, runtime);
}

model BatchRestoreModelRequest {
  appId?: string(name='AppId'),
  modelIdList?: string(name='ModelIdList'),
  schemaVersion?: string(name='SchemaVersion'),
}

model BatchRestoreModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function batchRestoreModelWithOptions(request: BatchRestoreModelRequest, runtime: Util.RuntimeOptions): BatchRestoreModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('BatchRestoreModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function batchRestoreModel(request: BatchRestoreModelRequest): BatchRestoreModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchRestoreModelWithOptions(request, runtime);
}

model GetAppRequest {
  appId?: string(name='AppId'),
}

model GetAppResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    appStatus?: string(name='AppStatus'),
    appName?: string(name='AppName'),
    isTemplate?: boolean(name='IsTemplate'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    appId?: string(name='AppId'),
    icon?: string(name='Icon'),
    appType?: string(name='AppType'),
    source?: string(name='Source'),
    lastEditTime?: string(name='LastEditTime'),
  }(name='Data'),
}

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', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

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

model DeleteResourceRequest {
  appId?: string(name='AppId'),
  moduleId?: string(name='ModuleId'),
  resourceId?: string(name='ResourceId'),
  scope?: string(name='Scope'),
}

model DeleteResourceResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleId?: string(name='ModuleId'),
    createTime?: string(name='CreateTime'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    resourceType?: string(name='ResourceType'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    scope?: string(name='Scope'),
    resourceId?: string(name='ResourceId'),
    content?: map[string]any(name='Content'),
    resourceName?: string(name='ResourceName'),
  }(name='Data'),
}

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

async function deleteResourceWithOptions(request: DeleteResourceRequest, runtime: Util.RuntimeOptions): DeleteResourceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteResource', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteResource(request: DeleteResourceRequest): DeleteResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteResourceWithOptions(request, runtime);
}

model GetPublishRequest {
  appId?: string(name='AppId'),
  publishId?: string(name='PublishId'),
}

model GetPublishResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    commitId?: string(name='CommitId'),
    createTime?: string(name='CreateTime'),
    publishStatus?: string(name='PublishStatus'),
    completionTime?: string(name='CompletionTime'),
    versionNumber?: string(name='VersionNumber'),
    startTime?: string(name='StartTime'),
    modifiedTime?: string(name='ModifiedTime'),
    publishId?: string(name='PublishId'),
    publishType?: string(name='PublishType'),
    description?: string(name='Description'),
    appId?: string(name='AppId'),
    envId?: string(name='EnvId'),
    reason?: string(name='Reason'),
    subTasks?: [  map[string]any ](name='SubTasks'),
  }(name='Data'),
}

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

async function getPublishWithOptions(request: GetPublishRequest, runtime: Util.RuntimeOptions): GetPublishResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetPublish', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getPublish(request: GetPublishRequest): GetPublishResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPublishWithOptions(request, runtime);
}

model CreatePageModelRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  encodeType?: string(name='EncodeType'),
  content?: string(name='Content'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model CreatePageModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function createPageModelWithOptions(request: CreatePageModelRequest, runtime: Util.RuntimeOptions): CreatePageModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreatePageModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createPageModel(request: CreatePageModelRequest): CreatePageModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPageModelWithOptions(request, runtime);
}

model DeleteDomainRequest {
  appId?: string(name='AppId'),
  domain?: string(name='Domain'),
  envId?: string(name='EnvId'),
}

model DeleteDomainResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    applied?: boolean(name='Applied'),
    domain?: string(name='Domain'),
    appId?: string(name='AppId'),
    path?: string(name='Path'),
    deleted?: boolean(name='Deleted'),
    envId?: string(name='EnvId'),
    domainType?: string(name='DomainType'),
  }(name='Data'),
}

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

async function deleteDomainWithOptions(request: DeleteDomainRequest, runtime: Util.RuntimeOptions): DeleteDomainResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteDomain', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteDomain(request: DeleteDomainRequest): DeleteDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDomainWithOptions(request, runtime);
}

model ListArtifactsRequest {
  appId?: string(name='AppId'),
  publishId?: string(name='PublishId'),
}

model ListArtifactsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        artifactId?: string(name='ArtifactId'),
        modifiedTime?: string(name='ModifiedTime'),
        appId?: string(name='AppId'),
        createTime?: string(name='CreateTime'),
        artifactType?: string(name='ArtifactType'),
        available?: boolean(name='Available'),
        url?: string(name='Url'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listArtifactsWithOptions(request: ListArtifactsRequest, runtime: Util.RuntimeOptions): ListArtifactsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListArtifacts', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listArtifacts(request: ListArtifactsRequest): ListArtifactsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listArtifactsWithOptions(request, runtime);
}

model CreateDomainRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  domain?: string(name='Domain'),
  envId?: string(name='EnvId'),
  path?: string(name='Path'),
  privateKey?: string(name='PrivateKey'),
  publicKey?: string(name='PublicKey'),
  domainType?: string(name='DomainType'),
}

model CreateDomainResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    applied?: boolean(name='Applied'),
    domain?: string(name='Domain'),
    appId?: string(name='AppId'),
    path?: string(name='Path'),
    deleted?: boolean(name='Deleted'),
    envId?: string(name='EnvId'),
    domainType?: string(name='DomainType'),
  }(name='Data'),
}

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

async function createDomainWithOptions(request: CreateDomainRequest, runtime: Util.RuntimeOptions): CreateDomainResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateDomain', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createDomain(request: CreateDomainRequest): CreateDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDomainWithOptions(request, runtime);
}

model CreateDataModelRequest {
  clientToken?: string(name='ClientToken'),
  appId?: string(name='AppId'),
  description?: string(name='Description'),
  encodeType?: string(name='EncodeType'),
  attributes?: string(name='Attributes'),
  content?: string(name='Content'),
  modelId?: string(name='ModelId'),
  modelName?: string(name='ModelName'),
  permission?: string(name='Permission'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model CreateDataModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
    attributes?: [  map[string]any ](name='Attributes'),
  }(name='Data'),
}

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

async function createDataModelWithOptions(request: CreateDataModelRequest, runtime: Util.RuntimeOptions): CreateDataModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateDataModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createDataModel(request: CreateDataModelRequest): CreateDataModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDataModelWithOptions(request, runtime);
}

model UpdateResourceContentRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  moduleId?: string(name='ModuleId'),
  resourceId?: string(name='ResourceId'),
  scope?: string(name='Scope'),
}

model UpdateResourceContentResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    moduleId?: string(name='ModuleId'),
    createTime?: string(name='CreateTime'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    resourceType?: string(name='ResourceType'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    scope?: string(name='Scope'),
    resourceId?: string(name='ResourceId'),
    content?: map[string]any(name='Content'),
    resourceName?: string(name='ResourceName'),
  }(name='Data'),
}

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

async function updateResourceContentWithOptions(request: UpdateResourceContentRequest, runtime: Util.RuntimeOptions): UpdateResourceContentResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateResourceContent', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateResourceContent(request: UpdateResourceContentRequest): UpdateResourceContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateResourceContentWithOptions(request, runtime);
}

model GenerateUploadTokenRequest {
  appId?: string(name='AppId'),
}

model GenerateUploadTokenResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    key?: string(name='Key'),
    signature?: string(name='Signature'),
    serverURL?: string(name='ServerURL'),
    ossAccessKeyId?: string(name='OssAccessKeyId'),
    policy?: string(name='Policy'),
  }(name='Data'),
}

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

async function generateUploadTokenWithOptions(request: GenerateUploadTokenRequest, runtime: Util.RuntimeOptions): GenerateUploadTokenResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GenerateUploadToken', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function generateUploadToken(request: GenerateUploadTokenRequest): GenerateUploadTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return generateUploadTokenWithOptions(request, runtime);
}

model GetLatestCommitRequest {
  appId?: string(name='AppId'),
}

model GetLatestCommitResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    commitType?: string(name='CommitType'),
    modifiedTime?: string(name='ModifiedTime'),
    commitId?: string(name='CommitId'),
    appId?: string(name='AppId'),
    createTime?: string(name='CreateTime'),
    rollbackToCommitId?: string(name='RollbackToCommitId'),
    commitLog?: string(name='CommitLog'),
  }(name='Data'),
}

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

async function getLatestCommitWithOptions(request: GetLatestCommitRequest, runtime: Util.RuntimeOptions): GetLatestCommitResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetLatestCommit', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getLatestCommit(request: GetLatestCommitRequest): GetLatestCommitResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLatestCommitWithOptions(request, runtime);
}

model CreateAppRequest {
  clientToken?: string(name='ClientToken'),
  description?: string(name='Description'),
  icon?: string(name='Icon'),
  appName?: string(name='AppName'),
  source?: string(name='Source'),
  templateId?: string(name='TemplateId'),
  appType?: string(name='AppType'),
}

model CreateAppResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    appStatus?: string(name='AppStatus'),
    appName?: string(name='AppName'),
    isTemplate?: boolean(name='IsTemplate'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    createTime?: string(name='CreateTime'),
    appId?: string(name='AppId'),
    icon?: string(name='Icon'),
    appType?: string(name='AppType'),
    source?: string(name='Source'),
    lastEditTime?: string(name='LastEditTime'),
  }(name='Data'),
}

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', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

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

model RunLogicModelRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  encodeType?: string(name='EncodeType'),
  parameters?: string(name='Parameters'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
}

model RunLogicModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    status?: int32(name='Status'),
    body?: string(name='Body'),
    headers?: map[string]any(name='Headers'),
  }(name='Data'),
}

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

async function runLogicModelWithOptions(request: RunLogicModelRequest, runtime: Util.RuntimeOptions): RunLogicModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('RunLogicModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function runLogicModel(request: RunLogicModelRequest): RunLogicModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return runLogicModelWithOptions(request, runtime);
}

model ListAppModulesRequest {
  appId?: string(name='AppId'),
}

model ListAppModulesResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        moduleName?: string(name='ModuleName'),
        modifiedTime?: string(name='ModifiedTime'),
        moduleId?: string(name='ModuleId'),
        description?: string(name='Description'),
        createTime?: string(name='CreateTime'),
        targetAppSource?: string(name='TargetAppSource'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listAppModulesWithOptions(request: ListAppModulesRequest, runtime: Util.RuntimeOptions): ListAppModulesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListAppModules', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listAppModules(request: ListAppModulesRequest): ListAppModulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppModulesWithOptions(request, runtime);
}

model ListDataModelsRequest {
  appId?: string(name='AppId'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
  subType?: string(name='SubType'),
  withContent?: boolean(name='WithContent'),
}

model ListDataModelsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    items?: [ 
      {
        createTime?: string(name='CreateTime'),
        modelType?: string(name='ModelType'),
        subType?: string(name='SubType'),
        revision?: int32(name='Revision'),
        modifiedTime?: string(name='ModifiedTime'),
        description?: string(name='Description'),
        schemaVersion?: string(name='SchemaVersion'),
        appId?: string(name='AppId'),
        props?: map[string]any(name='Props'),
        modelStatus?: string(name='ModelStatus'),
        modelName?: string(name='ModelName'),
        content?: map[string]any(name='Content'),
        id?: string(name='Id'),
        modelId?: string(name='ModelId'),
        attributes?: [  map[string]any ](name='Attributes'),
      }
    ](name='Items'),
  }(name='Data'),
}

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

async function listDataModelsWithOptions(request: ListDataModelsRequest, runtime: Util.RuntimeOptions): ListDataModelsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListDataModels', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listDataModels(request: ListDataModelsRequest): ListDataModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDataModelsWithOptions(request, runtime);
}

model UpdateModelRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  description?: string(name='Description'),
  encodeType?: string(name='EncodeType'),
  modelId?: string(name='ModelId'),
  modelName?: string(name='ModelName'),
  schemaVersion?: string(name='SchemaVersion'),
}

model UpdateModelResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    createTime?: string(name='CreateTime'),
    modelType?: string(name='ModelType'),
    subType?: string(name='SubType'),
    revision?: int32(name='Revision'),
    modifiedTime?: string(name='ModifiedTime'),
    description?: string(name='Description'),
    schemaVersion?: string(name='SchemaVersion'),
    appId?: string(name='AppId'),
    props?: map[string]any(name='Props'),
    modelStatus?: string(name='ModelStatus'),
    modelName?: string(name='ModelName'),
    content?: map[string]any(name='Content'),
    id?: string(name='Id'),
    modelId?: string(name='ModelId'),
  }(name='Data'),
}

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

async function updateModelWithOptions(request: UpdateModelRequest, runtime: Util.RuntimeOptions): UpdateModelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateModel', '2020-01-13', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateModel(request: UpdateModelRequest): UpdateModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateModelWithOptions(request, runtime);
}

