type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
(from: PieceProps, to: PieceProps) => { const [posFrom, posTo] = [from.position, to.position]; if (process.env.NODE_ENV === "development") { console.log(`Making a capture from ${posFrom} to ${posTo}`); } const emptyCell = utils.getEmptyCell(posFrom); from.position = posTo; to.position = posFrom; from.numMoves += 1; socket.emit("perform-move", { fromPos: posFrom, fromPiece: emptyCell, toPos: posTo, toPiece: from, gameCode: gameCode, points: to.value, moveType: MoveTypes.CAPTURE, }); }
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
(from: PieceProps, to: PieceProps) => { const newPos = [from.position, to.position]; const color = utils.getPieceColor(from); setPromotionPos([...newPos]); setPawnPromotionType(color + "-promotion"); }
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
(from: PieceProps, to: PieceProps) => { const [posFrom, posTo] = [from.position, to.position]; const emptyCell0 = utils.getEmptyCell(posFrom); const emptyCell1 = utils.getEmptyCell(posTo); let [newKingPos, newRookPos] = [posFrom, posTo]; if (posFrom < posTo) { // kingSide newKingPos += 2; newRookPos -= 2; } else { // queenSide newKingPos -= 2; newRookPos += 3; } from.position = newKingPos; from.numMoves += 1; to.position = newRookPos; to.numMoves += 1; socket.emit("castle", { oldKingPiece: emptyCell0, newKingPiece: from, oldKingPos: posFrom, newKingPos: newKingPos, oldRookPiece: emptyCell1, newRookPiece: to, oldRookPos: posTo, newRookPos: newRookPos, gameCode: gameCode, }); }
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
(from: PieceProps, to: PieceProps): number => { if (checkPromotion(from, to)) { performPromotion(from, to); return MoveTypes.PROMOTION; } else if (to.pieceName === null) { performMove(from, to); return MoveTypes.MOVE; } else if (utils.getPieceColor(to) === utils.getPieceColor(from)) { performCastling(from, to); return MoveTypes.CASTLE; } else { performCapture(from, to); return MoveTypes.CAPTURE; } }
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
(piece: PieceProps): boolean => { const index = piece.position; return piece.position !== clickedPiece.position && BoardConfig[index].color === "selected"; }
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
(fromPiece: PieceProps, toPiece: PieceProps, moveType: number) => { const color = utils.getPieceColor(toPiece); BoardConfig[fromPiece.position].piece = fromPiece; BoardConfig[toPiece.position].piece = toPiece; if (process.env.NODE_ENV === "development") { console.log("Check Status", fromPiece, toPiece, moveType); } let result: Result = { outcome: "", message: "" }; const [ischeck, ischeckmate] = isCheck(toPiece); const isstalemate = isStalemate(toPiece); const lastMove = getMoveRepresentation(fromPiece, toPiece, moveType, ischeck, ischeckmate); if (ischeckmate) { result.outcome = color === "white" ? GameResultTypes.WHITE : GameResultTypes.BLACK; result.message = "Checkmate"; } socket.emit("getMoveRepresentation", { move: lastMove, gameCode: gameCode, result: result, checkmate: ischeckmate, stalemate: isstalemate, }); }
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
(piece: PieceProps) => { const moves = new Hints(BoardConfig); if (checkPossibleMove(piece)) { const moveType = makeMove(clickedPiece, piece); moves.hideHints(hintCells); } else { const color = utils.getPieceColor(piece); if (color === currentTurn && color == playerColor) { updateClickedPiece(piece); moves.hideHints(hintCells); const validMoves = moves.showHints(piece); updateHintCells(validMoves); } } }
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
() => { const squares: any = []; for (let index = 0; index < 64; index++) { squares.push( <Square key={`square_${index}`} color={BoardConfig[index].color} position={index} piece={BoardConfig[index].piece} onClick={squareOnClickHandler} />
07kshitij/chess
src/components/Board.tsx
TypeScript
InterfaceDeclaration
export interface Result { outcome: string; message: string; }
07kshitij/chess
src/components/Board.tsx
TypeScript
InterfaceDeclaration
export interface BoardStatusProps { piece: PieceProps /** The piece under consideration */; setPiece: React.Dispatch<React.SetStateAction<PieceProps>> /** The callback to update the above `piece` */; color: string /** The color of the board cell under consideration */; setColor: React.Dispatch<React.SetStateAction<string>> /** The callback to update the above `color` */; }
07kshitij/chess
src/components/Board.tsx
TypeScript
InterfaceDeclaration
export interface BoardProps { currentTurn: string /** State representing the current turn, 'white' or 'black' */; setCurrentTurn: React.Dispatch<React.SetStateAction<string>>; /** The callback to update the above `currentTurn` */ whitePoints: number /** State representing the points scored by the player with white pieces */; setWhitePoints: React.Dispatch<React.SetStateAction<number>>; /** The callback to update the above `whitePoints` */ blackPoints: number /** State representing the points scored by the player with black pieces */; setBlackPoints: React.Dispatch<React.SetStateAction<number>>; /** The callback to update the above `blackPoints` */ gameMoves: Array<string> /** State representing the moves in the game so far */; setGameMoves: React.Dispatch<React.SetStateAction<string[]>> /** The callback to update the moves in the game */; /** The socket for the current player */ socket: Socket<DefaultEventsMap, DefaultEventsMap>; gameCode: string /** The gameCode for the current Game */; playerColor: string /** The piece color current player is playing on */; }
07kshitij/chess
src/components/Board.tsx
TypeScript
EnumDeclaration
enum MoveTypes { MOVE = 0, CAPTURE = 1, CASTLE = 2, PROMOTION = 3, }
07kshitij/chess
src/components/Board.tsx
TypeScript
EnumDeclaration
export enum GameResultTypes { WHITE = "White Won", BLACK = "Black Won", DRAW = "Game Drawn", }
07kshitij/chess
src/components/Board.tsx
TypeScript
MethodDeclaration
renderSquares()
07kshitij/chess
src/components/Board.tsx
TypeScript
ArrowFunction
() => { if (auth.isAuthenticated()) { this.rootPage = SearchPage; menu.enable(true, 'profile-menu'); } else { this.rootPage = LoginPage; menu.enable(false, 'profile-menu'); } setTimeout(() => splashScreen.hide(), 500); }
esingletary/jira-asset-companion
src/app/app.component.ts
TypeScript
ArrowFunction
() => splashScreen.hide()
esingletary/jira-asset-companion
src/app/app.component.ts
TypeScript
ArrowFunction
(err) => { // Catch any errors that occured. console.log(err); }
esingletary/jira-asset-companion
src/app/app.component.ts
TypeScript
ArrowFunction
() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need. statusBar.styleLightContent(); headerColor.tint('#0052cc'); }
esingletary/jira-asset-companion
src/app/app.component.ts
TypeScript
ClassDeclaration
@Component({ templateUrl: 'app.html' }) export class App { @ViewChild('mycontent') nav: NavController rootPage: any; user: User; constructor( platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, headerColor: HeaderColor, private auth: AuthProvider, private menu: MenuController, public events: Events ) { // Load authString and stored user, assuming they exist in storage auth.loadFromStorage() .then(() => { if (auth.isAuthenticated()) { this.rootPage = SearchPage; menu.enable(true, 'profile-menu'); } else { this.rootPage = LoginPage; menu.enable(false, 'profile-menu'); } setTimeout(() => splashScreen.hide(), 500); }) .catch((err) => { // Catch any errors that occured. console.log(err); }) platform.ready().then(() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need. statusBar.styleLightContent(); headerColor.tint('#0052cc'); }); // Update the menu with any changes in user information this.events.subscribe('user:set', (user) => { this.user = user; }) } // Disable the menu, destroy the auth, and go back to login public onLogoutSubmit(): void { this.menu.enable(false, 'profile-menu'); this.auth.destroyAuth(); this.nav.setRoot(LoginPage,{},{animate: true, direction: 'back'}); } }
esingletary/jira-asset-companion
src/app/app.component.ts
TypeScript
MethodDeclaration
// Disable the menu, destroy the auth, and go back to login public onLogoutSubmit(): void { this.menu.enable(false, 'profile-menu'); this.auth.destroyAuth(); this.nav.setRoot(LoginPage,{},{animate: true, direction: 'back'}); }
esingletary/jira-asset-companion
src/app/app.component.ts
TypeScript
InterfaceDeclaration
export interface Config { kind: 'Bootstrap' | 'Generator' | 'Module' | 'MethodDelegate' | 'DelegateFactory'; id: string; apiVersion?: string; }
chillapi/api
src/chill-api/Config.ts
TypeScript
ArrowFunction
(err) => { if (err) { console.log( "Failed to deliver " + request.toString() + ", err: " + JSON.stringify(err) ); } }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
ArrowFunction
(err, response) => { if (err) { console.log("Emulator shutdown failed", JSON.stringify(err)); } }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
ArrowFunction
(img: Image) => { // Make sure we properly translate mouse clicks. const format = img.getFormat()!; this.width = format.getWidth(); this.height = format.getHeight(); this.emitter.emit("frame", img); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
ArrowFunction
(err: any) => { // We cancel the stream on resize, so lets restart it! console.log("Error from screenshot: " + err.message); switch (err.code) { case 1: if (this.wantsResize) { this.wantsResize = false; this.streamScreenshot(); } break; case 13: this.close(); break; default: console.log("Error from screenshot: " + JSON.stringify(err)); } // Remove our transport file. fs.unlinkSync(tmpfile); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
ArrowFunction
(err, response) => { var hwConfig = new Map<string, string>(); const entryList = response.getHardwareconfig()!.getEntryList(); for (var i = 0; i < entryList.length; i++) { const key = entryList[i].getKey(); const val = entryList[i].getValue(); hwConfig.set(key, val); } this.deviceWidth = +hwConfig.get("hw.lcd.width")!; this.deviceHeight = +hwConfig.get("hw.lcd.height")!; }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
EnumDeclaration
export enum EmulatorKeyEvent { keydown = "keydown", keyup = "keyup", keypress = "keypress", }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
EnumDeclaration
export enum EmulatorEvent { frame = "frame", close = "close", }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
/** Registers the given event type. */ on(type: EmulatorEvent, listener: (data: any) => void) { this.emitter.on(type, listener); if (type === EmulatorEvent.frame) { this.streamScreenshot(); } return this; }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
/** True if the emulator process is still alive. */ isRunning(pid: number) { try { return process.kill(pid, 0); } catch (e) { return e.code === "EPERM"; } }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
/** * Sends the given key event to the emulator. * * @param eventType Type of event, keyup, keydown or keypress. * @param key Javascript keycode. @see {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values} */ sendKey(eventType: EmulatorKeyEvent, key: string) { var request = new KeyboardEvent(); request.setEventtype( eventType === EmulatorKeyEvent.keydown ? KeyboardEvent.KeyEventType.KEYDOWN : eventType === EmulatorKeyEvent.keyup ? KeyboardEvent.KeyEventType.KEYUP : KeyboardEvent.KeyEventType.KEYPRESS ); request.setKey(key); this.client!.sendKey(request, this.metadata!, (err) => { if (err) { console.log( "Failed to deliver " + request.toString() + ", err: " + JSON.stringify(err) ); } }); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
/** * Sends the given mouse event to the emulator. * * The x, y coordinates will be normalized and should be within * the width and height that are set by the resize function. * button: 0 no button, 1: left button, 2: right button. * * @example: this.canvas.addEventListener("mousedown", e => { const mouse = { x: e.clientX, y: e.clientY, // In browser's MouseEvent.button property, // 0 stands for left button and 2 stands for right button. button: e.button === 0 ? 1 : e.button === 2 ? 2 : 0 }; emulator.sendMouse(mouse); }); * * @param mouse The mouse event to send */ sendMouse(mouse: { x: number; y: number; button: number }) { let scaleX = this.deviceWidth / this.width; let scaleY = this.deviceHeight / this.height; let x = Math.round(mouse.x * scaleX); let y = Math.round(mouse.y * scaleY); var request = new MouseEvt(); request.setX(x); request.setY(y); request.setButtons(mouse.button); this.client!.sendMouse(request, this.metadata!, (err) => { if (err) { console.log( "Failed to deliver " + request.toString() + ", err: " + JSON.stringify(err) ); } }); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
/** Resizes the requested image stream. You should call this if your rendering surfaces changes in size. */ resize(width: number, height: number) { this.width = width; this.height = height; this.wantsResize = true; this.stream?.cancel(); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
/** Closes down the emulator connection. This will *NOT* stop the emulator from running. */ close() { this.client?.close(); this.emitter.emit("close", this.pid); this.emitter.removeAllListeners(); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
/** Clean shutdown of the emulator. */ shutdown() { let state = new VmRunState(); state.setState(VmRunState.RunState.SHUTDOWN); this.client.setVmState(state, (err, response) => { if (err) { console.log("Emulator shutdown failed", JSON.stringify(err)); } }); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
private streamScreenshot() { // File where the emulator writes the RGB888 file. mmap on the emulator side const tmpfile = path.join( this.transportDir, `emu-${this.width}x${this.height}.rgb888` ); fs.openSync(tmpfile, "w"); fs.truncateSync(tmpfile, this.height * this.width * 3); let transport = new ImageTransport(); transport.setChannel(ImageTransport.TransportChannel.MMAP); transport.setHandle(url.pathToFileURL(tmpfile).toString()); let fmt = new ImageFormat(); fmt.setHeight(this.height); fmt.setWidth(this.width); fmt.setFormat(ImageFormat.ImgFormat.RGB888); fmt.setTransport(transport); this.stream = this.client!.streamScreenshot(fmt, this.metadata!); this.stream.on("data", (img: Image) => { // Make sure we properly translate mouse clicks. const format = img.getFormat()!; this.width = format.getWidth(); this.height = format.getHeight(); this.emitter.emit("frame", img); }); this.stream.on("error", (err: any) => { // We cancel the stream on resize, so lets restart it! console.log("Error from screenshot: " + err.message); switch (err.code) { case 1: if (this.wantsResize) { this.wantsResize = false; this.streamScreenshot(); } break; case 13: this.close(); break; default: console.log("Error from screenshot: " + JSON.stringify(err)); } // Remove our transport file. fs.unlinkSync(tmpfile); }); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
MethodDeclaration
// Retrieves the device status, we use this to get the device width & height. private deviceStatus() { this.client!.getStatus(new Empty(), this.metadata!, (err, response) => { var hwConfig = new Map<string, string>(); const entryList = response.getHardwareconfig()!.getEntryList(); for (var i = 0; i < entryList.length; i++) { const key = entryList[i].getKey(); const val = entryList[i].getValue(); hwConfig.set(key, val); } this.deviceWidth = +hwConfig.get("hw.lcd.width")!; this.deviceHeight = +hwConfig.get("hw.lcd.height")!; }); }
pokowaka/aemu-vscode
src/emulator.ts
TypeScript
ClassDeclaration
export declare class SeriesList extends SeriesList_base { static fromMeasureNames(names: string[]): SeriesList; static fromMeasures(measures: Measure[]): SeriesList; static fromJS(seriesDefs: any[], measures: Measures): SeriesList; static fromSeries(series: Series[]): SeriesList; static validSeries(series: Series, measures: Measures): boolean; addSeries(newSeries: Series): SeriesList; removeSeries(series: Series): SeriesList; replaceSeries(original: Series, newSeries: Series): SeriesList; replaceByIndex(index: number, replace: Series): SeriesList; insertByIndex(index: number, insert: Series): SeriesList; hasMeasureSeries(reference: string): boolean; hasMeasure({ name }: Measure): boolean; getSeries(reference: string): Series; constrainToMeasures(measures: Measures): SeriesList; count(): number; isEmpty(): boolean; private updateSeries; hasSeries(series: Series): boolean; hasSeriesWithKey(key: string): boolean; getSeriesWithKey(key: string): Series; takeFirst(): this; getExpressionSeriesFor(reference: string): List<ExpressionSeries>; }
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
InterfaceDeclaration
interface SeriesListValue { series: List<Series>; }
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
static fromMeasureNames(names: string[]): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
static fromMeasures(measures: Measure[]): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
static fromJS(seriesDefs: any[], measures: Measures): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
static fromSeries(series: Series[]): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
static validSeries(series: Series, measures: Measures): boolean;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
addSeries(newSeries: Series): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
removeSeries(series: Series): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
replaceSeries(original: Series, newSeries: Series): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
replaceByIndex(index: number, replace: Series): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
insertByIndex(index: number, insert: Series): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
hasMeasureSeries(reference: string): boolean;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
hasMeasure({ name }: Measure): boolean;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
getSeries(reference: string): Series;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
constrainToMeasures(measures: Measures): SeriesList;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
count(): number;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
hasSeries(series: Series): boolean;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
hasSeriesWithKey(key: string): boolean;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
getSeriesWithKey(key: string): Series;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
takeFirst(): this;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
MethodDeclaration
getExpressionSeriesFor(reference: string): List<ExpressionSeries>;
cuebook/turnilo
build/common/models/series-list/series-list.d.ts
TypeScript
ArrowFunction
(err: Error | null | undefined) => () => { throw err; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Initialize the client. * Performs asynchronous operations (such as authentication) and prepares the client. * This function will be called automatically when any class method is called for the * first time, but if you need to initialize it before calling an actual method, * feel free to call initialize() directly. * * You can await on this method if you want to make sure the client is initialized. * * @returns {Promise} A promise that resolves to an authenticated service stub. */ initialize() { // If the client stub promise is already initialized, return immediately. if (this.metricsServiceV2Stub) { return this.metricsServiceV2Stub; } // Put together the "service stub" for // google.logging.v2.MetricsServiceV2. this.metricsServiceV2Stub = this._gaxGrpc.createStub( this._opts.fallback ? (this._protos as protobuf.Root).lookupService( 'google.logging.v2.MetricsServiceV2' ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.logging.v2.MetricsServiceV2, this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides // and create an API call method for each. const metricsServiceV2StubMethods = [ 'listLogMetrics', 'getLogMetric', 'createLogMetric', 'updateLogMetric', 'deleteLogMetric', ]; for (const methodName of metricsServiceV2StubMethods) { const callPromise = this.metricsServiceV2Stub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); } const func = stub[methodName]; return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; } ); const descriptor = this.descriptors.page[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], descriptor ); this.innerApiCalls[methodName] = apiCall; } return this.metricsServiceV2Stub; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return the project ID used by this class. * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback<string, undefined, undefined> ): Promise<string> | void { if (callback) { this.auth.getProjectId(callback); return; } return this.auth.getProjectId(); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
// ------------------- // -- Service calls -- // ------------------- getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, options?: gax.CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | undefined, {} | undefined ] >;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, options: gax.CallOptions, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Gets a logs-based metric. * * @param {Object} request * The request object that will be sent. * @param {string} request.metricName * Required. The resource name of the desired metric: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example * const [response] = await client.getLogMetric(request); */ getLogMetric( request: protos.google.logging.v2.IGetLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, {} | null | undefined >, callback?: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | null | undefined, {} | null | undefined > ): Promise< [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IGetLogMetricRequest | undefined, {} | undefined ] > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ metric_name: request.metricName || '', }); this.initialize(); return this.innerApiCalls.getLogMetric(request, options, callback); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, options?: gax.CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | undefined, {} | undefined ] >;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, options: gax.CallOptions, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Creates a logs-based metric. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the project in which to create the metric: * * "projects/[PROJECT_ID]" * * The new metric must be provided in the request. * @param {google.logging.v2.LogMetric} request.metric * Required. The new logs-based metric, which must not have an identifier that * already exists. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example * const [response] = await client.createLogMetric(request); */ createLogMetric( request: protos.google.logging.v2.ICreateLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, {} | null | undefined >, callback?: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | null | undefined, {} | null | undefined > ): Promise< [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.ICreateLogMetricRequest | undefined, {} | undefined ] > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.createLogMetric(request, options, callback); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, options?: gax.CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | undefined, {} | undefined ] >;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, options: gax.CallOptions, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, callback: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Creates or updates a logs-based metric. * * @param {Object} request * The request object that will be sent. * @param {string} request.metricName * Required. The resource name of the metric to update: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * * The updated metric must be provided in the request and it's * `name` field must be the same as `[METRIC_ID]` If the metric * does not exist in `[PROJECT_ID]`, then a new metric is created. * @param {google.logging.v2.LogMetric} request.metric * Required. The updated metric. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example * const [response] = await client.updateLogMetric(request); */ updateLogMetric( request: protos.google.logging.v2.IUpdateLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, {} | null | undefined >, callback?: Callback< protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | null | undefined, {} | null | undefined > ): Promise< [ protos.google.logging.v2.ILogMetric, protos.google.logging.v2.IUpdateLogMetricRequest | undefined, {} | undefined ] > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ metric_name: request.metricName || '', }); this.initialize(); return this.innerApiCalls.updateLogMetric(request, options, callback); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, options?: gax.CallOptions ): Promise< [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | undefined, {} | undefined ] >;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, options: gax.CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, callback: Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, {} | null | undefined > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Deletes a logs-based metric. * * @param {Object} request * The request object that will be sent. * @param {string} request.metricName * Required. The resource name of the metric to delete: * * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example * const [response] = await client.deleteLogMetric(request); */ deleteLogMetric( request: protos.google.logging.v2.IDeleteLogMetricRequest, optionsOrCallback?: | gax.CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, {} | null | undefined >, callback?: Callback< protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | null | undefined, {} | null | undefined > ): Promise< [ protos.google.protobuf.IEmpty, protos.google.logging.v2.IDeleteLogMetricRequest | undefined, {} | undefined ] > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ metric_name: request.metricName || '', }); this.initialize(); return this.innerApiCalls.deleteLogMetric(request, options, callback); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, options?: gax.CallOptions ): Promise< [ protos.google.logging.v2.ILogMetric[], protos.google.logging.v2.IListLogMetricsRequest | null, protos.google.logging.v2.IListLogMetricsResponse ] >;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, options: gax.CallOptions, callback: PaginationCallback< protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, protos.google.logging.v2.ILogMetric > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, callback: PaginationCallback< protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, protos.google.logging.v2.ILogMetric > ): void;
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Lists logs-based metrics. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The name of the project containing the metrics: * * "projects/[PROJECT_ID]" * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `pageToken` must be the value of * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the * response indicates that more results might be available. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listLogMetrics( request: protos.google.logging.v2.IListLogMetricsRequest, optionsOrCallback?: | gax.CallOptions | PaginationCallback< protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, protos.google.logging.v2.ILogMetric >, callback?: PaginationCallback< protos.google.logging.v2.IListLogMetricsRequest, protos.google.logging.v2.IListLogMetricsResponse | null | undefined, protos.google.logging.v2.ILogMetric > ): Promise< [ protos.google.logging.v2.ILogMetric[], protos.google.logging.v2.IListLogMetricsRequest | null, protos.google.logging.v2.IListLogMetricsResponse ] > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { options = optionsOrCallback as gax.CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.listLogMetrics(request, options, callback); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The name of the project containing the metrics: * * "projects/[PROJECT_ID]" * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `pageToken` must be the value of * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the * response indicates that more results might be available. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listLogMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ listLogMetricsStream( request?: protos.google.logging.v2.IListLogMetricsRequest, options?: gax.CallOptions ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listLogMetrics.createStream( this.innerApiCalls.listLogMetrics as gax.GaxCall, request, callSettings ); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Equivalent to `listLogMetrics`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The name of the project containing the metrics: * * "projects/[PROJECT_ID]" * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `pageToken` must be the value of * `nextPageToken` from the previous response. The values of other method * parameters should be identical to those in the previous call. * @param {number} [request.pageSize] * Optional. The maximum number of results to return from this request. * Non-positive values are ignored. The presence of `nextPageToken` in the * response indicates that more results might be available. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing * [LogMetric]{@link google.logging.v2.LogMetric}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example * const iterable = client.listLogMetricsAsync(request); * for await (const response of iterable) { * // process response * } */ listLogMetricsAsync( request?: protos.google.logging.v2.IListLogMetricsRequest, options?: gax.CallOptions ): AsyncIterable<protos.google.logging.v2.ILogMetric> { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listLogMetrics.asyncIterate( this.innerApiCalls['listLogMetrics'] as GaxCall, (request as unknown) as RequestType, callSettings ) as AsyncIterable<protos.google.logging.v2.ILogMetric>; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
// -------------------- // -- Path templates -- // -------------------- /** * Return a fully-qualified billingAccountCmekSettings resource name string. * * @param {string} billing_account * @returns {string} Resource name string. */ billingAccountCmekSettingsPath(billingAccount: string) { return this.pathTemplates.billingAccountCmekSettingsPathTemplate.render({ billing_account: billingAccount, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the billing_account from BillingAccountCmekSettings resource. * * @param {string} billingAccountCmekSettingsName * A fully-qualified path representing billing_account_cmekSettings resource. * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountCmekSettingsName( billingAccountCmekSettingsName: string ) { return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match( billingAccountCmekSettingsName ).billing_account; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified billingAccountExclusion resource name string. * * @param {string} billing_account * @param {string} exclusion * @returns {string} Resource name string. */ billingAccountExclusionPath(billingAccount: string, exclusion: string) { return this.pathTemplates.billingAccountExclusionPathTemplate.render({ billing_account: billingAccount, exclusion: exclusion, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the billing_account from BillingAccountExclusion resource. * * @param {string} billingAccountExclusionName * A fully-qualified path representing billing_account_exclusion resource. * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountExclusionName( billingAccountExclusionName: string ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).billing_account; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the exclusion from BillingAccountExclusion resource. * * @param {string} billingAccountExclusionName * A fully-qualified path representing billing_account_exclusion resource. * @returns {string} A string representing the exclusion. */ matchExclusionFromBillingAccountExclusionName( billingAccountExclusionName: string ) { return this.pathTemplates.billingAccountExclusionPathTemplate.match( billingAccountExclusionName ).exclusion; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified billingAccountLocationBucket resource name string. * * @param {string} billing_account * @param {string} location * @param {string} bucket * @returns {string} Resource name string. */ billingAccountLocationBucketPath( billingAccount: string, location: string, bucket: string ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({ billing_account: billingAccount, location: location, bucket: bucket, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the billing_account from BillingAccountLocationBucket resource. * * @param {string} billingAccountLocationBucketName * A fully-qualified path representing billing_account_location_bucket resource. * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).billing_account; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the location from BillingAccountLocationBucket resource. * * @param {string} billingAccountLocationBucketName * A fully-qualified path representing billing_account_location_bucket resource. * @returns {string} A string representing the location. */ matchLocationFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).location; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the bucket from BillingAccountLocationBucket resource. * * @param {string} billingAccountLocationBucketName * A fully-qualified path representing billing_account_location_bucket resource. * @returns {string} A string representing the bucket. */ matchBucketFromBillingAccountLocationBucketName( billingAccountLocationBucketName: string ) { return this.pathTemplates.billingAccountLocationBucketPathTemplate.match( billingAccountLocationBucketName ).bucket; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified billingAccountLog resource name string. * * @param {string} billing_account * @param {string} log * @returns {string} Resource name string. */ billingAccountLogPath(billingAccount: string, log: string) { return this.pathTemplates.billingAccountLogPathTemplate.render({ billing_account: billingAccount, log: log, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the billing_account from BillingAccountLog resource. * * @param {string} billingAccountLogName * A fully-qualified path representing billing_account_log resource. * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).billing_account; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the log from BillingAccountLog resource. * * @param {string} billingAccountLogName * A fully-qualified path representing billing_account_log resource. * @returns {string} A string representing the log. */ matchLogFromBillingAccountLogName(billingAccountLogName: string) { return this.pathTemplates.billingAccountLogPathTemplate.match( billingAccountLogName ).log; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified billingAccountSink resource name string. * * @param {string} billing_account * @param {string} sink * @returns {string} Resource name string. */ billingAccountSinkPath(billingAccount: string, sink: string) { return this.pathTemplates.billingAccountSinkPathTemplate.render({ billing_account: billingAccount, sink: sink, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the billing_account from BillingAccountSink resource. * * @param {string} billingAccountSinkName * A fully-qualified path representing billing_account_sink resource. * @returns {string} A string representing the billing_account. */ matchBillingAccountFromBillingAccountSinkName( billingAccountSinkName: string ) { return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).billing_account; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Parse the sink from BillingAccountSink resource. * * @param {string} billingAccountSinkName * A fully-qualified path representing billing_account_sink resource. * @returns {string} A string representing the sink. */ matchSinkFromBillingAccountSinkName(billingAccountSinkName: string) { return this.pathTemplates.billingAccountSinkPathTemplate.match( billingAccountSinkName ).sink; }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript
MethodDeclaration
/** * Return a fully-qualified folderCmekSettings resource name string. * * @param {string} folder * @returns {string} Resource name string. */ folderCmekSettingsPath(folder: string) { return this.pathTemplates.folderCmekSettingsPathTemplate.render({ folder: folder, }); }
simonz130/nodejs-logging
src/v2/metrics_service_v2_client.ts
TypeScript