MCPcopy
hub / github.com/Place1/wg-access-server / toObject

Method toObject

website/src/sdk/devices_pb.ts:280–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278 }
279
280 toObject(): Device.AsObject {
281 let f: any;
282 return {name: this.getName(),
283 owner: this.getOwner(),
284 publicKey: this.getPublicKey(),
285 address: this.getAddress(),
286 createdAt: (f = this.getCreatedAt()) && f.toObject(),
287 connected: this.getConnected(),
288 lastHandshakeTime: (f = this.getLastHandshakeTime()) && f.toObject(),
289 receiveBytes: this.getReceiveBytes(),
290 transmitBytes: this.getTransmitBytes(),
291 endpoint: this.getEndpoint(),
292 ownerName: this.getOwnerName(),
293 ownerEmail: this.getOwnerEmail(),
294 ownerProvider: this.getOwnerProvider(),
295
296 };
297 }
298
299 static serializeBinaryToWriter(message: Device, writer: jspb.BinaryWriter): void {
300 const field1 = message.getName();

Callers 7

addDeviceMethod · 0.45
listDevicesMethod · 0.45
deleteDeviceMethod · 0.45
listAllDevicesMethod · 0.45
toObjectMethod · 0.45
toObjectMethod · 0.45
toObjectMethod · 0.45

Calls 13

getNameMethod · 0.95
getOwnerMethod · 0.95
getPublicKeyMethod · 0.95
getAddressMethod · 0.95
getCreatedAtMethod · 0.95
getConnectedMethod · 0.95
getLastHandshakeTimeMethod · 0.95
getReceiveBytesMethod · 0.95
getTransmitBytesMethod · 0.95
getEndpointMethod · 0.95
getOwnerNameMethod · 0.95
getOwnerEmailMethod · 0.95

Tested by

no test coverage detected