syntax = "proto3";

package stockquote;

option java_multiple_files = true;
option java_package = "com.baeldung.grpc.streaming";
option java_outer_classname = "StockQuoteProto";
option objc_class_prefix = "RTG";

service StockQuoteProvider {
  
  rpc serverSideStreamingGetListStockQuotes(Stock) returns (stream StockQuote) {}

  rpc clientSideStreamingGetStatisticsOfStocks(stream Stock) returns (StockQuote) {}
  
  rpc bidirectionalStreamingGetListsStockQuotes(stream Stock) returns (stream StockQuote) {}
}

message Stock {
   string ticker_symbol = 1;
   string company_name = 2;
   string description = 3;
}

message StockQuote {
   double price = 1;
   int32 offer_number = 2;
   string description = 3;
}
