// GENERATED CODE -- DO NOT EDIT!

// Original file comments:
// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
'use strict';
var grpc = require('grpc');
var dlt_service_pb = require('./dlt_service_pb.js');
var context_pb = require('./context_pb.js');

function serialize_context_Empty(arg) {
  if (!(arg instanceof context_pb.Empty)) {
    throw new Error('Expected argument of type context.Empty');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_context_Empty(buffer_arg) {
  return context_pb.Empty.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_context_TeraFlowController(arg) {
  if (!(arg instanceof context_pb.TeraFlowController)) {
    throw new Error('Expected argument of type context.TeraFlowController');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_context_TeraFlowController(buffer_arg) {
  return context_pb.TeraFlowController.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_dlt_DltPeerStatus(arg) {
  if (!(arg instanceof dlt_service_pb.DltPeerStatus)) {
    throw new Error('Expected argument of type dlt.DltPeerStatus');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_dlt_DltPeerStatus(buffer_arg) {
  return dlt_service_pb.DltPeerStatus.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_dlt_DltPeerStatusList(arg) {
  if (!(arg instanceof dlt_service_pb.DltPeerStatusList)) {
    throw new Error('Expected argument of type dlt.DltPeerStatusList');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_dlt_DltPeerStatusList(buffer_arg) {
  return dlt_service_pb.DltPeerStatusList.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_dlt_DltRecord(arg) {
  if (!(arg instanceof dlt_service_pb.DltRecord)) {
    throw new Error('Expected argument of type dlt.DltRecord');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_dlt_DltRecord(buffer_arg) {
  return dlt_service_pb.DltRecord.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_dlt_DltRecordEvent(arg) {
  if (!(arg instanceof dlt_service_pb.DltRecordEvent)) {
    throw new Error('Expected argument of type dlt.DltRecordEvent');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_dlt_DltRecordEvent(buffer_arg) {
  return dlt_service_pb.DltRecordEvent.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_dlt_DltRecordId(arg) {
  if (!(arg instanceof dlt_service_pb.DltRecordId)) {
    throw new Error('Expected argument of type dlt.DltRecordId');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_dlt_DltRecordId(buffer_arg) {
  return dlt_service_pb.DltRecordId.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_dlt_DltRecordStatus(arg) {
  if (!(arg instanceof dlt_service_pb.DltRecordStatus)) {
    throw new Error('Expected argument of type dlt.DltRecordStatus');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_dlt_DltRecordStatus(buffer_arg) {
  return dlt_service_pb.DltRecordStatus.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_dlt_DltRecordSubscription(arg) {
  if (!(arg instanceof dlt_service_pb.DltRecordSubscription)) {
    throw new Error('Expected argument of type dlt.DltRecordSubscription');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_dlt_DltRecordSubscription(buffer_arg) {
  return dlt_service_pb.DltRecordSubscription.deserializeBinary(new Uint8Array(buffer_arg));
}


var DltGatewayServiceService = exports.DltGatewayServiceService = {
  recordToDlt: {
    path: '/dlt.DltGatewayService/RecordToDlt',
    requestStream: false,
    responseStream: false,
    requestType: dlt_service_pb.DltRecord,
    responseType: dlt_service_pb.DltRecordStatus,
    requestSerialize: serialize_dlt_DltRecord,
    requestDeserialize: deserialize_dlt_DltRecord,
    responseSerialize: serialize_dlt_DltRecordStatus,
    responseDeserialize: deserialize_dlt_DltRecordStatus,
  },
  getFromDlt: {
    path: '/dlt.DltGatewayService/GetFromDlt',
    requestStream: false,
    responseStream: false,
    requestType: dlt_service_pb.DltRecordId,
    responseType: dlt_service_pb.DltRecord,
    requestSerialize: serialize_dlt_DltRecordId,
    requestDeserialize: deserialize_dlt_DltRecordId,
    responseSerialize: serialize_dlt_DltRecord,
    responseDeserialize: deserialize_dlt_DltRecord,
  },
  subscribeToDlt: {
    path: '/dlt.DltGatewayService/SubscribeToDlt',
    requestStream: false,
    responseStream: true,
    requestType: dlt_service_pb.DltRecordSubscription,
    responseType: dlt_service_pb.DltRecordEvent,
    requestSerialize: serialize_dlt_DltRecordSubscription,
    requestDeserialize: deserialize_dlt_DltRecordSubscription,
    responseSerialize: serialize_dlt_DltRecordEvent,
    responseDeserialize: deserialize_dlt_DltRecordEvent,
  },
  getDltStatus: {
    path: '/dlt.DltGatewayService/GetDltStatus',
    requestStream: false,
    responseStream: false,
    requestType: context_pb.TeraFlowController,
    responseType: dlt_service_pb.DltPeerStatus,
    requestSerialize: serialize_context_TeraFlowController,
    requestDeserialize: deserialize_context_TeraFlowController,
    responseSerialize: serialize_dlt_DltPeerStatus,
    responseDeserialize: deserialize_dlt_DltPeerStatus,
  },
  getDltPeers: {
    path: '/dlt.DltGatewayService/GetDltPeers',
    requestStream: false,
    responseStream: false,
    requestType: context_pb.Empty,
    responseType: dlt_service_pb.DltPeerStatusList,
    requestSerialize: serialize_context_Empty,
    requestDeserialize: deserialize_context_Empty,
    responseSerialize: serialize_dlt_DltPeerStatusList,
    responseDeserialize: deserialize_dlt_DltPeerStatusList,
  },
};

exports.DltGatewayServiceClient = grpc.makeGenericClientConstructor(DltGatewayServiceService);
