import * as msRest from "@azure/ms-rest-js" ; import * as Models from "../models" ; import * as Mappers from "../models/webHooksMappers" ; import * as Parameters from "../models/parameters" ; import { KuduClientContext } from "../kuduClientContext" ; /** Class representing a WebHooks. */ export class WebHooks { private readonly client : KuduClientContext ; param { KuduClientContext } client constructor ( client ) { this . client = client ; } param id param options returns getWebHook ( id , options ? ) ; param id param callback getWebHook ( id , callback ) ; param id param options param callback getWebHook ( id , options , callback ) ; getWebHook ( id , options ? , callback ? ) { return this . client . sendOperationRequest ( { id , options } , getWebHookOperationSpec , callback ) as Promise < Models . WebHooksGetWebHookResponse > ; } param id param options returns unsubscribe ( id , options ? ) ; param id param callback unsubscribe ( id , callback ) ; param id param options param callback unsubscribe ( id , options , callback ) ; unsubscribe ( id , options ? , callback ? ) { return this . client . sendOperationRequest ( { id , options } , unsubscribeOperationSpec , callback ) as Promise < Models . WebHooksUnsubscribeResponse > ; } param id param options returns getWebHook1 ( id , options ? ) ; param id param callback getWebHook1 ( id , callback ) ; param id param options param callback getWebHook1 ( id , options , callback ) ; getWebHook1 ( id , options ? , callback ? ) { return this . client . sendOperationRequest ( { id , options } , getWebHook1OperationSpec , callback ) as Promise < Models . WebHooksGetWebHook1Response > ; } param id param options returns unsubscribe1 ( id , options ? ) ; param id param callback unsubscribe1 ( id , callback ) ; param id param options param callback unsubscribe1 ( id , options , callback ) ; unsubscribe1 ( id , options ? , callback ? ) { return this . client . sendOperationRequest ( { id , options } , unsubscribe1OperationSpec , callback ) as Promise < Models . WebHooksUnsubscribe1Response > ; } param hookEventType param eventContent param options returns publishEvent ( hookEventType , eventContent , options ? ) ; param hookEventType param eventContent param callback publishEvent ( hookEventType , eventContent , callback ) ; param hookEventType param eventContent param options param callback publishEvent ( hookEventType , eventContent , options , callback ) ; publishEvent ( hookEventType , eventContent , options ? , callback ? ) { return this . client . sendOperationRequest ( { hookEventType , eventContent , options } , publishEventOperationSpec , callback ) as Promise < Models . WebHooksPublishEventResponse > ; } param hookEventType param eventContent param options returns publishEvent1 ( hookEventType , eventContent , options ? ) ; param hookEventType param eventContent param callback publishEvent1 ( hookEventType , eventContent , callback ) ; param hookEventType param eventContent param options param callback publishEvent1 ( hookEventType , eventContent , options , callback ) ; publishEvent1 ( hookEventType , eventContent , options ? , callback ? ) { return this . client . sendOperationRequest ( { hookEventType , eventContent , options } , publishEvent1OperationSpec , callback ) as Promise < Models . WebHooksPublishEvent1Response > ; } param options returns getWebHooks ( options ? ) ; param callback getWebHooks ( callback ) ; param options param callback getWebHooks ( options , callback ) ; getWebHooks ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , getWebHooksOperationSpec , callback ) as Promise < Models . WebHooksGetWebHooksResponse > ; } param webHook param options returns subscribe ( webHook , options ? ) ; param webHook param callback subscribe ( webHook , callback ) ; param webHook param options param callback subscribe ( webHook , options , callback ) ; subscribe ( webHook , options ? , callback ? ) { return this . client . sendOperationRequest ( { webHook , options } , subscribeOperationSpec , callback ) as Promise < Models . WebHooksSubscribeResponse > ; } param options returns getWebHooks1 ( options ? ) ; param callback getWebHooks1 ( callback ) ; param options param callback getWebHooks1 ( options , callback ) ; getWebHooks1 ( options ? , callback ? ) { return this . client . sendOperationRequest ( { options } , getWebHooks1OperationSpec , callback ) as Promise < Models . WebHooksGetWebHooks1Response > ; } param webHook param options returns subscribe1 ( webHook , options ? ) ; param webHook param callback subscribe1 ( webHook , callback ) ; param webHook param options param callback subscribe1 ( webHook , options , callback ) ; subscribe1 ( webHook , options ? , callback ? ) { return this . client . sendOperationRequest ( { webHook , options } , subscribe1OperationSpec , callback ) as Promise < Models . WebHooksSubscribe1Response > ; } } const serializer = new msRest . Serializer ( Mappers ) ; const getWebHookOperationSpec = { httpMethod : "GET" , path : "hooks/{id}" , urlParameters : [ Parameters . id0 ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const unsubscribeOperationSpec = { httpMethod : "DELETE" , path : "hooks/{id}" , urlParameters : [ Parameters . id0 ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const getWebHook1OperationSpec = { httpMethod : "GET" , path : "api/hooks/{id}" , urlParameters : [ Parameters . id0 ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const unsubscribe1OperationSpec = { httpMethod : "DELETE" , path : "api/hooks/{id}" , urlParameters : [ Parameters . id0 ] , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const publishEventOperationSpec = { httpMethod : "POST" , path : "hooks/publish/{hookEventType}" , urlParameters : [ Parameters . hookEventType ] , requestBody : { parameterPath : "eventContent" , mapper : { required : true , serializedName : "eventContent" , type : { name : "Object" } } } , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const publishEvent1OperationSpec = { httpMethod : "POST" , path : "api/hooks/publish/{hookEventType}" , urlParameters : [ Parameters . hookEventType ] , requestBody : { parameterPath : "eventContent" , mapper : { required : true , serializedName : "eventContent" , type : { name : "Object" } } } , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const getWebHooksOperationSpec = { httpMethod : "GET" , path : "hooks" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const subscribeOperationSpec = { httpMethod : "POST" , path : "hooks" , requestBody : { parameterPath : "webHook" , mapper : { ... Mappers . WebHook , required : true } } , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const getWebHooks1OperationSpec = { httpMethod : "GET" , path : "api/hooks" , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ; const subscribe1OperationSpec = { httpMethod : "POST" , path : "api/hooks" , requestBody : { parameterPath : "webHook" , mapper : { ... Mappers . WebHook , required : true } } , responses : { 200 : { bodyMapper : { serializedName : "parsedResponse" , type : { name : "Object" } } } , default : { } } , serializer } ;