import * as msRest from "@azure/ms-rest-js" ; import * as Models from "../models" ; import * as Mappers from "../models/functionModelMappers" ; import * as Parameters from "../models/parameters" ; import { KuduClientContext } from "../kuduClientContext" ; /** Class representing a FunctionModel. */ export class FunctionModel { private readonly client : KuduClientContext ; param { KuduClientContext } client constructor ( client ) { this . client = client ; } param options returns getHostSettings ( options ? ) ; param callback getHostSettings ( callback ) ; param options param callback getHostSettings ( options , callback ) ; getHostSettings ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , getHostSettingsOperationSpec , callback ) as Promise < Models . FunctionModelGetHostSettingsResponse > ; } param options returns putHostSettings ( options ? ) ; param callback putHostSettings ( callback ) ; param options param callback putHostSettings ( options , callback ) ; putHostSettings ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , putHostSettingsOperationSpec , callback ) as Promise < Models . FunctionModelPutHostSettingsResponse > ; } param options returns syncTriggers ( options ? ) ; param callback syncTriggers ( callback ) ; param options param callback syncTriggers ( options , callback ) ; syncTriggers ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , syncTriggersOperationSpec , callback ) as Promise < Models . FunctionModelSyncTriggersResponse > ; } param options returns syncTriggers1 ( options ? ) ; param callback syncTriggers1 ( callback ) ; param options param callback syncTriggers1 ( options , callback ) ; syncTriggers1 ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , syncTriggers1OperationSpec , callback ) as Promise < Models . FunctionModelSyncTriggers1Response > ; } param name param options returns get ( name , options ? ) ; param name param callback get ( name , callback ) ; param name param options param callback get ( name , options , callback ) ; get ( name , options ? , callback ? ) { return this . client . sendOperationRequest ( { name , options } , getOperationSpec , callback ) as Promise < Models . FunctionModelGetResponse > ; } param name param options returns createOrUpdate ( name , options ? ) ; param name param callback createOrUpdate ( name , callback ) ; param name param options param callback createOrUpdate ( name , options , callback ) ; createOrUpdate ( name , options ? , callback ? ) { return this . client . sendOperationRequest ( { name , options } , createOrUpdateOperationSpec , callback ) as Promise < Models . FunctionModelCreateOrUpdateResponse > ; } param name param options returns deleteMethod ( name , options ? ) ; param name param callback deleteMethod ( name , callback ) ; param name param options param callback deleteMethod ( name , options , callback ) ; deleteMethod ( name , options ? , callback ? ) { return this . client . sendOperationRequest ( { name , options } , deleteMethodOperationSpec , callback ) as Promise < Models . FunctionModelDeleteMethodResponse > ; } param options returns list ( options ? ) ; param callback list ( callback ) ; param options param callback list ( options , callback ) ; list ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , listOperationSpec , callback ) as Promise < Models . FunctionModelListResponse > ; } param name param options returns getSecrets ( name , options ? ) ; param name param callback getSecrets ( name , callback ) ; param name param options param callback getSecrets ( name , options , callback ) ; getSecrets ( name , options ? , callback ? ) { return this . client . sendOperationRequest ( { name , options } , getSecretsOperationSpec , callback ) as Promise < Models . FunctionModelGetSecretsResponse > ; } param options returns getMasterKey ( options ? ) ; param callback getMasterKey ( callback ) ; param options param callback getMasterKey ( options , callback ) ; getMasterKey ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , getMasterKeyOperationSpec , callback ) as Promise < Models . FunctionModelGetMasterKeyResponse > ; } param options returns getAdminToken ( options ? ) ; param callback getAdminToken ( callback ) ; param options param callback getAdminToken ( options , callback ) ; getAdminToken ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , getAdminTokenOperationSpec , callback ) as Promise < Models . FunctionModelGetAdminTokenResponse > ; } param options returns downloadFunctions ( options ? ) ; param callback downloadFunctions ( callback ) ; param options param callback downloadFunctions ( options , callback ) ; downloadFunctions ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , downloadFunctionsOperationSpec , callback ) as Promise < Models . FunctionModelDownloadFunctionsResponse > ; } } const serializer = new msRest . Serializer ( Mappers ) ; const getHostSettingsOperationSpec = { httpMethod : "GET" , path : "api/functions/config" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const putHostSettingsOperationSpec = { httpMethod : "PUT" , path : "api/functions/config" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const syncTriggersOperationSpec = { httpMethod : "POST" , path : "api/functions/synctriggers" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const syncTriggers1OperationSpec = { httpMethod : "POST" , path : "functions/listsynctriggers" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const getOperationSpec = { httpMethod : "GET" , path : "api/functions/{name}" , urlParameters : [ Parameters . name ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const createOrUpdateOperationSpec = { httpMethod : "PUT" , path : "api/functions/{name}" , urlParameters : [ Parameters . name ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const deleteMethodOperationSpec = { httpMethod : "DELETE" , path : "api/functions/{name}" , urlParameters : [ Parameters . name ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , 204 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const listOperationSpec = { httpMethod : "GET" , path : "api/functions" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Sequence" , element : { type : { name : "Composite" , className : "FunctionEnvelope" } } } } } , default : { } } , serializer } ; const getSecretsOperationSpec = { httpMethod : "POST" , path : "api/functions/{name}/listsecrets" , urlParameters : [ Parameters . name ] , responses : { 200 : { bodyMapper : Mappers . FunctionSecrets } , default : { } } , serializer } ; const getMasterKeyOperationSpec = { httpMethod : "GET" , path : "api/functions/admin/masterkey" , responses : { 200 : { bodyMapper : Mappers . MasterKey } , default : { } } , serializer } ; const getAdminTokenOperationSpec = { httpMethod : "GET" , path : "api/functions/admin/token" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "String" } } } , default : { } } , serializer } ; const downloadFunctionsOperationSpec = { httpMethod : "GET" , path : "api/functions/admin/download" , queryParameters : [ Parameters . includeCsproj , Parameters . includeAppSettings ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ;