UNPKG

google-ads-node

Version:

Google Ads gRPC Client Library for Node

1 lines 4.35 kB
"use strict";var grpc=require("grpc"),google_bytestream_bytestream_pb=require("../../google/bytestream/bytestream_pb.js"),google_api_annotations_pb=require("../../google/api/annotations_pb.js"),google_protobuf_wrappers_pb=require("google-protobuf/google/protobuf/wrappers_pb.js");function serialize_google_bytestream_QueryWriteStatusRequest(arg){if(!(arg instanceof google_bytestream_bytestream_pb.QueryWriteStatusRequest))throw new Error("Expected argument of type google.bytestream.QueryWriteStatusRequest");return Buffer.from(arg.serializeBinary())}function deserialize_google_bytestream_QueryWriteStatusRequest(buffer_arg){return google_bytestream_bytestream_pb.QueryWriteStatusRequest.deserializeBinary(new Uint8Array(buffer_arg))}function serialize_google_bytestream_QueryWriteStatusResponse(arg){if(!(arg instanceof google_bytestream_bytestream_pb.QueryWriteStatusResponse))throw new Error("Expected argument of type google.bytestream.QueryWriteStatusResponse");return Buffer.from(arg.serializeBinary())}function deserialize_google_bytestream_QueryWriteStatusResponse(buffer_arg){return google_bytestream_bytestream_pb.QueryWriteStatusResponse.deserializeBinary(new Uint8Array(buffer_arg))}function serialize_google_bytestream_ReadRequest(arg){if(!(arg instanceof google_bytestream_bytestream_pb.ReadRequest))throw new Error("Expected argument of type google.bytestream.ReadRequest");return Buffer.from(arg.serializeBinary())}function deserialize_google_bytestream_ReadRequest(buffer_arg){return google_bytestream_bytestream_pb.ReadRequest.deserializeBinary(new Uint8Array(buffer_arg))}function serialize_google_bytestream_ReadResponse(arg){if(!(arg instanceof google_bytestream_bytestream_pb.ReadResponse))throw new Error("Expected argument of type google.bytestream.ReadResponse");return Buffer.from(arg.serializeBinary())}function deserialize_google_bytestream_ReadResponse(buffer_arg){return google_bytestream_bytestream_pb.ReadResponse.deserializeBinary(new Uint8Array(buffer_arg))}function serialize_google_bytestream_WriteRequest(arg){if(!(arg instanceof google_bytestream_bytestream_pb.WriteRequest))throw new Error("Expected argument of type google.bytestream.WriteRequest");return Buffer.from(arg.serializeBinary())}function deserialize_google_bytestream_WriteRequest(buffer_arg){return google_bytestream_bytestream_pb.WriteRequest.deserializeBinary(new Uint8Array(buffer_arg))}function serialize_google_bytestream_WriteResponse(arg){if(!(arg instanceof google_bytestream_bytestream_pb.WriteResponse))throw new Error("Expected argument of type google.bytestream.WriteResponse");return Buffer.from(arg.serializeBinary())}function deserialize_google_bytestream_WriteResponse(buffer_arg){return google_bytestream_bytestream_pb.WriteResponse.deserializeBinary(new Uint8Array(buffer_arg))}var ByteStreamService=exports.ByteStreamService={read:{path:"/google.bytestream.ByteStream/Read",requestStream:!1,responseStream:!0,requestType:google_bytestream_bytestream_pb.ReadRequest,responseType:google_bytestream_bytestream_pb.ReadResponse,requestSerialize:serialize_google_bytestream_ReadRequest,requestDeserialize:deserialize_google_bytestream_ReadRequest,responseSerialize:serialize_google_bytestream_ReadResponse,responseDeserialize:deserialize_google_bytestream_ReadResponse},write:{path:"/google.bytestream.ByteStream/Write",requestStream:!0,responseStream:!1,requestType:google_bytestream_bytestream_pb.WriteRequest,responseType:google_bytestream_bytestream_pb.WriteResponse,requestSerialize:serialize_google_bytestream_WriteRequest,requestDeserialize:deserialize_google_bytestream_WriteRequest,responseSerialize:serialize_google_bytestream_WriteResponse,responseDeserialize:deserialize_google_bytestream_WriteResponse},queryWriteStatus:{path:"/google.bytestream.ByteStream/QueryWriteStatus",requestStream:!1,responseStream:!1,requestType:google_bytestream_bytestream_pb.QueryWriteStatusRequest,responseType:google_bytestream_bytestream_pb.QueryWriteStatusResponse,requestSerialize:serialize_google_bytestream_QueryWriteStatusRequest,requestDeserialize:deserialize_google_bytestream_QueryWriteStatusRequest,responseSerialize:serialize_google_bytestream_QueryWriteStatusResponse,responseDeserialize:deserialize_google_bytestream_QueryWriteStatusResponse}};exports.ByteStreamClient=grpc.makeGenericClientConstructor(ByteStreamService);