syntax = "proto3"; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; package vet; option go_package = "github.com/hub335/petclinic-protobuf/vet"; service VetService { rpc CreateVet(VetCreateRequest) returns (google.protobuf.StringValue); rpc UpdateVet(VetUpdateRequest) returns (google.protobuf.BoolValue); rpc DeleteVet(google.protobuf.StringValue) returns (google.protobuf.Empty); rpc GetVetByPid(google.protobuf.StringValue) returns (Vet); rpc GetVetsByPids(VetStringsRequest) returns (Vets); rpc AddSpecialties(VetSpecialtyRequest) returns (google.protobuf.Empty); rpc RemoveSpecialties(VetSpecialtyRequest) returns (google.protobuf.Empty); rpc AddNewSpecialty(google.protobuf.StringValue) returns (google.protobuf.StringValue); rpc GetAllSpecialties(SpecialtyPageableRequest) returns (SpecialtyPageableResponse); rpc GetSpecialtyByPid(google.protobuf.StringValue) returns (Specialty); rpc GetSpecialtiesByPids(VetStringsRequest) returns (Specialties); } message VetCreateRequest { google.protobuf.StringValue familyName = 1; google.protobuf.StringValue givenName = 2; string password = 3; string email = 4; google.protobuf.StringValue phoneNumber = 5; repeated string specialties = 6; } message VetUpdateRequest { google.protobuf.StringValue familyName = 1; google.protobuf.StringValue givenName = 2; google.protobuf.StringValue email = 4; google.protobuf.StringValue phoneNumber = 5; string pid = 3; } message Vet { string pid = 1; google.protobuf.StringValue familyName = 2; google.protobuf.StringValue givenName = 3; string email = 5; google.protobuf.StringValue phoneNumber = 4; repeated string specialties = 6; } message Vets { repeated Vet Vets = 1; } message VetStringsRequest { repeated string requests = 1; } message Specialty { string pid = 1; string name = 2; } message Specialties { repeated Specialty specialties = 1; } message VetSpecialtyRequest { string vetPid = 1; repeated string specialties = 2; } message SpecialtyPageableRequest { google.protobuf.Int64Value numberPerPage = 1; google.protobuf.StringValue lastItemId = 2; } message SpecialtyPageableResponse { repeated Specialty data = 1; google.protobuf.Int64Value numberPerPage = 2; google.protobuf.StringValue lastItemId = 3; google.protobuf.Int64Value total = 4; google.protobuf.Int64Value noOfItemsInBatch = 5; }